/* The Link — public website.
   One stylesheet, no build step. Tokens are lifted from data/index.html so the
   site and the remote read as one object; the only additions are type scale and
   spacing, which the app does not need. Dark-only on purpose: the product is a
   black box with a green pinstripe, and the page is the shelf it sits on. */

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-latin-400-600.woff2") format("woff2");
  font-weight: 400 600;          /* one variable file covers both weights */
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #101012;
  --plateA: #0b0b0d;
  --plateB: #060607;
  --plateBrd: #232327;
  --surf1: #101013;
  --surf3: #141416;
  --surf4: #1c1c20;
  --brd1: #26262a;
  --brd3: #2c2c30;
  --brd5: #3a3a40;
  --green: #57d982;
  --greenInk: #06130a;           /* text on a green button */
  --tintGreen: #0c1510;
  --txt: #ececf0;
  --txt2: #c8c8cc;
  --txt3: #9a9aa0;
  --dim: #6b6b70;
  --red: #e5534b;

  --font: "Jost", "Futura", "Century Gothic", sans-serif;
  --fs-body: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --fs-h1: clamp(2.3rem, 1.4rem + 4.6vw, 4.4rem);
  --fs-h2: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem);
  --fs-h3: 1.125rem;
  --fs-small: 0.875rem;
  --fs-legend: 0.6875rem;        /* the faceplate legend: 11 px, tracked, green */

  --gutter: clamp(20px, 5vw, 48px);
  --max: 1100px;
  --measure: 60ch;
  --space: clamp(64px, 6vw + 32px, 128px);
  --radius: 20px;
  --radius-s: 10px;
}

/* ------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--txt);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font: 400 var(--fs-body) / 1.6 var(--font);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }   /* a display:grid class must not beat the attribute */
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.1; letter-spacing: -0.012em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.measure { max-width: var(--measure); }

/* The faceplate legend. On the remote every section title is set this way —
   small capitals, wide tracking, the house green — and it is the one typographic
   gesture the site borrows wholesale. */
.legend {
  font-size: var(--fs-legend);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 14px;
}
.lede { color: var(--txt2); font-size: 1.1em; max-width: var(--measure); }
.muted { color: var(--txt3); }
.small { font-size: var(--fs-small); }

/* ------------------------------------------------------------ rail
   The signature. The wordmark's long-tailed L runs on as a rail under the
   whole word and leaves as a green arrow past the k. The page does the same:
   the render in the hero sits on this rail, and every section break is one. */
.rail {
  position: relative;
  height: 1px;
  margin: 0;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--green) 14%, var(--green) 90%, transparent 90%);
}
.rail::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 90%;
  width: 0;
  height: 0;
  border: 5.5px solid transparent;
  border-left: 12px solid var(--green);
  border-right: 0;
}

/* ------------------------------------------------------------ header */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 16, 18, 0.84);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--brd1);
}
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 58px; }
.logo { display: block; line-height: 0; margin-right: auto; }
.logo img { height: 24px; width: auto; }
.nav { display: none; }
.nav a {
  text-decoration: none;
  color: var(--txt2);
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 0;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--txt); }
.nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--green); }
.menu {
  appearance: none;
  background: none;
  border: 1px solid var(--brd3);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  color: var(--txt);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.menu svg { width: 18px; height: 18px; }
.menu .x { display: none; }
.top.open .menu .x { display: block; }
.top.open .menu .bars { display: none; }
.top.open .nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 0; right: 0; top: 100%;
  padding: 10px var(--gutter) 18px;
  background: var(--bg);           /* opaque: the hero must not show through */
  border-bottom: 1px solid var(--brd1);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.5);
}
@media (min-width: 760px) {
  .nav { display: flex; gap: 28px; }
  .menu { display: none; }
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 var(--fs-small) / 1 var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s, border-color 0.15s, background 0.15s;
}
.btn-green { background: var(--green); color: var(--greenInk); }
.btn-green:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--brd5); color: var(--txt); background: transparent; }
.btn-ghost:hover { border-color: var(--txt3); }
.btn-small { min-height: 38px; padding: 0 18px; }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.textlink {
  color: var(--txt2);
  text-decoration: none;
  border-bottom: 1px solid var(--brd5);
  padding-bottom: 1px;
}
.textlink:hover { color: var(--txt); border-color: var(--green); }

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

.hero { padding-top: clamp(28px, 6vw, 72px); overflow: hidden; }
.hero .wrap { display: grid; gap: 22px; }
.hero h1 { max-width: 11ch; }
.hero .lede { margin-top: 18px; }
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; margin-top: 28px; }
.stage { position: relative; }
/* The hero is a PHOTOGRAPH (the box on the glass top of a preamplifier, tubes
   lit green) whose edges are already black, so it needs no glow or reflection:
   it melts into the page. On a phone it bleeds edge to edge; from 900 px up it
   gets the plate radius. */
.stage picture, .stage img { width: 100%; }
.stage { margin-inline: calc(-1 * var(--gutter)); }
.hero .rail { margin-top: 0; }
@media (min-width: 900px) {
  .hero { padding-top: clamp(40px, 5vw, 72px); }
  .hero .wrap {
    grid-template-columns: 0.75fr 1.25fr;
    align-items: center;
    gap: 40px;
  }
  .hero .stage { grid-column: 2; grid-row: 1; margin-inline: 0; }
  .hero .stage img { border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6); }
  .hero .copy { grid-column: 1; grid-row: 1; }
  .hero .rail { margin-top: 40px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero .stage picture { animation: settle 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .copy > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero .copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero .copy > :nth-child(4) { animation-delay: 0.18s; }
}
@keyframes settle { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ sections */

.sec { padding-block: var(--space); }
.sec h2 { max-width: 18ch; }
.sec h1 + .lede, .sec h2 + .lede { margin-top: 18px; }
.sec h1 + .lede { margin-top: 22px; }
.center { text-align: center; }
.center h2, .center .lede { margin-inline: auto; }

.figure { margin: 0; }
.figure.photo img { border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6); }
.figure figcaption {
  margin-top: 18px;
  color: var(--txt3);
  text-align: center;
  font-size: var(--fs-small);
}

.cards { display: grid; gap: 14px; margin-top: 36px; }
.card {
  background: linear-gradient(180deg, var(--plateA), var(--plateB));
  border: 1px solid var(--plateBrd);
  border-radius: var(--radius);
  padding: 24px 24px 26px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.5);
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--txt3); }
.card .legend { margin-bottom: 18px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; gap: 18px; } }
@media (min-width: 960px) {
  .cards.four { grid-template-columns: repeat(4, 1fr); }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
}

/* rear panel callouts: three columns under the render, one per thing on the back */
.callouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.co { border-top: 1px solid var(--brd3); padding-top: 12px; }
.co b { display: block; font-weight: 600; }
.co span { color: var(--txt3); font-size: var(--fs-small); }

/* two-column prose + image */
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } .split.flip > :first-child { order: 2; } }

/* a phone bezel around a UI shot */
.phone {
  width: min(280px, 78%);
  margin: 0 auto;
  border: 7px solid #1b1b1f;
  border-radius: 36px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), inset 0 0 0 1px #2a2a2e;
}
.phone img { width: 100%; }

/* the configuration pages: three phone frames in a row, tops aligned */
.phones { display: grid; gap: 28px; margin-top: 36px; justify-items: center; }
.phone-fig { margin: 0; width: 100%; max-width: 300px; }
.phone-fig .phone { width: 100%; margin: 0; }
.phone-fig .phone.top { border-radius: 36px 36px 22px 22px; }
.phone-fig figcaption { margin-top: 14px; color: var(--txt3); text-align: center; font-size: var(--fs-small); letter-spacing: 0.08em; text-transform: uppercase; }
@media (min-width: 640px) { .phones { grid-template-columns: repeat(2, 1fr); align-items: start; gap: 24px; } }
@media (min-width: 960px) { .phones { grid-template-columns: repeat(4, 1fr); } .phone-fig { max-width: 250px; } }

.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.badges img { height: 48px; width: auto; }

/* the CTA band */
.band {
  background: linear-gradient(180deg, var(--plateA), var(--plateB));
  border: 1px solid var(--plateBrd);
  border-radius: var(--radius);
  padding: clamp(32px, 5vw, 56px) clamp(22px, 4vw, 48px);
  display: grid;
  gap: 22px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.5);
}
.band .price { font-size: clamp(1.9rem, 1.4rem + 2.5vw, 3rem); line-height: 1; }
.band .price small { font-size: 0.5em; color: var(--txt3); margin-left: 0.4em; letter-spacing: 0.04em; }
@media (min-width: 760px) {
  .band { grid-template-columns: 1fr auto; align-items: center; }
}

/* ------------------------------------------------------------ lists + tables */

.models { margin: 36px 0 0; }
.models dt {
  font-size: var(--fs-legend);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 12px;
}
.models dd { margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.models dd span {
  border: 1px solid var(--brd3);
  background: var(--surf1);
  border-radius: 8px;
  padding: 6px 12px;
  letter-spacing: 0.04em;
}
/* connector tag on a chip: DB9 models need an adapter cable */
.models dd span small {
  margin-left: 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--txt3);
  vertical-align: 1px;
}
.models dd span.db9 { border-color: var(--brd5); }
.models dd span.unk small { color: var(--dim); }

.spec { width: 100%; border-collapse: collapse; margin-top: 28px; }
.spec th, .spec td { padding: 14px 0; border-top: 1px solid var(--brd1); text-align: left; vertical-align: top; }
.spec th {
  width: 38%;
  padding-right: 16px;
  font-size: var(--fs-legend);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt3);
  line-height: 1.8;
}
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 1px solid var(--brd1); }

.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.steps .n {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--brd5);
  display: grid; place-items: center;
  font-size: var(--fs-small);
  color: var(--green);
  font-weight: 600;
}
.steps b { display: block; font-weight: 600; }
.steps span { color: var(--txt3); }

/* the signal-path diagram (How it works) */
.path { margin: 36px 0 0; }
.path svg { width: 100%; height: auto; }
.path .lbl { fill: var(--txt); font: 600 13px var(--font); letter-spacing: 0.14em; }
.path .sub { fill: var(--txt3); font: 400 12px var(--font); }
.path .wire { stroke: var(--green); stroke-width: 1.5; fill: none; }
.path .box { fill: var(--plateA); stroke: var(--plateBrd); }
.path .tip { fill: var(--green); }

.blocks { display: grid; gap: 28px 40px; margin-top: 40px; }
.blocks h3 { margin-bottom: 8px; }
.blocks p { margin: 0; color: var(--txt3); }
@media (min-width: 720px) { .blocks { grid-template-columns: 1fr 1fr; } }

.links { display: grid; gap: 14px; margin-top: 32px; }
.links a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border: 1px solid var(--plateBrd);
  border-radius: var(--radius-s);
  padding: 18px 20px;
  background: linear-gradient(180deg, var(--plateA), var(--plateB));
}
.links a:hover { border-color: var(--brd5); }
.links b { display: block; font-weight: 600; }
.links span { color: var(--txt3); font-size: var(--fs-small); }
.links .arr { color: var(--green); font-size: 1.3rem; }
@media (min-width: 640px) { .links { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------ form */

.form { display: grid; gap: 18px; max-width: 560px; margin-top: 32px; }
.field label {
  display: block;
  font-size: var(--fs-legend);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt3);
  margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  background: var(--surf1);
  border: 1px solid var(--brd3);
  border-radius: var(--radius-s);
  color: var(--txt);
  padding: 12px 14px;
  font: inherit;
  line-height: 1.4;
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--txt3) 50%), linear-gradient(135deg, var(--txt3) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: transparent; }
.field input:user-invalid { border-color: var(--red); }
.row2 { display: grid; gap: 18px; }
@media (min-width: 480px) { .row2 { grid-template-columns: 1fr 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.note { color: var(--dim); font-size: var(--fs-small); }
.msg { display: none; border-radius: var(--radius-s); padding: 16px 18px; border: 1px solid var(--brd3); background: var(--tintGreen); }
.msg.show { display: block; }
.msg.err { background: #1a0e0d; border-color: #4a2320; }
.done { display: none; }
.done.show { display: block; }
.done .legend { margin-bottom: 10px; }

/* ------------------------------------------------------------ prose (privacy) */

.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.3rem; font-weight: 600; letter-spacing: 0; margin: 2em 0 0.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; color: var(--txt2); }

/* ------------------------------------------------------------ footer */

.foot {
  margin-top: auto;
  border-top: 1px solid var(--brd1);
  padding: 44px 0 calc(36px + env(safe-area-inset-bottom));
  color: var(--txt3);
  font-size: var(--fs-small);
}
.foot .wrap { display: grid; gap: 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot nav a { text-decoration: none; color: var(--txt2); letter-spacing: 0.08em; text-transform: uppercase; font-size: var(--fs-legend); }
.foot nav a:hover { color: var(--txt); }
.foot .disc { max-width: 72ch; color: var(--dim); }
.foot .co { border: 0; padding: 0; }
@media (min-width: 760px) {
  .foot .wrap { grid-template-columns: 1fr auto; }
  .foot .disc { grid-column: 1 / -1; }
}
