/* Keybeat website. Light first, dark via prefers-color-scheme.
   Neutral greys plus one orange accent. Flat: no gradients, no glows, no shadows
   (except the macOS menu inside the mockup, which copies the real menu). */

:root {
  color-scheme: light dark;

  /* Theme tokens (light default) */
  --bg: #FFFFFF;
  --band: #F5F5F5;            /* alternate section band, boxes */
  --rule: #E5E5E5;            /* 1px lines between sections and rows */
  --text: #0D0D0D;            /* 19:1 on white */
  --text-2: #5E5E5E;          /* secondary text: 6.5:1 on white, 6.0:1 on band */
  --accent: #FF5A1F;          /* the one accent: fills and small marks only */
  --on-accent: #0D0D0D;       /* text on an orange fill: 6.2:1 */
  --accent-text: #C2410C;     /* orange as text: 5.2:1 on white, 4.75:1 on band */
  --focus: #C2410C;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: 16px;
  --max: 1120px;
  --radius: 12px;             /* boxes */
  --radius-btn: 8px;          /* buttons */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D0D0D;
    --band: #1A1A1A;
    --rule: #2A2A2A;
    --text: #F5F5F5;
    --text-2: #A3A3A3;        /* 7.7:1 on bg, 6.9:1 on band */
    --accent-text: #FF7A45;   /* 7.5:1 on bg, 6.7:1 on band */
    --focus: #FF7A45;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }

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

h1, h2, h3 { line-height: 1.1; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); letter-spacing: -0.03em; line-height: 1.02; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); letter-spacing: -0.03em; }
h3 { font-size: 1.1rem; letter-spacing: -0.01em; font-weight: 650; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 650; }
code, kbd {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--band);
  border: 1px solid var(--rule);
  padding: 0.05em 0.35em;
  border-radius: 5px;
}
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--text-2); }
.small { font-size: 0.92rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--text); color: var(--bg);
  padding: 0.5rem 0.9rem; border-radius: var(--radius-btn);
  font-weight: 600; z-index: 100; text-decoration: none;
}
.skip-link:focus { top: 8px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* A small orange square: the one recurring accent mark. */
.mark {
  display: inline-block; flex: 0 0 auto;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 1px;
}

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

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  min-height: 60px; padding-top: 10px; padding-bottom: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.45rem;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem;
  letter-spacing: -0.02em; margin-right: auto;
}
.brand img { width: 28px; height: 28px; }
.brand:hover { color: var(--text); }

.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-nav a { color: var(--text-2); text-decoration: none; font-size: 0.95rem; padding: 0.35rem 0; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.site-nav a.btn { color: var(--bg); padding: 0.5rem 0.9rem; }
@media (max-width: 480px) {
  .site-nav { gap: 0.25rem 0.9rem; }
  .site-nav a { font-size: 0.9rem; }
  .site-nav a.btn { padding: 0.45rem 0.75rem; }
}
.site-nav a.btn:hover { color: var(--on-accent); }

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

.btn {
  display: inline-block; text-align: center; vertical-align: middle;
  padding: 0.75rem 1.2rem; min-height: 44px;
  border-radius: var(--radius-btn); border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--text); }
.btn-secondary:hover { background: var(--band); color: var(--text); }
.btn-small { padding: 0.5rem 0.9rem; min-height: 36px; font-size: 0.92rem; line-height: 1.15; }

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

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--rule); }
.section-alt { background: var(--band); }
.section-head { max-width: 640px; margin-bottom: 2rem; }
.section-head p { color: var(--text-2); font-size: 1.1rem; }
.section-head p:last-child { margin-bottom: 0; }

/* Heading on the left, content on the right (wide screens). */
@media (min-width: 900px) {
  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 3rem; align-items: start; }
  .split > .section-head { margin-bottom: 0; }
}

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

.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero .wrap {
  display: grid; gap: 2.75rem; align-items: center;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4rem; }
}
.hero h1 { max-width: 15ch; }
.hero .lede { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--text-2); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1.25rem; }
.spec-line {
  display: block;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 0.82rem; color: var(--text-2); margin: 0;
}
.spec-line .mark { margin-right: 0.55rem; vertical-align: 1px; }
.hero .spec-line { margin-bottom: 1.5rem; }
.hero-meta { color: var(--text-2); font-size: 0.92rem; margin: 0; }
.hero-figure { margin: 0; width: 100%; max-width: 420px; justify-self: start; }
@media (min-width: 900px) { .hero-figure { justify-self: end; } }
.hero-figure figcaption { margin-top: 0.75rem; font-size: 0.85rem; color: var(--text-2); }

/* ---------- Menu mockup (macOS Sonoma dark) ---------- */

.mac {
  --mac-bg: rgba(40, 40, 40, 0.94);
  --mac-text: rgba(255, 255, 255, 0.92);
  --mac-dim: rgba(255, 255, 255, 0.5);
  --mac-sep: rgba(255, 255, 255, 0.14);
  --mac-item-h: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px; line-height: 1;
  color: var(--mac-text);
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #3A3A3A;       /* a flat, neutral desktop */
  border: 1px solid var(--rule);
  padding-bottom: 16px;
}
.mac-bar {
  height: 28px;
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 0 10px 0 12px;
  background: #242424;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px; font-weight: 500;
}
.mac-bar .fill { margin-right: auto; }
.mac-bar svg { width: 16px; height: 16px; display: block; }
.mac-bar .clock { font-variant-numeric: tabular-nums; }
.mac-status {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 500; font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.mac-status svg { width: 14px; height: 14px; }
.mac-status .mac-readout { white-space: pre; }

.mac-menu {
  margin: 4px 8px 0 auto;
  width: min(100%, 320px);
  background: var(--mac-bg);
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 0.5px rgba(0, 0, 0, 0.4);
  list-style: none;
}
.mac-menu li {
  display: flex; align-items: center; gap: 6px;
  min-height: var(--mac-item-h);
  padding: 0 10px 0 6px;
  border-radius: 5px;
  margin: 0;
  white-space: nowrap;
}
.mac-menu li + li { margin-top: 0; }
.mac-menu .check { width: 14px; flex: 0 0 14px; text-align: center; font-size: 11px; }
.mac-menu .label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mac-menu .right { color: var(--mac-dim); font-size: 12px; letter-spacing: 0.06em; }
.mac-menu .arrow { color: var(--mac-dim); font-size: 10px; }
.mac-menu .sep { min-height: 0; height: 1px; background: var(--mac-sep); margin: 5px 10px; padding: 0; }
.mac-menu .dim { color: var(--mac-dim); }
.mac-menu .info { color: var(--mac-text); font-variant-numeric: tabular-nums; }
.mac-menu .info .label { white-space: normal; line-height: 1.3; padding: 3px 0; }

.notes {
  display: flex; align-items: flex-end; gap: 6px;
  padding: 4px 0 2px; width: 100%;
  font-family: var(--font-mono); font-size: 10px;
}
.notes span { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--mac-dim); flex: 1 1 0; min-width: 0; }
.notes i { display: block; width: 100%; max-width: 10px; background: currentColor; border-radius: 1px; }
.notes .in { color: var(--mac-text); }
.notes .tonic { font-weight: 700; }
.notes .tonic i { background: var(--accent); }

/* ---------- Who it is for: columns split by vertical rules ---------- */

.columns { display: grid; grid-template-columns: minmax(0, 1fr); }
.columns > div { padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.columns > div:first-child { border-top: 0; padding-top: 0; }
.columns p:last-child { margin-bottom: 0; }
.columns h3 { margin-bottom: 0.4rem; }
@media (min-width: 760px) {
  .columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .columns > div { border-top: 0; padding: 0 1.5rem; border-left: 1px solid var(--rule); }
  .columns > div:first-child { border-left: 0; padding-left: 0; }
  .columns > div:last-child { padding-right: 0; }
}

/* ---------- Feature list: name left, one sentence right, rules between ---------- */

.spec-list { margin: 0; border-bottom: 1px solid var(--rule); }
.spec-list > div {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.25rem;
  padding: 1rem 0; border-top: 1px solid var(--rule);
}
.spec-list dt { font-weight: 650; }
.spec-list dd { margin: 0; color: var(--text-2); }
@media (min-width: 640px) {
  .spec-list > div { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 1.5rem; }
}

/* ---------- Private by design ---------- */

.privacy-block {
  background: var(--band);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.privacy-block h2 { max-width: 20ch; }
.privacy-block > p { color: var(--text-2); max-width: 40rem; font-size: 1.1rem; }
.privacy-block ul {
  list-style: none; padding: 0; margin: 1.75rem 0 1.5rem;
  display: grid; grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--rule);
}
.privacy-block li { margin: 0; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); display: flex; gap: 0.75rem; align-items: baseline; }
.privacy-block li .mark { transform: translateY(-1px); }
@media (min-width: 720px) {
  .privacy-block ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
}

/* ---------- Steps ---------- */

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 0; }
.steps > li {
  counter-increment: step; position: relative; margin: 0;
  padding: 1.1rem 0 1.1rem 3rem; border-top: 1px solid var(--rule);
}
.steps > li:last-child { border-bottom: 1px solid var(--rule); }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 1.2rem;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 0.9rem; color: var(--text-2);
}
.steps h3, .prose .steps h3 { margin-top: 0; margin-bottom: 0.3rem; }
.steps p:last-child { margin-bottom: 0; }
@media (min-width: 760px) {
  .steps.steps-row { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2rem; }
  .steps.steps-row > li { padding: 1.1rem 0 0; border-bottom: 0; }
  .steps.steps-row > li::before { position: static; display: block; margin-bottom: 0.75rem; }
}

/* ---------- Pricing: a plain price tag ---------- */

.price-tag {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 480px;
}
.price-tag .price-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.price-tag .price-head .spec-line { margin: 0; }
.price-tag .price {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: clamp(2.8rem, 8vw, 3.6rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1;
  margin: 0 0 0.5rem;
}
.price-tag .price small { font-family: var(--font); font-size: 1rem; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.price-tag dl { margin: 1.25rem 0 1.5rem; border-bottom: 1px solid var(--rule); }
.price-tag dl > div {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem;
  padding: 0.65rem 0; border-top: 1px solid var(--rule);
}
.price-tag dt { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-2); padding-top: 0.15em; }
.price-tag dd { margin: 0; }
.price-tag .btn { width: 100%; }
.price-tag .fine { margin: 0.9rem 0 0; }

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

.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1rem 2.2rem 1rem 0;
  font-weight: 600; font-size: 1.05rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono); color: var(--text-2); font-size: 1.25rem; font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover::after { color: var(--text); }
.faq .answer { padding: 0 0 1.1rem; color: var(--text-2); max-width: 44rem; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Final call to action ---------- */

.cta h2 { max-width: 18ch; margin-bottom: 0.6rem; }

/* ---------- Prose pages ---------- */

.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--rule); }
.page-head h1 { max-width: 18ch; font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
.page-head .lede { font-size: 1.15rem; color: var(--text-2); max-width: 42rem; }
.page-head > :last-child { margin-bottom: 0; }
.prose { max-width: 720px; padding-bottom: clamp(3rem, 7vw, 5rem); }
.prose h2 { margin-top: 2.6rem; font-size: 1.55rem; letter-spacing: -0.02em; }
.prose h3 { margin-top: 1.8rem; }
.prose ol, .prose ul { margin-bottom: 1.2em; }
.prose li + li { margin-top: 0.5em; }
.prose .callout {
  border-left: 3px solid var(--accent);
  background: var(--band);
  padding: 0.9rem 1.1rem; border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
  margin: 1.5rem 0;
}
.prose .callout p:last-child { margin-bottom: 0; }
.prose dl { margin: 0 0 1.5em; border-bottom: 1px solid var(--rule); }
.prose dt { font-weight: 650; padding-top: 1rem; border-top: 1px solid var(--rule); }
.prose dd { margin: 0.3rem 0 0; padding-bottom: 1rem; color: var(--text-2); }
.prose .steps { margin-bottom: 1.5rem; }

.toc {
  font-size: 0.95rem; margin: 0 0 2.25rem; padding: 1rem 1.25rem;
  border: 1px solid var(--rule); border-radius: var(--radius);
}
.toc-label { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-2); }
.toc ol { margin: 0.5rem 0 0; }

aside.draft {
  border: 1px solid var(--accent);
  background: var(--band);
  color: var(--text);
  padding: 0.8rem 1.1rem; border-radius: var(--radius-btn);
  margin: 0 0 2rem; font-size: 0.95rem;
}
aside.draft strong { color: var(--accent-text); }

/* Example readouts */
.readout {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  background: var(--band); border: 1px solid var(--rule); border-radius: var(--radius-btn);
  padding: 0.6rem 0.9rem; display: inline-block; font-size: 0.92rem;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 2.5rem;
  color: var(--text-2); font-size: 0.92rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer .copy { margin-right: auto; }

/* ---------- 404 ---------- */

.error-page { padding: clamp(4rem, 12vw, 8rem) var(--gutter); }
.error-page .code {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 1rem; color: var(--text-2); margin-bottom: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
