/* Extendeck site styles v3
   Dark, matte, quiet. One light source: the lit pad. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --bg: #101215;
  --bg-2: #14171a;
  --surface: #191c20;
  --surface-2: #1f2328;
  --line: rgba(236, 237, 239, 0.08);
  --line-2: rgba(236, 237, 239, 0.15);
  --ink: #ecedef;
  --ink-2: #a5abb2;
  --ink-3: #6c737a;
  --ice: #eceef0;
  --ice-soft: rgba(236, 237, 239, 0.06);
  --ice-glow: rgba(236, 237, 239, 0.10);
  --ice-ink: #111316;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --measure: 62ch;
  --space-section: clamp(72px, 10vw, 136px);

  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ice); }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 60; }

/* ---------- Brand ---------- */

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-word {
  font-weight: 430;
  font-stretch: 100%;
  font-size: 14px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  line-height: 1;
  margin-right: -0.32em;
}

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

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: rgba(16, 18, 21, 0.82);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--line);
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: rgba(16, 18, 21, 0.82);
  z-index: 21;
}
.header-row { display: flex; align-items: center; gap: 32px; height: 68px; }
.header-row .brand { margin-right: auto; }
.site-nav { display: flex; gap: 26px; font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 10px;
  font: inherit; font-weight: 640; font-size: 15px; font-stretch: 104%;
  text-decoration: none;
  border: 1px solid var(--line-2);
  color: var(--ink); background: transparent; cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.btn:hover { border-color: rgba(236, 237, 239, 0.3); }
.btn-primary { background: var(--ice); border-color: var(--ice); color: var(--ice-ink); }
.btn-primary:hover { background: #ffffff; border-color: #ffffff; }
.header-row .btn { min-height: 38px; padding: 0 16px; font-size: 14px; border-radius: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

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

h1, h2, h3 { margin: 0; font-weight: 720; letter-spacing: -0.022em; line-height: 1.02; }
.display { font-stretch: 116%; font-size: clamp(40px, 4.7vw, 68px); max-width: 13ch; }
h1 { font-stretch: 114%; font-size: clamp(36px, 5vw, 64px); max-width: 17ch; }
h2 { font-stretch: 112%; font-size: clamp(28px, 3.4vw, 44px); max-width: 20ch; line-height: 1.06; }
h3 { font-stretch: 106%; font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; max-width: var(--measure); }
.lede { font-size: clamp(18px, 1.5vw, 21px); color: var(--ink-2); line-height: 1.5; }
.meta { font-size: 14px; color: var(--ink-3); }

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

section { padding: var(--space-section) 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 4vw, 56px); }
.stack { display: grid; gap: clamp(36px, 4vw, 56px); }

/* ---------- Home hero ---------- */

.hero {
  padding-top: clamp(56px, 8vw, 112px);
  padding-bottom: clamp(64px, 8vw, 120px);
  background:
    radial-gradient(55% 65% at 80% 48%, rgba(236, 237, 239, 0.09), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, #0c0e10 100%);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.hero-copy { display: grid; gap: 28px; justify-items: start; }

.booth { position: relative; }
.booth-mixer {
  position: absolute;
  left: 0;
  top: 6%;
  width: 40%;
  color: var(--line-2);
}
.device {
  position: relative;
  z-index: 1;
  margin-left: 27%;
  background: #08090b;
  border: 1px solid rgba(236, 237, 239, 0.12);
  border-radius: 28px;
  padding: 14px;
  box-shadow:
    0 0 0 7px #16181b,
    0 50px 100px -40px rgba(0, 0, 0, 0.9),
    0 0 140px -30px var(--ice-glow);
}
.screen {
  background: var(--surface);
  border-radius: 15px;
  padding: clamp(14px, 2vw, 22px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 1.8vw, 22px);
}
.deck { display: grid; gap: 10px; }
.deck-name { font-size: 12px; font-weight: 640; font-stretch: 112%; color: var(--ink-2); }
.pads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.pad {
  aspect-ratio: 1 / 0.8;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: rgba(236, 237, 239, 0.3);
  font: inherit; font-size: 12.5px; font-weight: 620; font-stretch: 108%;
  display: grid; place-items: end start;
  padding: 9px 11px;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.pad[aria-pressed="true"] {
  background: var(--surface-2);
  border-color: var(--ice);
  color: var(--ink);
  box-shadow: 0 0 24px -6px var(--ice-glow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.booth-caption { position: relative; z-index: 1; margin: 22px 0 0 27%; font-size: 13px; color: var(--ink-3); }

/* ---------- Media placeholders ---------- */

.media {
  margin: 0;
  position: relative;
  aspect-ratio: var(--ratio, 16 / 9);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.media-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(60% 80% at 50% 120%, rgba(236, 237, 239, 0.10), transparent 70%),
    repeating-linear-gradient(135deg, rgba(236, 237, 239, 0.025) 0 1px, transparent 1px 14px);
}
.media-ph::before, .media-ph::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border-color: var(--line-2);
  border-style: solid;
}
.media-ph::before { top: 18px; left: 18px; border-width: 1px 0 0 1px; }
.media-ph::after { bottom: 18px; right: 18px; border-width: 0 1px 1px 0; }
.media-title { font-weight: 640; font-stretch: 108%; color: var(--ink-2); max-width: 44ch; }
.media-size { font-size: 13px; color: var(--ink-3); }
.media-full { border-radius: 0; border-left: 0; border-right: 0; }

/* ---------- Setups ---------- */

.setups { display: grid; border-top: 1px solid var(--line); }
.setup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 200px;
  gap: 32px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.setup-text { display: grid; gap: 8px; }
.setup p { color: var(--ink-2); }
.setup .go { font-size: 14px; color: var(--ink-3); }
.setup:hover h3 { color: var(--ice); }
.setup .media { --ratio: 4 / 3; border-radius: 12px; }
.setup .media-title { font-size: 13px; }

/* ---------- Problem list ---------- */

.problems { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.problems li { padding: 20px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.problems strong { font-weight: 640; font-stretch: 106%; }
.problems span { color: var(--ink-2); font-size: 16px; }

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: rgba(25, 28, 32, 0.5); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 660px; }
th, td { text-align: left; padding: 15px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 13px; font-weight: 640; color: var(--ink-3); background: var(--surface); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 640; }
tr.ours th, tr.ours td { background: var(--ice-soft); }
tr.ours th { box-shadow: inset 2px 0 0 var(--ice); }
td a { white-space: nowrap; }
.table-note { margin-top: 12px; }

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

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: 780px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); font-weight: 720; font-stretch: 125%; font-size: 22px; color: var(--ice); line-height: 1.2; }
.steps p { color: var(--ink-2); }
.steps strong { font-weight: 640; }

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

.faq { max-width: 860px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; font-weight: 640; font-stretch: 104%; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg); transition: transform 160ms ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details > div { padding: 0 0 24px; display: grid; gap: 12px; color: var(--ink-2); }

/* ---------- Question and guide pages ---------- */

.page-hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(40px, 5vw, 64px); }
.page-hero .wrap { display: grid; gap: 24px; }
.crumbs { font-size: 14px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.answer {
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--ink);
  border-left: 2px solid var(--ice);
  padding-left: 22px;
  max-width: 58ch;
}
.page-body { padding-top: 0; }
.page-body.has-line { padding-top: var(--space-section); }
.callout { border: 1px solid var(--line-2); background: var(--surface); border-radius: 14px; padding: 20px 22px; color: var(--ink-2); max-width: 74ch; }
.callout strong { color: var(--ink); }
.download { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.download p { color: var(--ink-2); font-size: 15px; }
.prose { display: grid; gap: 16px; max-width: var(--measure); }
.prose h2 { font-size: clamp(24px, 2.4vw, 30px); margin-top: 24px; }
.prose ul { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 6px; }
.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 640; }

.cta-band {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: radial-gradient(70% 140% at 100% 0%, rgba(236, 237, 239, 0.12), transparent 60%), var(--surface);
}
.cta-band p { font-size: clamp(18px, 1.6vw, 22px); font-weight: 680; font-stretch: 110%; letter-spacing: -0.01em; }

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

.site-footer { border-top: 1px solid var(--line); padding: 64px 0 72px; font-size: 14px; color: var(--ink-3); background: #0d0f11; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-brand { display: grid; gap: 14px; align-content: start; }
.footer-brand p { max-width: 32ch; }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col h3 { font-size: 13px; font-weight: 640; color: var(--ink-2); font-stretch: 106%; letter-spacing: 0; margin-bottom: 4px; }
.footer-col a { color: var(--ink-3); text-decoration: none; }
.footer-col a:hover { color: var(--ink); }
.footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 8px; max-width: none; }
.footer-legal p { max-width: 100ch; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .setup { grid-template-columns: 1fr; gap: 14px; }
  .setup .media { max-width: 360px; }
  .problems { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-row { flex-wrap: wrap; height: auto; padding-top: 14px; padding-bottom: 10px; row-gap: 12px; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; gap: 20px; padding-bottom: 4px; }
}
@media (max-width: 520px) {
  .screen { gap: 10px; padding: 12px; }
  .pads { gap: 6px; }
  .pad { font-size: 11px; padding: 7px 8px; }
  .device { margin-left: 0; }
  .booth-caption { margin-left: 0; }
  .booth-mixer { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Question and guide pages share one section */
.guide { padding-top: clamp(48px, 7vw, 96px); }
.guide-head { display: grid; gap: 22px; }
.hero + .band { border-top: 0; padding-top: 0; }
.hero-meta { font-size: 14px; color: var(--ink-3); }
@media (max-width: 520px) {
  .media-title { font-size: 13px; }
  .media-ph { padding: 18px 28px; }
}

/* ---------- Real device mockups ---------- */
.hero-device { margin: 0; position: relative; }
.hero-device::before {
  content: ""; position: absolute; inset: 8% 4% 4%;
  background: radial-gradient(closest-side, rgba(236, 237, 239, 0.10), transparent);
  filter: blur(30px); z-index: 0;
}
.hero-device img { position: relative; z-index: 1; width: 100%; height: auto; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.6)); }

.device-pair { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: end; }
.device-shot { margin: 0; display: grid; gap: 18px; justify-items: center; }
.device-shot img { width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.55)); }
.device-shot.portrait img { max-width: 300px; }
.device-shot figcaption { font-size: 14px; color: var(--ink-3); text-align: center; max-width: 38ch; }
@media (max-width: 760px) {
  .device-pair { grid-template-columns: 1fr; }
  .device-shot.portrait img { max-width: 240px; }
}

/* ---------- App Store badge and QR ---------- */
/* Apple: clear space around the badge is at least a quarter of its height */
.store-badge { display: inline-block; padding: 12px; margin: -12px; line-height: 0; }
.store-badge img { height: 48px; width: auto; }
.get-app { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.qr { margin: 0; display: flex; align-items: center; gap: 14px; }
.qr img { width: 72px; height: 72px; border-radius: 8px; background: #fff; padding: 5px; opacity: 0.92; }
.qr figcaption { font-size: 13px; color: var(--ink-3); max-width: 16ch; line-height: 1.4; }
@media (max-width: 900px) { .qr { display: none; } }

/* ---------- v5: hero download block, grouped devices, compact table ---------- */
.hero-copy { gap: 26px; }
.get-app {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 28px;
  padding: 18px 24px 18px 20px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: rgba(25, 28, 32, 0.6);
}
.get-app .store-badge { padding: 0; margin: 0; }
.get-app .store-badge img { height: 54px; width: auto; }
.get-app-qr { display: flex; align-items: center; gap: 14px; padding-left: 28px; border-left: 1px solid var(--line); }
.get-app-qr img { width: 88px; height: 88px; border-radius: 8px; background: #fff; padding: 5px; }
.get-app-qr p { font-size: 14px; color: var(--ink-2); max-width: 15ch; line-height: 1.4; margin: 0; }
.hero-device::before { inset: 14% 10% 10% 6%; }
.hero-device img { filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5)); }

.table-compact { min-width: 520px; }
.table-compact th[scope="row"] { width: 30%; }
tr.more th, tr.more td { color: var(--ink-3); }
h2 sup { font-size: 0.5em; vertical-align: super; margin-left: 2px; color: var(--ink-2); }
.footnote { margin-top: 16px; max-width: 80ch; }
.footnote sup { margin-right: 4px; }

@media (max-width: 960px) {
  .get-app { grid-template-columns: auto; padding: 0; border: 0; background: none; }
  .get-app-qr { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Minimal support site */
.minimal-hero { padding-bottom: clamp(48px, 6vw, 80px); }
.minimal-hero .wrap { grid-template-columns: 1fr; }
.media-photo { border-color: transparent; background: #0c0d0f; }

/* Technical sketches in the setup rows */
.setup { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) 340px; }
.media-sketch { background: #0e1014; border-color: var(--line); }
.media-sketch img { object-fit: contain; }
.setup:hover .media-sketch { border-color: var(--line-2); }
@media (max-width: 960px) { .setup .media-sketch { max-width: 420px; } }
