/* Fatebend — launch site
   Cinematic chiaroscuro design system. Dark "brink" grounds + warm "dawn" bands. */

/* ---------- Fonts ---------- */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Noto+Serif+SC:wght@400;600;700&display=swap");

/* ---------- Tokens ---------- */
:root {
  --ink: #0c0a12;          /* near-black plum, primary dark ground */
  --ink-2: #14111d;
  --indigo: #1a1f36;        /* brand (app icon) */
  --panel: #1b1626;
  --line: rgba(217,169,97,.20);
  --line-soft: rgba(236,227,212,.12);

  --parchment: #efe6d6;     /* text on dark */
  --parchment-dim: rgba(239,230,214,.66);
  --parchment-faint: rgba(239,230,214,.52);

  --gold: #d9a961;          /* candlelight accent */
  --gold-soft: #e7c98c;
  --wine: #b06585;          /* rose accent for dark bg */

  /* dawn / light band */
  --dawn-bg: #f6ece5;
  --dawn-bg-2: #efdfe2;
  --dawn-ink: #2a2230;
  --dawn-ink-dim: rgba(42,34,48,.66);

  --serif-display: "Cinzel", "Songti SC", "Noto Serif SC", serif;
  --serif-body: "EB Garamond", "Songti SC", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", system-ui, sans-serif;

  --maxw: 1160px;
  --pad: clamp(20px, 5vw, 64px);
}

/* ---------- Language toggle (CSS-driven bilingual) ---------- */
html[data-lang="en"] [lang="zh"] { display: none !important; }
html[data-lang="zh"] [lang="en"] { display: none !important; }
/* CJK reads better with a touch more line-height */
html[data-lang="zh"] body { line-height: 1.85; }

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--serif-body);
  font-size: 19px;
  line-height: 1.65;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--gold); }
h1, h2, h3 { font-family: var(--serif-display); font-weight: 600; line-height: 1.12; margin: 0; }
section { position: relative; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

.eyebrow {
  font-family: var(--sans);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.badge-link { display: inline-flex; transition: transform .2s ease, filter .2s ease; }
.badge-link:hover { transform: translateY(-1px); filter: brightness(1.06); }
.badge-link img { height: 52px; width: auto; }
.text-link {
  font-family: var(--sans); font-size: 14.5px; letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 7px;
}
.text-link .arrow { transition: transform .2s ease; }
.text-link:hover .arrow { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--pad);
  transition: background .3s ease, backdrop-filter .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(12,10,18,.82);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 26px; height: 26px; filter: invert(1) brightness(1.4); }
.brand .word {
  font-family: var(--serif-display); font-weight: 700;
  font-size: 19px; letter-spacing: .26em; color: var(--parchment);
  padding-left: 2px;
}
.nav-right { display: flex; align-items: center; gap: 26px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-family: var(--sans); font-size: 14px; letter-spacing: .03em;
  color: var(--parchment-dim);
}
.nav-links a:hover { color: var(--parchment); }
.lang-toggle {
  font-family: var(--sans); font-size: 13px; letter-spacing: .04em;
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
}
.lang-toggle button {
  background: transparent; border: 0; color: var(--parchment-dim);
  padding: 6px 13px; cursor: pointer; font: inherit; transition: all .2s ease;
}
.lang-toggle button[aria-pressed="true"] { background: var(--gold); color: #1a130a; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(12,10,18,.72) 0%, rgba(12,10,18,.40) 30%, rgba(12,10,18,.55) 64%, var(--ink) 100%),
    radial-gradient(120% 90% at 78% 36%, transparent 30%, rgba(12,10,18,.5) 100%);
}
.hero .wrap { position: relative; z-index: 2; width: 100%; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 96px; padding-bottom: 64px; }
.hero-copy { max-width: 620px; }
.hero h1 {
  font-size: clamp(40px, 6.4vw, 76px); letter-spacing: .04em; margin: 22px 0 0;
  text-transform: uppercase;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
html[data-lang="zh"] .hero h1 { letter-spacing: .06em; line-height: 1.18; }
.hero .tagline {
  font-family: var(--serif-body); font-size: clamp(20px, 2.4vw, 27px);
  color: var(--gold-soft); font-style: italic; margin: 20px 0 0; font-weight: 500;
}
.hero .lede { font-size: 18.5px; color: var(--parchment-dim); margin: 22px 0 34px; max-width: 30em; }
.hero .btn-row { margin-top: 4px; }

/* floating phone */
.phone-float { justify-self: center; }
.phone {
  position: relative; width: clamp(220px, 24vw, 290px); aspect-ratio: 1284 / 2778;
  border-radius: 42px; padding: 10px;
  background: linear-gradient(155deg, #2a2433, #100d18);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06), inset 0 0 0 2px rgba(0,0,0,.5);
}
.phone::before {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 32%; height: 18px; background: #06040a; border-radius: 0 0 14px 14px; z-index: 3;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 33px; }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-family: var(--sans); font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--parchment-faint); display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-cue .dot { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); }

/* ---------- Generic section ---------- */
.band { padding: clamp(72px, 11vw, 138px) 0; }
.band-dawn { background: linear-gradient(170deg, var(--dawn-bg), var(--dawn-bg-2)); color: var(--dawn-ink); }
.band-dawn .eyebrow { color: #a85f4a; }
.band-dawn h2, .band-dawn h3 { color: var(--dawn-ink); }
.band-dawn .dim { color: var(--dawn-ink-dim); }
.band-ink { background: var(--ink); }
.band-deep { background: linear-gradient(180deg, var(--ink) 0%, #0a0710 100%); }

.section-head { max-width: 720px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 50px); letter-spacing: .02em; margin-top: 14px; }
html[data-lang="zh"] .section-head h2 { letter-spacing: .04em; }
.section-head .sub { font-size: 20px; margin-top: 18px; color: var(--parchment-dim); }
.band-dawn .section-head .sub { color: var(--dawn-ink-dim); }

/* ---------- "What is it" split ---------- */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.split .phone { width: clamp(230px, 26vw, 300px); }
.split-media { display: flex; justify-content: center; }
.prose-lg p { font-size: 20.5px; margin: 0 0 18px; }
.prose-lg p:last-child { margin-bottom: 0; }

/* ---------- Features ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 56px; }
.feat {
  position: relative; border-radius: 16px; overflow: hidden; min-height: 340px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 30px; border: 1px solid var(--line-soft);
  background: var(--ink-2);
}
.feat-bg { position: absolute; inset: 0; z-index: 0; }
.feat-bg img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--feat-image-position, 50% 50%);
  opacity: .55; transition: transform .8s ease, opacity .5s ease;
}
.feat-image-socrates { --feat-image-position: 50% 24%; }
.feat-image-macbeth { --feat-image-position: 50% 32%; }
.feat-image-cleopatra { --feat-image-position: 50% 28%; }
.feat-image-van-gogh { --feat-image-position: 50% 32%; }
.feat:hover .feat-bg img { transform: scale(1.05); opacity: .68; }
.feat-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,10,18,.25) 0%, rgba(12,10,18,.55) 50%, rgba(12,10,18,.93) 100%); }
.feat-body { position: relative; z-index: 1; }
.feat h3 { font-size: 23px; letter-spacing: .02em; color: var(--parchment); }
.feat p { font-size: 16.5px; color: var(--parchment-dim); margin: 12px 0 0; font-family: var(--sans); line-height: 1.6; }
.feat .tag { font-family: var(--sans); font-size: 11.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }

/* secondary feature list */
.feat-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 30px; }
.feat-list .fl { padding-top: 22px; border-top: 1px solid var(--line); }
.feat-list h3 { font-size: 19px; letter-spacing: .01em; }
.feat-list p { font-family: var(--sans); font-size: 15.5px; color: var(--parchment-dim); margin: 10px 0 0; line-height: 1.6; }

/* ---------- Moments gallery ---------- */
.moments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.moment {
  position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 3/4;
  display: flex; align-items: flex-end; border: 1px solid var(--line-soft);
}
.moment img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s ease; }
.moment:hover img { transform: scale(1.06); }
.moment::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(8,6,12,.55) 66%, rgba(8,6,12,.94) 100%); }
.moment-cap { position: relative; z-index: 1; padding: 22px; }
.moment-cap .place { font-family: var(--sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.moment-cap h3 { font-size: 21px; letter-spacing: .04em; text-transform: uppercase; margin-top: 7px; color: #fff; }
.moment-cap .q { font-style: italic; color: var(--parchment-dim); margin-top: 9px; font-size: 16.5px; line-height: 1.45; }
.moments-note { margin-top: 30px; font-size: 15px; color: var(--parchment-dim); font-family: var(--sans); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 56px; counter-reset: step; }
.step { counter-increment: step; }
.step .num { font-family: var(--serif-display); font-size: 15px; color: var(--gold); letter-spacing: .2em; }
.step .num::before { content: "0" counter(step); }
.step h3 { font-size: 24px; margin-top: 14px; letter-spacing: .02em; }
.step p { color: var(--parchment-dim); margin: 12px 0 0; font-size: 17px; }
.band-dawn .step p { color: var(--dawn-ink-dim); }
.band-dawn .step .num { color: #a85f4a; }

/* ---------- Eyes-free band ---------- */
.eyesfree { text-align: center; }
.eyesfree h2 { font-size: clamp(30px, 5vw, 56px); letter-spacing: .03em; max-width: 16em; margin: 14px auto 0; }
.eyesfree .sub { max-width: 36em; margin: 20px auto 0; color: var(--parchment-dim); font-size: 20px; }

/* ---------- Download CTA ---------- */
.cta { text-align: center; }
.cta .app-icon { width: 92px; height: 92px; border-radius: 21px; margin: 0 auto 26px; box-shadow: 0 18px 50px -16px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.07); }
.cta h2 { font-size: clamp(32px, 5vw, 58px); letter-spacing: .03em; }
.cta .sub { margin: 20px auto 32px; max-width: 32em; color: var(--parchment-dim); font-size: 19px; }
.cta .btn-row { justify-content: center; }
.cta .fineprint { margin-top: 22px; font-family: var(--sans); font-size: 14px; color: var(--parchment-dim); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 52px auto 0; }
.faq details {
  border-top: 1px solid var(--line); padding: 22px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  font-family: var(--serif-display); font-size: 21px; letter-spacing: .01em;
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; align-items: baseline;
  color: var(--parchment);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { color: var(--gold); font-family: var(--sans); font-weight: 300; transition: transform .25s ease; flex: none; }
.faq details[open] summary .plus { transform: rotate(45deg); }
.faq .ans { color: var(--parchment-dim); margin-top: 14px; font-size: 17.5px; }
.faq .ans a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.footer { background: #08060d; border-top: 1px solid var(--line-soft); padding: 64px 0 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer .brand .word { font-size: 17px; }
.footer .tagline { font-style: italic; color: var(--parchment-dim); margin-top: 16px; max-width: 24em; }
.footer h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0 0 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer ul a { font-family: var(--sans); font-size: 15px; color: var(--parchment-dim); }
.footer ul a:hover { color: var(--parchment); }
.footer-bottom { margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; align-items: flex-start; }
.footer-bottom .legal { font-family: var(--sans); font-size: 13px; color: var(--parchment-dim); line-height: 1.7; max-width: 60ch; }
.footer-bottom .legal p { margin: 0 0 6px; }

/* ---------- Legal / content pages ---------- */
.page-nav { position: sticky; top: 0; z-index: 40; background: rgba(12,10,18,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.doc { max-width: 760px; margin: 0 auto; padding: 124px var(--pad) 90px; }
.doc .eyebrow { display: block; margin-bottom: 14px; }
.doc h1 { font-family: var(--serif-display); font-size: clamp(32px, 5vw, 48px); letter-spacing: .03em; }
.doc .meta { font-family: var(--sans); font-size: 13.5px; color: var(--parchment-faint); margin-top: 16px; }
.doc h2 { font-family: var(--serif-display); font-size: 25px; margin: 46px 0 16px; letter-spacing: .01em; color: var(--gold-soft); }
.doc h3 { font-family: var(--sans); font-size: 17px; letter-spacing: .02em; margin: 28px 0 8px; color: var(--parchment); }
.doc p, .doc li { font-size: 18px; color: var(--parchment-dim); }
.doc p { margin: 0 0 16px; }
.doc ul { padding-left: 1.2em; margin: 0 0 18px; }
.doc li { margin-bottom: 9px; }
.doc strong { color: var(--parchment); font-weight: 600; }
.doc a { text-decoration: underline; text-underline-offset: 3px; }
.doc .callout {
  border: 1px solid var(--line); border-radius: 12px; padding: 24px 26px; margin: 28px 0;
  background: rgba(217,169,97,.05);
}
.doc .callout p:last-child { margin-bottom: 0; }
.back-home { font-family: var(--sans); font-size: 14px; margin-top: 56px; display: inline-flex; gap: 8px; }

/* ---------- Reveal-on-scroll (progressive enhancement) ---------- */
/* Hidden only when JS is active; without JS everything stays visible. */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  body { font-size: 18px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; text-align: center; padding-top: 78px; padding-bottom: 44px; }
  .hero-copy { max-width: none; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
  /* surface the CTA earlier on mobile: badge sits right under the tagline, lede drops below it */
  .hero .btn-row { justify-content: center; order: 1; margin-top: 6px; }
  .hero .lede { margin: 24px auto 0; order: 2; }
  .hero .phone { width: 172px; }
  .phone-float { order: -1; }
  .split { grid-template-columns: 1fr; text-align: center; }
  .split-media { order: -1; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat-list, .moments, .steps { grid-template-columns: 1fr; }
  .moments { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .scroll-cue { display: none; }
}
@media (max-width: 560px) {
  .moments { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .badge-link img { height: 48px; }
  .nav .brand .word { font-size: 17px; letter-spacing: .2em; }
}
