/* Mood Flower — landing page
   Palette: dusk. Aubergine ground, cream type, coral/apricot/saffron/lilac accents. */
:root {
  --ground: #170b22;
  --ground-2: #24113a;
  --cream: #fff3e6;
  --cream-dim: #d9c8d8;
  --coral: #ff5e8a;
  --apricot: #ffb57a;
  --saffron: #ffd166;
  --lilac: #b9a4ff;
  --display: "Fraunces", Georgia, serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--ground); color-scheme: dark; scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--cream);
  background: var(--ground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--apricot); text-underline-offset: 3px; }
a:hover { color: var(--saffron); }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--cream); color: var(--ground); padding: 10px 14px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 14px;
  background: linear-gradient(to bottom, rgba(23, 11, 34, 0.85), rgba(23, 11, 34, 0));
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 1.2rem; font-weight: 520;
  color: var(--cream); text-decoration: none;
}
.brand-mark {
  width: 22px; height: 22px; border-radius: 50%;
  background: conic-gradient(var(--coral), var(--apricot), var(--saffron), var(--lilac), var(--coral));
  box-shadow: 0 0 18px rgba(255, 94, 138, 0.5);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  background: linear-gradient(135deg, var(--coral), var(--apricot));
  color: #2a0f1d; font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 30px rgba(255, 94, 138, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { color: #2a0f1d; transform: translateY(-2px); box-shadow: 0 14px 36px rgba(255, 94, 138, 0.45); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 0.95rem; }

.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 30; }
.progress i {
  display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--coral), var(--saffron), var(--lilac));
}

/* The scroll-driven bloom */
.track { position: relative; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; z-index: 0;
  background: var(--ground);
}
.bloom { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; display: block; }
/* The film, when the file exists, fades in over the drawn bloom and takes over. */
.film {
  position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.6s ease;
  will-change: transform;
}
@media (min-width: 761px) {
  .film {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
  }
}
.film-on .film { opacity: 1; }
.film-on .bloom { opacity: 0; }

.veil {
  position: absolute; z-index: 3; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(23, 11, 34, 0) 30%, rgba(23, 11, 34, 0.6) 100%),
    linear-gradient(to bottom, rgba(23, 11, 34, 0.55), rgba(23, 11, 34, 0) 22%, rgba(23, 11, 34, 0) 78%, rgba(23, 11, 34, 0.7));
}

/* Chapters sit over the stage in normal document flow */
.chapter {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 96px clamp(20px, 6vw, 96px);
}
.chapter-hero { margin-top: -100vh; margin-top: -100svh; }
.chapter-right { justify-content: flex-end; }
.chapter-end { justify-content: center; text-align: center; min-height: 120vh; }

.copy {
  max-width: 34rem;
  padding: clamp(20px, 3vw, 32px);
  border-radius: 28px;
  background: rgba(23, 11, 34, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 243, 230, 0.1);
}
.copy-center { max-width: 40rem; }
.chapter-hero .copy { max-width: 40rem; background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; padding-left: 0; }

.eyebrow {
  margin: 0 0 14px; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--apricot);
}
h1, h2 { font-family: var(--display); font-weight: 450; line-height: 1.06; margin: 0 0 18px; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.8rem, 8vw, 5.6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
h1 em, h2 em {
  font-style: italic; font-weight: 400;
  background: linear-gradient(100deg, var(--coral), var(--apricot) 55%, var(--saffron));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.copy p { margin: 0 0 14px; color: var(--cream-dim); font-size: clamp(1rem, 1.6vw, 1.12rem); }
.lede { font-size: clamp(1.05rem, 2vw, 1.3rem) !important; color: var(--cream) !important; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 26px; }
.actions-center { justify-content: center; }
.hint { font-size: 0.9rem; color: var(--cream-dim); }

.chips { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  color: var(--c); border: 1.5px solid var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
}

.fine { margin-top: 36px !important; font-size: 0.85rem !important; line-height: 1.55; }

.foot {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  padding: 28px clamp(20px, 6vw, 96px) calc(28px + env(safe-area-inset-bottom));
  background: var(--ground); color: var(--cream-dim); font-size: 0.9rem;
  border-top: 1px solid rgba(255, 243, 230, 0.08);
}
.foot nav { display: flex; gap: 18px; }

@media (max-width: 760px) {
  .chapter, .chapter-right { justify-content: center; align-items: flex-end; padding-bottom: 12vh; }
  .chapter-hero { align-items: center; }
  .copy { max-width: 100%; }
  .hint { display: none; }
}

/* Reduced motion: a calm static page with the bloom fully open, still fully readable. */
.still .stage { position: relative; height: 70vh; }
.still .chapter-hero { margin-top: -50vh; }
.still .progress { display: none; }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
