/* ===========================================================================
   OTPNEST public site.

   Its own look, deliberately not the panel's and not the reference site's:
   indigo night with an aurora behind it, geometric display type (Sora) over
   a neutral text face (Inter), and hairline borders instead of heavy cards.
   Light mode is a token swap, nothing else.
   =========================================================================== */

:root {
  --ink: #e8e9f5;
  --ink-soft: #b4b7cf;
  --ink-dim: #8186a6;
  --ink-faint: #5d6383;

  --bg: #07070f;
  --bg-2: #0c0d18;
  --surface: #11131f;
  --surface-2: #161829;
  --line: #22243a;
  --line-soft: #191b2c;

  --brand: #6d70f7;
  --brand-2: #a98cff;
  --brand-3: #35d0d6;
  --brand-ink: #ffffff;
  --brand-wash: #6d70f71f;
  --brand-line: #6d70f74d;

  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;

  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --r-lg: 20px;
  --r-md: 13px;
  --r-sm: 8px;
  --r-pill: 999px;

  --page: 1180px;
  --pad: 24px;

  --shadow: 0 28px 70px -30px #000000cc;
  --glow: 0 0 0 1px var(--brand-line), 0 20px 60px -25px #6d70f780;

  color-scheme: dark;
}

[data-mode="light"] {
  --ink: #12142a;
  --ink-soft: #3d4166;
  --ink-dim: #5c6186;
  --ink-faint: #8b90ad;

  --bg: #f7f7fc;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f3fa;
  --line: #e2e4f0;
  --line-soft: #edeef6;

  --brand-wash: #6d70f714;
  --brand-line: #6d70f73d;

  --shadow: 0 24px 60px -32px #1a1c3340;
  --glow: 0 0 0 1px var(--brand-line), 0 18px 48px -26px #6d70f74d;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The aurora. One fixed layer, no animation: it must not cost a phone
   anything to sit there. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 38rem at 12% -8%, #6d70f72e, transparent 62%),
    radial-gradient(48rem 34rem at 92% 6%, #35d0d61f, transparent 60%),
    radial-gradient(55rem 40rem at 50% 108%, #a98cff1c, transparent 62%);
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600;
  letter-spacing: -.02em; line-height: 1.12; }

p { margin: 0 0 1rem; }

::selection { background: var(--brand); color: #fff; }

.wrap { width: min(var(--page), 100% - (var(--pad) * 2)); margin-inline: auto; }

/* ------------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.nav-in { display: flex; align-items: center; gap: 1.4rem; height: 66px; }
.logo { display: flex; align-items: center; gap: .55rem; }
.logo img { height: 26px; }
.logo b { font-family: var(--font-display); font-size: 1.02rem; letter-spacing: -.01em; }
.logo b span { color: var(--brand-2); }

.nav-links { display: flex; gap: 1.3rem; margin-left: auto; align-items: center; }
.nav-links a {
  font-size: .89rem; color: var(--ink-soft);
  padding: .3rem 0; border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: .55rem; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--brand-line); }

.burger { display: none; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.25rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-size: .92rem; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: .18s ease;
}
.btn:hover { border-color: var(--brand-line); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent; color: var(--brand-ink);
  box-shadow: 0 14px 34px -14px #6d70f7cc;
}
.btn.primary:hover { box-shadow: 0 18px 42px -14px #6d70f7e6; }
.btn.ghost { background: transparent; }
.btn.lg { padding: .9rem 1.6rem; font-size: 1rem; }
.btn.sm { padding: .42rem .8rem; font-size: .82rem; }
.btn.block { width: 100%; justify-content: center; }

/* -------------------------------------------------------------- sections */
section { padding: 5.5rem 0; position: relative; }
section + section { border-top: 1px solid var(--line-soft); }

.eyebrow {
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .24em; text-transform: uppercase; color: var(--ink-faint);
  margin-bottom: 1.1rem;
}
.eyebrow i {
  font-style: normal; color: var(--brand-2);
  padding: .12rem .45rem; border: 1px solid var(--brand-line);
  border-radius: var(--r-sm); background: var(--brand-wash);
}
.eyebrow::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.sec-title { font-size: clamp(1.8rem, 3.4vw, 2.7rem); max-width: 22ch; }
.sec-lede { color: var(--ink-dim); max-width: 62ch; margin-top: .9rem; }

/* ------------------------------------------------------------------ hero */
.hero { padding: 5.5rem 0 4.5rem; }
.hero .tag {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .35rem .8rem .35rem .45rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface);
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim);
}
.hero .tag b {
  color: var(--brand-ink); background: var(--brand);
  padding: .1rem .45rem; border-radius: var(--r-pill); font-weight: 600;
}
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  margin: 1.4rem 0 0; max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(110deg, var(--brand-2), var(--brand-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede {
  margin-top: 1.4rem; max-width: 56ch;
  font-size: 1.08rem; color: var(--ink-soft);
}
.hero .cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }

.stat-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; margin-top: 4rem;
  background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  overflow: hidden;
}
.stat-strip div { background: var(--bg); padding: 1.4rem 1.3rem; }
.stat-strip b {
  display: block; font-family: var(--font-display);
  font-size: 1.75rem; letter-spacing: -.02em;
}
.stat-strip b u { text-decoration: none; color: var(--brand-2); font-size: 1rem; }
.stat-strip span {
  display: block; margin-top: .3rem;
  font-size: .82rem; color: var(--ink-dim);
}

/* --------------------------------------------------------------- diagram */
.flowbox {
  margin-top: 2.5rem; padding: 1.6rem;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: var(--shadow);
}
.flowbox .cap {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint);
  margin-bottom: 1.2rem;
}
.flow {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch; gap: .9rem;
}
.flow .node {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-2); padding: 1.1rem;
}
.flow .node h4 {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--brand-2);
}
.flow .node p { margin: .6rem 0 0; font-size: .86rem; color: var(--ink-dim); }
.flow .node ul { margin: .7rem 0 0; padding-left: 1rem; font-size: .82rem;
  color: var(--ink-soft); }
.flow .node li { margin-bottom: .2rem; }
.flow .arrow {
  display: grid; place-items: center; color: var(--brand);
  font-family: var(--font-mono);
}

/* ---------------------------------------------------------------- grid-n */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem; margin-top: 2.6rem;
}
.feature {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); padding: 1.5rem;
  position: relative; overflow: hidden; transition: .2s ease;
}
.feature:hover { border-color: var(--brand-line); transform: translateY(-3px); }
.feature .n {
  font-family: var(--font-mono); font-size: .7rem; color: var(--ink-faint);
  letter-spacing: .18em;
}
.feature h3 { font-size: 1.12rem; margin: .7rem 0 .55rem; }
.feature p { font-size: .9rem; color: var(--ink-dim); margin: 0; }
.feature .chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .9rem; }

.chip {
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .2rem .5rem; border-radius: var(--r-sm);
  border: 1px solid var(--line); color: var(--ink-dim);
}
.chip.on { color: var(--brand-2); border-color: var(--brand-line);
  background: var(--brand-wash); }

/* -------------------------------------------------------------- manifest */
.manifest {
  margin-top: 2.4rem; border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
}
.manifest .row {
  display: grid; grid-template-columns: 3.2rem 1fr auto;
  align-items: center; gap: 1rem;
  padding: 1rem 1.3rem; border-bottom: 1px solid var(--line-soft);
}
.manifest .row:last-child { border-bottom: 0; }
.manifest .row .n { font-family: var(--font-mono); font-size: .72rem;
  color: var(--ink-faint); }
.manifest .row .what b { display: block; font-weight: 500; }
.manifest .row .what span { font-size: .85rem; color: var(--ink-dim); }
.manifest .row .state {
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ok);
}

/* --------------------------------------------------------------- pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem; margin-top: 2.6rem; }
.plan {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); padding: 1.7rem; display: flex;
  flex-direction: column;
}
.plan.featured { border-color: var(--brand-line); box-shadow: var(--glow); }
.plan .mark {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--brand-2); margin-bottom: .8rem;
}
.plan h3 { font-size: 1.3rem; }
.plan .tps {
  margin-top: .9rem; font-family: var(--font-display);
  font-size: 2.4rem; letter-spacing: -.03em;
}
.plan .tps small { font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .18em; color: var(--ink-faint); display: block;
  margin-top: .1rem; }
.plan ul { list-style: none; margin: 1.3rem 0 0; padding: 0; font-size: .9rem; }
.plan li { display: flex; gap: .55rem; padding: .32rem 0; color: var(--ink-soft); }
.plan li svg { flex: none; margin-top: .28rem; color: var(--brand-2); }
.plan .btn { margin-top: 1.5rem; }
.plan .price { margin-top: auto; padding-top: 1.3rem; color: var(--ink-dim);
  font-size: .9rem; }

.setup-note {
  margin-top: 1rem; padding: 1.1rem 1.3rem;
  border: 1px dashed var(--line); border-radius: var(--r-md);
  color: var(--ink-dim); font-size: .9rem;
}

/* ------------------------------------------------------------------- faq */
.faq { margin-top: 2.2rem; border-top: 1px solid var(--line-soft); }
.faq details {
  border-bottom: 1px solid var(--line-soft);
}
.faq summary {
  list-style: none; cursor: pointer; padding: 1.15rem 0;
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--font-display); font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; margin-left: auto; color: var(--brand-2);
  font-family: var(--font-mono); font-size: 1.2rem;
}
.faq details[open] summary::after { content: "\2212"; }
.faq p { color: var(--ink-dim); max-width: 75ch; padding-bottom: 1.1rem;
  margin: 0; }

/* ------------------------------------------------------------------ demo */
.demo-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem; margin-top: 2.6rem; }
.demo-card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden; transition: .2s ease;
  display: flex; flex-direction: column;
}
.demo-card:hover { border-color: var(--brand-line); transform: translateY(-3px); }
.demo-card .shot { aspect-ratio: 16 / 10; background: var(--bg-2);
  border-bottom: 1px solid var(--line); overflow: hidden; }
.demo-card .shot img { width: 100%; height: 100%; object-fit: cover;
  object-position: top left; }
.demo-card .meta { padding: 1.3rem 1.4rem 1.5rem; }
.demo-card .meta h3 { font-size: 1.2rem; }
.demo-card .meta p { margin: .55rem 0 0; font-size: .9rem; color: var(--ink-dim); }
.demo-card .meta .btn { margin-top: 1.1rem; }

/* ----------------------------------------------------------------- forms */
.form-card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); padding: 1.8rem; box-shadow: var(--shadow);
}
.form-head {
  display: flex; align-items: center; gap: .8rem;
  padding-bottom: 1.2rem; margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint);
}
.form-head b { color: var(--brand-2); }
.form-head .right { margin-left: auto; }

fieldset { border: 0; margin: 0 0 1.6rem; padding: 0; }
legend {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--brand-2); padding: 0 0 .9rem;
}

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem; }

.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field > label:not(.switch):not(.pill), .field > .lbl {
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim);
}
.field .hint { font-size: .78rem; color: var(--ink-faint); }
.field.span2 { grid-column: span 2; }
.field.span3 { grid-column: span 3; }

input[type=text], input[type=email], input[type=password], input[type=url],
input[type=tel], select, textarea {
  width: 100%; padding: .78rem .9rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-2); color: var(--ink);
  font: inherit; font-size: .94rem;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-wash);
}
textarea { min-height: 7rem; resize: vertical; }
input[type=file] { font-size: .85rem; color: var(--ink-dim); }

.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill {
  position: relative; display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .9rem; border: 1px solid var(--line);
  border-radius: var(--r-pill); cursor: pointer; font-size: .88rem;
  color: var(--ink-soft); user-select: none;
}
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:has(input:checked) {
  border-color: var(--brand); background: var(--brand-wash);
  color: var(--ink);
}
.pill .dot {
  width: .5rem; height: .5rem; border-radius: 50%;
  border: 1px solid var(--ink-faint);
}
.pill:has(input:checked) .dot { background: var(--brand); border-color: var(--brand); }

.switch { display: flex; align-items: flex-start; gap: .65rem; font-size: .92rem; }
.switch input { margin-top: .32rem; accent-color: var(--brand); }
.switch span small { display: block; color: var(--ink-faint); font-size: .8rem; }

.honey { position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; }

/* ---------------------------------------------------------------- flashes */
.flashes { display: grid; gap: .6rem; margin-bottom: 1.3rem; }
.flash {
  padding: .8rem 1rem; border-radius: var(--r-md);
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  background: var(--surface); font-size: .9rem;
}
.flash.error { border-left-color: var(--bad); }
.flash.warning { border-left-color: var(--warn); }
.flash.success { border-left-color: var(--ok); }

/* ---------------------------------------------------------------- footer */
footer {
  border-top: 1px solid var(--line-soft); padding: 3.2rem 0 2.4rem;
  color: var(--ink-dim); font-size: .88rem;
}
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem; }
.foot-grid h4 {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: .9rem;
}
.foot-grid a { display: block; padding: .18rem 0; color: var(--ink-soft); }
.foot-grid a:hover { color: var(--brand-2); }
.foot-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.6rem;
  padding-top: 1.4rem; border-top: 1px solid var(--line-soft);
  font-size: .82rem; color: var(--ink-faint);
}
.foot-bottom .right { margin-left: auto; }

/* ----------------------------------------------------------------- inbox */
.inbox { display: grid; grid-template-columns: 17rem 1fr; gap: 1.4rem;
  padding: 2.4rem 0 4rem; }
.inbox aside {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); padding: 1.2rem; height: max-content;
}
.inbox aside h4 {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-faint); margin: 1.2rem 0 .6rem;
}
.inbox aside h4:first-child { margin-top: 0; }
.inbox aside a {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .6rem; border-radius: var(--r-sm);
  font-size: .9rem; color: var(--ink-soft);
}
.inbox aside a:hover { background: var(--surface-2); color: var(--ink); }
.inbox aside a.on { background: var(--brand-wash); color: var(--ink); }
.inbox aside a .count {
  margin-left: auto; font-family: var(--font-mono); font-size: .72rem;
  color: var(--ink-faint);
}
.inbox aside a .count.new { color: var(--brand-ink); background: var(--brand);
  padding: .05rem .4rem; border-radius: var(--r-pill); }

.msg-list { border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden; }
.msg-row {
  display: grid; grid-template-columns: 5.5rem 1fr 7rem 6rem;
  gap: 1rem; align-items: center;
  padding: .95rem 1.2rem; border-bottom: 1px solid var(--line-soft);
}
.msg-row:last-child { border-bottom: 0; }
.msg-row:hover { background: var(--surface-2); }
.msg-row.unread { background: var(--brand-wash); }
.msg-row .who b { display: block; }
.msg-row .who span { font-size: .84rem; color: var(--ink-dim);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; }
.msg-row .when { font-family: var(--font-mono); font-size: .76rem;
  color: var(--ink-faint); text-align: right; }

.tag {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; padding: .18rem .5rem;
  border-radius: var(--r-sm); border: 1px solid var(--line);
  color: var(--ink-dim); white-space: nowrap;
}
.tag.supplier { color: var(--brand-3); border-color: #35d0d64d; }
.tag.enquiry { color: var(--brand-2); border-color: var(--brand-line); }
.tag.new { color: var(--brand-ink); background: var(--brand); border-color: transparent; }
.tag.replied { color: var(--ok); border-color: #34d39950; }
.tag.archived { color: var(--ink-faint); }

.detail { border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); }
.detail .d-head { padding: 1.4rem 1.6rem; border-bottom: 1px solid var(--line-soft); }
.detail .d-body { padding: 1.6rem; }
.detail dl { display: grid; grid-template-columns: 11rem 1fr; gap: .1rem 1rem;
  margin: 0; }
.detail dt { font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
  padding: .5rem 0; }
.detail dd { margin: 0; padding: .5rem 0; border-bottom: 1px solid var(--line-soft); }
.detail .body-text { white-space: pre-wrap; margin-top: 1.4rem;
  padding: 1.1rem 1.2rem; border-radius: var(--r-md);
  background: var(--bg-2); border: 1px solid var(--line-soft); }

.login-wrap { min-height: 72vh; display: grid; place-items: center; padding: 3rem 0; }
.login-card { width: min(23rem, 100%); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .feature-grid, .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { transform: rotate(90deg); padding: .2rem 0; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: 66px 0 auto; z-index: 55;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: .5rem 0; display: none;
  }
  body.menu-open .nav-links { display: flex; }
  .nav-links a { padding: .8rem var(--pad); border-bottom: 1px solid var(--line-soft); }
  .burger { display: inline-grid; }
  .feature-grid, .plans, .grid2, .grid3, .demo-split { grid-template-columns: 1fr; }
  .field.span2, .field.span3 { grid-column: auto; }
  section { padding: 3.6rem 0; }
  .hero { padding: 3.2rem 0 2.6rem; }
  .msg-row { grid-template-columns: 1fr auto; }
  .msg-row .when, .msg-row .kind-cell { display: none; }
  .detail dl { grid-template-columns: 1fr; }
  .detail dt { padding-bottom: 0; }
  .detail dd { padding-top: .15rem; }
}

/* ===========================================================================
   Second pass: the things that make it read as a platform company rather
   than a brochure - a measured grid behind the hero, packets that actually
   move along the switch diagram, gradient edges on the cards that matter,
   and prices that are not whispered.

   Everything here is decoration. None of it carries meaning on its own, and
   all of the motion stops for anyone who has asked for less of it.
   =========================================================================== */

/* A faint engineering grid, only behind the hero, fading out downward. */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  opacity: .55;
}
.hero { position: relative; }

/* The readout under the hero: small, monospace, factual. */
.readout {
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1.8rem;
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint);
}
.readout span { display: inline-flex; align-items: center; gap: .45rem; }
.readout i {
  font-style: normal; width: .4rem; height: .4rem; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent);
}
.readout b { color: var(--ink-soft); font-weight: 500; }

/* A single line of capability chips that drifts. Decorative; duplicated so
   the loop has no seam, and the copy is hidden from screen readers. */
.ticker {
  margin-top: 3.2rem; overflow: hidden;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: .9rem 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker-track {
  display: flex; gap: 2.6rem; width: max-content;
  animation: drift 38s linear infinite;
}
.ticker span {
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint);
  white-space: nowrap;
}
.ticker span::before {
  content: "\2022"; color: var(--brand-2); margin-right: .8rem;
}
@keyframes drift { to { transform: translateX(-50%); } }

/* Packets travelling the switch diagram. The dot rides the arrow column. */
.flow .arrow { position: relative; overflow: hidden; }
.flow .arrow::after {
  content: ""; position: absolute;
  width: .36rem; height: .36rem; border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--brand-2) 55%, transparent);
  animation: packet 2.6s linear infinite;
}
.flow .arrow:nth-of-type(4)::after { animation-delay: 1.3s; }
@keyframes packet {
  0%   { left: -8%; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: 108%; opacity: 0; }
}

/* The node a message passes through earns a lit edge. */
.flow .node { position: relative; }
.flow .node::before {
  content: ""; position: absolute; inset: -1px -1px auto; height: 2px;
  border-radius: var(--r-md) var(--r-md) 0 0;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: .5;
}

/* Cards light along their top edge when you reach them. */
.feature::before, .demo-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-2), transparent);
  opacity: 0; transition: opacity .25s ease;
}
.demo-card { position: relative; }
.feature:hover::before, .demo-card:hover::before { opacity: 1; }

/* The chosen plan gets a real gradient edge rather than a tinted border. */
.plan.featured {
  position: relative; border-color: transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(140deg, var(--brand), var(--brand-3)) border-box;
  border: 1px solid transparent;
}

/* Price, said out loud. */
.plan .price {
  margin-top: auto; padding-top: 1.3rem;
  font-family: var(--font-display); font-size: 1.45rem;
  letter-spacing: -.02em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.plan .price:has(+ .btn) { padding-bottom: .2rem; }

/* Figures line up when they are numbers. */
.stat-strip b, .plan .tps, .msg-row .when, .detail dd { font-variant-numeric: tabular-nums; }

/* A quieter, more deliberate hover on the primary button. */
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, #ffffff38 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.btn.primary:hover::after { transform: translateX(120%); }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .flow .arrow::after { animation: none; opacity: .8; left: 46%; }
  .btn.primary::after { display: none; }
  html { scroll-behavior: auto; }
}
