/* Above-the-fold critical styles , inlined in production build */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600 700;
  font-display: optional;
  src: url('/assets/fonts/cormorant-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url('/assets/fonts/source-sans-3-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --pink-logo: #eda0c0;
  --pink-logo-deep: #d886a8;
  --pink: #fec2e7;
  --header-pink: #fceef5;
  --pink-border: #e8aac4;
  --pink-glow: rgba(237, 160, 192, 0.42);
  --pink-soft: rgba(237, 160, 192, 0.18);
  --gold: #ad7a2e;
  --gold-light: #c9953d;
  --gold-dark: #8f6324;
  --ink: #1a1714;
  --ink-soft: #3d3835;
  --ink-muted: #3f3a37;
  --white: #ffffff;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 32px rgba(26, 23, 20, 0.08);
  --nav-h: 96px;
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: auto; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--ink-soft);
  background: var(--header-pink);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-dark); text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}

.page-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

main:has(> .page-hero) {
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
}

.puzzle-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.hero-puzzle-wrap {
  opacity: 1;
  transform: none;
}

.hero-puzzle {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.puzzle-board {
  position: relative;
  width: 100%;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid rgba(236, 185, 204, 0.8);
  border-radius: var(--radius-lg);
  box-shadow:
    0 20px 48px rgba(26, 23, 20, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  overflow: visible;
}

.puzzle-grid-area {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, 68px);
  grid-template-rows: repeat(3, 68px);
  justify-content: center;
  gap: 5px;
  padding: 10px 12px 8px;
}

.puzzle-slot {
  position: relative;
  width: 100%;
  height: 100%;
  border: 2px dashed var(--pink-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.puzzle-slot-ghost {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-dark);
  opacity: 0.52;
  pointer-events: none;
}

.puzzle-tray {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  border-top: 2px dashed var(--pink-border);
  background: rgba(254, 244, 250, 0.96);
  padding: 8px 12px 10px;
}

.puzzle-tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 8px;
}

.puzzle-tray-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.puzzle-counter {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-dark);
}

.puzzle-skeleton-pieces {
  display: grid;
  grid-template-columns: repeat(3, 50px);
  grid-template-rows: repeat(3, 50px);
  gap: 4px;
  justify-content: center;
  padding: 8px;
}

.puzzle-skeleton-piece {
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: rgba(254, 194, 231, 0.38);
  border: 1px dashed rgba(237, 160, 192, 0.75);
}

.puzzle-hint-text {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--gold-dark);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  box-sizing: border-box;
  background: var(--header-pink);
  border-bottom: 1px solid rgba(237, 160, 192, 0.35);
  box-shadow: 0 2px 16px rgba(237, 160, 192, 0.12);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-h);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink);
  min-width: 0;
}

.logo-icon {
  width: clamp(48px, 7.5vw, 68px);
  height: clamp(48px, 7.5vw, 68px);
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
}

.logo-wordmark-main {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.menu-toggle { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink-logo), var(--pink-logo-deep));
  color: var(--white);
  border-color: var(--pink-logo-deep);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--gold-dark);
  border: 2px solid var(--pink-logo);
}

.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

.hero, .hero-premium {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 0.75rem);
  padding-right: 1.5rem;
  padding-bottom: 2.5rem;
  padding-left: 1.5rem;
  overflow: hidden;
  background: transparent;
}

.hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.35rem, 5.5vw, 3.65rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-line {
  display: block;
  opacity: 1;
  transform: none;
}

.hero-line-accent em {
  font-style: normal;
  font-weight: 700;
  color: #7a5520;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--ink);
  margin: 1.25rem 0 1.75rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.page-hero,
.page-hero-premium {
  position: relative;
  overflow: hidden;
  padding-top: 2.75rem;
  padding-right: 1.5rem;
  padding-bottom: 3.75rem;
  padding-left: 1.5rem;
  text-align: center;
  background: transparent;
}

.page-hero .page-hero-inner.reveal {
  opacity: 1;
  transform: none;
}

.page-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-hero-title {
  font-size: clamp(2.15rem, 5vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  opacity: 1;
  transform: none;
}

.page-hero-lead {
  font-size: 1.08rem;
  color: var(--ink);
  max-width: 640px;
  margin: 1.15rem auto 0;
}

@media (max-width: 1024px) {
  :root {
    --nav-h: 84px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 76px;
  }
}

@media (max-width: 1024px) {
  .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(237, 160, 192, 0.45);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding:
      calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 1.25rem)
      max(1.25rem, env(safe-area-inset-right, 0px))
      max(1.5rem, env(safe-area-inset-bottom, 0px))
      max(1.25rem, env(safe-area-inset-left, 0px));
    list-style: none;
    background-color: #fceef5;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    transition: none;
    overflow-y: auto;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    filter: none !important;
  }

  html.mobile-menu-open .page-wrap > main,
  html.mobile-menu-open .page-wrap > footer,
  html.mobile-menu-open .page-wrap > .site-footer,
  html.mobile-menu-open .puzzle-field,
  html.mobile-menu-open .sparkle-canvas,
  html.mobile-menu-open .sparkle-canvas-overlay,
  html.mobile-menu-open .nav-backdrop,
  html.mobile-menu-open .cookie-banner {
    display: none !important;
  }

  html.mobile-menu-open .page-wrap {
    z-index: 600;
    pointer-events: none;
  }

  html.mobile-menu-open .site-header {
    visibility: hidden;
    pointer-events: none;
  }

  .mobile-menu-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 700;
    height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
    padding:
      env(safe-area-inset-top, 0px)
      max(1.1rem, env(safe-area-inset-right, 0px))
      0
      max(1.25rem, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    background: #fceef5;
    border-bottom: 1px solid rgba(237, 160, 192, 0.35);
  }

  html.mobile-menu-open .mobile-menu-bar {
    display: flex;
  }

  .mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(237, 160, 192, 0.45);
    border-radius: 50%;
    background: #ffffff;
    color: var(--ink);
    -webkit-appearance: none;
    appearance: none;
  }

  .mobile-menu-close-glyph {
    font-size: 1.65rem;
    line-height: 1;
  }

  .nav-links.open {
    display: flex;
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
    max-width: 420px;
    opacity: 1 !important;
    transform: none !important;
    position: relative;
    z-index: 1;
    filter: none !important;
  }

  .nav-links a {
    width: 100%;
    padding: 1rem 1.35rem;
    font-size: 1.08rem;
    text-align: center;
    border-radius: var(--radius);
    background-color: #ffffff !important;
    border: 1px solid rgba(237, 160, 192, 0.45);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    filter: none !important;
  }

  .site-header.menu-open {
    z-index: 510;
    background: #fceef5;
  }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero,
  .hero-premium {
    min-height: auto;
    max-height: none;
    align-items: flex-start;
    padding-bottom: 1.75rem;
  }

  .hero-inner {
    gap: 0;
  }

  .hero-home > .hero-orbit,
  .hero-home > .hero-thread {
    display: none;
  }

  .hero-home .hero.hero-premium .hero-inner {
    text-align: left;
  }

  .hero-home .hero.hero-premium .hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1rem 0.85rem 1.1rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(237, 160, 192, 0.38);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 36px rgba(26, 23, 20, 0.07);
    box-sizing: border-box;
  }

  .hero-home .hero.hero-premium .hero-chips {
    display: none;
  }

  .hero-puzzle-band {
    padding: 0 1.25rem 2rem;
  }

  .site-footer[data-site-footer] {
    contain: layout style;
  }

  .hero-puzzle-band .puzzle-board[data-puzzle-board] {
    height: 360px;
    min-height: 360px;
    max-height: 360px;
    overflow: hidden;
  }

  .hero-puzzle-band .puzzle-board[data-puzzle-board].puzzle-ready {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.hero-home {
  position: relative;
  overflow: hidden;
  content-visibility: visible;
}

.hero-puzzle-band,
.hero-puzzle-wrap,
.hero-puzzle {
  content-visibility: visible;
}

@media (min-width: 769px) {
  .hero-home {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem 3.5rem;
    align-items: center;
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding:
      calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 0.75rem)
      1.5rem
      2.5rem;
  }

  .hero-home > .hero.hero-premium {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    max-height: none;
    padding: 0;
  }

  .hero-home > .hero-puzzle-band {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .hero-home > .hero-orbit,
  .hero-home > .hero-thread {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .hero-home > .hero-scroll {
    grid-column: 1 / -1;
    grid-row: 2;
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    justify-self: center;
    margin: 0;
    padding: 0.35rem 0 0.75rem;
    z-index: 2;
  }

  .hero-home .hero-content {
    max-width: none;
  }

  .hero-home .hero.hero-premium .hero-content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    max-width: none;
    margin: 0;
  }

  .hero-home .hero.hero-premium .hero-inner {
    grid-template-columns: 1fr;
    max-width: none;
    text-align: left;
  }

  .hero-home .hero.hero-premium .hero-chips {
    display: flex;
    justify-content: flex-start;
  }

  .hero-home .hero.hero-premium .hero-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-home .hero.hero-premium .hero-actions .btn {
    flex: 0 1 auto;
    width: auto;
  }

  .hero-home .hero.hero-premium .hero-lead {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

.page-spotlight-frame {
  aspect-ratio: 3 / 4;
  min-height: 280px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr));
  gap: 2.5rem 2rem;
}

.reveal,
.journey-step {
  opacity: 1;
  transform: none;
}
