/* ============================================================
   PianoHack — pianohack.org
   Brand: Cyan #00C2D1 · Ink #0A1828 · White · Warm coral accent
   ============================================================ */

:root {
  --cyan: #00C2D1;
  --cyan-bright: #00E5FF;
  --cyan-deep: #00A0B0;
  --cyan-tint: #E3F8FA;
  --ink: #0A1828;
  --ink-soft: #16293E;
  --paper: #F7FAFC;
  --white: #FFFFFF;
  --slate: #5C6B7C;
  --slate-light: #8995A4;
  --line: #DCE5EC;
  --warm: oklch(0.68 0.16 40);        /* warm coral — contrast accent */
  --warm-soft: oklch(0.95 0.035 45);  /* coral tint for badges */
  --warm-deep: oklch(0.55 0.16 40);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 2px 6px rgba(10, 24, 40, 0.06), 0 14px 34px rgba(10, 24, 40, 0.07);
  --font-head: "Sora", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--cyan-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.18;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

p { text-wrap: pretty; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  border-bottom: 1px solid rgba(0, 194, 209, 0.25);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--white);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }

.brand img { width: 36px; height: 36px; border-radius: 8px; }

.brand-word {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-word em { font-style: normal; color: var(--cyan-bright); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.site-nav a {
  color: #C2D2DF;
  font-size: 14.5px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 7px;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--white); background: rgba(255,255,255,0.07); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--cyan-bright); background: rgba(0, 229, 255, 0.1); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  color: var(--white);
  font-size: 20px;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
}

@media (max-width: 1023px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--ink);
    border-bottom: 1px solid rgba(0, 194, 209, 0.25);
    padding: 10px 16px 18px;
    gap: 4px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { font-size: 16px; padding: 11px 14px; }
}

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

.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(0, 194, 209, 0.18), transparent 60%),
    var(--ink);
  color: var(--white);
  padding: 72px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 700;
  margin: 18px 0 16px;
}
.hero h1 em { font-style: normal; color: var(--cyan-bright); }

.hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-bright);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 999px;
  padding: 6px 14px;
}

.hero .lede {
  font-size: 18.5px;
  color: #B7C7D4;
  max-width: 54ch;
  margin-bottom: 30px;
}

.hero-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.hero-photo figcaption {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--slate-light);
  background: var(--ink-soft);
  padding: 10px 16px;
}

/* Hero slideshow: 3 stacked photos, each held 3.7s with a 0.7s crossfade.
   One 13.2s loop shared by all three, offset by negative delays. */

.hero-slides {
  position: relative;
  aspect-ratio: 1300 / 834;
  background: var(--ink);
  container-type: inline-size;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: heroSlideFade 13.2s ease-in-out infinite;
}

.hero-slide:nth-of-type(1) { animation-delay: 0s; }
.hero-slide:nth-of-type(2) { animation-delay: -8.8s; }
.hero-slide:nth-of-type(3) { animation-delay: -4.4s; }

/* The product shot is the only slide with a hard rectangular edge — the other
   two are cutouts already sitting on ink. Feather all four sides out to the
   same ink so it dissolves into the card instead of stopping at a border. */
.hero-slide:nth-of-type(2) {
  --feather-x: 11%;
  --feather-y: 14%;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 var(--feather-x), #000 calc(100% - var(--feather-x)), transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 var(--feather-y), #000 calc(100% - var(--feather-y)), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 var(--feather-x), #000 calc(100% - var(--feather-x)), transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 var(--feather-y), #000 calc(100% - var(--feather-y)), transparent 100%);
  mask-composite: intersect;
}

@keyframes heroSlideFade {
  0%       { opacity: 1; }  /*  0.0s  visible          */
  28.030%  { opacity: 1; }  /*  3.7s  start fade out   */
  33.333%  { opacity: 0; }  /*  4.4s  hidden           */
  94.697%  { opacity: 0; }  /* 12.5s  start fade in    */
  100%     { opacity: 1; }  /* 13.2s  visible again    */
}

/* Sits in the empty space of slide 1, and fades in and out with it. */
.hero-tagline {
  position: absolute;
  left: 6%;
  top: 16%;
  width: 42%;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 7.2cqw;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--white);
  text-shadow: 0 2px 20px rgba(10, 24, 40, 0.9);
  opacity: 0;
  animation: heroSlideFade 13.2s ease-in-out infinite;
}

.hero-tagline em {
  display: block;
  font-style: normal;
  color: var(--cyan-bright);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide, .hero-tagline { animation: none; }
  .hero-slide:nth-of-type(1), .hero-tagline { opacity: 1; }
}

@media (max-width: 860px) {
  .hero { padding: 48px 0 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}

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

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-head);
  font-size: 15.5px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--cyan); color: var(--ink); }
.btn-primary:hover { background: var(--cyan-bright); box-shadow: 0 8px 22px rgba(0, 229, 255, 0.3); }

.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.35); }
.btn-ghost:hover { border-color: var(--cyan-bright); color: var(--cyan-bright); }

.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-soft); }

.btn-outline { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan-deep); }

.btn[disabled], .btn.is-disabled { opacity: 0.55; pointer-events: none; }

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

.section { padding: 64px 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.dark { background: var(--ink); color: var(--white); }

.section-head { max-width: 720px; margin-bottom: 36px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan-deep);
  margin-bottom: 10px;
}
.section.dark .eyebrow { color: var(--cyan-bright); }

.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 12px; }
.section-head p { color: var(--slate); font-size: 17.5px; }
.section.dark .section-head p { color: #B7C7D4; }

/* ---------- Cards ---------- */

.card-grid { display: grid; gap: 20px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px) {
  .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .card-grid.cols-2, .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.card h3 { font-size: 18.5px; margin-bottom: 9px; }
.card p { color: var(--slate); font-size: 15.5px; }
.card .card-link { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 15px; }

.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--cyan-tint);
  color: var(--cyan-deep);
  font-size: 20px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge-tba { background: var(--warm-soft); color: var(--warm-deep); border: 1px solid color-mix(in oklab, var(--warm) 35%, white); }
.badge-cyan { background: var(--cyan-tint); color: var(--cyan-deep); border: 1px solid #BCE9EE; }
.badge-soon { background: #EFF3F7; color: var(--slate); border: 1px solid var(--line); }

/* ---------- Signal chain diagram ---------- */

.chain {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
  margin-top: 8px;
}

.chain-node {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.chain-node.is-hack { border-color: var(--cyan); border-width: 2px; background: var(--cyan-tint); }

.chain-node h4 { font-size: 16.5px; margin-bottom: 6px; }
.chain-node p { font-size: 14px; color: var(--slate); }
.chain-node .chain-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-deep);
  display: block;
  margin-bottom: 8px;
}

.chain-arrow {
  display: grid;
  place-items: center;
  color: var(--cyan-deep);
  font-size: 22px;
  font-family: var(--font-mono);
}

@media (max-width: 860px) {
  .chain { grid-template-columns: 1fr; }
  .chain-arrow { transform: rotate(90deg); padding: 2px 0; }
}

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

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 560px;
}
table.data th {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  color: var(--white);
  background: var(--ink);
  padding: 13px 18px;
}
table.data td { padding: 14px 18px; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink); }
table.data td.mono, .mono { font-family: var(--font-mono); font-size: 14px; }
table.data tr:nth-child(even) td { background: #FBFDFE; }

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

.steps { list-style: none; counter-reset: step; display: grid; gap: 16px; }
.steps li {
  counter-increment: step;
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px 20px 74px;
  box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 22px;
  top: 21px;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--cyan-deep);
}
.steps li strong { font-family: var(--font-head); font-size: 16.5px; display: block; margin-bottom: 4px; }
.steps li p { color: var(--slate); font-size: 15.5px; }

/* ---------- Callouts ---------- */

.callout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--cyan-tint);
  border: 1px solid #BCE9EE;
  border-radius: var(--radius);
  padding: 20px 22px;
  font-size: 15.5px;
}
.callout.warm { background: var(--warm-soft); border-color: color-mix(in oklab, var(--warm) 30%, white); }
.callout .callout-icon { font-size: 20px; line-height: 1.4; flex-shrink: 0; }
.callout strong { font-family: var(--font-head); }

/* ---------- Download rows ---------- */

.dl-list { display: grid; gap: 12px; }

.dl-row {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}
.dl-row .dl-meta { flex: 1; min-width: 0; }
.dl-row .dl-name { font-family: var(--font-head); font-weight: 600; font-size: 15.5px; }
.dl-row .dl-desc { font-size: 14px; color: var(--slate); margin-top: 2px; }
.dl-row .dl-kind {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan-deep);
  background: var(--cyan-tint);
  border-radius: 6px;
  padding: 4px 9px;
  flex-shrink: 0;
}
.dl-row .btn { padding: 9px 18px; font-size: 14px; flex-shrink: 0; }

@media (max-width: 640px) {
  .dl-row { flex-wrap: wrap; }
}

/* ---------- Forms ---------- */

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.form-grid { display: grid; gap: 18px; }

.field label {
  display: block;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
}
.field .hint { font-size: 13px; color: var(--slate-light); margin-top: 5px; }

.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15.5px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--cyan);
  outline-offset: 0;
  border-color: var(--cyan);
  background: var(--white);
}
.field textarea { min-height: 140px; resize: vertical; }

/* ---------- Video embeds ---------- */

.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 800px) { .video-grid { grid-template-columns: 1fr; } }

.video-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card .video-info { padding: 18px 20px; }
.video-card h3 { font-size: 16.5px; margin-bottom: 5px; }
.video-card p { font-size: 14.5px; color: var(--slate); }

.video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--slate-light);
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding: 20px;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 12px, transparent 12px 24px),
    var(--ink);
}

/* ---------- Manual page ---------- */

.manual-frame {
  width: 100%;
  height: min(82vh, 980px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

/* ---------- LED boot table dots ---------- */

.led { display: inline-block; width: 13px; height: 13px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; }
.led-green { background: #2BB673; }
.led-blue { background: #2A6FDB; }
.led-red { background: #E14B4B; }
.led-yellow { background: #E8B931; }

/* ---------- Prose (about/privacy/terms) ---------- */

.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin: 36px 0 12px; }
.prose h3 { font-size: 19px; margin: 26px 0 10px; }
.prose p, .prose ul, .prose ol { margin-bottom: 14px; color: #2C3E50; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 6px; }

/* ---------- Page hero (interior pages) ---------- */

.page-hero {
  background:
    radial-gradient(900px 360px at 90% -20%, rgba(0, 194, 209, 0.16), transparent 60%),
    var(--ink);
  color: var(--white);
  padding: 52px 0 46px;
}
.page-hero h1 { font-size: clamp(28px, 3.6vw, 42px); margin: 14px 0 12px; }
.page-hero p { color: #B7C7D4; font-size: 17.5px; max-width: 68ch; }

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

.site-footer {
  background: var(--ink);
  color: #B7C7D4;
  padding: 56px 0 28px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-grid h4 {
  color: var(--white);
  font-size: 14px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; display: grid; gap: 9px; }
.footer-grid a { color: #B7C7D4; font-size: 14.5px; }
.footer-grid a:hover { color: var(--cyan-bright); }

.footer-brand p { font-size: 14.5px; max-width: 36ch; margin-top: 12px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 22px;
  font-size: 13.5px;
  color: var(--slate-light);
}
.footer-bottom a { color: var(--slate-light); }
.footer-bottom a:hover { color: var(--cyan-bright); }

/* ---------- Misc ---------- */

.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .split-2 { grid-template-columns: 1fr; } }

.figure-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.figure-card figcaption {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate);
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

.checklist { list-style: none; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: "✓"; position: absolute; left: 4px; color: var(--cyan-deep); font-weight: 700; }
.checklist li.optional::before { content: "○"; color: var(--slate-light); font-weight: 400; }

.spacer-sm { height: 22px; }
.spacer { height: 40px; }

/* ---------- Keyboard "wrong notes → right notes" diagram ---------- */

.kbd-demo {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 30px 26px;
}

.kbd-stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 26px;
  align-items: center;
}

.kbd-col { min-width: 0; }

.kbd {
  position: relative;
  height: 188px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  gap: 4px;
}

.wkey {
  position: relative;
  flex: 1;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px 3px 7px 7px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 11px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
}
.wkey.on { background: var(--cyan); border-color: var(--cyan-deep); color: var(--ink); }

.bkey {
  position: absolute;
  top: 8px;
  width: 7.1%;
  height: 116px;
  background: var(--ink);
  border-radius: 0 0 5px 5px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 9px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 11.5px;
  color: var(--white);
  z-index: 2;
}
.bkey.played { background: oklch(0.42 0.13 18); }

.kbd-cap {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-light);
  text-align: center;
  margin-top: 16px;
}
.kbd-cap b { color: var(--cyan-deep); font-weight: 600; letter-spacing: 0; }

.kbd-mid { display: grid; place-items: center; gap: 18px; }
.kbd-pill {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  background: var(--ink);
  border-radius: 12px;
  padding: 13px 22px;
}
.kbd-pill em { font-style: normal; color: var(--cyan-bright); }
.kbd-arrow { color: var(--cyan-deep); font-size: 30px; line-height: 1; }

.kbd-note {
  margin-top: 22px;
  font-size: 15.5px;
  color: var(--slate);
  text-wrap: pretty;
}
.kbd-note b { font-family: var(--font-mono); font-size: 13.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan-deep); margin-right: 4px; }

@media (max-width: 860px) {
  .kbd-demo { padding: 22px 18px 20px; }
  .kbd-stage { grid-template-columns: 1fr; gap: 14px; }
  .kbd-mid { grid-auto-flow: column; }
  .kbd-mid .kbd-arrow { transform: rotate(90deg); }
}

/* ---- Email-gated download modal ---- */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 24, 40, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
/* display:flex above beats the browser's [hidden] rule, so restate it here. */
.gate-overlay[hidden] { display: none; }
.gate-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.gate-card h3 { font-family: var(--font-head); margin-bottom: 8px; }
.gate-file { font-size: 15px; color: var(--slate); margin-bottom: 16px; }
.gate-file-name { color: var(--ink); font-size: 13.5px; word-break: break-all; }
.gate-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--slate-light);
  cursor: pointer;
}
.gate-close:hover { color: var(--ink); }
.gate-form .btn { width: 100%; margin-top: 14px; }
/* Scoped to the gate: .field carries no base margin, and the site's other
   forms space themselves with their own grid. */
.gate-form .field + .field { margin-top: 12px; }
.gate-optional { color: var(--slate-light); font-weight: 400; font-size: 12.5px; }
.gate-check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--slate);
  cursor: pointer;
  text-wrap: pretty;
}
.gate-check input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--cyan-deep);
  cursor: pointer;
}
.gate-error { color: var(--warm-deep); font-size: 13.5px; margin-top: 6px; }
.gate-consent { font-size: 12.5px; color: var(--slate-light); margin-top: 12px; text-wrap: pretty; }
.gate-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Small layout-preview icon in a download row */
.dl-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .dl-thumb { display: none; }
}
