/* ==========================================================================
   ModbusLab — design system
   Industrial instrument aesthetic: flat surfaces, hairline borders,
   sharp corners, IBM Plex typography. One accent color, used sparingly.
   ========================================================================== */

:root {
  --bg: #05090c;
  --bg-2: #070c10;
  --surface: #0a1015;
  --surface-2: #0d141a;
  --surface-3: #111a22;
  --line: #1b2630;
  --line-2: #283845;
  --cyan: #2fd3ea;
  --cyan-hover: #62e1f3;
  --cyan-ink: #032228;
  --cyan-soft: rgba(47, 211, 234, 0.08);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.1);
  --amber: #f0b429;
  --red: #f26d6d;
  --text: #d8e1e8;
  --muted: #8a99a6;
  --muted-2: #5d6e7a;
  --font-display: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  --radius: 4px;
  --radius-sm: 3px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

::selection { background: var(--cyan); color: var(--cyan-ink); }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 0; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #33485a; }

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

/* ---------- utilities ---------- */
.container { width: min(1240px, 100% - 48px); margin-inline: auto; }
.container--narrow { width: min(860px, 100% - 48px); }
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-muted { color: var(--muted); }
.text-mono { font-family: var(--font-mono); }

/* status lamp — functional, no decoration */
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex: none;
  position: relative;
}
.pulse-dot--green { background: var(--green); }
.pulse-dot--cyan { background: var(--cyan); }
.pulse-dot--red { background: var(--red); }
.pulse-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid currentColor; color: inherit; opacity: 0.5;
  animation: pulse-ring 1.8s var(--ease) infinite;
}
.pulse-dot--green::after { border-color: var(--green); }
.pulse-dot--cyan::after { border-color: var(--cyan); }
.pulse-dot--red::after { border-color: var(--red); }
@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}

.dot-green, .dot-amber {
  width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none;
}
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); margin-right: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 12px 24px; border-radius: var(--radius);
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  white-space: nowrap; user-select: none;
}
.btn--primary {
  background: var(--cyan);
  color: var(--cyan-ink);
}
.btn--primary:hover { background: var(--cyan-hover); }
.btn--primary:active { background: var(--cyan); }
.btn--ghost {
  border: 1px solid var(--line-2); color: var(--text);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn--lg { padding: 15px 30px; font-size: 16px; }
.btn--sm { padding: 8px 16px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn__icon { width: 16px; height: 16px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  transition: background 0.25s, border-color 0.25s;
  border-bottom: 1px solid transparent;
}
.nav--scrolled {
  background: var(--bg);
  border-bottom-color: var(--line);
}
.nav__inner { height: var(--nav-h); display: flex; align-items: center; gap: 32px; }
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); }
.nav__logo { width: 30px; height: 30px; border-radius: var(--radius-sm); }
.nav__name { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a {
  font-size: 14px; color: var(--muted); font-weight: 500;
  transition: color 0.18s; position: relative;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: var(--cyan); transition: width 0.22s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }
.nav__actions { display: flex; align-items: center; gap: 14px; }
.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__burger span { width: 20px; height: 2px; background: var(--text); transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 80px) 0 0;
  overflow: hidden;
}
.hero__grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(47, 211, 234, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 211, 234, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 56px;
  align-items: center;
}
.hero__status {
  display: inline-flex; align-items: center; flex-wrap: wrap; row-gap: 6px;
  column-gap: 12px;
  font-size: 11.5px; letter-spacing: 0.14em; color: var(--muted);
}
.hero__status span:not(.pulse-dot) { white-space: nowrap; }
.hero__status i { font-style: normal; color: var(--muted-2); }
.hero__title {
  font-size: clamp(40px, 4.8vw, 64px);
  margin: 22px 0 22px;
  font-weight: 600;
}
.hero__sub { font-size: 17px; color: var(--muted); max-width: 520px; }
.hero__ctas { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero__trust {
  display: flex; gap: 24px; margin-top: 28px; flex-wrap: wrap;
  padding-top: 22px; border-top: 1px solid var(--line);
}
.hero__trust li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.hero__trust svg { width: 14px; height: 14px; color: var(--green); flex: none; }

/* ---------- live app mockup ---------- */
.hero__mockup { position: relative; container-type: inline-size; container-name: mockup; }
.mockup {
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--bg-2);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  font-size: 12px;
}
.mockup__titlebar {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px;
  background: #04070a;
  border-bottom: 1px solid var(--line);
}
.mockup__icon { width: 16px; height: 16px; border-radius: 3px; }
.mockup__title { font-size: 11px; color: var(--muted); font-weight: 500; }
.mockup__winbtns { margin-left: auto; display: flex; gap: 6px; }
.mockup__winbtns i { width: 10px; height: 10px; border-radius: 50%; background: #1a2b38; }
.mockup__winbtns i:last-child { background: rgba(242, 109, 109, 0.55); }

.mockup__toolbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.mockup__busstatus { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12px; }
.mockup__com { font-size: 10.5px; color: var(--muted); padding-left: 14px; border-left: 1px solid var(--line-2); }
.mockup__toolbar-actions { margin-left: auto; display: flex; gap: 8px; }
.mockup__btn {
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  padding: 6px 14px; border-radius: var(--radius-sm); transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.mockup__btn--ghost { border: 1px solid var(--line-2); color: var(--muted); }
.mockup__btn--ghost:hover { color: var(--text); border-color: var(--muted-2); }
.mockup__btn--primary { background: var(--cyan); color: var(--cyan-ink); }
.mockup__btn--primary:hover { background: var(--cyan-hover); }
.mockup__btn--primary.is-stopped { background: var(--green); color: #032017; }

.mockup__body {
  display: grid;
  grid-template-columns: 168px 1fr 264px;
  min-height: 380px;
}
.mockup__sidebar {
  border-right: 1px solid var(--line);
  padding: 12px 10px;
  background: #060b0f;
}
.mockup__sidebar-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 9px; letter-spacing: 0.1em; color: var(--muted-2);
  padding: 0 4px 10px; font-weight: 600;
}
.mockup__slavelist li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px; border-radius: var(--radius-sm); border: 1px solid transparent;
  margin-bottom: 4px; transition: background 0.18s, border-color 0.18s;
}
.mockup__slavelist li.is-active {
  background: var(--cyan-soft); border-color: rgba(47, 211, 234, 0.3);
}
.mockup__slavelist li b { display: block; font-size: 11px; font-weight: 600; line-height: 1.25; }
.mockup__slavelist li small { display: block; font-size: 9px; color: var(--muted); line-height: 1.2; }
.mockup__slavelist li i { margin-left: auto; }
.mockup__uid {
  font-size: 9.5px; color: var(--cyan);
  background: var(--cyan-soft); border: 1px solid rgba(47, 211, 234, 0.25);
  padding: 3px 5px; border-radius: 2px;
}
.mockup__add {
  margin-top: 8px; padding: 8px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--radius-sm);
  color: var(--cyan); font-size: 10.5px; font-weight: 500;
}

.mockup__main { padding: 14px; border-right: 1px solid var(--line); min-width: 0; }
.mockup__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; margin-bottom: 12px;
}
.mockup__stat { background: var(--surface); padding: 10px 12px; }
.mockup__stat label { display: block; font-size: 8px; letter-spacing: 0.12em; color: var(--muted-2); font-weight: 600; }
.mockup__stat b {
  display: block; font-family: var(--font-mono); font-weight: 600;
  font-size: 15px; margin: 3px 0 1px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mockup__stat small { font-size: 8.5px; color: var(--muted-2); display: block; line-height: 1.3; }

.mockup__panel {
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface);
}
.mockup__panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-bottom: 1px solid var(--line); gap: 10px;
}
.mockup__panel-head b { font-size: 12px; font-family: var(--font-display); display: block; white-space: nowrap; }
.mockup__panel-head small { font-size: 9px; color: var(--muted-2); display: block; }
.mockup__tabs { display: flex; gap: 4px; font-size: 9px; }
.mockup__tabs span { padding: 3px 8px; border-radius: 2px; color: var(--muted); border: 1px solid transparent; white-space: nowrap; }
.mockup__tabs .is-on { background: var(--cyan-soft); color: var(--cyan); border-color: rgba(47, 211, 234, 0.3); }

.mockup__table { width: 100%; border-collapse: collapse; font-size: 10px; font-variant-numeric: tabular-nums; }
.mockup__table th {
  text-align: left; font-size: 8px; letter-spacing: 0.1em; color: var(--muted-2);
  padding: 7px 12px; border-bottom: 1px solid var(--line); font-weight: 600;
}
.mockup__table td { padding: 6px 12px; border-bottom: 1px solid rgba(27, 38, 48, 0.55); color: var(--muted); white-space: nowrap; }
.mockup__table tr:last-child td { border-bottom: 0; }
.mockup__table td:nth-child(2) { color: var(--text); font-family: var(--font-body); font-size: 10.5px; }
.mockup__table td:last-child .dot-amber { vertical-align: -1px; }
.reg-val { color: var(--text); transition: color 0.25s, background 0.25s; min-width: 34px; display: inline-block; }
.reg-val.is-ticked { color: var(--cyan); }
.reg-val.is-written { color: var(--green); }

.mockup__traffic { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #060b0f; }
.mockup__idle { font-size: 9px; color: var(--green); letter-spacing: 0.08em; }
.mockup__idle.is-paused { color: var(--amber); }
.mockup__frames {
  flex: 1; min-height: 0; overflow: hidden; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 3px;
  font-size: 9.5px; line-height: 1.5;
  mask-image: linear-gradient(180deg, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent);
  font-variant-numeric: tabular-nums;
}
.frame { display: flex; gap: 7px; white-space: nowrap; animation: frame-in 0.25s var(--ease); }
@keyframes frame-in { from { opacity: 0; } to { opacity: 1; } }
.frame__arrow { flex: none; width: 12px; }
.frame--req { color: #8fd8e6; }
.frame--req .frame__arrow { color: var(--cyan); }
.frame--res { color: #7fd6ae; opacity: 0.85; }
.frame--res .frame__arrow { color: var(--green); }
.frame--err { color: var(--red); }
.frame__crc { opacity: 0.4; }
.frame__tag { margin-left: auto; opacity: 0.4; font-size: 8.5px; }
.mockup__legend {
  display: flex; gap: 14px; align-items: center;
  padding: 9px 12px; border-top: 1px solid var(--line);
  font-size: 9px; color: var(--muted);
}
.sw { width: 12px; height: 3px; border-radius: 0; display: inline-block; margin-right: 5px; vertical-align: middle; }
.sw--req { background: var(--cyan); }
.sw--res { background: var(--green); }
.sw--err { background: var(--red); }
.mockup__legend-count { margin-left: auto; }

/* mockup adapts its columns to the space it actually gets */
@container mockup (max-width: 800px) {
  .mockup__table th:nth-child(4), .mockup__table td:nth-child(4) { display: none; }
  .mockup__tabs span:nth-child(3) { display: none; }
}
@container mockup (max-width: 730px) {
  .mockup__table th:nth-child(5), .mockup__table td:nth-child(5) { display: none; }
}

/* ---------- spec strip (static datasheet bar under the hero) ---------- */
.specstrip {
  margin-top: 88px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.specstrip__inner {
  display: grid;
  grid-template-columns: repeat(6, auto);
  justify-content: space-between;
  gap: 18px 32px;
  padding-top: 18px; padding-bottom: 18px;
}
.specstrip__inner div {
  font-size: 12.5px; color: var(--text); white-space: nowrap;
  display: flex; flex-direction: column; gap: 2px;
}
.specstrip__inner span {
  font-size: 9.5px; letter-spacing: 0.14em; color: var(--muted-2);
}

/* ---------- sections ---------- */
.section { padding: 104px 0; position: relative; }
#pricing { padding-top: 64px; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__head { max-width: 640px; margin-bottom: 60px; }
.section__head h2 { font-size: clamp(30px, 3.4vw, 44px); margin: 18px 0 14px; }
.section__head p { color: var(--muted); font-size: 16px; }
.section__kicker {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase;
}
.section__kicker b { color: var(--cyan); font-weight: 500; }
.section__kicker::after { content: ""; height: 1px; width: 72px; background: var(--line-2); }

/* ---------- features ---------- */
.features__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.fcard {
  background: var(--surface);
  padding: 30px 28px;
  transition: background 0.2s;
}
.fcard:hover { background: var(--surface-2); }
.fcard__icon {
  color: var(--cyan); margin-bottom: 22px;
}
.fcard__icon svg { width: 26px; height: 26px; }
.fcard h3 { font-size: 18.5px; margin-bottom: 10px; letter-spacing: -0.01em; }
.fcard p { font-size: 14.5px; color: var(--muted); line-height: 1.65; }
.fcard__tag {
  display: inline-block; margin-top: 20px;
  font-size: 10.5px; letter-spacing: 0.12em; color: var(--muted-2);
  border-left: 2px solid var(--cyan);
  padding: 2px 0 2px 10px;
}

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 18px; align-items: stretch; }
.step {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 30px 26px;
  transition: border-color 0.2s;
}
.step:hover { border-color: var(--line-2); }
.step__num {
  font-size: 12px; color: var(--cyan); letter-spacing: 0.1em;
  display: inline-block; margin-bottom: 20px;
  border-bottom: 1px solid var(--line-2); padding-bottom: 8px;
}
.step h3 { font-size: 19px; margin-bottom: 10px; }
.step p { font-size: 14.5px; color: var(--muted); }
.step__chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px; font-size: 10.5px; letter-spacing: 0.06em;
  color: var(--text); background: var(--surface-3);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 12px;
}
.step__arrow { align-self: center; color: var(--muted-2); }
.step__arrow svg { width: 38px; height: 15px; }

/* ---------- roadmap ---------- */
.roadmap {
  position: relative;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px;
  padding-top: 34px;
}
.roadmap__line {
  position: absolute; top: 8px; left: 1%; right: 1%; height: 1px;
  background: var(--line-2);
}
.roadmap__line-fill {
  display: block; height: 100%; width: 10%;
  background: var(--green);
}
.rnode { position: relative; padding-top: 26px; }
.rnode__dot {
  position: absolute; top: -33px; left: 0;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-2);
}
.rnode--done .rnode__dot { border-color: var(--green); background: var(--green); }
.rnode--wip .rnode__dot { border-color: var(--amber); background: var(--amber); }
.rnode__status { font-size: 9.5px; letter-spacing: 0.14em; color: var(--muted-2); }
.rnode--done .rnode__status { color: var(--green); }
.rnode--wip .rnode__status { color: var(--amber); }
.rnode h3 { font-size: 18.5px; margin: 10px 0 8px; }
.rnode h3 small { font-size: 13px; color: var(--muted); font-weight: 500; }
.rnode p { font-size: 13.5px; color: var(--muted); }

/* ---------- pricing ---------- */
.pricing__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 460px));
  gap: 24px; justify-content: center;
}
.pcard {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  padding: 36px 34px;
  transition: border-color 0.2s;
}
.pcard:hover { border-color: var(--line-2); }
.pcard--featured {
  border-color: var(--cyan);
  background: var(--surface-2);
}
.pcard__badge {
  position: absolute; top: -1px; left: 32px;
  transform: translateY(-100%);
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em;
  color: var(--cyan-ink); background: var(--cyan);
  padding: 6px 12px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-weight: 600;
}
.pcard__head h3 { font-size: 22px; }
.pcard__head p { font-size: 13.5px; color: var(--muted); margin-top: 5px; }
.pcard__price { display: flex; align-items: baseline; gap: 4px; margin: 26px 0 4px; }
.pcard__currency { font-family: var(--font-mono); font-size: 22px; color: var(--muted); }
.pcard__amount {
  font-family: var(--font-display); font-size: 60px; font-weight: 600;
  letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums;
}
.pcard__per { color: var(--muted); font-size: 15px; margin-left: 6px; }
.pcard__trial-note {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--muted); margin: 12px 0 24px;
}
.pcard__list { margin-bottom: 30px; display: grid; gap: 11px; }
.pcard__list li {
  position: relative; padding-left: 24px;
  font-size: 14.5px; color: var(--muted);
}
.pcard__list li b { color: var(--text); font-weight: 600; }
.pcard__list li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 14px; height: 14px;
  background: var(--green-soft) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4 8.5l2.5 2.5L12 5" fill="none" stroke="%2334d399" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/10px no-repeat;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 2px;
}
.pcard__fine { display: block; text-align: center; margin-top: 14px; color: var(--muted-2); font-size: 12px; }

.pricing__strip {
  margin: 56px auto 0; max-width: 944px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.pricing__strip div {
  padding: 18px 24px; text-align: center;
  border-right: 1px solid var(--line);
}
.pricing__strip div:last-child { border-right: 0; }
.pricing__strip b { display: block; font-family: var(--font-display); font-size: 15.5px; }
.pricing__strip span { font-size: 12.5px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq__item {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}
.faq__item:last-child { border-bottom: 0; }
.faq__item[open] { background: var(--surface-2); }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  font-family: var(--font-display); font-weight: 600; font-size: 15.5px;
  transition: color 0.18s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--cyan); }
.faq__chev {
  flex: none; width: 9px; height: 9px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.25s var(--ease), border-color 0.25s;
  margin-right: 4px;
}
.faq__item[open] .faq__chev { transform: rotate(225deg) translate(-2px, -2px); border-color: var(--cyan); }
.faq__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s var(--ease); }
.faq__item[open] .faq__body { grid-template-rows: 1fr; }
.faq__body p {
  overflow: hidden; color: var(--muted); font-size: 14.5px; line-height: 1.7;
  padding: 0 22px;
}
.faq__item[open] .faq__body p { padding-bottom: 20px; }

/* ---------- download ---------- */
.dl {
  position: relative; text-align: center;
  border: 1px solid var(--line-2); border-top: 2px solid var(--cyan);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 72px 32px; overflow: hidden;
}
.dl__logo {
  width: 76px; height: 76px; border-radius: var(--radius); margin: 0 auto 26px;
  border: 1px solid var(--line-2);
}
.dl h2 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 14px; }
.dl p { color: var(--muted); font-size: 16px; }
.dl__actions { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 34px; }
.dl__meta { font-size: 11.5px; color: var(--muted-2); letter-spacing: 0.06em; }
.dl__os { margin-top: 26px; font-size: 13.5px; color: var(--muted-2); }
.dl__os a { color: var(--cyan); border-bottom: 1px solid rgba(47, 211, 234, 0.4); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: #04070a; }
.footer__inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding: 60px 0 44px;
}
.footer__brand p { margin-top: 18px; font-size: 14px; color: var(--muted); max-width: 300px; }
.footer__col h4 {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 18px; font-family: var(--font-mono); font-weight: 500;
}
.footer__col a { display: block; font-size: 14px; color: var(--muted); padding: 5px 0; transition: color 0.18s; }
.footer__col a:hover { color: var(--cyan); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted-2);
}
.footer__proto { font-size: 10.5px; letter-spacing: 0.1em; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 20px;
  visibility: hidden; opacity: 0;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}
.modal.is-open { visibility: visible; opacity: 1; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 5, 7, 0.8);
}
.modal__card {
  position: relative; width: min(480px, 100%);
  background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: 6px;
  padding: 34px 32px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.8);
  transform: translateY(10px);
  transition: transform 0.3s var(--ease);
}
.modal.is-open .modal__card { transform: none; }
.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  color: var(--muted); border: 1px solid var(--line);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.modal__close:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-3); }
.modal__close svg { width: 13px; height: 13px; }
.modal__head { display: flex; gap: 16px; align-items: center; margin-bottom: 26px; }
.modal__logo { width: 46px; height: 46px; border-radius: var(--radius); border: 1px solid var(--line-2); }
.modal__head h3 { font-size: 20px; }
.modal__secure { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; letter-spacing: 0.12em; color: var(--green); margin-top: 3px; }
.modal__secure svg { width: 12px; height: 12px; }
.modal__summary {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); overflow: hidden; margin-bottom: 20px;
}
.modal__row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 18px; font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.modal__row:last-child { border-bottom: 0; }
.modal__row--total { background: var(--cyan-soft); }
.modal__row--total b { font-family: var(--font-display); font-size: 18px; color: var(--cyan); }
.modal__row .text-muted { font-size: 12.5px; }
.modal__perks { display: grid; gap: 9px; margin-bottom: 26px; }
.modal__perks li {
  position: relative; padding-left: 22px;
  font-size: 13.5px; color: var(--muted);
}
.modal__perks li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 13px; height: 13px; border-radius: 2px;
  background: var(--green-soft) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4 8.5l2.5 2.5L12 5" fill="none" stroke="%2334d399" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/9px no-repeat;
  border: 1px solid rgba(52, 211, 153, 0.35);
}
.modal__email { margin-bottom: 20px; }
.modal__email label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.02em; }
.modal__email input {
  width: 100%; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  color: var(--text); font-size: 15px; font-family: var(--font-body);
  outline: none; transition: border-color 0.18s, box-shadow 0.18s;
}
.modal__email input:focus {
  border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft);
}
.modal__email input::placeholder { color: var(--muted-2); }
.modal__email input.is-invalid { border-color: var(--red); }
.modal__fine { margin-top: 16px; font-size: 12px; color: var(--muted-2); text-align: center; line-height: 1.6; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translate(-50%, 80px);
  z-index: 300;
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--line-2); border-left: 2px solid var(--cyan);
  border-radius: var(--radius);
  padding: 13px 22px; font-size: 14px; font-weight: 500;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.75);
  opacity: 0; transition: transform 0.35s var(--ease), opacity 0.35s;
  pointer-events: none; max-width: min(520px, calc(100vw - 40px));
  text-align: center;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .hero__inner { grid-template-columns: 1fr; gap: 60px; }
  .hero__copy { max-width: 680px; }
  .hero__mockup { max-width: 940px; width: 100%; }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .specstrip__inner { grid-template-columns: repeat(3, auto); }
}

@media (max-width: 900px) {
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: all 0.28s var(--ease);
  }
  .nav__links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__links a { padding: 13px 0; font-size: 16px; border-bottom: 1px solid rgba(27, 38, 48, 0.55); }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__burger { display: flex; }
  .steps { grid-template-columns: 1fr; }
  .step__arrow { transform: rotate(90deg); justify-self: center; }
  .roadmap { grid-template-columns: repeat(2, 1fr); gap: 40px 22px; }
  .roadmap__line { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .section { padding: 80px 0; }
  .mockup__body { grid-template-columns: 150px 1fr; }
  .mockup__traffic { display: none; }
  .features__grid { grid-template-columns: 1fr; }
  .pricing__grid { grid-template-columns: minmax(0, 460px); }
  .pricing__strip { grid-template-columns: repeat(2, 1fr); }
  .pricing__strip div:nth-child(2) { border-right: 0; }
  .pricing__strip div:nth-child(1), .pricing__strip div:nth-child(2) { border-bottom: 1px solid var(--line); }
  .roadmap { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }
  .specstrip__inner { grid-template-columns: repeat(2, auto); }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 36px); }
  .hero { padding-top: calc(var(--nav-h) + 48px); }
  .mockup__body { grid-template-columns: 1fr; }
  .mockup__sidebar { display: none; }
  .mockup__stats { grid-template-columns: repeat(2, 1fr); }
  .pcard { padding: 30px 24px; }
  .pcard__amount { font-size: 50px; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .dl { padding: 52px 22px; }
  .specstrip__inner { grid-template-columns: 1fr; gap: 14px; }
}

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