/* ==========================================================================
   Always Carry Bubbles — Global Styles
   ========================================================================== */

/* Google Fonts: Montserrat throughout */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  color: #e8e8e8;
  background: #0a0a0a;
}

section {
  padding: 5rem 2rem;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Navigation */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(10, 10, 10, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: #e8e8e8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.nav-link:hover,
.nav-link:focus {
  color: #ffffff;
  opacity: 1;
}

.nav-link.active {
  color: #8b5cf6;
}

/* Tagline — two centered lines with iridescent bubble ellipses */
.tagline {
  text-align: center;
  margin-top: 2rem;
  line-height: 1.4;
}

.tagline-line {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tagline-line:first-child {
  margin-bottom: 0.25rem;
}

.bubbles {
  display: inline-block;
  margin: 0 0.75rem;
}

.bubble {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 50%;
  margin: 0 2px;
  vertical-align: middle;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}

.bubble:nth-child(1) {
  background: radial-gradient(circle at 30% 30%, #ffffff, #ff9a9e 40%, #fecfef 70%, #fecfef 100%);
}

.bubble:nth-child(2) {
  background: radial-gradient(circle at 30% 30%, #ffffff, #a1c4fd 40%, #c2e9fb 70%, #c2e9fb 100%);
}

.bubble:nth-child(3) {
  background: radial-gradient(circle at 30% 30%, #ffffff, #d4fc79 40%, #96e6a1 70%, #96e6a1 100%);
}

/* Home — Full-screen background */
.home-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #ffffff;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.home-hero > * {
  position: relative;
  z-index: 2;
}

.home-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.home-subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  margin-bottom: 2rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.home-support {
  font-size: 1.1rem;
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  margin-top: 1.5rem;
  max-width: 600px;
}

/* Artwork integration — Home full-screen background */
.home-bg-artwork {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Artwork integration — Bubble Alchemist portrait */
.alchemist-portrait {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0 auto 1.5rem auto;
}

/* Section Layout */
.section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
}

.section-intro {
  font-size: 1.1rem;
  font-weight: 400;
  color: #b0b0b0;
  max-width: 700px;
  margin: 0 auto;
}

.light-section {
  background: #1a1a1a;
}

/* Cards / Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.card-body {
  font-size: 1rem;
  color: #b0b0b0;
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: #8b5cf6;
  color: #ffffff;
}

.btn-primary:hover {
  background: #7c3aed;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Footer */
footer {
  background: #050505;
  padding: 4rem 2rem 2rem;
  text-align: center;
  color: #8a8a8a;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-tagline {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Mobile nav toggle button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  position: relative;
  transition: background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: #ffffff;
  transition: transform 0.3s ease;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  bottom: -7px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .hamburger,
  .hamburger::before,
  .hamburger::after {
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  .card {
    transition: none;
  }
  .btn {
    transition: none;
  }
  .nav-link {
    transition: none;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    padding: 1.5rem 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    padding: 1.5rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .nav-menu.open .nav-link {
    opacity: 1;
  }

  .home-title {
    font-size: 2.5rem;
  }

  .tagline-line {
    font-size: 1.5rem;
  }

  .section {
    padding: 3rem 1.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .bubble {
    width: 12px;
    height: 12px;
  }

  /* Prevent horizontal overflow at the source on narrow screens */
  .content-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card {
    max-width: 100%;
  }

  /* Ensure no element exceeds viewport width */
  * {
    max-width: 100vw;
  }
}

/* Logo as clickable brand link (separate from Home nav item) */
.nav-logo-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.nav-logo-link:hover {
  opacity: 0.9;
}

/* Layout variety — card modifiers to break up identical text cards */
.card--featured {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.card--wide {
  grid-column: 1 / -1;
}

.card--image {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card--image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 1rem;
}

/* Lead text */
.text-lead {
  font-size: 1.25rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.6;
}

/* Two-column content within cards */
.content-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .content-two-col {
    grid-template-columns: 1fr;
  }
}

/* Featured section header */
.section--featured .section-title {
  font-size: 3rem;
}

/* Bubble Alchemist portrait — responsive scaling */
.alchemist-portrait {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .alchemist-portrait {
    max-width: 90%;
    border-radius: 8px;
  }
}

/* Missing image fallback */
.image-placeholder {
  width: 100%;
  max-width: 480px;
  height: 320px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
  margin: 0 auto 1.5rem auto;
}