/* Layout: flat sand page, one soft glow at the top. The cycle wave is the one bold element;
   the community band is the one dark surface. Phones carry real app screens. */
:root {
  --ground: #F5EFE6; --raised: #FBF8F3; --linen: #E6DCCB;
  --ink: #2B2B2B; --muted: #5E5A55; --hairline: rgba(43,43,43,0.14);
  --emerald: #1F4D3F; --on-emerald: #FFFFFF;
  --gold: #C9A35B; --gold-text: #7E5F24; --rose: #D8A7A0; --rose-text: #8E534B;
  --period: #9B5A52; --mauve: #B79AA6;
  --glow: rgba(216,167,160,0.50);
  --band: #143329; --band-fg: #F5EFE6; --band-muted: rgba(245,239,230,0.72); --band-line: rgba(245,239,230,0.16); --band-chip: rgba(245,239,230,0.10); --band-accent: #D6B472;
  --field: #FFFFFF; --shadow: 0 18px 50px rgba(31,77,63,0.16);
  --phone-ink: #2B2B2B; --phone-edge: #0c0c0c;
  --display: Fraunces, Georgia, serif;
  --sans: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --arabic: Amiri, "Geeza Pro", "Noto Naskh Arabic", serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --ground: #10241E; --raised: #18332B; --linen: #23392F;
  --ink: #F3EEE6; --muted: #B9B4AA; --hairline: rgba(243,238,230,0.16);
  --emerald: #6FB59B; --on-emerald: #10241E;
  --gold: #D6B472; --gold-text: #D6B472; --rose: #E3B5AE; --rose-text: #E3B5AE;
  --period: #D99A91; --mauve: #C4A9B4;
  --glow: rgba(216,167,160,0.16);
  --band: #18332B; --band-fg: #F3EEE6; --band-muted: rgba(243,238,230,0.72); --band-line: rgba(243,238,230,0.16); --band-chip: rgba(243,238,230,0.08); --band-accent: #D6B472;
  --field: #0D1D18; --shadow: 0 18px 50px rgba(0,0,0,0.45);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --ground: #10241E; --raised: #18332B; --linen: #23392F;
  --ink: #F3EEE6; --muted: #B9B4AA; --hairline: rgba(243,238,230,0.16);
  --emerald: #6FB59B; --on-emerald: #10241E;
  --gold: #D6B472; --gold-text: #D6B472; --rose: #E3B5AE; --rose-text: #E3B5AE;
  --period: #D99A91; --mauve: #C4A9B4;
  --glow: rgba(216,167,160,0.16);
  --band: #18332B; --band-fg: #F3EEE6; --band-muted: rgba(243,238,230,0.72); --band-line: rgba(243,238,230,0.16); --band-chip: rgba(243,238,230,0.08); --band-accent: #D6B472;
  --field: #0D1D18; --shadow: 0 18px 50px rgba(0,0,0,0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
img { max-width: 100%; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; overflow-x: hidden; }
a { color: var(--emerald); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.04; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
h3 { font-size: 22px; line-height: 1.25; }
.lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: 34em; }
.label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-text); }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
section { padding-block: clamp(56px, 8vw, 104px); }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* Top */
.top { position: relative; isolation: isolate; overflow: hidden; overflow: clip; }
.top::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -340px; width: 1100px; height: 760px; margin-left: -550px; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.mark { font-family: var(--script); font-size: 38px; line-height: 1; color: var(--emerald); text-decoration: none; white-space: nowrap; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav__links a:hover { color: var(--emerald); }
.nav__links a.btn { color: var(--on-emerald); }
@media (max-width: 720px) { .nav__links a:not(.btn) { display: none; } .mark { font-size: 32px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--emerald); color: var(--on-emerald); font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 14px; }

.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 5vw, 72px); align-items: center; padding-block: clamp(24px, 4vw, 56px) clamp(48px, 7vw, 96px); }
.hero__copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero__phone { display: flex; justify-content: center; min-width: 0; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); } }

/* Lead form */
.lead { display: flex; flex-direction: column; gap: 10px; max-width: 480px; }
.lead__row { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: var(--field); border: 1px solid var(--hairline); box-shadow: 0 6px 20px rgba(31,77,63,0.08); }
.lead__row:focus-within { border-color: var(--emerald); }
.lead input { color: var(--ink); font: 400 16px/1.2 var(--sans); outline: none; }
.lead .lead__name { flex: none; min-height: 52px; padding: 0 20px; border-radius: 999px; background: var(--field); border: 1px solid var(--hairline); box-shadow: 0 6px 20px rgba(31,77,63,0.08); }
.lead .lead__name:focus { border-color: var(--emerald); }
.lead__row input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: 400 16px/1.2 var(--sans); padding: 0 14px; outline: none; }
.lead input::placeholder { color: var(--muted); }
.lead__note { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.lead__note svg { flex: none; margin-top: 3px; }
.lead__msg { font-size: 15px; font-weight: 500; }
.lead__msg[data-tone="error"] { color: var(--rose-text); }
.lead__msg[data-tone="ok"] { color: var(--emerald); }
@media (max-width: 440px) { .lead__row { flex-direction: column; border-radius: 26px; padding: 10px; } .lead__row input { min-height: 44px; } }

/* Phone: a generic modern handset frame. All sizes follow the phone's own width. */
.phone { width: min(320px, 76vw); container-type: inline-size; flex: none; }
.phone__body { position: relative; padding: 2.7cqw; border-radius: 17.5cqw; background: linear-gradient(145deg, #8a867f 0%, #3a3836 22%, #6b6761 48%, #262524 74%, #5a5651 100%); box-shadow: var(--shadow), inset 0 0 0 0.5cqw rgba(255,255,255,0.18); }
.phone__body::before, .phone__body::after { content: ""; position: absolute; width: 1cqw; border-radius: 1cqw; background: #45423e; }
.phone__body::before { left: -0.8cqw; top: 26%; height: 9%; box-shadow: 0 13cqw 0 #45423e; }
.phone__body::after { right: -0.8cqw; top: 31%; height: 14%; }
.phone__screen { position: relative; aspect-ratio: 402 / 874; overflow: hidden; border-radius: 15cqw; border: 1.1cqw solid var(--phone-edge); background: #F5EFE6; container-type: size; }
.phone__screen img { display: block; width: 100%; height: auto; max-width: none; }
.phone__status { position: absolute; z-index: 3; inset: 0 0 auto 0; height: 14.5cqw; display: flex; align-items: center; justify-content: space-between; padding: 0 8.5cqw 0 10cqw; color: var(--phone-ink); font: 600 4.4cqw/1 var(--sans); pointer-events: none; }
.phone__status::before { content: ""; position: absolute; left: 50%; top: 3.2cqw; width: 31cqw; height: 9cqw; margin-left: -15.5cqw; border-radius: 9cqw; background: #050505; }
.phone__status svg { height: 3.4cqw; width: auto; }
.phone--scroll .phone__status { background: linear-gradient(#F0DDD6 55%, rgba(240,221,214,0)); }

/* Hero phone: the four tabs slide past, flat, like swiping in the app. */
.reel { display: flex; height: 100%; animation: reel 18s cubic-bezier(.3,.7,.2,1) infinite; }
.reel img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; object-position: top; }
@keyframes reel { 0%, 19% { transform: translateX(0); } 24%, 43% { transform: translateX(-100%); } 48%, 67% { transform: translateX(-200%); } 72%, 94% { transform: translateX(-300%); } 99.5%, 100% { transform: translateX(-400%); } }
.tabs { position: absolute; z-index: 3; left: 5cqw; right: 5cqw; bottom: 3.6cqw; height: 15.4cqw; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; border-radius: 99cqw; background: rgba(255,255,255,0.78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 2cqw 6cqw rgba(31,77,63,0.16), inset 0 0 0 1px rgba(255,255,255,0.9); color: var(--phone-ink); font: 500 3.7cqw/1 var(--sans); text-align: center; }
.tabs span { position: relative; z-index: 1; }
.tabs i { position: absolute; left: 1.4cqw; top: 1.4cqw; bottom: 1.4cqw; width: calc(25% - 0.7cqw); border-radius: 99cqw; background: rgba(31,77,63,0.13); animation: pill 18s cubic-bezier(.3,.7,.2,1) infinite; }
@keyframes pill { 0%, 19% { transform: translateX(0); } 24%, 43% { transform: translateX(100%); } 48%, 67% { transform: translateX(200%); } 72%, 94% { transform: translateX(300%); } 99.5%, 100% { transform: translateX(0); } }

/* Scrolling phones: one long real screen moving under the glass. */
.phone--scroll img { animation: scroll 20s ease-in-out infinite alternate; animation-delay: var(--delay, 0s); }
@keyframes scroll { 0%, 12% { transform: translateY(0); } 88%, 100% { transform: translateY(calc(-100% + 100cqh)); } }

/* The rhythm section: the wave */
.rhythm__head { display: flex; flex-direction: column; gap: 14px; max-width: 40em; }
.wave { margin-top: 28px; }
.wave svg { display: block; width: 100%; height: auto; overflow: visible; }
.wave__base { stroke: var(--linen); }
.wave__seg { stroke-linecap: butt; }
.wave__dot { fill: var(--ground); stroke: var(--ink); }
.wave__dot-core { fill: var(--emerald); }
.phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.phase-btn { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 16px; background: none; color: var(--ink); font: 600 16px/1.2 var(--sans); cursor: pointer; text-align: left; }
.phase-btn small { font: 400 13px/1.3 var(--sans); color: var(--muted); }
.phase-btn[aria-selected="true"] { background: var(--raised); border-color: var(--emerald); box-shadow: 0 6px 18px rgba(31,77,63,0.10); }
.phase-panel { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); padding-top: 24px; border-top: 1px solid var(--hairline); }
.phase-panel > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.phase-panel p.big { font-family: var(--display); font-size: clamp(20px, 2.2vw, 26px); line-height: 1.3; }
.phase-panel p { color: var(--ink); }
.phase-panel .sub { color: var(--muted); font-size: 15px; }
.phase-panel .ar { text-align: left; font-family: var(--arabic); font-size: 34px; line-height: 1.7; color: var(--emerald); }
@media (max-width: 760px) { .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); } .phase-panel { grid-template-columns: minmax(0, 1fr); } }

/* Inside the app */
.inside__head { display: flex; flex-direction: column; gap: 14px; max-width: 40em; margin-bottom: clamp(32px, 5vw, 56px); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.trio > div { display: flex; flex-direction: column; align-items: center; gap: 22px; min-width: 0; }
.trio .phone { width: min(270px, 70vw); }
.trio .cap { display: flex; flex-direction: column; gap: 6px; max-width: 300px; }
.trio .cap p { color: var(--muted); font-size: 16px; }
@media (min-width: 861px) { .trio > div:nth-child(2) { margin-top: 48px; } }
@media (max-width: 860px) { .trio { grid-template-columns: minmax(0, 1fr); gap: 56px; } .trio .cap { text-align: center; } }

/* Community band */
.band { background: var(--band); color: var(--band-fg); }
.band h2, .band h3 { color: var(--band-fg); }
.band .label { color: var(--band-accent); }
.band .lede { color: var(--band-muted); }
.community { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.community__copy { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.community__phone { display: flex; justify-content: center; position: sticky; top: 24px; }
.rooms { display: flex; flex-wrap: wrap; gap: 8px; }
.rooms span { padding: 8px 14px; border-radius: 999px; background: var(--band-chip); border: 1px solid var(--band-line); font-size: 14px; font-weight: 500; }
.prompt { padding: 20px 22px; border-radius: 20px; background: var(--band-chip); border: 1px solid var(--band-line); display: flex; flex-direction: column; gap: 8px; }
.prompt p.q { font-family: var(--display); font-size: clamp(20px, 2.2vw, 25px); line-height: 1.3; min-height: 2.6em; }
.pledge { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.pledge li { padding: 14px 0; border-top: 1px solid var(--band-line); display: flex; flex-direction: column; gap: 2px; }
.pledge strong { font-weight: 600; }
.pledge span { color: var(--band-muted); font-size: 15px; }
.band .fine { color: var(--band-muted); font-size: 15px; }
@media (max-width: 860px) { .community { grid-template-columns: minmax(0, 1fr); } .community__phone { position: static; } .pledge { grid-template-columns: minmax(0, 1fr); } }

/* Privacy */
.privacy { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 72px); }
.privacy ul { list-style: none; padding: 0; display: flex; flex-direction: column; }
.privacy li { padding: 18px 0; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 4px; }
.privacy li:last-child { border-bottom: 1px solid var(--hairline); }
.privacy li strong { font-family: var(--display); font-weight: 600; font-size: 20px; }
.privacy li span { color: var(--muted); }
@media (max-width: 860px) { .privacy { grid-template-columns: minmax(0, 1fr); } }

/* Join */
.join { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.join ol { list-style: none; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 18px; }
.join ol li { counter-increment: step; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; }
.join ol li::before { content: counter(step); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--linen); font: 600 16px/1 var(--display); color: var(--ink); }
.join ol li span { color: var(--muted); display: block; font-size: 16px; }
@media (max-width: 860px) { .join { grid-template-columns: minmax(0, 1fr); } }

footer { border-top: 1px solid var(--hairline); padding-block: 32px 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; }
footer .mark { font-size: 30px; }

@media (prefers-reduced-motion: reduce) {
  .reel, .tabs i, .phone--scroll img { animation: none; }
  .wave__seg { transition: none; }
}

.lead__fine { font-size: 13px; color: var(--muted); }
.lead__msg a { font-weight: 700; }
.legal { padding-top: 24px; }
.legal__body { max-width: 720px; gap: 20px; }
.legal__body h1 { font-size: clamp(34px, 5vw, 48px); }
.legal__date { color: var(--muted); font-size: 15px; }

/* The month, scrubbed by scrolling: the section pins while the dot travels the wave. */
#rhythm.is-scrolly { height: 340vh; padding-block: 0; }
#rhythm.is-scrolly .rhythm__pin { position: sticky; top: var(--pin-top, 0px); padding-block: 20px; }
.rhythm__hint { margin-top: 4px; font-size: 13px; color: var(--muted); text-align: center; letter-spacing: 0.02em; transition: opacity .4s; }
.phase-panel [data-f] { transition: opacity .22s ease; }
.phase-panel.is-swapping [data-f] { opacity: 0; }
.phase-panel p.big { min-height: 3.9em; }
@media (max-width: 760px) {
  .phases { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .phase-btn { padding: 10px 4px; align-items: center; text-align: center; font-size: 14px; border-radius: 14px; }
  .phase-btn small { display: none; }
  .phase-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; padding-top: 16px; margin-top: 14px; }
  .phase-panel > div:first-child { grid-column: 1 / -1; }
  .phase-panel p.big { font-size: 18px; min-height: 5.2em; }
  .phase-panel .ar { font-size: 28px; line-height: 1.5; }
  #rhythm.is-scrolly .rhythm__head .lede { display: none; }
  #rhythm.is-scrolly .wave { margin-top: 12px; }
}

/* Arrivals: the top of the page settles in on load; lower sections rise as they are reached. */
@keyframes settle { from { opacity: 0; transform: translateY(18px); } }
.hero__copy > * { animation: settle .7s cubic-bezier(.2,.7,.2,1) both; }
.hero__copy > *:nth-child(2) { animation-delay: .06s; } .hero__copy > *:nth-child(3) { animation-delay: .12s; } .hero__copy > *:nth-child(4) { animation-delay: .18s; }
.hero__phone { animation: settle .9s cubic-bezier(.2,.7,.2,1) .15s both; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .hero__copy > *, .hero__phone { animation: none; } .reveal { opacity: 1; transform: none; transition: none; } }
#rhythm.is-scrolly .wave svg { max-height: 28vh; }
#rhythm.is-scrolly .wave { margin-top: 16px; }
#rhythm.is-scrolly .phase-panel { margin-top: 14px; padding-top: 18px; }
@media (max-height: 860px) { #rhythm.is-scrolly .rhythm__head .lede { display: none; } }
