/* GazeGuard site stylesheet. Pure CSS, no JS anywhere.
   Palette and type follow the app: warm paper, amber, pixel display faces. */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "PP Mondwest";
  src: url("../assets/fonts/ppmondwest_regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "PP NeueBit";
  src: url("../assets/fonts/ppneuebit_bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter_regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter_medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter_semibold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter_bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f6efe4;
  --surface: #fffaf2;
  --cream: #faf4e8;
  --ink: #2c241d;
  --muted: #90806d;
  --faint: #bcae99;
  --line: #e8ddcb;
  --amber: #d97a2e;
  --amber-deep: #ab581c;
  --accent: #c15f3c;
  --accent-deep: #a84e2f;
  --accent-soft: #f4e3d8;
  --night: #181c26;
  --night-2: #202634;
  --night-line: #2e3546;
  --night-muted: #8b92a6;
  --body: "Inter", -apple-system, system-ui, sans-serif;
  --display: "PP Mondwest", "Iowan Old Style", Georgia, serif;
  --pixel: "PP NeueBit", "Courier New", monospace;
  --r: 16px;
  --r-lg: 24px;
  --wrap: 68rem;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
.pix { image-rendering: pixelated; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-soft); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--cream); padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- Type ---------- */
h1, h2, h3 { font-weight: 400; line-height: 1.12; letter-spacing: -.01em; }
h1 { font-family: var(--display); font-size: clamp(2.6rem, 7vw, 4.4rem); }
h2 { font-family: var(--display); font-size: clamp(1.9rem, 4vw, 2.7rem); }
h3 { font-family: var(--body); font-weight: 600; font-size: 1.125rem; letter-spacing: 0; }

.eyebrow {
  font-family: var(--pixel);
  font-size: 1.05rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--amber-deep);
  display: block;
  margin-bottom: .9rem;
}
.night .eyebrow { color: var(--amber); }
.lede { font-size: 1.1875rem; color: var(--muted); max-width: 44rem; }
.night .lede { color: var(--night-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 600; font-size: 1rem; line-height: 1;
  padding: .95rem 1.5rem; border-radius: 12px;
  border: 1px solid transparent;
  transition: transform .1s var(--ease), box-shadow .1s var(--ease), background .15s var(--ease);
}
.btn:hover { text-decoration: none; }
/* Primary = a pressable keycap: a hard bottom edge that collapses on click, same
   language as the app's PixelButton. Secondary (.btn-ghost) stays a plain outline. */
.btn-primary {
  background: var(--amber); color: #2b1608; border: none;
  box-shadow: 0 4px 0 var(--amber-deep);
  transform: translateY(0);
}
.btn-primary:hover { background: #e08a42; transform: translateY(-1px); box-shadow: 0 5px 0 var(--amber-deep); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--amber-deep); }
.night .btn-primary { background: var(--amber); color: #2b1608; box-shadow: 0 4px 0 #8a4d13; }
.night .btn-primary:hover { background: #e08a42; box-shadow: 0 5px 0 #8a4d13; }
.night .btn-primary:active { box-shadow: 0 1px 0 #8a4d13; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--faint); transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(0); }
.night .btn-ghost { border-color: var(--night-line); color: var(--cream); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 4.25rem;
}
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: auto; }
.brand .name { font-family: var(--display); font-size: 1.35rem; font-weight: 400; letter-spacing: .01em; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; }
.site-nav a { color: var(--muted); font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav .btn { padding: .62rem 1.05rem; font-size: .92rem; }

/* Mobile menu: a pure CSS details element */
.menu { display: none; margin-left: auto; position: relative; }
.menu > summary {
  list-style: none; cursor: pointer;
  font-family: var(--pixel); font-size: 1rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); padding: .5rem .25rem;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { color: var(--amber-deep); }
.menu .sheet {
  position: absolute; right: 0; top: calc(100% + .6rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: .6rem; min-width: 13rem;
  box-shadow: 0 14px 40px rgba(44, 36, 29, .12);
  display: flex; flex-direction: column;
}
.menu .sheet a { padding: .6rem .8rem; border-radius: 10px; color: var(--ink); font-weight: 500; }
.menu .sheet a:hover { background: var(--paper); text-decoration: none; }
@media (max-width: 760px) {
  .site-nav { display: none; }
  .menu { display: block; }
}

/* ---------- Hero ---------- */
.hero { padding: 5.5rem 0 4.5rem; text-align: center; }
.hero .mark { width: clamp(84px, 12vw, 116px); margin: 0 auto 2rem; }
.hero h1 { margin-bottom: 1.1rem; }
.hero .lede { margin: 0 auto 2.2rem; }
.hero .cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.chips { display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; }
.chip {
  font-family: var(--pixel); font-size: .95rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: .42rem .95rem; background: var(--surface);
}
.verse {
  margin-top: 3.2rem; font-family: var(--display); font-size: 1.2rem; color: var(--muted);
}
.verse cite { font-family: var(--pixel); font-style: normal; font-size: .95rem; letter-spacing: .18em; color: var(--faint); display: block; margin-top: .35rem; }

/* ---------- Sections ---------- */
section { padding: 5rem 0; }
.section-head { max-width: 46rem; margin-bottom: 3rem; }
.section-head h2 { margin-bottom: .9rem; }
.night { background: var(--night); color: var(--cream); }
.night h2, .night h3 { color: var(--cream); }
.dawn-seam { height: 6px; background: linear-gradient(90deg, var(--amber-deep), var(--amber), #eeb060, var(--amber), var(--amber-deep)); }

/* Stats (the problem section) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.stat {
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--r-lg);
  padding: 1.8rem 1.6rem;
}
.stat .num { font-family: var(--display); font-size: clamp(2.2rem, 4vw, 3rem); color: var(--amber); line-height: 1; margin-bottom: .55rem; }
.stat p { color: var(--night-muted); font-size: .98rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.9rem 1.7rem;
}
.card .glyph {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); color: var(--amber-deep);
  display: grid; place-items: center;
  font-family: var(--pixel); font-size: 1.35rem;
  margin-bottom: 1.1rem;
}
.card h3 { margin-bottom: .55rem; }
.card p { color: var(--muted); font-size: .98rem; }
.card .tag { font-family: var(--pixel); letter-spacing: .16em; text-transform: uppercase; font-size: .88rem; color: var(--faint); display: block; margin-top: 1rem; }

/* How it works: numbered rows */
.rows { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.25rem;
  padding: 1.7rem 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.row .n { font-family: var(--display); font-size: 1.9rem; color: var(--amber); }
.row h3 { margin-bottom: .4rem; }
.row p { color: var(--muted); max-width: 42rem; }
@media (max-width: 560px) { .row { grid-template-columns: 3rem 1fr; gap: .9rem; } }

/* Steps (how to use) */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.step {
  counter-increment: step;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.8rem 1.6rem;
}
.step::before {
  content: "0" counter(step);
  font-family: var(--pixel); font-size: 1.1rem; letter-spacing: .18em; color: var(--amber-deep);
  display: block; margin-bottom: .9rem;
}
.step h3 { margin-bottom: .5rem; }
.step p { color: var(--muted); font-size: .97rem; }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.quote {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.8rem 1.7rem; display: flex; flex-direction: column; gap: 1rem;
}
.quote blockquote { font-size: 1.02rem; line-height: 1.6; }
.quote figcaption { font-family: var(--pixel); letter-spacing: .16em; text-transform: uppercase; font-size: .9rem; color: var(--faint); }
.note { font-size: .92rem; color: var(--faint); margin-top: 1.4rem; }

/* FAQ */
.faq { max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; font-weight: 600; font-size: 1.05rem;
  padding: 1.25rem 2.2rem 1.25rem 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .2rem; top: 50%; transform: translateY(-50%);
  font-family: var(--pixel); font-size: 1.4rem; color: var(--amber-deep);
}
.faq details[open] summary::after { content: "-"; }
.faq details p { color: var(--muted); padding: 0 0 1.4rem; max-width: 42rem; }
.faq details p + p { margin-top: -0.6rem; }

/* Download band */
.download-band { text-align: center; }
.download-band .cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0 1.4rem; }
.fineprint { font-size: .92rem; color: var(--night-muted); }
.fineprint a { color: var(--cream); }

/* Contact */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; max-width: 40rem; }

/* ---------- Blog ---------- */
.post-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.post-item { padding: 2rem 0; border-bottom: 1px solid var(--line); }
.post-item time { font-family: var(--pixel); letter-spacing: .16em; text-transform: uppercase; font-size: .92rem; color: var(--faint); }
.post-item h2 { font-size: 1.7rem; margin: .5rem 0 .6rem; }
.post-item h2 a { color: var(--ink); }
.post-item p { color: var(--muted); max-width: 44rem; }

article.post { max-width: 44rem; margin: 0 auto; padding: 4.5rem 1.5rem 5rem; }
article.post header { margin-bottom: 2.6rem; }
article.post time { font-family: var(--pixel); letter-spacing: .16em; text-transform: uppercase; font-size: .95rem; color: var(--faint); }
article.post h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); margin: .7rem 0 1rem; }
article.post .standfirst { font-size: 1.15rem; color: var(--muted); }
article.post h2 { font-size: 1.55rem; margin: 2.6rem 0 .9rem; }
article.post p { margin-bottom: 1.15rem; }
article.post ul { margin: 0 0 1.15rem 1.2rem; }
article.post li { margin-bottom: .45rem; }
article.post .pull {
  font-family: var(--display); font-size: 1.5rem; line-height: 1.35; color: var(--amber-deep);
  border-left: 3px solid var(--amber); padding-left: 1.2rem; margin: 2.2rem 0;
}
.post-footer { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }

/* Breadcrumb */
.crumb { font-size: .92rem; color: var(--faint); margin-bottom: 1rem; }
.crumb a { color: var(--muted); }

/* ---------- Legal pages (privacy / terms) ----------
   Plain document treatment on purpose: one font (no display face), neutral
   white/gray instead of the warm amber cards used everywhere else on the site. */
article.legal { max-width: 40rem; }
article.legal h1, article.legal h2 {
  font-family: var(--body); font-weight: 700; letter-spacing: -.01em; color: var(--ink);
}
article.legal h1 { font-size: 2rem; }
article.legal h2 { font-size: 1.2rem; scroll-margin-top: 1.5rem; }
.legal-promise {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 1.25rem 1.4rem; margin: 1.8rem 0 .5rem; font-size: 1rem; line-height: 1.6;
}
.legal-promise strong { color: var(--ink); }
.toc {
  margin: 1.8rem 0 .5rem; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem;
}
.toc a { font-size: .86rem; font-weight: 500; color: var(--muted); }
.toc a:hover { color: var(--accent-deep); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--night-muted); padding: 4rem 0 3rem; }
.site-footer .top { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: space-between; margin-bottom: 3rem; }
.site-footer .brand { color: var(--cream); }
.site-footer .brand .name { color: var(--cream); }
.site-footer .verse { margin-top: 1rem; text-align: left; color: var(--night-muted); font-size: 1.05rem; max-width: 24rem; }
.site-footer nav { display: flex; gap: 3rem; flex-wrap: wrap; }
.site-footer nav h3 { font-family: var(--pixel); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: .92rem; color: var(--faint); margin-bottom: .8rem; }
.site-footer nav ul { list-style: none; }
.site-footer nav li { margin-bottom: .5rem; }
.site-footer nav a { color: var(--night-muted); font-size: .95rem; }
.site-footer nav a:hover { color: var(--cream); }
.site-footer .bottom { border-top: 1px solid var(--night-line); padding-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .88rem; }
.site-footer .bottom a { color: var(--night-muted); }

/* ---------- Misc ---------- */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
kbd, code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em;
  background: var(--cream); border: 1px solid var(--line); border-radius: 6px; padding: .1em .4em;
}
.night code { background: var(--night-2); border-color: var(--night-line); }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 5rem 1.5rem; }
.notfound .big { font-family: var(--pixel); font-size: 4rem; letter-spacing: .2em; color: var(--amber-deep); }
