/* AutoEase site. Tokens match the app's design system (docs/design/README.md
   in bitPimps/autoease): Fog/Panel/Steel/Asphalt/Instrument plus the three
   status "telltale" colors, Big Shoulders Display + IBM Plex. Dark asphalt
   for the header, hero and bands (like the store art); light Fog for reading. */

@font-face {
  font-family: 'Big Shoulders Display';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/big-shoulders-display.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-500.woff2') format('woff2');
}

:root {
  --fog: #eceee9;
  --panel: #f8f9f6;
  --steel: #d7dcd5;
  --asphalt: #1c2125;
  --asphalt-2: #252c32;
  --asphalt-line: #343c43;
  --instrument: #2b4a6f;
  --instrument-hover: #223c5b;
  --instrument-soft: #dfe6ee;

  --good: #2f8f5b;
  --soon: #c98a12;
  --overdue: #d14343;

  --ink: #1c2125;
  --ink-muted: #545d63;
  --on-dark: #eceee9;
  --on-dark-muted: #a9b1b6;

  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --max-width: 1120px;
  --radius: 16px;
  --radius-sm: 10px;

  color-scheme: light;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--instrument); }
a:hover { color: var(--instrument-hover); }
img { max-width: 100%; display: block; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }

:focus-visible { outline: 3px solid var(--soon); outline-offset: 2px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--panel); color: var(--ink); padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { line-height: 1.1; margin: 0 0 0.5em; }
h1, h2 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
h3 { font-size: 1.15rem; font-weight: 600; }

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--good);
  margin-bottom: 12px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--asphalt) 94%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--asphalt-line);
  color: var(--on-dark);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
.brand:hover { color: inherit; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand span {
  font-family: var(--display); font-weight: 800; font-size: 1.5rem;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--on-dark-muted); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--on-dark); }
.nav-links a.nav-cta {
  color: #fff; background: var(--instrument); padding: 9px 16px; border-radius: 999px;
}
.nav-links a.nav-cta:hover { background: var(--instrument-hover); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--asphalt-line); color: var(--on-dark);
  border-radius: 8px; font-size: 1.2rem; padding: 4px 10px; cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--asphalt); border-bottom: 1px solid var(--asphalt-line); padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; }
  .nav-links a.nav-cta { text-align: center; margin-top: 8px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; font-size: 1rem;
}
.btn-primary { background: var(--instrument); color: #fff; }
.btn-primary:hover { background: var(--instrument-hover); color: #fff; }
.btn-ghost { border-color: var(--asphalt-line); color: var(--on-dark); }
.btn-ghost:hover { border-color: var(--on-dark-muted); color: #fff; }

/* ---------- Hero ---------- */

.dark {
  background: radial-gradient(120% 90% at 20% 0%, #29313a 0%, var(--asphalt) 55%, #15191c 100%);
  color: var(--on-dark);
}
.hero { padding: 84px 0 96px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero .lead { font-size: 1.2rem; color: var(--on-dark-muted); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.hero-note { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-muted); }
.hero-art { display: flex; flex-direction: column; align-items: center; gap: 28px; }

@media (max-width: 860px) {
  .hero { padding: 56px 0 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { order: -1; }
}

/* ---------- Telltale (the app's signature lamp) ---------- */

.telltale {
  --size: 220px;
  width: var(--size); height: var(--size); border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #e6ebe5 0%, #b9c3bb 100%);
  border: 2px solid #8c958f;
  display: grid; place-items: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
.telltale .lamp {
  width: 68%; height: 68%; border-radius: 50%;
  background: radial-gradient(circle at 50% 28%, #8fe0b0 0%, var(--good) 45%, #1f6b42 100%);
  box-shadow: inset 0 -10px 24px rgba(0, 0, 0, 0.25), 0 0 40px rgba(47, 143, 91, 0.55);
  position: relative;
}
.telltale .lamp::after {
  content: ''; position: absolute; left: 21%; top: 11%; width: 58%; height: 26%;
  border-radius: 50%; background: rgba(255, 255, 255, 0.28);
}
@media (prefers-reduced-motion: no-preference) {
  .telltale .lamp { animation: self-check 2.4s ease-out 0.3s both; }
}
/* Gauge self-check: red → amber → green, then settle. */
@keyframes self-check {
  0%   { background: radial-gradient(circle at 50% 28%, #f2a0a0 0%, var(--overdue) 45%, #8f2a2a 100%); box-shadow: inset 0 -10px 24px rgba(0,0,0,.25), 0 0 40px rgba(209,67,67,.55); }
  33%  { background: radial-gradient(circle at 50% 28%, #f6d58f 0%, var(--soon) 45%, #8a5e0b 100%); box-shadow: inset 0 -10px 24px rgba(0,0,0,.25), 0 0 40px rgba(201,138,18,.55); }
  66%, 100% { background: radial-gradient(circle at 50% 28%, #8fe0b0 0%, var(--good) 45%, #1f6b42 100%); box-shadow: inset 0 -10px 24px rgba(0,0,0,.25), 0 0 40px rgba(47,143,91,.55); }
}

.legend { display: flex; gap: 20px; list-style: none; padding: 0; margin: 0; font-size: 0.95rem; color: var(--on-dark-muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.dot.good { background: var(--good); }
.dot.soon { background: var(--soon); }
.dot.overdue { background: var(--overdue); }

/* ---------- Sections ---------- */

section { padding: 88px 0; }
section[id], details[id], h2[id], h3[id] { scroll-margin-top: 80px; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--ink-muted); font-size: 1.1rem; margin: 0; }
.dark .section-head p { color: var(--on-dark-muted); }
.alt { background: var(--panel); border-top: 1px solid var(--steel); border-bottom: 1px solid var(--steel); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li {
  background: var(--panel); border: 1px solid var(--steel); border-radius: var(--radius);
  padding: 28px 24px; counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--mono); color: var(--instrument); font-size: 0.9rem; margin-bottom: 12px;
}
.steps p { margin: 0; color: var(--ink-muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--panel); border: 1px solid var(--steel); border-radius: var(--radius); padding: 26px 24px;
}
.alt .card { background: var(--fog); }
.card p { margin: 0; color: var(--ink-muted); }
.card .icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--instrument-soft); color: var(--instrument);
  display: grid; place-items: center; margin-bottom: 16px;
}
.card .icon svg { width: 22px; height: 22px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

/* Status explainer */
.status-rows { display: grid; gap: 14px; }
.status-row {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
  background: var(--panel); border: 1px solid var(--steel); border-radius: var(--radius-sm); padding: 18px 20px;
}
.status-row .dot { width: 18px; height: 18px; margin-top: 4px; }
.status-row h3 { margin: 0 0 2px; }
.status-row p { margin: 0; color: var(--ink-muted); }

/* Data table */
.table-wrap { overflow-x: auto; border: 1px solid var(--steel); border-radius: var(--radius-sm); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
caption { text-align: left; padding: 14px 18px 0; color: var(--ink-muted); font-size: 0.9rem; caption-side: bottom; padding-bottom: 14px; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--steel); vertical-align: top; }
thead th { font-size: 0.8rem; font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); background: var(--fog); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }

/* Screenshots */
.shots {
  display: flex; gap: 18px; list-style: none; padding: 4px 0 18px; margin: 0;
  overflow-x: auto; scroll-snap-type: x mandatory;
}
.shots li { flex: 0 0 230px; scroll-snap-align: start; }
.shots img { width: 230px; height: auto; border-radius: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }

/* Privacy band */
.band-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.band-inner p { color: var(--on-dark-muted); }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before {
  content: ''; flex: none; width: 14px; height: 14px; border-radius: 50%; margin-top: 6px;
  background: var(--good); box-shadow: 0 0 10px rgba(47, 143, 91, 0.6);
}
.data-flow { display: grid; gap: 12px; }
.data-flow div {
  border: 1px solid var(--asphalt-line); border-radius: var(--radius-sm); padding: 16px 18px; background: rgba(255,255,255,0.03);
}
.data-flow strong { display: block; color: var(--on-dark); }
.data-flow span { color: var(--on-dark-muted); font-size: 0.95rem; }
@media (max-width: 860px) { .band-inner { grid-template-columns: 1fr; gap: 32px; } }

/* Pricing */
.pricing-card {
  max-width: 560px; background: var(--panel); border: 1px solid var(--steel); border-radius: var(--radius); padding: 34px 32px;
}
.price { font-family: var(--display); font-weight: 800; font-size: 4rem; line-height: 1; margin: 6px 0 8px; }
.price-note { color: var(--ink-muted); margin-bottom: 18px; }
.pricing-list { padding-left: 0; list-style: none; display: grid; gap: 10px; margin: 0 0 22px; }
.pricing-list li { padding-left: 26px; position: relative; }
.pricing-list li::before { content: '✓'; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.fineprint { color: var(--ink-muted); font-size: 0.92rem; margin: 0; }

/* CTA */
.cta-band { text-align: center; border-radius: var(--radius); padding: 56px 28px; }
.cta-band p { color: var(--on-dark-muted); max-width: 40em; margin: 0 auto 8px; }
.store-soon { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 24px 0 8px; }
.store-soon span {
  border: 1px solid var(--asphalt-line); border-radius: 12px; padding: 10px 18px; color: var(--on-dark);
  font-weight: 500;
}

/* Guides list */
.guide-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.guide-list a { display: block; height: 100%; text-decoration: none; color: inherit; }
.guide-list a:hover h3 { color: var(--instrument); }
@media (max-width: 960px) { .guide-list { grid-template-columns: 1fr; } }

/* ---------- Content pages (privacy, guides, delete data) ---------- */

.page-hero { padding: 64px 0 48px; }
.page-hero p { color: var(--on-dark-muted); max-width: 40em; margin: 0; font-size: 1.1rem; }
.breadcrumb { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.9rem; color: var(--on-dark-muted); }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; }
.breadcrumb a { color: var(--on-dark-muted); }
.content-page { max-width: 760px; padding-top: 48px; padding-bottom: 88px; }
.content-page h2 { font-size: 1.9rem; margin-top: 1.6em; }
.content-page h3 { margin-top: 1.4em; }
.content-page li { margin-bottom: 6px; }
.updated { font-family: var(--mono); font-size: 0.85rem; color: var(--ink-muted); }
.callout {
  border-left: 4px solid var(--instrument); background: var(--panel); padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 24px 0;
}
.callout.warn { border-left-color: var(--soon); }
.tldr { border: 1px solid var(--steel); background: var(--panel); border-radius: var(--radius-sm); padding: 18px 22px; margin: 0 0 32px; }
.tldr strong:first-child { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--good); display: block; margin-bottom: 4px; }
.tldr p { margin: 0; }

/* ---------- FAQ ---------- */

.faq-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding-top: 48px; padding-bottom: 88px; }
.faq-toc { position: sticky; top: 88px; align-self: start; }
.faq-toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.faq-toc a { text-decoration: none; color: var(--ink-muted); display: block; padding: 6px 10px; border-radius: 8px; font-size: 0.95rem; }
.faq-toc a:hover { background: var(--panel); color: var(--ink); }
.faq-search { margin-top: 28px; max-width: 560px; }
.faq-search input {
  width: 100%; padding: 14px 18px; font: inherit; border-radius: 999px; border: 1px solid var(--asphalt-line);
  background: var(--asphalt-2); color: var(--on-dark);
}
.faq-search input::placeholder { color: var(--on-dark-muted); }
.faq-group { padding: 0; margin-bottom: 44px; }
.faq-group h2 { font-size: 2rem; }
.faq-item { background: var(--panel); border: 1px solid var(--steel); border-radius: var(--radius-sm); margin-bottom: 10px; }
.faq-item summary {
  cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 600; list-style: none; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); color: var(--instrument); font-size: 1.2rem;
}
.faq-item[open] summary::after { content: '−'; }
.faq-answer { padding: 0 20px 18px; color: var(--ink-muted); }
.faq-answer p { margin: 0 0 10px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-empty { display: none; background: var(--panel); border: 1px solid var(--steel); border-radius: var(--radius-sm); padding: 18px 20px; }
@media (max-width: 860px) {
  .faq-layout { grid-template-columns: 1fr; gap: 24px; }
  .faq-toc { position: static; }
  .faq-toc ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .faq-toc a { border: 1px solid var(--steel); background: var(--panel); }
}

/* ---------- Footer ---------- */

footer { background: var(--asphalt); color: var(--on-dark-muted); padding: 48px 0 40px; }
.footer-inner { display: grid; gap: 18px; }
.footer-inner .brand { color: var(--on-dark); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--on-dark); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; color: #fff; }
.footer-copy { font-size: 0.85rem; margin: 0; }

/* Back to top */
.to-top {
  position: fixed; left: 20px; bottom: 20px; z-index: 30; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--asphalt-line); background: var(--asphalt); color: var(--on-dark);
  display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.to-top { visibility: hidden; transition: opacity 0.2s, visibility 0.2s; }
.to-top.visible { opacity: 1; pointer-events: auto; visibility: visible; }

/* Grid children default to min-width:auto, which lets a wide table push the page sideways. */
.two-col > *, .band-inner > *, .hero-inner > *, .faq-layout > * { min-width: 0; }
