/* ============================================================
   Anwaza — refined editorial landing page
   Light paper base · Fraunces display · Hanken Grotesk body
   One restrained accent · hairline rules · generous air
   ============================================================ */

:root {
  /* Palette */
  --paper:      #faf8f3;   /* warm paper background        */
  --paper-2:    #f3efe6;   /* slightly deeper panel        */
  --ink:        #1a1815;   /* near-black text              */
  --ink-soft:   #58524a;   /* muted body / captions        */
  --ink-faint:  #6e685e;   /* placeholders, fine print (AA ~5.2:1 on paper) */
  --accent:     #9e3b2e;   /* deep oxblood / terracotta    */
  --accent-ink: #7e2e23;   /* accent on hover              */
  --rule:       #e3ddd1;   /* hairline rule                */
  --rule-soft:  #ece7dc;

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Hanken Grotesk", system-ui, sans-serif;

  /* Space */
  --shell:   min(1120px, 100% - 2 * clamp(1.25rem, 5vw, 5rem));
  --gutter:  clamp(1.25rem, 5vw, 5rem);
  --sec-y:   clamp(4.5rem, 11vh, 9rem);
  --header-h: 4.75rem;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Full-screen "deck": each section is its own screen; gentle (proximity)
     snap so tall sections (demo, FAQ, contact) can still scroll internally. */
  scroll-snap-type: y proximity;
  scroll-padding-top: var(--header-h);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.125rem);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* very subtle paper grain via layered radial noise */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(158, 59, 46, 0.025), transparent 38%),
    radial-gradient(circle at 88% 8%, rgba(26, 24, 21, 0.02), transparent 30%);
  background-attachment: fixed;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 380; line-height: 1.08; letter-spacing: -0.015em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: var(--paper); }

/* ---------- Full-screen sections (one section = one screen) ---------- */
main > section {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;   /* content starts just under the header — consistent */
}
.hero { justify-content: center; }   /* marquee screen is centred */
/* svh avoids the mobile URL-bar height jump where supported */
@supports (min-height: 100svh) { main > section { min-height: 100svh; } }
/* Deck spacing: tighter, uniform vertical padding so each screen's content sits
   high and tall screens (gifts demo, FAQ, contact) fit without a big top gap.
   `section.shell` (0,1,2) overrides each section's own padding rule (0,1,0). */
main > section.shell { padding-block: clamp(2.5rem, 6vh, 4.5rem); }

/* Side dot indicator — jumps between screens, shows current position.
   Works as plain anchors without JS; JS adds the .is-active highlight. */
.screen-dots {
  position: fixed;
  right: clamp(0.6rem, 1.6vw, 1.4rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex; flex-direction: column; gap: 0.8rem; align-items: center;
}
.screen-dots a {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--ink-faint); background: transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.screen-dots a:hover { border-color: var(--ink); }
.screen-dots a.is-active { background: var(--accent); border-color: var(--accent); transform: scale(1.3); }

/* ---------- Skip link (keyboard / screen-reader) ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.65rem 1rem;
  border-radius: 2px;
  font-size: 0.9rem;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Language switch ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 0.55rem; }
.lang-switch a {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  transition: color .25s var(--ease);
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.lang-switch a + a { position: relative; }
.lang-switch a + a::before {
  content: "";
  position: absolute;
  left: -0.3rem; top: 50%;
  width: 1px; height: 0.8em;
  background: var(--rule);
  transform: translateY(-50%);
}

/* Chinese (Simplified): swap in CJK-capable faces, keep the brand in Fraunces,
   and disable synthetic italics (slanted CJK reads poorly). */
html:lang(zh-Hans) {
  --display: "Noto Serif SC", Georgia, serif;
  --body: "Noto Sans SC", system-ui, sans-serif;
}
html:lang(zh-Hans) .wordmark { font-family: "Fraunces", "Noto Serif SC", serif; }
html:lang(zh-Hans) h1, html:lang(zh-Hans) h2, html:lang(zh-Hans) h3 { letter-spacing: 0; }
html:lang(zh-Hans) em,
html:lang(zh-Hans) blockquote,
html:lang(zh-Hans) .handle-coda,
html:lang(zh-Hans) .proof-note,
html:lang(zh-Hans) .ph { font-style: normal; }

/* ---------- Layout primitives ---------- */
.shell { width: var(--shell); margin-inline: auto; }
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.85em 1.5em;
  border-radius: 2px;
  border: 1px solid var(--ink);
  transition: background .35s var(--ease), color .35s var(--ease),
              border-color .35s var(--ease), transform .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 4.75rem; }
.wordmark {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.5rem); }
.nav a { font-size: 0.95rem; color: var(--ink-soft); transition: color .25s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav-cta {
  color: var(--ink) !important;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.nav-toggle { display: none; }

/* Mobile nav — hidden on desktop; shown only below the breakpoint, and
   only when not collapsed via the [hidden] attribute (toggled by JS). */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem var(--gutter) 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.mobile-nav a { padding: 0.6rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--rule-soft); }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: clamp(4rem, 12vh, 8rem); padding-bottom: var(--sec-y); }
.hero-title { font-size: clamp(2.05rem, 8vw, 5.25rem); margin-bottom: 1.75rem; }
.hero-title span { display: block; }
.accent-line em { color: var(--accent); font-style: italic; }
.hero-sub {
  max-width: 34ch;
  font-size: clamp(1.05rem, 0.6vw + 1rem, 1.3rem);
  color: var(--ink-soft);
  margin-bottom: 2.25rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.hero-scroll {
  display: inline-block; margin-top: 1.6rem;
  font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.02em;
  border-bottom: 1px solid var(--rule); padding-bottom: 2px;
  transition: color .25s var(--ease);
}
.hero-scroll:hover { color: var(--ink); }

/* ============================================================
   For everyone — the gift, + signature gift-reveal demo
   ============================================================ */
.everyone { padding-block: var(--sec-y); }

.gift-demo { max-width: 40rem; margin: clamp(1rem, 3vw, 1.75rem) auto 0; }

.demo-receipt {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 1px 2px rgba(26, 24, 21, .05), 0 18px 40px -28px rgba(26, 24, 21, .35);
}
.demo-tag {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink-faint);
}
.demo-tag::before { content: "\2713"; color: var(--accent); font-weight: 700; }
.demo-banner {
  margin-top: 1rem;
  display: flex; align-items: center; gap: 0.85rem;
  padding: clamp(0.9rem, 2.5vw, 1.15rem) clamp(1rem, 3vw, 1.4rem);
  border-radius: 6px;
  background: rgba(158, 59, 46, .06);
  border: 1px solid rgba(158, 59, 46, .22);
}
.demo-gift { width: 1.6rem; height: 1.6rem; color: var(--accent); flex: none; }
.demo-banner-text { font-size: clamp(0.98rem, 1.4vw, 1.1rem); color: var(--ink); }
.demo-banner-text strong { color: var(--accent); font-weight: 600; }
.demo-arrow { margin-left: auto; color: var(--accent); font-size: 1.2rem; }

.demo-flow { display: block; text-align: center; color: var(--ink-faint); font-size: 1.3rem; margin: 0.9rem 0; }

.demo-rewards {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.55rem, 2vw, 1rem);
}
.gift-card {
  background: #fff; border: 1px solid var(--rule); border-radius: 6px;
  padding: clamp(0.85rem, 2.5vw, 1.1rem);
  min-height: 5rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.gift-kind { font-family: var(--display); font-size: 1.05rem; color: var(--ink); }
.gift-val { font-size: 0.85rem; color: var(--ink-soft); margin-top: auto; }
.gift-val .ph { font-weight: 600; }

/* Folded-in flow: Buy → Gift appears → Claim it */
.demo-flow-steps {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.6rem;
  margin: 1.25rem auto 0;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-faint);
}
.demo-flow-steps .sep { color: var(--accent); }

.demo-caption { text-align: center; max-width: 48ch; margin: 0.9rem auto 0; color: var(--ink-soft); font-size: 0.95rem; }

.chips {
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem;
  margin-top: 2rem;
}
.chips li {
  font-size: 0.85rem; color: var(--ink-soft);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.45rem 1rem;
}

/* ============================================================
   Section heads
   ============================================================ */
.section-head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); }

/* ============================================================
   Business sections (Monetization, Customer acquisition)
   ============================================================ */
.biz { padding-block: var(--sec-y); border-top: 1px solid var(--rule); }
.biz h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin: 0.6rem 0 1.1rem; max-width: 20ch; }
.biz-lead { color: var(--ink-soft); margin-bottom: 1.75rem; max-width: 46ch; font-size: 1.05rem; }
.ticks { margin-bottom: 2rem; display: grid; gap: 0.9rem; max-width: 46ch; }
.ticks li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 0.7rem; height: 1px;
  background: var(--accent);
}
.ticks strong { color: var(--ink); font-weight: 600; }

/* Placeholder caption (testimonials) */
.proof-note { color: var(--ink-faint); font-size: 0.85rem; margin-top: 0.75rem; font-style: italic; }

/* ============================================================
   Contact
   ============================================================ */
.contact { padding-block: var(--sec-y); border-top: 1px solid var(--rule); }
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact-intro h2 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
.contact-lead { color: var(--ink-soft); max-width: 30ch; margin-bottom: 2rem; }
.contact-direct dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); margin-top: 1rem; }
.contact-direct dd { margin: 0.15rem 0 0; font-size: 1.05rem; }

.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 0.8rem; letter-spacing: 0.04em; color: var(--ink-soft); font-weight: 500; }
.opt { color: var(--ink-faint); font-weight: 400; }
.field input, .field select, .field textarea {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.7em 0.85em;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}
.field textarea { resize: vertical; }
.consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; }
.consent input { margin-top: 0.2rem; accent-color: var(--accent); flex: none; width: 1rem; height: 1rem; }
.consent a { border-bottom: 1px solid var(--rule); }
.btn-submit { justify-content: center; }
.form-status { font-size: 0.9rem; color: var(--accent); margin-top: -0.25rem; }
.ph-link { color: var(--ink-soft); border-bottom: 1px dashed var(--rule); }

/* Placeholder marker styling */
.ph { color: var(--ink-faint); font-style: italic; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--rule); padding-top: clamp(3rem, 7vw, 5rem); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 3rem;
}
.footer-brand .wordmark { display: block; margin-bottom: 0.5rem; }
.footer-brand p { color: var(--ink-soft); font-size: 0.9rem; max-width: 22ch; }
.footer-col h4 { font-family: var(--body); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); margin-bottom: 1rem; font-weight: 600; }
.footer-col a, .footer-col span { display: block; font-size: 0.92rem; color: var(--ink-soft); padding: 0.2rem 0; transition: color .25s var(--ease); }
.footer-col a:hover { color: var(--ink); }
.footer-base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.footer-base .muted { color: var(--ink-faint); }

/* ============================================================
   We absorb the work
   ============================================================ */
.handle { padding-block: var(--sec-y); border-top: 1px solid var(--rule); }
.handle > h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); max-width: 18ch; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.handle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}
.handle-grid li {
  padding: 1.75rem 1.5rem 2rem 0;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding-left: 1.5rem;
}
.handle-grid li:last-child { border-right: none; }
.handle-mark { display: block; color: var(--accent); font-size: 1.1rem; margin-bottom: 1rem; }
.handle-grid h3 { font-size: 1.2rem; margin-bottom: 0.55rem; }
.handle-grid p { font-size: 0.95rem; color: var(--ink-soft); }
.handle-coda {
  margin-top: 2.25rem;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--accent);
}

/* ============================================================
   Partner testimonials
   ============================================================ */
.testimonials { padding-block: var(--sec-y); border-top: 1px solid var(--rule); }
.tm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.tm { margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--accent); }
.tm blockquote {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-weight: 340;
  font-style: italic;
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.4;
  color: var(--ink);
}
.tm figcaption { font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.02em; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { padding-block: var(--sec-y); border-top: 1px solid var(--rule); }
.faq-list { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  list-style: none;
  cursor: pointer;
  padding: 1.4rem 0.25rem;
  font-family: var(--display);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 360;
  color: var(--ink);
  transition: color .25s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
/* +/− marker built from two hairlines */
.faq-mark { position: relative; flex: none; width: 16px; height: 16px; }
.faq-mark::before, .faq-mark::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  background: var(--accent);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.faq-mark::before { width: 16px; height: 1.5px; transform: translate(-50%, -50%); }
.faq-mark::after  { width: 1.5px; height: 16px; transform: translate(-50%, -50%); }
.faq-item[open] .faq-mark::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }
.faq-a { padding: 0 2.5rem 1.6rem 0.25rem; max-width: 60ch; }
.faq-a p { color: var(--ink-soft); }
.faq-a strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   Reveal animation (orchestrated load + on-scroll)
   Progressive enhancement: elements are hidden ONLY when JS is
   present (the <html class="js"> set by boot.js). Without JS they
   render fully visible — no blank page.
   ============================================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* Staggered load delays (replaces inline style="--d:N") */
.d1 { --d: 1; } .d2 { --d: 2; } .d3 { --d: 3; }
.d4 { --d: 4; } .d5 { --d: 5; } .d6 { --d: 6; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 820px) {
  .nav { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
  }
  .nav-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .3s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-6.5px) rotate(-45deg); }

  /* Show the drawer on mobile unless JS has collapsed it via [hidden].
     Without JS (boot.js never adds .js), the toggle is inert, so show the
     drawer open as the fallback — ignoring the static [hidden] attribute. */
  .mobile-nav:not([hidden]) { display: flex; }
  html:not(.js) .mobile-nav { display: flex; }

  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .handle-grid li { border-right: none; }
}

@media (max-width: 520px) {
  .lead-form { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  main > section { scroll-snap-align: none; }
  /* !important so visibility wins over `.js .reveal` regardless of JS timing */
  .reveal, .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .btn:hover { transform: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
