/* Silo 26 site. No frameworks, no external JS.
   Palette: brushed aluminium paper, graphite ink, one blue. */

:root {
  --bg: #eceef2;
  --surface: #f8f9fb;
  --sunk: #e2e5eb;
  --ink: #14161b;
  --muted: #555b67;
  --line: #d2d6de;
  --accent: rgb(74, 107, 255);
  --accent-text: #2f4fe0;
  --accent-soft: rgba(74, 107, 255, 0.12);
  --on-accent: #ffffff;
  --pad-glass: linear-gradient(160deg, #fbfbfd 0%, #e9ecf1 100%);
  --pad-edge: #cfd4dc;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 18px 40px -24px rgba(20, 22, 27, 0.35);

  --display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: 16px;
  --measure: 64ch;
  --wide: 1120px;
  --radius: 22px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --sunk: #1d2128;
    --ink: #e8eaee;
    --muted: #9aa1ad;
    --line: #2a2f38;
    --accent-text: #8ea3ff;
    --accent-soft: rgba(74, 107, 255, 0.18);
    --pad-glass: linear-gradient(160deg, #20242c 0%, #15181d 100%);
    --pad-edge: #2e333d;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

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

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--display); font-weight: 650; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.5rem, 8vw, 4.6rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 4.6vw, 2.7rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.08rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 40ch; }
.label {
  font: 600 0.78rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
kbd, .mono { font-family: var(--mono); font-size: 0.88em; }
kbd {
  display: inline-block;
  padding: 0.1em 0.45em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
  line-height: 1.4;
}

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

.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 650 1.12rem/1 var(--display); letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; }
.site-nav { display: flex; gap: 18px; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
@media (max-width: 560px) { .site-nav .hide-sm { display: none; } }

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

.hero { padding: 28px 0 72px; }
.hero .wrap { display: grid; gap: 44px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; gap: 56px; } .hero { padding: 56px 0 104px; } }
.hero h1 { margin-bottom: 20px; }
.hero h1 .quiet { color: var(--muted); }

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.btn-mac {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 24px 16px 20px;
  background: var(--accent); color: var(--on-accent);
  border-radius: 16px; text-decoration: none;
  font: 650 1.2rem/1 var(--display); letter-spacing: -0.01em;
  box-shadow: 0 10px 24px -14px rgba(74, 107, 255, 0.9);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-mac:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -14px rgba(74, 107, 255, 1); text-decoration: none; }
.btn-mac:active { transform: translateY(1px); }
.btn-mac svg { width: 22px; height: 22px; }
.badge-appstore {
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 18px;
  background: #000; color: #fff; border: 1px solid #3a3a3c; border-radius: 14px;
  text-decoration: none; line-height: 1.05;
}
.badge-appstore small { display: block; font-size: 0.68rem; letter-spacing: 0.02em; }
.badge-appstore strong { display: block; font: 600 1.15rem/1.05 var(--body); letter-spacing: -0.01em; }
.badge-appstore svg { width: 22px; height: 22px; }
.fineprint { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }
.fineprint span + span::before { content: "·"; margin: 0 8px; color: var(--line); }

/* The signature: a trackpad you can read. */
.pad {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 34px;
  background: var(--pad-glass);
  border: 1px solid var(--pad-edge);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pad svg.trail { position: absolute; inset: 0; width: 100%; height: 100%; }
.pad .note {
  position: absolute;
  font: 500 0.78rem/1.3 var(--mono);
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  white-space: nowrap;
}
.pad .note b { color: var(--ink); font-weight: 600; }
.note-a { left: 6%; top: 8%; }
.note-b { right: 6%; top: 42%; }
.note-c { left: 8%; bottom: 8%; }
@media (max-width: 420px) { .pad .note { font-size: 0.7rem; padding: 5px 7px; } }

.trail .path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 9; }
.trail .scroll { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; opacity: 0.55; }
.trail .finger { fill: var(--accent); opacity: 0.16; }
.trail .tip { fill: var(--accent); }
.trail .ripple { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
  .trail .path { stroke-dashoffset: 520; animation: draw 2.4s cubic-bezier(.45,.05,.25,1) 0.3s forwards; }
  .trail .tip { opacity: 0; animation: appear 0.2s ease 2.5s forwards; }
  .trail .ripple { animation: ripple 1.1s ease-out 2.6s 2; }
  @keyframes draw { from { stroke-dashoffset: 520; } to { stroke-dashoffset: 0; } }
  @keyframes appear { to { opacity: 1; } }
  @keyframes ripple { 0% { opacity: 0.7; transform: scale(0.4); } 100% { opacity: 0; transform: scale(2.2); } }
}

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

section { padding: 72px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { section { padding: 104px 0; } }
.section-head { display: grid; gap: 14px; margin-bottom: 44px; max-width: 46rem; }
.section-head p { color: var(--muted); margin: 0; max-width: var(--measure); }

/* The five tabs, named as they appear in the app. */
.tabbar {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 6px; margin: 0 0 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  list-style: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.tabbar li { flex: 1 1 0; min-width: 0; }
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; border-radius: 12px;
  color: var(--muted); text-decoration: none; font-size: 0.78rem; font-weight: 500;
}
.tabbar a:hover { background: var(--accent-soft); color: var(--accent-text); }
.tabbar svg { width: 22px; height: 22px; }

.tab {
  display: grid; gap: 20px 48px;
  padding: 40px 0;
  border-top: 1px dashed var(--line);
  scroll-margin-top: 16px;
}
.tab:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 900px) { .tab { grid-template-columns: 15rem 1fr; } }
.tab-name { display: flex; align-items: center; gap: 10px; color: var(--accent-text); font: 600 0.95rem/1 var(--display); }
.tab-name svg { width: 20px; height: 20px; }
.tab h3 { margin: 10px 0 0; font-size: 1.5rem; }
.tab p { color: var(--muted); max-width: var(--measure); }
.tab p strong { color: var(--ink); font-weight: 600; }

.specs { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 0; max-width: 40rem; }
.specs li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.specs li span:last-child { color: var(--muted); text-align: right; }

/* Gestures: fingers drawn as dots. */
.gestures { width: 100%; max-width: 40rem; border-collapse: collapse; margin-top: 18px; font-size: 0.95rem; }
.gestures th, .gestures td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.gestures th { font-weight: 500; width: 4.5rem; }
.gestures td:last-child { color: var(--muted); text-align: right; padding-left: 12px; }
.dots { display: inline-flex; gap: 4px; padding-top: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

/* ---------- Pairing ---------- */

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 28px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.steps li { counter-increment: step; padding-top: 18px; border-top: 2px solid var(--ink); }
.steps li::before { content: "Step " counter(step); display: block; margin-bottom: 10px; font: 600 0.78rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.steps h3 { margin-bottom: 8px; font-size: 1.15rem; }
.steps p { color: var(--muted); margin: 0; font-size: 0.97rem; }

.code { display: flex; gap: 6px; margin: 40px 0 0; flex-wrap: nowrap; }
.code span {
  display: grid; place-items: center;
  width: clamp(38px, 11vw, 60px); height: clamp(52px, 15vw, 80px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  font: 600 clamp(1.6rem, 6vw, 2.6rem)/1 var(--display); font-variant-numeric: tabular-nums;
}
.code span:nth-child(4) { margin-left: clamp(8px, 3vw, 18px); }
.code-caption { margin-top: 12px; font-size: 0.9rem; color: var(--muted); }

/* ---------- Security ---------- */

.route { margin: 8px 0 40px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.route svg { width: 100%; height: auto; }
.route .node { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.route .relay { fill: var(--sunk); stroke: var(--muted); stroke-dasharray: 4 4; }
.route text { font-family: var(--mono); font-size: 13px; fill: var(--ink); }
.route .sub { fill: var(--muted); font-size: 11.5px; }
.route .wire { stroke: var(--accent); stroke-width: 2; }
.route .cipher { font-size: 11px; fill: var(--accent-text); letter-spacing: 0.08em; }

.facts { display: grid; gap: 28px 40px; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.facts h3 { font-size: 1.08rem; margin-bottom: 6px; }
.facts p { color: var(--muted); margin: 0; font-size: 0.97rem; }

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

.faq { max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 18px 0; font: 600 1.08rem/1.35 var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.4rem/1 var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 20px; color: var(--muted); max-width: var(--measure); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Closing download ---------- */

.closing { text-align: left; }
.closing .wrap { display: grid; gap: 20px; }
@media (min-width: 900px) { .closing .wrap { grid-template-columns: 1fr auto; align-items: end; } }
.closing .cta { margin-top: 0; }

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

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 0.92rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* ---------- Document pages (privacy, support) ---------- */

.doc { padding: 32px 0 88px; }
.doc .wrap { max-width: 46rem; }
.doc h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); margin-bottom: 12px; }
.doc .meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 36px; }
.doc h2 { font-size: 1.45rem; margin: 48px 0 12px; padding-top: 20px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.doc h3 { font-size: 1.1rem; margin: 28px 0 8px; }
.doc ul, .doc ol { padding-left: 1.2em; margin: 0 0 1em; }
.doc li { margin-bottom: 0.4em; }
.doc li::marker { color: var(--muted); }
.summary-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 0 0 12px; }
.summary-box p:last-child, .summary-box ul:last-child { margin-bottom: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 0.9rem; background: var(--surface); }
.toc a:hover { border-color: var(--accent); color: var(--accent-text); }
.table-scroll { overflow-x: auto; margin: 0 0 1em; }
.data { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
.data th, .data td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.data th { font-weight: 600; color: var(--ink); }
.data td { color: var(--muted); }
.callout { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin: 0 0 1em; }
