/* ============================================================================
   Maktaby — landing page styles
   Dark-first, with a light theme driven by [data-theme="light"] on <html>.
   Palette is taken from .github/assets/readme-hero-dark-en.svg so the page and
   the README banner read as one thing.
   ========================================================================= */

/* ------------------------------- Tokens ---------------------------------- */
:root {
  --blue: #3B93FF;
  --blue-deep: #156FE6;
  --amber: #FFB703;
  --coral: #FF5232;
  --cyan: #00B4D8;

  --font-sans: "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, -apple-system,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --wrap: 1180px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 68px;
}

/* Dark (default) */
html[data-theme="dark"] {
  --bg: #070C16;
  --bg-2: #0A1220;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .075);
  --surface-solid: #0D1524;
  --border: rgba(255, 255, 255, .10);
  --border-strong: rgba(255, 255, 255, .18);
  --text: #EAF0F8;
  --text-2: #A9B8CC;
  --text-3: #7C8CA3;
  --accent: var(--blue);
  --accent-ink: #04162C;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, .85);
  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, .95);
  --grid-line: rgba(255, 255, 255, .045);
  --glow-a: rgba(59, 147, 255, .20);
  --glow-b: rgba(0, 180, 216, .14);
  --glass: rgba(9, 15, 27, .72);
}

/* Light */
html[data-theme="light"] {
  --bg: #F5F7FB;
  --bg-2: #FFFFFF;
  --surface: rgba(12, 26, 48, .035);
  --surface-2: rgba(12, 26, 48, .06);
  --surface-solid: #FFFFFF;
  --border: rgba(12, 26, 48, .10);
  --border-strong: rgba(12, 26, 48, .18);
  --text: #10192B;
  --text-2: #44536B;
  --text-3: #64748B;
  --accent: var(--blue-deep);
  --accent-ink: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(16, 25, 43, .08);
  --shadow: 0 16px 36px -24px rgba(16, 25, 43, .45);
  --shadow-lg: 0 40px 80px -44px rgba(16, 25, 43, .38);
  --grid-line: rgba(12, 26, 48, .045);
  --glow-a: rgba(59, 147, 255, .16);
  --glow-b: rgba(0, 180, 216, .12);
  --glass: rgba(255, 255, 255, .78);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  /* Offset anchor targets so the sticky header never covers a heading. */
  scroll-padding-top: calc(var(--header-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, kbd { font-family: var(--font-mono); font-size: .86em; }
code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .1em .38em;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.025em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.14rem; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* The release lookup hides meta rows with the `hidden` attribute, and several of
   them are display:inline-flex, which would otherwise beat the UA rule. */
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }
.wrap--narrow { max-width: 820px; }

.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; text-decoration: none; }

.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.9; flex: none; }
.icon--sm { width: 14px; height: 14px; }

/* --------------------------- Ambient background --------------------------- */
.bg-grid, .bg-glow { position: fixed; inset: 0; pointer-events: none; z-index: -1; }
.bg-grid {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 35%, transparent 78%);
}
.bg-glow { inset: auto; filter: blur(90px); border-radius: 50%; }
.bg-glow--one { width: 720px; height: 460px; top: -220px; left: -140px; background: var(--glow-a); }
.bg-glow--two { width: 640px; height: 420px; top: 180px; right: -220px; background: var(--glow-b); }

/* ------------------------------- Header ---------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), backdrop-filter .25s var(--ease);
}
.site-header.is-stuck {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { border-radius: 8px; }
.brand-name { font-size: 1.06rem; }

.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .93rem;
  font-weight: 500;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.site-nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .icon { width: 18px; height: 18px; }

/* Sun shows in dark mode, moon in light. */
html[data-theme="dark"] .icon--moon { display: none; }
html[data-theme="light"] .icon--sun { display: none; }

.nav-toggle { display: none; }

/* ------------------------------- Buttons --------------------------------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--btn-bg);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .22s var(--ease),
              background-color .18s var(--ease), border-color .18s var(--ease), opacity .18s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.995); }

.btn--primary {
  --btn-bg: linear-gradient(180deg, #4EA0FF, var(--blue-deep));
  color: #fff;
  box-shadow: 0 12px 28px -14px rgba(21, 111, 230, .9), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn--primary:hover { box-shadow: 0 18px 34px -14px rgba(21, 111, 230, 1), inset 0 1px 0 rgba(255, 255, 255, .28); }
html[data-theme="light"] .btn--primary { color: #fff; }

.btn--outline { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn--outline:hover { background: var(--surface-2); border-color: var(--accent); }

.btn--ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn--ghost:hover { background: var(--surface); }

.btn--sm { padding: 8px 13px; font-size: .88rem; border-radius: 9px; }
.btn--lg { padding: 14px 24px; font-size: 1rem; border-radius: 13px; }

/* Live star count inside the header's GitHub button. Hidden until the API
   answers, so the button never shows a placeholder dash. */
.count-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.count-badge .icon { color: var(--amber); fill: var(--amber); stroke: none; width: 12px; height: 12px; }

.btn[aria-disabled="true"], .btn.is-disabled {
  opacity: .5;
  pointer-events: none;
  filter: saturate(.35);
  box-shadow: none;
}

/* --------------------------------- Hero ---------------------------------- */
.hero { padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); position: relative; }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.eyebrow { margin-bottom: 20px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text-2);
}
.pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #33D17A;
  box-shadow: 0 0 0 3px rgba(51, 209, 122, .18);
}
.hero h1 { margin-bottom: 20px; }
.grad {
  background: linear-gradient(100deg, #6FB4FF 0%, #3B93FF 40%, #00B4D8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme="light"] .grad { background-image: linear-gradient(100deg, #156FE6, #3B93FF 55%, #0891B2); }

.lede { color: var(--text-2); font-size: 1.1rem; max-width: 58ch; }
.lede strong { color: var(--text); font-weight: 650; }
.lede em { font-style: normal; color: var(--text); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 20px;
  font-size: .88rem;
  color: var(--text-3);
}
/* gap 4px, not more: a .meta-item is a flex container, so whitespace between
   two flex items is discarded and a wider gap would read as a loose space.
   The literal spaces in the markup are kept for screen readers. */
.meta-item { display: inline-flex; align-items: center; gap: 4px; }
.meta-item .icon { color: var(--text-3); }

.hero-note { margin-top: 16px; font-size: .85rem; color: var(--text-3); max-width: 56ch; }
.hero-note a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--border-strong); }
.hero-note a:hover { color: var(--accent); }

/* Hero screenshot frame */
.hero-visual { position: relative; }
.shot-frame {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1600px) rotateY(-5deg) rotateX(1.5deg);
  transition: transform .5s var(--ease);
}
.shot-frame:hover { transform: perspective(1600px) rotateY(-2deg) rotateX(.5deg); }
.shot-frame-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.tl { display: flex; gap: 6px; }
.tl i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.tl i:nth-child(1) { background: #FF5F57; }
.tl i:nth-child(2) { background: #FEBC2E; }
.tl i:nth-child(3) { background: #28C840; }
.shot-frame-title { font-size: .78rem; color: var(--text-3); letter-spacing: .01em; }

.shot-frame-body {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  line-height: 0;
}
.shot-frame-body img { width: 100%; height: auto; }
.shot-zoom {
  position: absolute;
  right: 12px; bottom: 12px;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(6, 10, 20, .62);
  backdrop-filter: blur(8px);
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.shot-zoom .icon { width: 17px; height: 17px; }
.shot-frame-body:hover .shot-zoom, .shot-frame-body:focus-visible .shot-zoom { opacity: 1; transform: none; }
.shot-caption { margin-top: 16px; font-size: .84rem; color: var(--text-3); text-align: center; }

.stat-row {
  margin-top: clamp(36px, 5vw, 60px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 20px;
  background: var(--bg);
}
.stat strong { font-size: 1.06rem; letter-spacing: -.02em; }
.stat span { font-size: .82rem; color: var(--text-3); }

/* ------------------------------- Sections -------------------------------- */
.section { padding: clamp(60px, 8vw, 108px) 0; position: relative; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--border); }
html[data-theme="light"] .section--alt { background: var(--surface); }

.section-head { max-width: 68ch; margin-bottom: clamp(30px, 4vw, 48px); }
.section-head h2 { margin-bottom: 14px; }
.section-sub { color: var(--text-2); font-size: 1.04rem; }
.kicker {
  display: inline-block;
  margin-bottom: 12px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ------------------------------- Features -------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px 140px at 50% -20%, var(--glow-a), transparent 70%);
  opacity: 0;
  transition: opacity .3s var(--ease);
  pointer-events: none;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface-2); }
.card:hover::after { opacity: 1; }
.card--wide { grid-column: span 2; }
.card-body { padding: 22px; position: relative; z-index: 1; height: 100%; }
.card-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 14px;
  font-size: 1.15rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: .96rem; }
.card-foot { margin-top: 12px; font-size: .92rem; }
.link { font-weight: 600; }

.ticks { margin-top: 14px; display: grid; gap: 8px; }
.ticks li {
  position: relative;
  padding-left: 24px;
  font-size: .93rem;
  color: var(--text-2);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 3px; top: .52em;
  width: 9px; height: 9px;
  border-radius: 3px;
  background: var(--accent);
  opacity: .85;
}

/* ------------------------------- Gallery --------------------------------- */
/* The hero capture is full width; the rest are wildly different aspect ratios
   (a 16:9 desktop next to a tall portrait tray menu), so they flow in CSS
   multi-column rather than grid — grid rows would pad every short card out to
   the height of the tallest one in its row. */
.gallery { display: grid; gap: 18px; }
.gallery-masonry { column-count: 3; column-gap: 18px; }
.gallery-masonry .shot {
  break-inside: avoid;
  display: inline-block; /* keeps the column from splitting the box model */
  width: 100%;
  margin: 0 0 18px;
}
.shot {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.shot:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.shot-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  line-height: 0;
  position: relative;
}
.shot-open img { width: 100%; height: auto; }
.shot-open::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(4, 8, 16, .45));
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.shot-open:hover::after { opacity: 1; }
.shot figcaption {
  padding: 15px 18px 17px;
  font-size: .89rem;
  color: var(--text-3);
}
.shot figcaption strong { display: block; color: var(--text); font-size: .96rem; margin-bottom: 3px; }

/* ------------------------------- Steps ----------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.step-num {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #4EA0FF, var(--blue-deep));
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: .95rem; }

.shortcut-table { margin-top: 20px; }
.shortcut-title { margin-bottom: 12px; }
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: 12px 18px; text-align: left; }
thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
tbody tr + tr td { border-top: 1px solid var(--border); }
tbody td:first-child { color: var(--text-2); white-space: nowrap; }
tbody td:last-child { color: var(--text); }
kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: .8em;
}

/* ------------------------------- Install --------------------------------- */
.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(26px, 4vw, 52px);
  align-items: start;
}
.install-copy h2 { margin-bottom: 14px; }
.install-steps {
  counter-reset: istep;
  display: grid;
  gap: 14px;
  margin: 24px 0;
}
.install-steps li {
  counter-increment: istep;
  position: relative;
  padding-left: 40px;
  color: var(--text-2);
  font-size: .98rem;
}
.install-steps li::before {
  content: counter(istep);
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .82rem;
  font-weight: 700;
}
.install-aside {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: .92rem;
}

.install-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.install-card-title { margin-bottom: 16px; }
.reqs { display: grid; gap: 14px; }
.reqs li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; font-size: .9rem; color: var(--text-2); }
.req-label {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: center;
}

/* --------------------------------- FAQ ----------------------------------- */
.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.faq details[open] { border-color: var(--border-strong); background: var(--surface-2); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-weight: 600;
  font-size: .99rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { padding: 0 20px 18px; color: var(--text-2); font-size: .95rem; }

/* --------------------------------- CTA ----------------------------------- */
.section--cta { padding-block: clamp(56px, 7vw, 92px); }
.cta-inner { text-align: center; display: grid; justify-items: center; gap: 14px; }
.cta-inner h2 { max-width: 22ch; }
.cta-inner > p { color: var(--text-2); max-width: 52ch; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }
.cta-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-top: 6px;
  font-size: .84rem;
  color: var(--text-3);
}
/* Direct children only: making the nested value spans flex items too would
   swallow the space between the number and its label. `gap` supplies that space
   because whitespace between flex items is never rendered. */
.cta-meta > span { display: inline-flex; align-items: center; gap: 5px; }

/* -------------------------------- Footer ---------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding-top: 46px;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 34px;
  padding-bottom: 34px;
}
.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-name { font-weight: 700; letter-spacing: -.02em; }
.footer-tag { font-size: .84rem; color: var(--text-3); }
.footer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
.footer-col { display: grid; gap: 9px; align-content: start; }
.footer-col h4 {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  margin-bottom: 3px;
}
.footer-col a { color: var(--text-2); font-size: .92rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  padding-block: 18px 26px;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text-3);
}

/* ------------------------------- Lightbox -------------------------------- */
/* The side gutters hold the prev/next buttons, so the image never sits under
   them and the controls stay reachable on a narrow phone. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 40px) clamp(52px, 7vw, 84px);
  background: rgba(3, 6, 12, .84);
  backdrop-filter: blur(6px);
  animation: fade .2s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.lightbox-figure {
  margin: 0;
  max-width: min(1400px, 100%);
  display: grid;
  gap: 12px;
  justify-items: center;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9);
}
.lightbox-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  text-align: center;
  color: #C6D2E2;
  font-size: .9rem;
}
.lightbox-count {
  padding: 2px 9px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #93A4B8;
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lightbox-hint {
  position: absolute;
  bottom: 12px;
  left: 0; right: 0;
  text-align: center;
  color: rgba(198, 210, 226, .45);
  font-size: .76rem;
  letter-spacing: .02em;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  transition: background-color .18s var(--ease), transform .18s var(--ease);
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, .2); }
.lightbox-close:active,
.lightbox-nav:active { transform: scale(.94); }
.lightbox-close { top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 11px; z-index: 2; }
.lightbox-close .icon { width: 18px; height: 18px; }

.lightbox-nav {
  top: 50%;
  width: 46px; height: 46px;
  margin-top: -23px;
  border-radius: 50%;
}
.lightbox-nav .icon { width: 20px; height: 20px; }
.lightbox-nav--prev { left: 10px; }
.lightbox-nav--next { right: 10px; }
.lightbox-nav[hidden] { display: none; }

body.no-scroll { overflow: hidden; }

/* ------------------------------- Reveals --------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--reveal-delay, 0) * 70ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ------------------------------ Responsive ------------------------------- */
@media (max-width: 960px) {
  .hero-inner, .install-grid, .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .shot-frame { transform: none; }
  .hero-visual { order: -1; }
  .lede, .hero-note { max-width: none; }
  .gallery-masonry { column-count: 2; }
}

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  /* The nav leaves the flow (it becomes the drop-down panel), so it can no
     longer be what pushes the actions to the right edge. */
  .header-actions { margin-left: auto; }
  .site-nav {
    position: absolute;
    top: calc(var(--header-h) - 1px);
    left: 0; right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 10px 22px 16px;
    background: var(--glass);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav a { padding: 11px 12px; font-size: .98rem; }
  .card--wide { grid-column: span 1; }
  .reqs li { grid-template-columns: 1fr; gap: 5px; }
  .req-label { justify-self: start; }
  .hide-md { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero-cta .btn { width: 100%; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat { padding: 14px 16px; }
  .gallery-masonry { column-count: 1; }
  tbody td:first-child { white-space: normal; }
}

/* --------------------------- Reduced motion ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .shot-frame { transform: none; }
}