/* Optically — optically.app
 *
 * One stylesheet, used by the live site and by the standalone preview, so the
 * two cannot drift. Tokens first; nothing below the token block ever names a
 * raw colour.
 */

:root {
  color-scheme: light dark;

  /* The mark's own two stops. These are the logo's colours and they never
     change — the mark is a graphic on its own ground and reads fine in both
     themes. */
  --brand-a: #e1ed81;
  --brand-b: #8bc9c2;

  /* The same ramp when it is used as INK — gradient headline text, and the
     lines in the diagram.
     *
     * THESE ARE NOT THE BRAND STOPS, and that is the whole point. The pale
     * yellow-green measures 1.22:1 on this page's ground: the second line of
     * the H1 was all but invisible on a light-mode Mac, which is the macOS
     * default. Same two hues, taken down in lightness until they clear 4.5:1.
     * Dark mode gets the artwork's own values back, where they measure 15:1. */
  --ink-a: #717d12;
  --ink-b: #3c827a;
  /* The diagram sits on the sunken ground and only has to clear 3:1 as a
     graphic, so it keeps a little more of the mark's character. */
  --line-live-a: #859315;
  --line-live-b: #479990;
  --line-dead: rgb(22 22 26 / 22%);
  --line-box: rgb(22 22 26 / 55%);

  /* Ground and ink. The dark ground is sampled from the app icon's own base
     rather than a generic near-black, and the light ground is warmed a
     fraction so it does not read as printer white next to the mark. */
  --bg: #fbfbf9;
  --bg-raised: #ffffff;
  --bg-sunken: #f2f2ee;
  --ink: #16161a;
  --ink-soft: #4a4a52;
  /* Grey with a cool bias toward the teal, so it belongs to the palette
     instead of being inherited from the browser. */
  --ink-mute: #6f747a;
  --line: #e2e2dc;
  /* Link/accent solid, dark enough to hold contrast on the light ground. */
  --accent: #2b7a72;
  --accent-ink: #16161a;
  /* A control's edge is a non-text element: 3:1, not the hairline's 1.3:1. */
  --field-line: #8e8e86;
  --card-line: #e2e2dc;
  --card-shadow: 0 1px 2px rgb(22 22 26 / 5%), 0 8px 20px -14px rgb(22 22 26 / 22%);
  --danger: #a8341f;
  --shadow: 0 1px 2px rgb(22 22 26 / 6%), 0 12px 32px -12px rgb(22 22 26 / 14%);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark mode gets the artwork's own colours back as ink. */
    --ink-a: #e1ed81; --ink-b: #8bc9c2;
    --line-live-a: #e1ed81; --line-live-b: #8bc9c2;
    --line-dead: rgb(244 244 239 / 26%);
    --line-box: rgb(244 244 239 / 42%);
    --bg: #0b0b0e;
    --bg-raised: #141419;
    --bg-sunken: #08080a;
    --ink: #f4f4ef;
    --ink-soft: #c6c6c0;
    --ink-mute: #8b8f94;
    --line: #26262c;
    --accent: #7fc3bb;
    --accent-ink: #0b0b0e;
    --field-line: #62626e;
    --card-line: #26262c;
    --card-shadow: none;
    --danger: #ff8a75;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 20px 48px -16px rgb(0 0 0 / 60%);
  }
}

/* The viewer's own toggle wins over the OS preference, in BOTH directions. */
:root[data-theme='light'] {
  --ink-a: #717d12; --ink-b: #3c827a;
  --line-live-a: #859315; --line-live-b: #479990;
  --line-dead: rgb(22 22 26 / 22%);
  --line-box: rgb(22 22 26 / 55%);
  --bg: #fbfbf9; --bg-raised: #ffffff; --bg-sunken: #f2f2ee;
  --ink: #16161a; --ink-soft: #4a4a52; --ink-mute: #6f747a;
  --line: #e2e2dc; --accent: #2b7a72; --accent-ink: #16161a;
  --field-line: #8e8e86; --card-line: #e2e2dc;
  --card-shadow: 0 1px 2px rgb(22 22 26 / 5%), 0 8px 20px -14px rgb(22 22 26 / 22%);
  --danger: #a8341f;
  --shadow: 0 1px 2px rgb(22 22 26 / 6%), 0 12px 32px -12px rgb(22 22 26 / 14%);
}
:root[data-theme='dark'] {
    /* Dark mode gets the artwork's own colours back as ink. */
    --ink-a: #e1ed81; --ink-b: #8bc9c2;
    --line-live-a: #e1ed81; --line-live-b: #8bc9c2;
    --line-dead: rgb(244 244 239 / 26%);
    --line-box: rgb(244 244 239 / 42%);
  --bg: #0b0b0e; --bg-raised: #141419; --bg-sunken: #08080a;
  --ink: #f4f4ef; --ink-soft: #c6c6c0; --ink-mute: #8b8f94;
  --line: #26262c; --accent: #7fc3bb; --accent-ink: #0b0b0e;
  --field-line: #62626e; --card-line: #26262c; --card-shadow: none; --danger: #ff8a75;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 20px 48px -16px rgb(0 0 0 / 60%);
}

/* SF Pro on a Mac, which is what this is for. Not a fallback — a page about a
   Mac utility, read on a Mac, should be set in the system's own face. */
:root {
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue',
          system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  --wrap: 1080px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

img, svg { max-width: 100%; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 50%; translate: -50% -120%;
  background: var(--bg-raised); color: var(--ink); padding: .6rem 1rem;
  border-radius: 8px; z-index: 100; transition: translate .15s;
}
.skip:focus { translate: -50% 0.5rem; }

/* ---------------------------------------------------------------- type -- */

h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -0.022em; line-height: 1.06; }

.display {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}
.h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 650; }
.h3 { font-size: 1.2rem; font-weight: 620; letter-spacing: -0.012em; }

.lede {
  font-size: clamp(1.1rem, 1.9vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34ch;
  text-wrap: pretty;
}
.prose { max-width: 62ch; color: var(--ink-soft); text-wrap: pretty; }
.prose p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 1rem;
}

/* Gradient TEXT uses the ink stops, never the brand ones. */
.grad {
  background: linear-gradient(105deg, var(--ink-a), var(--ink-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

kbd {
  font-family: var(--mono); font-size: .82em;
  background: var(--bg-sunken); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 6px;
  padding: .1em .45em; color: var(--ink);
}

/* -------------------------------------------------------------- header -- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-head[data-stuck='true'] { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; height: 56px; }

.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: inherit; }
.brand svg { width: 30px; height: auto; display: block; }
.brand b { font-size: 1.02rem; font-weight: 620; letter-spacing: -.015em; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .93rem; }
.nav a:hover { color: var(--ink); }
.nav .btn { color: #10131a; font-size: .88rem; padding: .5rem 1.05rem; }
.nav .btn:hover { color: #10131a; }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }

/* ------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-size: .97rem; font-weight: 560;
  padding: .72rem 1.4rem; border-radius: 980px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, filter .18s ease, background-color .18s ease;
}
.btn:active { transform: scale(.975); }

.btn-primary {
  background: linear-gradient(105deg, var(--brand-a), var(--brand-b));
  color: #10131a;
  font-weight: 620;
}
.btn-primary:hover { filter: brightness(1.06); }

.btn-quiet {
  background: transparent; color: var(--ink); border-color: var(--line);
}
.btn-quiet:hover { background: var(--bg-sunken); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* -------------------------------------------------------------- layout -- */

section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-sunken { background: var(--bg-sunken); }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.hero { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
/* A wrapper, so the mark sizes without an inline <style> in the template. */
.hero-mark { width: clamp(84px, 12vw, 116px); margin-bottom: 2rem; }
.hero-mark svg { width: 100%; height: auto; display: block; }
.hero .lede { max-width: 40ch; margin-block: 1.25rem 2rem; }
.hero-note { font-size: .88rem; color: var(--ink-mute); margin-top: 1rem; }

.grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--bg-raised); border: 1px solid var(--card-line);
  border-radius: 18px; padding: clamp(1.35rem, 2.6vw, 1.9rem);
  box-shadow: var(--card-shadow);
}
/* The winner in the comparison grid, marked rather than left to the reader. */
.card-win {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--card-line));
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .5rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

.step-n {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .1em;
  color: var(--accent); margin-bottom: .9rem; display: block;
}

/* ------------------------------------------------------------ showcase -- */
/* One image, doing the job the audit said nothing on the page was doing:
   showing the thing being sold, and the situation it is for. */

.showcase { padding-top: 0; padding-bottom: clamp(3rem, 7vw, 5rem); }

.shot {
  position: relative; margin: 0; border-radius: clamp(18px, 2.4vw, 28px);
  overflow: hidden; background: var(--bg-sunken); box-shadow: var(--shadow);
  isolation: isolate;
}
.shot > img:first-of-type { display: block; width: 100%; height: auto; }

/* Text sits ON the photograph, so it needs its own guaranteed ground rather
   than relying on whatever happens to be behind it. */
.shot-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg,
    rgb(6 6 8 / 88%) 0%, rgb(6 6 8 / 74%) 34%,
    rgb(6 6 8 / 30%) 62%, rgb(6 6 8 / 12%) 100%);
}
.shot-copy {
  position: absolute; left: 0; bottom: 0;
  padding: clamp(1.5rem, 4vw, 3rem);
  max-width: 30ch; color: #fff;
}
.shot-copy .eyebrow { color: rgb(255 255 255 / 72%); }
.shot-line {
  margin: 0; font-size: clamp(1.5rem, 3.8vw, 2.9rem); font-weight: 680;
  line-height: 1.08; letter-spacing: -0.03em; color: #fff;
  text-wrap: balance;
}

/* The app itself, tucked into the corner at its native size. */
.shot-inset {
  position: absolute; right: clamp(1rem, 3vw, 2.5rem); bottom: clamp(1rem, 3vw, 2.5rem);
  width: clamp(132px, 20vw, 232px); height: auto;
  border-radius: 14px; box-shadow: 0 18px 44px -12px rgb(0 0 0 / 62%);
}
@media (max-width: 560px) {
  /* Below this the inset covers the sentence it is meant to illustrate. */
  .shot-inset { display: none; }
}

.shot-note {
  margin: 1.25rem 0 0; font-size: .95rem; color: var(--ink-mute);
  text-align: center;
}

/* ------------------------------------------------------- the one-way -- */
/* The diagram IS the pitch: light goes one way down the cable, so the keys
   have nothing to talk to, and Optically goes around by network instead. */

.path { margin-top: clamp(2.5rem, 6vw, 4rem); }
.path svg { width: 100%; height: auto; display: block; overflow: visible; }
/* The viewBox is 900 wide, so at a 360px viewport a 14px label rendered at
   about 5px. Scale the type up as the canvas shrinks. */
@media (max-width: 860px) { .path svg text { font-size: 22px; } }
@media (max-width: 560px) { .path svg text { font-size: 30px; } }
.path-cap {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem;
  margin-top: 1.5rem; font-size: .9rem; color: var(--ink-mute);
}
.path-cap span { display: inline-flex; align-items: center; gap: .5rem; }
.swatch { width: 22px; height: 3px; border-radius: 2px; flex: none; }
.swatch-optical { background: linear-gradient(90deg, var(--line-live-a), var(--line-live-b)); }
.swatch-dead { background: var(--line-dead); }

/* The diagram's own strokes, themed.
 *
 * In light mode the dead channel used to be the STRONGEST line on the canvas
 * (1.85:1 against a 1.12:1 beam) — the section built to explain the product
 * was arguing against it. The live paths now clear 3:1 and the dead one is
 * held below them in both themes. */
.d-dead { stroke: var(--line-dead); }
.d-box  { stroke: var(--line-box); }
.d-fill { fill: var(--line-live-b); }
.d-label { fill: var(--ink-soft); }
.d-label-dim { fill: var(--ink-mute); }

.beam { stroke-dasharray: 8 12; animation: flow 2.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -40; } }

/* ------------------------------------------------------------- pricing -- */

.price-card { display: grid; gap: clamp(1.5rem, 3.5vw, 2.75rem); align-items: start; }
@media (min-width: 800px) {
  /* A fixed-ish purchase column, so the button does not stretch the track and
     leave the two halves lopsided. */
  .price-card { grid-template-columns: 1fr minmax(15rem, 18rem); }
}
.price-facts { min-width: 0; }

/* The currency mark aligned to the TOP of the digits by layout, not by a
   negative offset. `sup` with position/top was measured in its OWN font size,
   so at .4em it lifted the $ about a rem and a half clear of the number and
   left it floating unattached. */
.price {
  display: inline-flex; align-items: flex-start; gap: .05em; margin: 0;
  font-size: clamp(3rem, 6vw, 4.25rem); font-weight: 700;
  letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.price-cur { font-size: .4em; font-weight: 600; line-height: 1.35; }
.price-sub { color: var(--ink-mute); font-size: .95rem; margin: .7rem 0 0; }

.tick { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: .6rem; }
.tick li { display: flex; gap: .65rem; align-items: baseline; color: var(--ink-soft); font-size: .97rem; }
.tick li::before {
  content: '✓'; color: var(--accent); font-weight: 700; flex: none; font-size: .9em;
}

/* The purchase side, grouped so it reads as one thing to act on. */
.buy-panel {
  background: var(--bg-sunken); border: 1px solid var(--card-line);
  border-radius: 16px; padding: clamp(1.1rem, 2.2vw, 1.4rem);
  display: grid; gap: .9rem;
}
.buy-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.buy-row label, .buy-row span { font-size: .93rem; color: var(--ink-mute); }
.buy-total { padding-top: .9rem; border-top: 1px solid var(--card-line); }
.buy-total strong { font-size: 1.35rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.buy-go { width: 100%; margin-top: .2rem; }
.buy-note { margin: 0; font-size: .84rem; color: var(--ink-mute); text-align: center; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--field-line); border-radius: 980px; overflow: hidden; }
.stepper button {
  font: inherit; font-size: 1.1rem; line-height: 1; width: 2.4rem; height: 2.4rem;
  background: var(--bg-raised); color: var(--ink); border: 0; cursor: pointer;
}
.stepper button:hover:not(:disabled) { background: var(--bg-sunken); }
.stepper button:disabled { color: var(--ink-mute); cursor: default; }
.stepper output { min-width: 4.6rem; text-align: center; font-variant-numeric: tabular-nums; font-size: .95rem; }

/* ------------------------------------------------------------ hardware -- */

.hw-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .75rem; }
.hw {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--bg-raised); border: 1px solid var(--card-line);
  border-radius: 14px; padding: 1.1rem 1.25rem;
  transition: border-color .18s ease;
}
.hw:hover { border-color: var(--accent); }
.hw-name { font-size: 1.05rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.hw-name:hover { text-decoration: underline; }
/* The whole row is the target, not just the four words of the name. */
.hw-name::after { content: ''; position: absolute; inset: 0; }
.hw { position: relative; }
.hw-kind {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-mute); margin-left: .7rem;
}
.hw-note { margin: .45rem 0 0; font-size: .93rem; color: var(--ink-soft); max-width: 56ch; }
.hw-go { color: var(--ink-mute); font-size: 1.1rem; flex: none; }

.hw-disclosure {
  margin: 1.25rem 0 0; font-size: .86rem; color: var(--ink-mute);
  max-width: 62ch; border-left: 2px solid var(--card-line); padding-left: 1rem;
}

/* ----------------------------------------------------------------- faq -- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2rem 1.15rem 0;
  font-weight: 560; position: relative; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: .25rem; top: 50%; translate: 0 -50%;
  font-size: 1.4rem; font-weight: 400; color: var(--ink-mute); line-height: 1;
  transition: rotate .2s ease;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq .answer { padding-bottom: 1.3rem; color: var(--ink-soft); max-width: 62ch; }
.faq .answer p { margin: 0 0 .8em; }
.faq .answer :last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- contact -- */

.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.field label { font-size: .9rem; color: var(--ink-soft); font-weight: 520; }
/* --field-line, not --line.
 *
 * --line is a hairline BETWEEN things, and at 1.30:1 it is right for that and
 * useless as the edge of a control: the contact form rendered as four labels
 * floating over a blank card. A control's boundary is a non-text element and
 * has to clear 3:1. */
.field input, .field textarea, .field select {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg-raised); border: 1px solid var(--field-line);
  border-radius: 12px; padding: .7rem .85rem; width: 100%;
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink-mute); }

/* The select, stripped of its native chrome.
 *
 * Left alone, a <select> renders in the SYSTEM appearance regardless of the
 * page: a white pill with a blue chevron sitting in the middle of a dark
 * form, looking like a control that belongs to a different application. It is
 * the one form element that does not inherit, so it has to be told. */
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
}
/* The chevron cannot live on the <select> itself — a replaced element has no
   pseudo-elements — so the wrapper draws it, and a mask means it takes its
   colour from the palette instead of being baked into a data URI per theme. */
.select-wrap { position: relative; display: block; }
.select-wrap::after {
  content: '';
  position: absolute; right: .95rem; top: 50%; translate: 0 -50%;
  width: 11px; height: 7px; pointer-events: none;
  background-color: var(--ink-mute);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: background-color .15s ease;
}
.select-wrap:hover::after { background-color: var(--ink); }
/* The open list is drawn by the OS and cannot be themed, so give its options
   a ground that at least does not flash white on the way. */
.field select option { background: var(--bg-raised); color: var(--ink); }
.field textarea { min-height: 9rem; resize: vertical; }
.field .hint { font-size: .82rem; color: var(--ink-mute); }
.field-error input, .field-error textarea, .field-error select { border-color: var(--danger); }
.err { color: var(--danger); font-size: .85rem; }

.notice {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 1.15rem; margin-bottom: 1.5rem; font-size: .95rem;
}
.notice-ok { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }

/* honeypot — never shown, never announced */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* -------------------------------------------------------------- footer -- */

.site-foot { border-top: 1px solid var(--line); padding-block: 3.5rem 4rem; font-size: .92rem; }
.foot-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.site-foot h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); margin: 0 0 .9rem; font-weight: 600; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.foot-base { margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--line); color: var(--ink-mute); display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }

/* --------------------------------------------------------- legal pages -- */

.legal { max-width: 70ch; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: .5rem; }
.legal .updated { color: var(--ink-mute); font-size: .9rem; margin: 0 0 3rem; }
.legal h2 { font-size: 1.25rem; margin: 2.75rem 0 .75rem; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 1.15rem; display: grid; gap: .5rem; }
.legal strong { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------- keys demo -- */
/* The live volume keys. Laid out as keys beside a wave on a wide screen and
   stacked on a narrow one, with the keys FIRST in both — they are the control,
   and a control below the thing it moves reads as a caption. */
.keydemo {
  margin-top: 2.5rem; display: grid; gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: auto 1fr; align-items: center;
  background: var(--bg-raised); border: 1px solid var(--card-line);
  border-radius: 18px; padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--card-shadow);
}
@media (max-width: 720px) {
  .keydemo { grid-template-columns: 1fr; }
}

.keydemo-keys { display: flex; gap: .7rem; }

/* A real Apple function key: white face, thin outline glyph, F-number beneath.
   White in BOTH themes rather than following the page — a keyboard does not
   change colour when the room does, and the point of this block is that these
   are the keys already under the reader's hands. */
.keycap {
  position: relative; width: 66px; height: 60px;
  padding: 11px 0 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #ffffff 0%, #f1f1ef 100%);
  border: 1px solid #d3d3cf; border-radius: 8px;
  box-shadow: 0 1px 0 #fff inset, 0 2px 5px rgb(0 0 0 / .30),
              0 0 0 1px rgb(0 0 0 / .04);
  transition: transform .08s ease, box-shadow .08s ease;
}
/* Apple's glyphs are OUTLINES. Nothing here is filled — including the speaker
   cone, which the first version filled solid and got wrong. */
.keycap svg {
  width: 23px; height: 23px; fill: none;
  stroke: #5f5f66; stroke-width: 1.45;
  stroke-linecap: round; stroke-linejoin: round;
}
.keycap-f {
  font-size: .56rem; letter-spacing: .05em; color: #85858c;
  font-variant-numeric: tabular-nums;
}
.keycap:hover { border-color: #bdbdb8; }
.keycap:active, .keycap.is-down {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #fff inset, 0 1px 2px rgb(0 0 0 / .34);
}
.keycap:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Muted is shown on the key that caused it. */
.keycap[aria-pressed="true"] { background: linear-gradient(180deg,#f4f4f1 0%,#e6e6e2 100%); }
.keycap[aria-pressed="true"] svg { stroke: #1d6f66; }

.keydemo-wave { position: relative; min-width: 0; }
.keydemo-wave canvas {
  display: block; width: 100%; height: 150px;
}
.keydemo-level {
  position: absolute; inset-inline-end: .2rem; inset-block-start: .1rem;
  text-align: end; line-height: 1.1;
}
.keydemo-num {
  display: block; font-size: 1.9rem; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--ink);
}
.keydemo-cap { font-size: .72rem; color: var(--ink-mute); }
.keydemo.is-muted .keydemo-num { color: var(--ink-mute); }
