/* Shared styles for keechain.com pages other than the home page.
   The first part mirrors the inline <style> in index.html (same "Instrument
   Panel" tokens as dashboard/src/index.css); keep the two in step. */
/* ============================================================
   Keechain marketing - "Instrument Panel" tokens
   (mirrors dashboard/src/index.css)
   ============================================================ */
:root {
  --bg: oklch(0.985 0.002 247);
  --surface: #fff;
  --surface-2: oklch(0.968 0.003 247);
  --ink: oklch(0.205 0.006 265);
  --ink-2: oklch(0.49 0.01 265);
  --ink-3: oklch(0.68 0.008 265);
  --hairline: oklch(0.912 0.004 264);
  --hairline-2: oklch(0.865 0.005 264);
  --accent: oklch(0.52 0.19 262);
  --accent-hover: oklch(0.47 0.19 262);
  --accent-ink: oklch(0.985 0.002 247);
  --ok: oklch(0.62 0.15 155);
  --ok-ink: oklch(0.42 0.12 155);
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-full: 999px;
  --shadow-pop: 0 8px 24px oklch(0.2 0.01 265 / 0.1), 0 1px 2px oklch(0.2 0.01 265 / 0.06);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --container: 1120px;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; }
::selection { background: oklch(0.52 0.19 262 / 0.16); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

.overline {
  font-size: 12px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-2);
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── static dither tile, identical to the dashboard utility ── */
.dither {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><rect width="2" height="2" x="0" y="0" fill="black"/><rect width="2" height="2" x="4" y="2" fill="black"/><rect width="2" height="2" x="2" y="4" fill="black"/><rect width="2" height="2" x="6" y="6" fill="black"/></svg>');
  background-size: 8px 8px;
  image-rendering: pixelated;
}

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 15px/1 var(--font-sans);
  border-radius: var(--r-md); padding: 12px 20px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background 120ms var(--ease), border-color 120ms var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: translateY(0.5px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--hairline); color: var(--ink); }
.btn-ghost:hover { border-color: var(--hairline-2); background: var(--surface); }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* ── nav ── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: oklch(0.985 0.002 247 / 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px; letter-spacing: -0.01em; text-decoration: none;
}
/* the three-box mark (driver/assets/brand), inked like the dashboard sidebar */
.wordmark .glyph {
  width: 30px; height: 13px;
  background-color: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="142 340 740 320"><rect x="142" y="470" width="180" height="190" rx="52"/><rect x="362" y="340" width="180" height="320" rx="52"/><rect x="582" y="430" width="300" height="230" rx="52"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="142 340 740 320"><rect x="142" y="470" width="180" height="190" rx="52"/><rect x="362" y="340" width="180" height="320" rx="52"/><rect x="582" y="430" width="300" height="230" rx="52"/></svg>') center / contain no-repeat;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a.link {
  font-size: 14px; color: var(--ink-2); text-decoration: none;
  padding: 8px 12px; border-radius: var(--r-sm);
  transition: color 120ms var(--ease), background 120ms var(--ease);
}
.nav-links a.link:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-cta .btn { white-space: nowrap; }
@media (max-width: 720px) { .nav-links { display: none; } }
@media (max-width: 420px) { .nav-cta { gap: 6px; } .nav-cta .btn-sm { padding: 7px 10px; font-size: 13px; } }

/* ── hero ── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--hairline); }
.hero-field {
  position: absolute; inset: 0; pointer-events: none;
}
.hero-field canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated;
  opacity: 0.15;
  -webkit-mask-image: radial-gradient(120% 90% at 78% 8%, black, transparent 62%);
  mask-image: radial-gradient(120% 90% at 78% 8%, black, transparent 62%);
}
.hero-inner {
  position: relative;
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.hero h1 {
  font-size: clamp(42px, 5.8vw, 74px);
  font-weight: 600; letter-spacing: -0.035em; line-height: 1.02;
  text-wrap: balance;
  margin-top: 16px;
}
.hero .lede {
  margin-top: 20px; max-width: 50ch;
  font-size: clamp(16px, 1.4vw, 18px); color: var(--ink-2); text-wrap: pretty;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--ink-3); }

/* ── mock panel ── */
.panel {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 18px 20px;
}
.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: var(--r-full);
  background: var(--accent); margin-right: 7px; vertical-align: 1px;
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
.pill {
  font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--r-full);
  border: 1px solid var(--hairline); color: var(--ink-2); white-space: nowrap;
}
.pill.ok { color: var(--ok-ink); border-color: oklch(0.62 0.15 155 / 0.35); background: oklch(0.62 0.15 155 / 0.07); }
.pill.blue { color: var(--accent); border-color: oklch(0.52 0.19 262 / 0.35); background: oklch(0.52 0.19 262 / 0.06); }

/* ── sections ── */
section.block { padding: clamp(48px, 6vw, 80px) 0; }
.section-head { max-width: 60ch; }
.section-head h2 {
  margin-top: 12px; font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; text-wrap: balance;
}
.section-head p { margin-top: 12px; color: var(--ink-2); max-width: 52ch; text-wrap: pretty; }

.feature-grid {
  display: grid; gap: 12px; margin-top: 32px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.feature {
  display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 20px;
  transition: border-color 200ms var(--ease);
}
.feature:hover { border-color: var(--hairline-2); }
.feature .icon {
  width: 36px; height: 36px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--hairline);
  display: grid; place-items: center; color: var(--ink-2);
}
.feature h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.feature p { margin-top: 4px; font-size: 14px; color: var(--ink-2); text-wrap: pretty; }

/* ── final CTA ── */
.fin { position: relative; overflow: hidden; border-top: 1px solid var(--hairline); text-align: center; }
.fin-field { position: absolute; inset: 0; pointer-events: none; }
.fin-field canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated; opacity: 0.12;
  -webkit-mask-image: radial-gradient(ellipse at 50% 130%, black, transparent 68%);
  mask-image: radial-gradient(ellipse at 50% 130%, black, transparent 68%);
}
.fin-inner { position: relative; padding: clamp(56px, 7vw, 96px) 0; }
.fin h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
.fin p { margin: 14px auto 0; color: var(--ink-2); max-width: 44ch; text-wrap: pretty; }

/* ── footer ── */
footer { border-top: 1px solid var(--hairline); }
.foot {
  display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between;
  padding: 28px 0; font-size: 13px; color: var(--ink-2);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--ink); }

.door-panel {
  margin-top: 20px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 4vw, 52px); align-items: start;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: clamp(22px, 3.5vw, 36px);
}
@media (max-width: 820px) { .door-panel { grid-template-columns: 1fr; } }
.door-panel + .door-panel { margin-top: 12px; }
.door-panel h3 {
  font-size: clamp(21px, 2.4vw, 27px); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.16; text-wrap: balance;
}
.door-panel .said {
  margin-top: 12px; color: var(--ink-2); font-size: 15px; text-wrap: pretty;
}
.gets { display: flex; flex-direction: column; gap: 0; }
.door-panel > div > .said + .gets { margin-top: 20px; }
.get {
  display: grid; grid-template-columns: 20px 1fr; gap: 14px; align-items: start;
  padding: 12px 0; border-bottom: 1px solid var(--hairline);
}
.get:first-child { padding-top: 0; }
.get:last-child { border-bottom: 0; padding-bottom: 0; }
.get .tick { color: var(--ok-ink); margin-top: 2px; }
.get b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.get span { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-2); text-wrap: pretty; }

/* ── booking flow mock ── */
.flow { display: flex; flex-direction: column; margin-top: 12px; }
.flow-row {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  font-size: 13px; padding: 10px 0;
}
.flow-row + .flow-row { border-top: 1px solid var(--hairline); }
.flow-row:first-child { padding-top: 0; }
.flow-row:last-child { padding-bottom: 0; }
.flow-row .t { font-family: var(--font-mono); color: var(--ink-3); font-size: 11px; letter-spacing: 0.04em; }
.flow-row .l { color: var(--ink); text-wrap: pretty; }
.flow-row .l small { display: block; color: var(--ink-2); font-size: 12px; margin-top: 1px; }
@media (max-width: 420px) { .flow-row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; } }

/* ── pricing ── */
.plans {
  display: grid; gap: 12px; margin-top: 32px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 22px;
  transition: border-color 200ms var(--ease);
}
.plan:hover { border-color: var(--hairline-2); }
.plan.featured { border-color: var(--accent); box-shadow: var(--shadow-pop); }
.plan .price { margin-top: 12px; font-size: 32px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.plan .price .per { font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.plan .extra { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.plan .tag { margin-top: 12px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.plan ul { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.plan li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; font-size: 14px; color: var(--ink-2); }
.plan li::before { content: '\2713'; color: var(--ok-ink); }
.plan .btn { margin-top: 20px; justify-content: center; }
.plans-note { margin-top: 16px; font-size: 14px; color: var(--ink-3); max-width: 72ch; text-wrap: pretty; }

/* ── reveal on scroll (armed by JS only, so no-JS/crawlers see everything) ── */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js-reveal .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   Feature, comparison and guide pages
   ============================================================ */

.nav-links a.link[aria-current='page'] { color: var(--ink); background: var(--surface-2); }

/* static dither in the page head (no WebGL off the home page) */
.page-head { position: relative; overflow: hidden; border-bottom: 1px solid var(--hairline); }
.page-head .dither {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.06;
  -webkit-mask-image: radial-gradient(110% 90% at 85% 0%, black, transparent 60%);
  mask-image: radial-gradient(110% 90% at 85% 0%, black, transparent 60%);
}
.page-head-inner { position: relative; padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 72px); }
.page-head h1 {
  margin-top: 14px; max-width: 22ch;
  font-size: clamp(34px, 4.6vw, 56px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance;
}
.page-head .lede {
  margin-top: 18px; max-width: 58ch;
  font-size: clamp(16px, 1.4vw, 18px); color: var(--ink-2); text-wrap: pretty;
}

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { color: var(--ink-3); }

/* long-form copy */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 40px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 24px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.prose p, .prose ul, .prose ol { margin-top: 12px; color: var(--ink-2); text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 20px; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); }

/* step list */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 18px 20px;
}
.steps li::before {
  content: counter(step);
  width: 28px; height: 28px; border-radius: var(--r-full);
  display: grid; place-items: center;
  font: 600 13px/1 var(--font-mono); color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--hairline);
}
.steps b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.steps span { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-2); text-wrap: pretty; }

/* comparison table */
.table-wrap { margin-top: 28px; overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface); }
table.compare { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
table.compare th, table.compare td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
table.compare tr:last-child th, table.compare tr:last-child td { border-bottom: 0; }
table.compare thead th { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); background: var(--surface-2); }
table.compare tbody th { font-weight: 600; color: var(--ink); width: 28%; }
table.compare td { color: var(--ink-2); text-wrap: pretty; }
table.compare td.us { color: var(--ink); }
.table-note { margin-top: 12px; font-size: 13px; color: var(--ink-3); max-width: 80ch; text-wrap: pretty; }

/* FAQ */
.faq { margin-top: 28px; display: grid; gap: 8px; max-width: 80ch; }
.faq details { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 0 20px; }
.faq details[open] { border-color: var(--hairline-2); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-mono); color: var(--ink-3); }
.faq details[open] summary::after { content: '\2212'; }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.faq details p { padding-bottom: 16px; color: var(--ink-2); font-size: 15px; text-wrap: pretty; }

/* related pages */
.related { display: grid; gap: 12px; margin-top: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .related { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .related { grid-template-columns: 1fr; } }
.related a {
  display: block; text-decoration: none;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 18px 20px;
  transition: border-color 200ms var(--ease);
}
.related a:hover { border-color: var(--hairline-2); }
.related a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.related b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.related span { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-2); text-wrap: pretty; }

/* sources under a comparison */
.sources { margin-top: 16px; padding-left: 20px; font-size: 13px; color: var(--ink-2); max-width: 90ch; }
.sources li + li { margin-top: 4px; }
.sources a { color: var(--ink-2); word-break: break-word; }

/* feature cards that link */
a.feature { text-decoration: none; color: inherit; }
a.feature:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.feature .more { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--accent); }
