/* Tami phase-colour backgrounds and responsive presentation. */
:root {
  --paper:#FAF6ED; --surface:#FFFDF9; --ink:#222426;
  --coral:#C46568; --sage:#73977E; --gold:#BD9134; --blue:#6F9FBC;
  --period-page:#F5E2E1; --resting-page:#E7F0E8;
  --fertile-page:#F6EDCF; --preparing-page:#E5F0F6;
  --period-quiet:#FAECEA; --resting-quiet:#EDF4EF;
  --fertile-quiet:#FCF3DC; --preparing-quiet:#EDF5F9;
}
.site-header { background:#FAF6ED; }
:focus-visible { outline-color:#93434A; }
.hero {
  display:grid; grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);
  gap:clamp(24px,4vw,70px); min-height:calc(100svh - var(--header));
  padding:54px var(--gutter) 68px; background:var(--paper);
}
.hero::before { display:none; }
.hero-copy { width:100%; max-width:620px; opacity:1; transform:none; }
.hero h1 { font-size:clamp(3.6rem,6.2vw,6.6rem); }
.hero-lede { max-width:540px; }
.hero-copy .eyebrow { color:#45644E; }
.hero-app-art { position:relative; z-index:1; width:100%; max-width:500px; height:600px; justify-self:end; }
.hero-real-phone { position:absolute; top:0; right:0; width:310px; max-width:73%; height:auto; filter:drop-shadow(0 16px 18px #30251e20); }
.hero-original-tami { position:absolute; left:1%; bottom:26px; width:155px; max-width:32%; height:auto; }
.hero-phase-waves { position:absolute; z-index:0; inset:0; overflow:hidden; pointer-events:none; }
.hero-phase-waves i,.story-phase-waves i { position:absolute; display:block; border-radius:48% 52% 0 0; pointer-events:none; }
.hero-phase-waves .wave-period { background:var(--period-page); width:72%; height:70%; right:-23%; top:-5%; transform:rotate(-12deg); }
.hero-phase-waves .wave-resting { background:var(--resting-page); width:112%; height:260px; right:-37%; bottom:-110px; transform:rotate(-12deg); }
.hero-phase-waves .wave-fertile { background:var(--fertile-page); width:100%; height:210px; right:-30%; bottom:-140px; transform:rotate(-9deg); }
.hero-phase-waves .wave-preparing { background:var(--preparing-page); width:106%; height:170px; right:-22%; bottom:-145px; transform:rotate(-6deg); }

.experience { position:relative; background:#F8F6F3; }
.cycle-story { isolation:isolate; clip-path:inset(0); background:#F8F6F3; padding-top:90px; }
.cycle-story::after { content:""; position:absolute; z-index:0; right:0; bottom:0; left:0; height:100px; pointer-events:none; background:linear-gradient(transparent,#F8F6F3); }
.story-phase-waves { position:fixed; z-index:0; top:var(--header); right:0; bottom:0; left:0; overflow:hidden; pointer-events:none; }
.story-phase-waves .wave-period { background:var(--period-quiet); width:70%; height:30%; right:-18%; top:-22%; transform:rotate(-8deg); }
.story-phase-waves .wave-resting { background:var(--resting-quiet); width:90%; height:38%; left:-31%; top:20%; transform:rotate(17deg); border-radius:0 55% 8% 0; }
.story-phase-waves .wave-preparing { background:var(--preparing-quiet); width:105%; height:28%; right:-38%; bottom:-14%; transform:rotate(-11deg); }
.story-phase-waves .wave-fertile { background:var(--fertile-quiet); width:75%; height:16%; left:-25%; bottom:-12%; transform:rotate(8deg); }
.story-intro h2 { max-width:1100px; font-size:clamp(3rem,5.1vw,5.3rem); }
.story-intro h2 em { color:var(--coral); }
.desktop-story { grid-template-columns:minmax(0,1fr) minmax(0,.85fr); gap:6%; }
.story-chapter h3 { font-size:clamp(2.8rem,4.2vw,4.8rem); }
.story-chapter::after { display:none; }
.cycle-story { --tone:var(--sage); --tone-text:#294C38; --tone-soft:var(--resting-page); }
.cycle-story[data-tone="preparing"] { --tone:var(--blue); --tone-soft:var(--preparing-page); }
.cycle-story[data-tone="period"] { --tone:var(--coral); --tone-soft:var(--period-page); }
.cycle-story[data-tone="fertility"] { --tone:var(--gold); --tone-soft:var(--fertile-page); }
.phase-name { color:var(--tone-text); }
.roadmap-preview { background:linear-gradient(#F8F6F3,var(--preparing-quiet)); }

@media (min-width:721px) and (max-width:1100px) {
  .hero { gap:22px; min-height:680px; padding-top:42px; padding-bottom:48px; }
  .hero h1 { font-size:clamp(3.3rem,6.5vw,4.9rem); }
  .hero-app-art { height:520px; }
  .hero-real-phone { width:270px; max-width:68%; }
  .hero-original-tami { width:125px; max-width:28%; left:0; bottom:40px; }
  .hero-lede { font-size:1.04rem; }
  .site-nav { gap:18px; }
  .story-chapter h3 { font-size:clamp(2.5rem,4.5vw,3.5rem); }
  .keep-together { white-space:normal; }
}
@media (max-width:720px) {
  .experience { clip-path:none; background:#F8F6F3; }
  .hero { display:flex; flex-direction:column; align-items:stretch; gap:24px; min-height:0; padding:32px 24px 16px; }
  .hero-copy { max-width:none; }
  .hero h1 { font-size:clamp(3rem,14.5vw,4.5rem); margin-bottom:22px; }
  .hero-copy .eyebrow { font-size:.68rem; margin-bottom:16px; line-height:1.55; }
  .hero-lede { font-size:1rem; margin-bottom:22px; line-height:1.65; }
  .hero-actions { flex-direction:row; align-items:center; gap:14px 18px; }
  .hero .play-button { width:160px; }
  .hero .text-link { font-size:.86rem; display:inline-flex; align-items:center; min-height:44px; }
  .hero-trust { margin-top:16px; font-size:.68rem; max-width:none; }
  .hero-app-art { align-self:center; width:min(100%,380px); height:clamp(350px,104vw,430px); margin-top:0; }
  .hero-real-phone { width:230px; max-width:68%; }
  .hero-original-tami { width:100px; max-width:29%; left:1%; bottom:22px; }
  .hero-phase-waves .wave-period { width:95%; height:33%; top:auto; bottom:5%; right:-28%; transform:rotate(-12deg); }
  .hero-phase-waves .wave-resting { width:130%; right:-17%; bottom:-60px; height:160px; }
  .hero-phase-waves .wave-fertile { width:130%; right:-26%; bottom:-100px; height:170px; }
  .hero-phase-waves .wave-preparing { width:130%; right:-28%; bottom:-120px; height:160px; }
  .cycle-story { padding-top:0; }
  .story-intro { padding:54px 24px 36px; }
  .story-intro h2 { font-size:clamp(2rem,8.4vw,3rem); line-height:1.07; }
  .desktop-story { display:block; padding:0 18px; }
  .story-chapter h3 { font-size:clamp(2.1rem,9.6vw,3.2rem); }
  .story-chapter::before { border:0; background:rgba(248,246,243,.96); box-shadow:none; backdrop-filter:none; }
  .story-phase-waves .wave-resting { width:150%; left:-85%; top:14%; height:43%; transform:rotate(16deg); }
  .story-phase-waves .wave-period { width:90%; top:-23%; right:-35%; height:30%; }
  .story-phase-waves .wave-preparing { width:140%; right:-60%; bottom:-8%; height:23%; }
  .story-phase-waves .wave-fertile { width:110%; left:-40%; bottom:-13%; height:19%; }
  .roadmap-preview { padding-top:42px; background:linear-gradient(#F8F6F3,var(--preparing-quiet)); }
  .health-boundary { color:#454C48; }
}
@media (max-width:340px) {
  .story-chapter h3 { font-size:2rem; line-height:1.02; }
}
@media (prefers-reduced-motion:reduce) {
  .story-chapter,.story-chapter.is-active { opacity:1!important; }
  .hero-app-art,.hero-copy { transform:none!important; }
}
@media (prefers-reduced-motion:reduce) and (max-width:720px) {
  .story-chapter,.story-chapter.is-active { opacity:var(--chapter-opacity,0)!important; }
}

/* Background-only variation: broad, horizontal ribbons from the Facebook banner.
   Artwork, copy, sizing and scroll behaviour above remain unchanged. */
.hero-phase-waves { background:url("assets/banner-flow-hero.svg?v=connected") center / 100% 100% no-repeat; }
.story-phase-waves { background:url("assets/banner-flow-story.svg?v=connected") center / 100% 100% no-repeat; }
.hero-phase-waves i,.story-phase-waves i { display:none; }
@media (max-width:720px) {
  .hero-phase-waves { background-image:url("assets/banner-flow-hero-mobile.svg?v=connected"); }
  /* Give the copy room to travel naturally before its mid-screen fade. */
  .story-chapter { display:block; min-height:115svh; padding:18svh 20px 7vh; }
  .story-chapter::before { display:none; }
  .mobile-phase-copy { position:relative; isolation:isolate; }
  .mobile-phase-copy::before { content:""; position:absolute; z-index:-1; inset:-18px -12px; border-radius:26px; background:rgba(248,246,243,.96); pointer-events:none; }
  .mobile-phase-copy > p:last-child { margin-bottom:0; max-width:460px; color:#303432; font-size:1rem; }
}

/* One stationary composition spans the hero, feature sequence and notebook.
   Clipping it to their shared wrapper keeps it out of the privacy section. */
.experience { isolation:isolate; clip-path:inset(0); background:var(--paper); }
.experience-phase-waves {
  position:fixed; z-index:0; top:var(--header); right:0; bottom:0; left:0;
  pointer-events:none;
  background:url("assets/banner-flow-hero.svg?v=connected") center / 100% 100% no-repeat;
}
.hero-phase-waves,.story-phase-waves { display:none; }
.experience > .hero,.experience > .cycle-story,.experience > .roadmap-preview {
  position:relative; z-index:1; background:transparent;
}
.cycle-story::after { display:none; }
@media (max-width:720px) {
  .experience-phase-waves { background-image:url("assets/banner-flow-hero-mobile.svg?v=connected"); }
}
