/* Keyway launch site. Tokens from docs/site/BRIEF.md. */
:root {
  color-scheme: light dark;
  --paper: #f5f3ee;
  --surface: #ffffff;
  --sunken: #ebe8e0;
  --ink: #121c2b;
  --ink-muted: #4c5566;
  --line: #d8d3c7;
  --line-strong: #a9a395;
  --navy: #0f1b2e;
  --navy-raised: #1a2a44;
  --navy-glow: #24406b;
  --on-navy: #f4efe4;
  --on-navy-muted: #c3c9d6;
  --brass: #e8a93a;
  --brass-hover: #f2bb55;
  --brass-deep: #8a5800;
  --on-brass: #1d1303;
  --steel: #8c97a8;
  --go: #1d7348;
  --go-surface: #e6f4ec;
  --focus: #b06f00;

  --code-bg: var(--surface);
  --mark-outline: transparent;
  --on-navy-border: color-mix(in srgb, var(--on-navy) 20%, transparent);
  --ring: var(--focus);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --snap: cubic-bezier(0.3, 1.4, 0.5, 1);
  --header-h: 64px;
  --section-pad: 112px;
  --gutter: 24px;
  --display: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --card-shadow: 0 18px 40px rgb(15 27 46 / 0.18), 0 2px 6px rgb(15 27 46 / 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a111d;
    --surface: #111b2b;
    --sunken: #0d1624;
    --ink: #ebe7de;
    --ink-muted: #a4adbd;
    --line: #253450;
    --line-strong: #3d4f6e;
    --navy: #070d17;
    --navy-raised: #142239;
    --navy-glow: #2b4b7c;
    --on-navy: #f4efe4;
    --on-navy-muted: #c3c9d6;
    --brass: #e8a93a;
    --brass-hover: #f2bb55;
    --brass-deep: #f0bb5c;
    --on-brass: #1d1303;
    --steel: #6b7890;
    --go: #7fd1a4;
    --go-surface: #10291d;
    --focus: #f2bb55;

    --code-bg: var(--sunken);
    /* The navy mark would vanish into the dark page without a hairline. */
    --mark-outline: color-mix(in srgb, var(--on-navy) 25%, transparent);
  }
  /* Dark navy sits on dark paper, so these navy blocks step up a shade.
     `:root` lifts them over the base rules that come later in the file. */
  :root .rec-phonebar,
  :root .terminal {
    background: var(--navy-raised);
  }
}

@media (max-width: 599px) {
  :root {
    --header-h: 56px;
    --section-pad: 72px;
    --gutter: 16px;
  }
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-stretch: 100%;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
}

@media (max-width: 599px) {
  body {
    font-size: 16px;
  }
}

p {
  margin: 0 0 1em;
  max-width: 62ch;
}

h1,
h2,
h3 {
  margin: 0;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 200ms var(--ease);
}

a:hover {
  text-decoration-color: var(--brass-deep);
}

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.navy {
  --ring: var(--brass);
  background: var(--navy);
  color: var(--on-navy);
}

.navy a:not(.btn) {
  color: var(--on-navy);
  text-decoration-color: var(--on-navy-border);
}

.navy a:not(.btn):hover {
  text-decoration-color: var(--brass);
}

.container {
  width: 100%;
  max-width: calc(1200px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.display {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  overflow-wrap: normal;
  hyphens: none;
  text-wrap: balance;
}

.section-title {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.2rem);
  max-width: 22ch;
  margin-bottom: 24px;
}

.section-title .line {
  display: block;
}

.lead {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.mono-label,
.eyebrow,
.small-print {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}

.eyebrow {
  color: var(--brass);
  margin-bottom: 20px;
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition:
    background-color 200ms var(--ease),
    transform 200ms var(--ease);
}

.btn-brass {
  background: var(--brass);
  color: var(--on-brass);
}

.btn-brass:hover {
  background: var(--brass-hover);
  transform: translateY(-1px);
}

.btn-hero {
  min-height: 56px;
  padding: 0 30px;
  font-size: 1.05rem;
}

.btn-close {
  min-height: 60px;
  padding: 0 34px;
  font-size: 1.1rem;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 500;
}

.arrow-link span {
  transition: transform 200ms var(--ease);
}

.arrow-link:hover span {
  transform: translateX(3px);
}

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
}

.skip:focus {
  top: 10px;
}

/* ---------- 0. Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition:
    background-color 300ms var(--ease),
    border-color 300ms var(--ease);
}

/* Over the navy hero: transparent with light text (only once main.js runs). */
.js .site-header:not(.is-solid) {
  --ring: var(--brass);
  --mark-outline: color-mix(in srgb, var(--on-navy) 25%, transparent);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

.js .site-header:not(.is-solid) .logo,
.js .site-header:not(.is-solid) .header-nav a {
  color: var(--on-navy);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  transition: color 300ms var(--ease);
}

.logo-mark {
  flex: none;
  display: block;
}

.logo-bg {
  fill: var(--navy);
  stroke: var(--mark-outline);
  stroke-width: 2;
}

.logo-hole {
  fill: var(--brass);
}

.logo-word {
  font-stretch: 125%;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
}

.header-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: color 300ms var(--ease);
}

.header-nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--brass);
}

.btn-small {
  padding: 0 18px;
  font-size: 15px;
}

.short-label {
  display: none;
}

@media (max-width: 759px) {
  .header-nav {
    display: none;
  }
  .site-header .btn-small {
    margin-left: auto;
  }
  .long-label {
    display: none;
  }
  .short-label {
    display: inline;
  }
}

@media (max-width: 599px) {
  .site-header .logo-mark {
    width: 28px;
    height: 28px;
  }
}

/* ---------- 1. Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + 56px) 0 72px;
  min-height: min(92svh, 860px);
  display: flex;
  align-items: center;
  isolation: isolate;
  --hero-p: 0;
  --tilt: 0;
  --key-rot: -14deg;
  --hole-x: 88.7%;
  --hole-y: 21%;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  right: -10%;
  top: 50%;
  width: 70vw;
  max-width: 1000px;
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: radial-gradient(closest-side, var(--navy-glow), transparent);
  opacity: 0.6;
}

.hero-back {
  position: absolute;
  z-index: -1;
  right: -14%;
  top: 50%;
  width: min(980px, 82vw);
  margin-top: calc(min(980px, 82vw) / -2);
  color: color-mix(in srgb, var(--on-navy) 10%, transparent);
  transform: translate3d(0, calc(var(--hero-p) * -86px), 0);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: center;
}

.hero-copy {
  grid-column: 1 / 7;
  grid-row: 1;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.6rem, 1.4rem + 5.2vw, 5.4rem);
  margin-bottom: 28px;
}

.hero-title span {
  display: block;
}

.hero-sub {
  color: var(--on-navy-muted);
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-bottom: 20px;
}

.small-print {
  font-size: 12px;
  color: var(--on-navy-muted);
  margin: 0;
}

.hero-art {
  grid-column: 5 / 13;
  grid-row: 1;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-start;
  /* Pull the key left so its tip passes behind the headline's last line. */
  margin-left: -72px;
  align-self: start;
  padding-top: 150px;
}

.key-par {
  width: min(100%, 640px);
  transform: translate3d(0, calc(var(--hero-p) * -215px), 0);
}

.key-in {
  position: relative;
}

.key-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  transform: rotate(var(--key-rot));
}

.tag-anchor {
  position: absolute;
  left: var(--hole-x);
  top: var(--hole-y);
  width: 0;
  height: 0;
  transform: translate3d(0, calc(var(--hero-p) * -86px), 0);
}

.tag-tilt {
  transform-origin: 0 0;
  transform: rotate(calc(6deg + var(--hero-p) * 6deg + var(--tilt) * 3deg));
  transition: transform 300ms var(--ease);
}

.tag-in {
  transform-origin: 0 0;
}

.tag-string {
  position: absolute;
  left: -1px;
  top: -4px;
  width: 1.5px;
  height: 64px;
  background: var(--on-navy-muted);
  border-radius: 1px;
}

.tag {
  position: absolute;
  left: -150px;
  top: 46px;
  width: 168px;
  height: 96px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  background: #f4efe4;
  color: var(--navy);
  border-radius: 12px;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--navy) 60%, transparent);
}

/* Punched hole with a brass eyelet, where the string passes through. */
.tag::before {
  content: "";
  position: absolute;
  left: 142px;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--brass);
}

.tag .mono-label {
  font-size: 10px;
  color: var(--navy);
  opacity: 0.75;
}

.tag-name {
  font-weight: 700;
  font-stretch: 88%;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.15;
}

.tag-phone {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
}

@media (max-width: 959px) {
  .hero {
    min-height: 0;
    padding-top: calc(var(--header-h) + 40px);
    --key-rot: -6deg;
    --hole-x: 90%;
    --hole-y: 34%;
  }
  .hero-copy,
  .hero-art {
    grid-column: 1 / -1;
  }
  .hero-art {
    grid-row: 2;
    margin: 48px 0 0;
    padding-top: 0;
    padding-bottom: 150px;
    justify-content: flex-start;
  }
  .key-par {
    width: 100%;
    max-width: 520px;
  }
  .hero-back {
    right: auto;
    left: -10%;
    top: auto;
    bottom: -12%;
    width: 120%;
    margin-top: 0;
  }
  .hero::before {
    top: auto;
    bottom: 0;
    left: 0;
    right: auto;
    width: 120vw;
    transform: translateY(30%);
  }
}

/* Parallax and pointer tilt only on wide screens with a fine pointer. */
@media not ((min-width: 960px) and (pointer: fine)) {
  .hero {
    --hero-p: 0 !important;
    --tilt: 0 !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .key-in {
    animation: key-in 600ms var(--ease) both;
  }
  .tag-in {
    animation: tag-swing 700ms ease-out 120ms both;
  }
  .hero-title span {
    animation: rise 600ms var(--ease) both;
  }
  .hero-title span:nth-child(2) {
    animation-delay: 80ms;
  }
  .hero-title span:nth-child(3) {
    animation-delay: 160ms;
  }
  .hero-title span:nth-child(4) {
    animation-delay: 240ms;
  }
}

@keyframes key-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
}

@keyframes tag-swing {
  from {
    opacity: 0;
    transform: rotate(4deg);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* ---------- 2. Why ---------- */

.why {
  padding: 128px 0;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

.why-statement {
  grid-column: 2 / 11;
  max-width: 30ch;
  margin: 0 0 40px;
  font-weight: 500;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.4rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.why-statement strong {
  font-weight: 700;
  background-image: linear-gradient(var(--brass), var(--brass));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 0.18em;
  transition: background-size 500ms var(--ease);
}

.why-statement strong:nth-of-type(2) {
  transition-delay: 250ms;
}

.why-statement strong:nth-of-type(3) {
  transition-delay: 500ms;
}

@media (prefers-reduced-motion: no-preference) {
  .js .why-statement:not(.is-in) strong {
    background-size: 0% 0.18em;
  }
}

.why-caption {
  grid-column: 7 / 13;
  text-align: right;
  color: var(--ink-muted);
  max-width: none;
  margin: 0;
}

@media (max-width: 959px) {
  .why {
    padding: 72px 0;
  }
  .why-statement,
  .why-caption {
    grid-column: 1 / -1;
  }
  .why-caption {
    text-align: left;
  }
}

/* ---------- 3. How it works ---------- */

.how {
  background: var(--sunken);
  padding: var(--section-pad) 0;
}

.how-lead {
  max-width: 56ch;
  color: var(--ink-muted);
  margin-bottom: 48px;
}

.how-grid {
  display: grid;
  gap: 32px;
}

.pin-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 40px;
}

@media (min-width: 720px) {
  .pin-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}

.pin-step {
  display: grid;
  gap: 16px;
  align-content: start;
}

.step-num {
  display: block;
  color: var(--brass-deep);
  margin-bottom: 6px;
}

.step-q {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 14px;
}

/* A copy of the app's selected option button: not a control here. */
.picked {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 18px;
  background: var(--surface);
  border: 2px solid var(--brass);
  border-radius: 10px;
  font-weight: 500;
  margin-bottom: 12px;
}

.step-note {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0;
}

/* Cylinder drawings, shared by the big stage and the small per-step ones. */
.cyl-housing {
  fill: var(--surface);
  stroke: var(--steel);
  stroke-width: 1.5;
}

.cyl-plug-shape,
.chamber {
  fill: none;
  stroke: var(--steel);
  stroke-width: 1.5;
}

.shear {
  stroke: var(--brass-deep);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}

/* Front-view inset: the plug end-on. Its final state is turned, so reduced
   motion and no-JS draw it turned; the pinned stage holds it square until open. */
.front-plug {
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(18deg);
  transition: transform 500ms var(--ease);
}

.front-plug-face {
  fill: var(--surface);
  stroke: var(--steel);
  stroke-width: 1.5;
}

.front-keyway {
  fill: none;
  stroke: var(--steel);
  stroke-width: 1.5;
}

.front-label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  fill: var(--ink-muted);
}

.shear-label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  fill: var(--brass-deep);
}

.spring {
  fill: none;
  stroke: var(--steel);
  stroke-width: 1.5;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: bottom;
}

.pin {
  fill: var(--surface);
  stroke: var(--steel);
  stroke-width: 1.5;
  transition: fill 160ms var(--ease);
}

.keypin {
  fill: var(--brass);
  stroke: var(--brass-deep);
}

.blade {
  fill: var(--brass);
  stroke: var(--brass-deep);
  stroke-width: 1;
}

.pin-mini {
  width: 120px;
  height: 140px;
  display: block;
}

.pin-mini .stack,
.pin-mini .spring {
  transition: transform 500ms var(--snap);
}

@media (prefers-reduced-motion: no-preference) {
  .js .pin-step:not(.is-in) .pin-mini .stack {
    transform: translateY(18px);
  }
  .js .pin-step:not(.is-in) .pin-mini .spring {
    transform: scaleY(1.7);
  }
  .js .pin-step:not(.is-in) .pin-mini .keypin {
    fill: var(--surface);
    stroke: var(--steel);
  }
}

.cylinder {
  display: none;
  width: 100%;
  height: auto;
  max-width: 560px;
}

.result-card {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  padding: 24px;
  margin-top: 40px;
  transition:
    opacity 400ms var(--ease),
    transform 400ms var(--ease);
}

.result-card .mono-label {
  color: var(--ink-muted);
}

.result-title {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 8px 0 6px;
}

.result-price {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 8px;
}

.result-note {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footnote {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin: 16px 0 0;
}

.call-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--brass);
  color: var(--on-brass);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
}

.call-pill-mini {
  min-height: 36px;
  font-size: 14px;
}

.handset {
  flex: none;
  fill: currentColor;
}

/* Desktop: the stage pins while the visitor scrolls 300vh, driven by --pin-p. */
@media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
  .js .how-track {
    height: 300vh;
  }
  .js .how-stage {
    position: sticky;
    top: 64px;
    height: calc(100svh - 64px);
    display: flex;
    align-items: center;
    --pin-p: 0;
  }
  .js .how-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    align-items: center;
  }
  .js .pin-steps {
    grid-column: 1 / 6;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .js .pin-mini {
    display: none;
  }
  .js .pin-step {
    opacity: 0.35;
    transition: opacity 300ms var(--ease);
  }
  .js .pin-step.is-active {
    opacity: 1;
  }
  .js .step-q {
    margin-bottom: 10px;
  }
  .js .picked {
    margin-bottom: 8px;
  }
  .js .how-visual {
    grid-column: 6 / 13;
    position: relative;
  }
  .js .cylinder {
    display: block;
    margin-left: auto;
  }
  .js .result-card {
    position: absolute;
    right: 0;
    bottom: -24px;
    width: 340px;
    margin: 0;
    opacity: 0;
    transform: translateY(24px);
  }
  .js .is-open .result-card {
    opacity: 1;
    transform: none;
  }
  .stack.big {
    --a: clamp(0, (var(--pin-p) - var(--start)) / var(--len), 1);
    --off: calc(32 - var(--a) * 25.6);
    transform: translateY(calc(var(--off) * 1px));
  }
  .stack.big .spring {
    transform: scaleY(calc(1 + var(--off) / 70));
  }
  .stack.big .keypin {
    fill: var(--surface);
    stroke: var(--steel);
  }
  /* The click: the last stretch snaps into place with a small overshoot. */
  .stack.big.is-set {
    --off: 0;
    transition: transform 160ms var(--snap);
  }
  .stack.big.is-set .spring {
    transition: transform 160ms var(--snap);
  }
  .stack.big.is-set .keypin {
    fill: var(--brass);
    stroke: var(--brass-deep);
  }
  /* The side section stays still; only the front-view inset's plug turns,
     and only once every pin is set. */
  .js .how-stage:not(.is-open) .front-plug {
    transform: none;
  }
}

/* ---------- 4. Features ---------- */

.features {
  padding: var(--section-pad) 0;
}

.features .section-title {
  margin-bottom: 56px;
}

.feature-rows {
  border-top: 1px solid var(--line);
}

.feature {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.feature-name {
  grid-column: 1 / 5;
  font-size: 1.3rem;
  line-height: 1.25;
  font-weight: 700;
}

.feature-name .mono-label {
  display: block;
  color: var(--brass-deep);
  margin-bottom: 8px;
}

.feature-copy {
  grid-column: 5 / 9;
  color: var(--ink-muted);
  margin: 0;
  text-wrap: pretty;
}

.recreation {
  grid-column: 9 / 13;
  display: flex;
  justify-content: flex-end;
  transition:
    opacity 500ms var(--ease),
    transform 500ms var(--ease);
}

@media (max-width: 959px) {
  .feature {
    grid-template-columns: 1fr;
    row-gap: 16px;
    padding: 32px 0;
  }
  .feature-name,
  .feature-copy,
  .recreation {
    grid-column: 1 / -1;
  }
  .recreation {
    justify-content: flex-start;
    margin-top: 8px;
  }
}

.rec-phonebar {
  width: 260px;
  max-width: 100%;
  padding: 14px 16px 18px;
  background: var(--navy);
  border: 1px solid var(--line-strong);
  border-top: 0;
  border-radius: 0 0 22px 22px;
  display: flex;
  justify-content: center;
}

.accent-lift {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--brass) 45%, transparent);
  transition:
    transform 400ms var(--ease) 200ms,
    box-shadow 400ms var(--ease) 200ms;
}

.rec-card {
  width: 260px;
  max-width: 100%;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  justify-items: start;
  gap: 10px;
}

.rec-price {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--sunken);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
}

.rec-table {
  width: 280px;
  max-width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  font-size: 13px;
}

.rec-table th,
.rec-table td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}

.rec-table th {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-muted);
}

.rec-table th:first-child,
.rec-table td:first-child {
  text-align: left;
}

.rec-table td:not(:first-child) {
  font-family: var(--mono);
  font-weight: 500;
  white-space: nowrap;
}

.rec-table tbody tr:nth-child(even) {
  background: var(--sunken);
}

.rec-table tbody tr:last-child td {
  border-bottom: 0;
}

.rec-hours {
  width: 260px;
  max-width: 100%;
  display: grid;
  gap: 12px;
  justify-items: start;
}

.open-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--go-surface);
  color: var(--go);
  font-size: 14px;
  font-weight: 600;
}

.open-pill .dot {
  display: inline-block;
  transition: transform 400ms var(--snap) 200ms;
}

.rec-days {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  gap: 4px;
  font-size: 14px;
}

.rec-days li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 999px;
}

.rec-days li span:last-child {
  font-family: var(--mono);
  font-size: 13px;
}

.rec-days .today {
  background: var(--brass);
  color: var(--on-brass);
  font-weight: 600;
  transition: transform 400ms var(--ease) 200ms;
}

@media (prefers-reduced-motion: no-preference) {
  .js .feature:not(.is-in) .recreation {
    opacity: 0;
    transform: translateY(12px);
  }
  .js .feature:not(.is-in) .accent-lift {
    transform: none;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--brass) 25%, transparent);
  }
  .js .feature:not(.is-in) .today {
    transform: scale(0.96);
  }
  .js .feature:not(.is-in) .dot {
    transform: scale(0.5);
  }
}

.spec-chips {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spec-chips li {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

/* ---------- 5. Try it ---------- */

.demo {
  padding: var(--section-pad) 0;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: center;
}

.demo-side {
  grid-column: 1 / 6;
}

.demo-lead {
  color: var(--on-navy-muted);
  margin-bottom: 36px;
}

.screens {
  display: grid;
  border-top: 1px solid var(--on-navy-border);
  margin-bottom: 20px;
}

.screen-btn {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  column-gap: 8px;
  width: 100%;
  min-height: 64px;
  padding: 10px 16px;
  text-align: left;
  background: transparent;
  color: var(--on-navy);
  border: 0;
  border-bottom: 1px solid var(--on-navy-border);
  font: inherit;
  cursor: pointer;
  transition: background-color 200ms var(--ease);
}

.screen-btn:hover {
  background: color-mix(in srgb, var(--navy-raised) 60%, transparent);
}

.screen-btn[aria-pressed="true"] {
  background: var(--navy-raised);
  box-shadow: inset 3px 0 0 var(--brass);
}

.screen-btn .mono-label {
  grid-row: 1 / 3;
  color: var(--brass);
}

.screen-label {
  font-weight: 600;
  line-height: 1.3;
}

.screen-desc {
  grid-column: 2;
  font-size: 14px;
  line-height: 1.4;
  color: var(--on-navy-muted);
}

.demo-device {
  grid-column: 7 / 13;
  display: flex;
  justify-content: center;
}

.frame-box {
  --s: 0.82;
  width: calc(418px * var(--s));
  height: calc(828px * var(--s));
}

.frame {
  position: relative;
  width: 418px;
  height: 828px;
  padding: 14px;
  background: #05090f;
  border-radius: 44px;
  box-shadow:
    0 0 0 1px var(--on-navy-border),
    0 40px 80px rgb(0 0 0 / 0.45);
  transform: scale(var(--s));
  transform-origin: 0 0;
}

.island {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 24px;
  width: 110px;
  height: 28px;
  margin-left: -55px;
  border-radius: 999px;
  background: #05090f;
}

.frame iframe {
  display: block;
  width: 390px;
  height: 800px;
  border: 0;
  border-radius: 30px;
  background: var(--paper);
  transition: opacity 150ms var(--ease);
}

.frame iframe.is-swapping {
  opacity: 0;
}

@media (max-width: 959px) {
  .demo-side,
  .demo-device {
    grid-column: 1 / -1;
  }
  .demo-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .demo-side {
    display: contents;
  }
  .demo-side .section-title,
  .demo-lead {
    order: 0;
  }
  .screens {
    order: 1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-top: 0;
    margin: 0 calc(-1 * var(--gutter)) 20px;
    padding: 4px var(--gutter);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent);
    mask-image: linear-gradient(to right, black calc(100% - 24px), transparent);
  }
  .screens::-webkit-scrollbar {
    display: none;
  }
  .screen-btn {
    flex: none;
    width: auto;
    display: inline-flex;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--on-navy-border);
    border-radius: 999px;
    scroll-snap-align: start;
    white-space: nowrap;
  }
  .screen-btn:last-child {
    margin-right: 24px;
  }
  .screen-btn[aria-pressed="true"] {
    box-shadow: none;
    border-color: var(--brass);
  }
  .screen-desc {
    display: none;
  }
  .demo-device {
    order: 2;
    display: block;
  }
  .frame-box {
    width: auto;
    height: auto;
  }
  .frame {
    width: 100%;
    height: auto;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }
  .island {
    display: none;
  }
  .frame iframe {
    width: 100%;
    height: 680px;
    border-radius: 18px;
    border: 1px solid var(--on-navy-border);
  }
  .fullscreen-link {
    order: 3;
    margin-top: 16px;
    align-self: flex-start;
  }
}

/* ---------- 6. Make it yours ---------- */

.yours {
  padding: var(--section-pad) 0;
}

.yours-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 40px;
  align-items: start;
}

.yours-copy {
  grid-column: 1 / 6;
}

.yours-code {
  grid-column: 6 / 13;
  min-width: 0;
}

@media (max-width: 959px) {
  .yours-copy,
  .yours-code {
    grid-column: 1 / -1;
  }
}

.ticks {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
}

.ticks li {
  position: relative;
  padding-left: 26px;
}

/* Brass tick, drawn as an inline SVG mask so it takes the token colour. */
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 14px;
  height: 14px;
  background: var(--brass-deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 7.5l3.5 3.5L12 3.5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 7.5l3.5 3.5L12 3.5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

figure {
  margin: 0;
}

.code {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.code-file {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
}

pre {
  margin: 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
  tab-size: 2;
}

.code pre {
  padding: 20px;
}

.chunk {
  display: block;
  transition:
    opacity 500ms var(--ease),
    transform 500ms var(--ease);
}

.chunk:nth-child(2) {
  transition-delay: 120ms;
}

.chunk:nth-child(3) {
  transition-delay: 240ms;
}

@media (prefers-reduced-motion: no-preference) {
  .js .yours-code:not(.is-in) .chunk {
    opacity: 0;
    transform: translateY(8px);
  }
}

.k {
  color: var(--ink);
}

.s {
  color: var(--brass-deep);
}

.n {
  color: var(--go);
}

.c {
  color: var(--ink-muted);
}

.typo-lead {
  margin: 32px 0 14px;
}

.terminal {
  background: var(--navy);
  border: 1px solid var(--line-strong);
  color: var(--on-navy);
  border-radius: 14px;
}

.terminal pre {
  padding: 18px 20px;
  font-size: 13px;
}

.problem::before {
  content: "› ";
  color: var(--brass);
}

@media (max-width: 599px) {
  pre {
    font-size: 13px;
  }
  .terminal pre {
    font-size: 12px;
  }
}

/* ---------- 7. Closing ---------- */

.start {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 160px 0;
  text-align: center;
}

.start-cyl {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(640px, 130%);
  transform: translate(-50%, -50%);
  color: color-mix(in srgb, var(--on-navy) 10%, transparent);
}

.plug-turn {
  transform-box: view-box;
  transform-origin: 300px 300px;
  transform: rotate(18deg);
  transition: transform 700ms var(--ease) 150ms;
}

@media (prefers-reduced-motion: no-preference) {
  .js .start:not(.is-in) .plug-turn {
    transform: none;
  }
}

.start-inner {
  display: grid;
  justify-items: center;
}

.start .section-title {
  max-width: none;
}

.start-line {
  color: var(--on-navy-muted);
  margin-bottom: 36px;
}

@media (max-width: 599px) {
  .start {
    padding: 96px 0;
  }
}

/* ---------- 8. Footer ---------- */

.site-footer {
  padding: 48px 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 32px;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand p {
  margin: 0;
}

.logo-small .logo-word {
  font-size: 18px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--ink-muted);
}

.footer-note {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  max-width: none;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 759px) {
  .footer-grid {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .footer-nav {
    margin-left: -10px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
