/* AcuSight marketing site — tokens from design_handoff_acusight/README.md.
   Two worlds on one scroll: the camera's night (Ink/Lantern) and the Learn
   world (Paper/gold). Zero JS; all motion is CSS behind reduced-motion. */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-wght-italic.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* night world */
  --ink: #0B0E14;
  --indigo: #141B2E;
  --card: #10141F;
  --cloud: #F2EFE9;
  --cloud-75: rgba(242, 239, 233, 0.75);
  --cloud-55: rgba(242, 239, 233, 0.55);
  --hairline: rgba(255, 255, 255, 0.12);
  /* the single accent */
  --lantern: #FFB65C;
  --lantern-hi: #FFD9A0;
  --badge-text: #FFC98A;
  --glow: rgba(255, 182, 92, 0.34);
  /* paper world (Learn) */
  --paper: #F4EEE2;
  --paper-ink: #3A342A;
  --paper-sub: #5A5142;
  --gold: #B98A45;
  --paper-hairline: rgba(58, 52, 42, 0.14);
  /* type */
  --serif: "Newsreader", "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  /* shape */
  --r-card: 16px;
  --r-sheet: 24px;
  --measure: 62ch;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cloud);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--badge-text); text-underline-offset: 3px; }
a:hover { color: var(--lantern-hi); }
:focus-visible { outline: 2px solid var(--lantern); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--glow); color: var(--cloud); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 420;
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; }
.measure { max-width: var(--measure); }

.wrap {
  width: min(1120px, 100% - 2 * clamp(22px, 6vw, 32px));
  margin-inline: auto;
}

/* ---------- The mark (app icon as pure CSS: amber ring + cream core) ---------- */
.mark {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--lantern);
  box-shadow: 0 0 14px 2px var(--glow);
  flex: none;
}
.mark::after {
  content: "";
  position: absolute; inset: 50%;
  width: 9px; height: 9px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--lantern-hi);
  box-shadow: 0 0 10px 3px rgba(255, 190, 110, 0.85);
}
/* pulse ring: born at the mark, 0.35→1.9 scale, .9→0 opacity, 2.6s ease-out */
.mark::before {
  content: "";
  position: absolute; inset: -2px;
  border-radius: 50%;
  border: 1.5px solid var(--lantern);
  opacity: 0;
}

/* ---------- Header ---------- */
.site-head {
  padding: 22px 0;
}
.site-head .wrap {
  display: flex; align-items: center; gap: 14px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 460;
  color: var(--cloud);
  text-decoration: none;
  letter-spacing: 0.005em;
}
.wordmark:hover { color: var(--cloud); }
.site-head nav {
  margin-left: auto;
  display: flex; gap: clamp(16px, 3vw, 30px);
  font-size: 0.95rem;
}
.site-head nav a { color: var(--cloud-75); text-decoration: none; }
.site-head nav a:hover { color: var(--lantern-hi); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 8vh, 96px) 0 clamp(56px, 9vh, 110px); }
.hero .wrap {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; }
}
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--badge-text);
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  margin-bottom: 0.55em;
}
.hero h1 em { font-style: italic; font-weight: 460; color: var(--lantern-hi); }
.hero .lede {
  color: var(--cloud-75);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 34em;
}
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(10, 12, 18, 0.62);
  border: 1px solid var(--hairline);
  font-size: 0.85rem;
  color: var(--cloud-75);
}
.chip--accent {
  background: rgba(255, 182, 92, 0.14);
  border-color: rgba(255, 182, 92, 0.35);
  color: var(--badge-text);
  font-weight: 600;
}
.hero-note { font-size: 0.85rem; color: var(--cloud-55); margin-top: 16px; }
.paper-cols h2, .privacy-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }

/* ---------- Viewfinder (the CSS-drawn camera moment: a Zone, honestly) ---------- */
.viewfinder {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 400px;
  width: 100%;
  margin-inline: auto;
  border-radius: var(--r-sheet);
  background:
    radial-gradient(120% 90% at 70% 20%, rgba(20, 27, 46, 0.9), transparent 60%),
    linear-gradient(200deg, #10151f 0%, var(--ink) 70%);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
/* edge scrim from the handoff */
.viewfinder::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 14, 20, 0.5) 0%, transparent 16%, transparent 72%, rgba(11, 14, 20, 0.62) 100%);
  pointer-events: none;
}
/* corner brackets */
.vf-corner {
  position: absolute;
  width: 22px; height: 22px;
  border: 1.5px solid rgba(242, 239, 233, 0.35);
  z-index: 2;
}
.vf-corner.tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.vf-corner.tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.vf-corner.bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.vf-corner.br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
/* the Zone: a diffuse breathing glow — never a dot */
.zone-glow {
  position: absolute;
  top: 34%; left: 50%;
  width: 190px; height: 190px;
  margin: -95px 0 0 -95px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 182, 92, 0.36) 0%, rgba(255, 182, 92, 0.18) 45%, transparent 72%);
}
.vf-badge {
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 182, 92, 0.09);
  border: 1px solid rgba(255, 182, 92, 0.22);
  color: var(--badge-text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.vf-coach {
  position: absolute;
  left: 18px; right: 18px; bottom: 18px;
  z-index: 3;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(10, 12, 18, 0.62);
  border: 1px solid var(--hairline);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--cloud);
  text-align: center;
}

/* dot glyph used inside tier badges */
.dot-glyph { width: 7px; height: 7px; border-radius: 50%; background: var(--lantern); flex: none; }
.dot-glyph--soft { filter: blur(1.5px); }
.square-glyph {
  width: 8px; height: 8px; flex: none;
  border: 1px dashed rgba(255, 182, 92, 0.7);
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vh, 110px) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vh, 52px); }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-head p { color: var(--cloud-75); margin: 0; }

/* tier cards */
.tiers {
  display: grid;
  gap: 18px;
}
@media (min-width: 760px) { .tiers { grid-template-columns: repeat(3, 1fr); } }
.tier-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 24px 22px;
  display: flex; flex-direction: column;
}
.tier-visual {
  position: relative;
  height: 150px;
  margin: 0 0 20px;
  border-radius: 12px;
  background: linear-gradient(200deg, #131a29, #0d1119);
  overflow: hidden;
}
/* Tier 1: dot + halo */
.tier-visual .precise-marker {
  position: absolute; top: 50%; left: 50%;
  width: 11px; height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: var(--lantern-hi);
  box-shadow: 0 0 12px 4px rgba(255, 190, 110, 0.85);
}
.tier-visual .precise-halo {
  position: absolute; top: 50%; left: 50%;
  width: 110px; height: 110px;
  margin: -55px 0 0 -55px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 182, 92, 0.32) 0%, transparent 72%);
}
/* Tier 2: glow only, NO dot — compliance rule, not style */
.tier-visual .zone-marker {
  position: absolute; top: 50%; left: 50%;
  width: 130px; height: 130px;
  margin: -65px 0 0 -65px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 182, 92, 0.34) 0%, rgba(255, 182, 92, 0.16) 45%, transparent 72%);
}
/* Tier 3: no camera at all — a paper step card */
.tier-visual--paper {
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.guide-card {
  width: 100%;
  background: #fffdf8;
  border: 1px solid var(--paper-hairline);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--paper-ink);
  font-size: 0.78rem;
  line-height: 1.5;
}
.guide-card .gc-step { color: var(--gold); font-weight: 600; letter-spacing: 0.1em; font-size: 0.66rem; }
.tier-badge {
  display: inline-flex; align-items: center; gap: 7px;
  align-self: flex-start;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 14px;
}
.tier-badge--precise { background: rgba(255, 182, 92, 0.14); border: 1px solid rgba(255, 182, 92, 0.35); color: var(--badge-text); }
.tier-badge--zone    { background: rgba(255, 182, 92, 0.08); border: 1px solid rgba(255, 182, 92, 0.22); color: var(--badge-text); }
.tier-badge--guide   { background: transparent; border: 1px dashed rgba(255, 182, 92, 0.3); color: var(--badge-text); }
.tier-card h3 { font-size: 1.35rem; margin-bottom: 0.35em; }
.tier-card p { color: var(--cloud-75); font-size: 0.95rem; margin: 0; }

/* ---------- Screenshots ---------- */
.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(72vw, 250px);
  gap: 20px;
  overflow-x: auto;
  padding: 6px 6px 22px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 1000px) {
  .shots { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); grid-auto-columns: unset; overflow: visible; }
}
.shot { scroll-snap-align: start; }
.shot figure { margin: 0; }
.shot .frame {
  border-radius: 26px;
  border: 1px solid var(--hairline);
  background: #05070b;
  padding: 7px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}
.shot img { border-radius: 20px; }
.shot figcaption {
  margin-top: 12px;
  font-size: 0.84rem;
  color: var(--cloud-55);
  text-align: center;
}

/* features list under the shots */
.features {
  display: grid; gap: 14px 32px;
  margin-top: clamp(36px, 5vh, 56px);
  padding: 0; list-style: none;
}
@media (min-width: 760px) { .features { grid-template-columns: 1fr 1fr; } }
.features li {
  position: relative;
  padding-left: 26px;
  color: var(--cloud-75);
  font-size: 0.98rem;
}
.features li::before {
  content: "";
  position: absolute; left: 4px; top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lantern);
  box-shadow: 0 0 8px 2px var(--glow);
}
.features li strong { color: var(--cloud); font-weight: 600; }

/* ---------- Paper world ---------- */
.paper-world {
  background: var(--paper);
  color: var(--paper-ink);
  border-top: 1px solid rgba(185, 138, 69, 0.25);
  border-bottom: 1px solid rgba(185, 138, 69, 0.25);
}
.paper-world .section-head h2 { color: var(--paper-ink); }
.paper-world .section-head p, .paper-world p { color: var(--paper-sub); }
.paper-world .eyebrow { color: var(--gold); }
.paper-world ::selection { background: rgba(185, 138, 69, 0.25); }
.routine-pills {
  display: flex; flex-wrap: wrap; gap: 10px 12px;
  margin: 26px 0 0;
  padding: 0; list-style: none;
}
.routine-pills li {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--paper-ink);
  padding: 9px 18px;
  border: 1px solid rgba(185, 138, 69, 0.4);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.6);
}
.paper-cols {
  display: grid; gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (min-width: 900px) { .paper-cols { grid-template-columns: 1fr 1fr; } }
.paper-cols h3 { font-size: 1.45rem; color: var(--paper-ink); }

/* ---------- Privacy section ---------- */
.privacy-band .wrap {
  display: grid; gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
@media (min-width: 900px) { .privacy-band .wrap { grid-template-columns: 0.9fr 1.1fr; } }
.privacy-label {
  border: 1px solid var(--hairline);
  border-radius: var(--r-sheet);
  background: linear-gradient(210deg, var(--indigo), var(--card) 70%);
  padding: clamp(28px, 4vw, 44px);
  text-align: center;
}
.privacy-label .lock {
  font-size: 1.9rem;
  display: block;
  margin-bottom: 10px;
}
.privacy-label .big {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--lantern-hi);
  display: block;
  margin-bottom: 8px;
}
.privacy-label .sub { color: var(--cloud-55); font-size: 0.9rem; margin: 0; }

/* ---------- Footer ---------- */
.site-foot {
  border-top: 1px solid var(--hairline);
  padding: clamp(40px, 6vh, 64px) 0 48px;
  font-size: 0.92rem;
  color: var(--cloud-55);
}
.site-foot .disclaimer {
  max-width: var(--measure);
  color: var(--cloud-75);
  font-size: 0.98rem;
  border-left: 2px solid var(--lantern);
  padding-left: 18px;
  margin-bottom: 32px;
}
.foot-row {
  display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center;
}
.foot-row a { color: var(--cloud-75); }

/* ---------- Subpages (privacy / support live in the paper world) ---------- */
.page-paper { background: var(--paper); color: var(--paper-ink); }
.page-paper .site-head { background: var(--ink); }
.page-paper main { padding: clamp(40px, 7vh, 80px) 0 clamp(56px, 8vh, 96px); }
.doc { max-width: 46rem; }
.doc h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); color: var(--paper-ink); }
.doc .doc-meta { color: var(--gold); font-size: 0.9rem; margin-bottom: 2.2em; }
.doc h2 {
  font-size: 1.45rem;
  color: var(--paper-ink);
  margin-top: 2em;
}
.doc p, .doc li { color: var(--paper-sub); }
.doc strong { color: var(--paper-ink); }
.doc a { color: var(--gold); }
.doc a:hover { color: #96702f; }
.doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: 0.4em; }
.doc hr { border: 0; border-top: 1px solid var(--paper-hairline); margin: 2.6em 0; }
.doc .part-label {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 2.6em 0 0;
}
.doc .part-label + h2 { margin-top: 0.4em; }
.doc .qa dt { font-weight: 600; color: var(--paper-ink); margin-top: 1.6em; }
.doc .qa dd { margin: 0.4em 0 0; color: var(--paper-sub); }
.page-paper .site-foot { background: var(--ink); }

/* ---------- 404 ---------- */
.lost {
  min-height: 55vh;
  display: grid; place-content: center; text-align: center;
  padding: 60px 0;
}
.lost h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.lost p { color: var(--cloud-75); }

/* ---------- Motion (all loops guarded; static fallback is the default) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* zone breathing: 0.92↔1.06 scale, .75↔1 opacity, 4s ease-in-out — must not read as "searching" */
  @keyframes breathe {
    0%, 100% { transform: scale(0.92); opacity: 0.75; }
    50% { transform: scale(1.06); opacity: 1; }
  }
  .zone-glow, .tier-visual .zone-marker { animation: breathe 4s ease-in-out infinite; }
  .tier-visual .precise-halo { animation: breathe 4s ease-in-out infinite; }

  /* pulse ring on the mark: 0.35→1.9, .9→0, 2.6s ease-out */
  @keyframes pulse-ring {
    0% { transform: scale(0.35); opacity: 0.9; }
    100% { transform: scale(1.9); opacity: 0; }
  }
  .mark::before { animation: pulse-ring 2.6s ease-out infinite; }

  /* one-time staggered hero reveal — settles like marker acquisition, never pops */
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
  .hero .eyebrow, .hero h1, .hero .lede, .hero .hero-meta, .hero .hero-note {
    animation: rise 0.7s ease-out both;
  }
  .hero h1 { animation-delay: 0.08s; }
  .hero .lede { animation-delay: 0.16s; }
  .hero .hero-meta { animation-delay: 0.24s; }
  .hero .hero-note { animation-delay: 0.3s; }
  .viewfinder { animation: rise 0.9s ease-out 0.2s both; }
}
