/* trunkrecorder.pro — light page with dark technical sections. */

:root {
  --ink: #0b1a2e;          /* headings */
  --text: #3c4d63;         /* body */
  --muted: #66778c;
  --line: #e3e8ef;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --night: #0b1220;        /* dark sections, matches the app */
  --night-2: #121b2c;
  --night-line: #233049;
  --night-text: #aab8cb;
  --cyan: #3fb6ff;         /* the app's accent */
  --blue: #0a7bd6;
  --indigo: #6c6cff;
  --teal: #19c3a6;
  --ok: #16965c;
  --warn: #b7791f;
  --radius: 14px;
  --shadow-lg: 0 50px 100px -20px rgba(11, 26, 46, .25), 0 30px 60px -30px rgba(11, 26, 46, .3);
  --shadow-md: 0 13px 27px -5px rgba(11, 26, 46, .15), 0 8px 16px -8px rgba(11, 26, 46, .2);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
b, strong { color: var(--ink); font-weight: 600; }
code {
  font: 500 .86em/1.4 var(--mono);
  background: #eef2f7;
  color: #1d3350;
  padding: .12em .4em;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .45em;
  font: 600 15px/1 var(--sans);
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s, transform .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1b3352; box-shadow: var(--shadow-md); }
.btn-light { background: rgba(255,255,255,.85); color: var(--ink); border-color: rgba(11,26,46,.08); }
.btn-light:hover { background: #fff; box-shadow: var(--shadow-md); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.6); }
.btn-ghost:hover { border-color: #c9d3df; background: #fff; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(227,232,239,.7);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 24px; margin-left: 12px; }
.nav-links a { color: var(--text); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-cta { margin-left: auto; }
/* Web App: the key feature, so it stands out from the section links and stays on phones. */
.nav-links .nav-app {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 650; color: #fff;
  padding: 7px 14px; margin: -7px 0; border-radius: 999px;
  background: linear-gradient(135deg, #1a9cf0, #6c6cff);
  box-shadow: 0 4px 12px -4px rgba(76,110,245,.55), inset 0 1px 0 rgba(255,255,255,.25);
  transition: box-shadow .15s, transform .15s;
}
.nav-links .nav-app svg { width: 15px; height: 15px; }
.nav-links .nav-app:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(76,110,245,.65), inset 0 1px 0 rgba(255,255,255,.25); }
.nav-links .nav-app small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.nav-links .nav-app-off { color: var(--ink); background: #f1f4f8; box-shadow: inset 0 0 0 1px var(--line); }
.nav-links .nav-app-off:hover { color: var(--ink); transform: none; box-shadow: inset 0 0 0 1px #c9d3df; }
@media (max-width: 860px) {
  .nav-links { margin-left: auto; }
  .nav-links a:not(.nav-app) { display: none; }
  .nav-cta { margin-left: 0; }
}
@media (max-width: 480px) {
  .nav-inner { gap: 12px; }
  .brand span { display: none; }
  .nav-links .nav-app small { display: none; }
}

/* WebUSB detection (class set in <head>): show the Web App link, or how to get it. */
.no-webusb .webusb-only { display: none !important; }
html:not(.no-webusb) .no-webusb-only { display: none !important; }
.webapp-note {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 14.5px/1.35 var(--sans); color: var(--text);
  padding: 10px 16px; border-radius: 999px;
  background: rgba(255,255,255,.7); border: 1px dashed #b9c6d6;
}
a.webapp-note:hover { text-decoration: none; color: var(--ink); border-color: #93a5bb; }
.webapp-note svg { width: 16px; height: 16px; flex: none; color: var(--blue); }
p.webapp-note { margin: 8px 0 0; background: var(--bg-alt); }
@media (max-width: 600px) { .webapp-note { border-radius: 14px; } }
@media (max-width: 920px) { .hero-spectrum { -webkit-mask-image: none; mask-image: none; opacity: .5; } }

/* Hero */
.hero { position: relative; padding: 84px 0 0; isolation: isolate; }
.hero-bg {
  position: absolute; inset: -64px 0 auto 0; height: 760px; z-index: -1; overflow: hidden;
  background:
    radial-gradient(60% 80% at 85% 10%, rgba(108,108,255,.55), transparent 60%),
    radial-gradient(50% 70% at 60% 0%, rgba(63,182,255,.65), transparent 65%),
    radial-gradient(45% 60% at 100% 60%, rgba(25,195,166,.45), transparent 70%),
    linear-gradient(180deg, #eaf5ff 0%, #f4f2ff 100%);
  transform: skewY(-6deg);
  transform-origin: 0 0;
}
.hero-spectrum {
  position: absolute; left: 0; right: 0; bottom: 40px; width: 100%; height: 420px;
  transform: skewY(6deg); transform-origin: 0 0;
  opacity: .9;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 62%);
  mask-image: linear-gradient(90deg, transparent 30%, #000 62%);
}
.hero-spectrum .trace { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.hero-spectrum .trace.t2 { stroke: rgba(11,26,46,.18); }
.hero-spectrum .fill { fill: url(#spec-fill); }
.hero-spectrum .tick { stroke: rgba(11,26,46,.12); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hero-spectrum .marker { stroke: rgba(255,255,255,.9); stroke-width: 1; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }

.hero-inner { max-width: 1160px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 13px/1 var(--mono); color: var(--ink);
  background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.9);
  padding: 7px 12px; border-radius: 999px; margin: 0 0 26px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(25,195,166,.2); }
.hero h1 {
  font-size: clamp(38px, 6.2vw, 72px); line-height: 1.04; letter-spacing: -.035em;
  color: var(--ink); margin: 0 0 22px; font-weight: 700;
}
.lede { font-size: clamp(17px, 1.8vw, 20px); line-height: 1.6; color: #2c3e55; max-width: 620px; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; padding: 0; margin: 0 0 56px; font-size: 14px; color: #3a4d66; }
.hero-facts strong { font-family: var(--mono); font-weight: 500; }

.hero-shot { position: relative; }
.window {
  margin: 0; border-radius: 12px; overflow: hidden;
  background: #0d1117; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(11,26,46,.1);
}
.window-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #161d28; border-bottom: 1px solid #222c3b; }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2b3647; }
.window-bar span { margin: 0 auto; transform: translateX(-20px); font: 12px var(--mono); color: #7d8ba0; background: #0d1117; padding: 3px 14px; border-radius: 6px; }
.window img { width: 100%; height: auto; }
.caption { font-size: 14px; color: var(--muted); margin: 14px 2px 0; }

/* Sections */
.section { padding: 112px 0; position: relative; }
.section.alt { background: var(--bg-alt); }
.section.feature { padding: 96px 0; }
@media (max-width: 760px) { .section, .section.feature { padding: 72px 0; } }
.kicker { font: 600 14px/1 var(--sans); color: var(--blue); margin: 0 0 14px; letter-spacing: .01em; }
.h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.12; letter-spacing: -.028em; color: var(--ink); margin: 0 0 16px; font-weight: 700; max-width: 22ch; }
.h3 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -.024em; color: var(--ink); margin: 0 0 16px; font-weight: 700; }
.h4 { font-size: 18px; color: var(--ink); margin: 0 0 8px; letter-spacing: -.01em; }
.sub { font-size: 18px; max-width: 680px; margin: 0 0 48px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }

/* Protocol cards */
.proto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .proto-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .proto-grid { grid-template-columns: 1fr; } }
.proto {
  padding: 26px 24px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.proto:hover { box-shadow: var(--shadow-md); border-color: transparent; transform: translateY(-2px); }
.proto h3 { margin: 16px 0 6px; font-size: 18px; color: var(--ink); letter-spacing: -.01em; }
.proto p { margin: 0; font-size: 15px; line-height: 1.6; }
.pico {
  width: 44px; height: 44px; padding: 8px; border-radius: 11px;
  background: linear-gradient(135deg, rgba(63,182,255,.14), rgba(108,108,255,.14));
  fill: none; stroke: var(--blue); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}

/* Feature rows */
.feature-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.feature-grid.flip { grid-template-columns: 1.15fr 1fr; }
@media (max-width: 920px) {
  .feature-grid, .feature-grid.flip { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid.flip .shot { order: 2; }
}
.feature-text > p { margin: 0 0 18px; }
.ticks { list-style: none; padding: 0; margin: 0 0 20px; }
.ticks li { position: relative; padding-left: 30px; margin: 0 0 11px; font-size: 16px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(25,195,166,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.5L13 6.4' fill='none' stroke='%23109f86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
.shot { margin: 0; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid rgba(11,26,46,.08); background: #0d1117; }
.shot img { width: 100%; height: auto; }
.shot-right { transform: perspective(1600px) rotateY(-4deg); }
.shot-left { transform: perspective(1600px) rotateY(4deg); }
@media (max-width: 920px) { .shot-right, .shot-left { transform: none; } }

/* Dark section */
.dark { background: var(--night); color: var(--night-text); overflow: hidden; }
.dark .h2 { color: #fff; }
.dark b { color: #fff; }
.kicker-dark { color: var(--cyan); }
.sub-dark { color: var(--night-text); }
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(63,182,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63,182,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 80%);
}
.dark .wrap { position: relative; }

.diagram { margin: 0 0 64px; padding: 28px; border-radius: 16px; background: rgba(18,27,44,.75); border: 1px solid var(--night-line); overflow-x: auto; }
.diagram svg { min-width: 760px; width: 100%; height: auto; }
.dg-node rect { fill: #151f33; stroke: #2a3954; stroke-width: 1.2; }
.dg-hl rect { fill: #13233d; stroke: url(#dg-line); stroke-width: 1.8; }
.dg-out rect { fill: #112a2c; stroke: #1f8f7f; stroke-width: 1.4; }
.dg-t { fill: #fff; font: 600 16px var(--sans); text-anchor: middle; }
.dg-s { fill: #8fa0b8; font: 12.5px var(--mono); text-anchor: middle; }
.dg-note { fill: #6f819b; font: italic 12px var(--sans); text-anchor: start; }
.dg-edge path { fill: none; stroke: #4a5d7a; stroke-width: 1.6; }
.dg-edge .dg-dash { stroke-dasharray: 4 5; }
.dg-fft { fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linejoin: round; opacity: .9; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--night-line); border: 1px solid var(--night-line); border-radius: 16px; overflow: hidden; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }
.stat { background: var(--night); padding: 28px 24px; }
.stat-n {
  font: 600 40px/1 var(--sans); letter-spacing: -.03em; margin-bottom: 14px;
  background: linear-gradient(90deg, #7fd0ff, #a3a3ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-n span { font-size: 22px; margin-left: 2px; }
.stat p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.fine { font-size: 13px; color: #71839c; margin: 20px 0 0; max-width: 820px; }

/* Compatibility */
.compat { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 920px) { .compat { grid-template-columns: 1fr; gap: 40px; } }
.compat p { margin: 0 0 18px; }
.code-card { background: var(--night); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid #1d2840; min-width: 0; }
.code-head { padding: 12px 18px; border-bottom: 1px solid var(--night-line); font: 12px var(--mono); color: #7d8ba0; }
.code-card pre { margin: 0; padding: 20px 18px 22px; overflow-x: auto; }
.code-card code { background: none; padding: 0; color: #d8e2ef; font-size: 13px; line-height: 1.85; overflow-wrap: normal; }
.c-dim { color: #6c7d95; }
.c-acc { color: var(--cyan); }

/* Tabs */
.tabs { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-md); overflow: hidden; }
.tablist { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); background: #fbfcfe; overflow-x: auto; }
.tablist button {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px/1 var(--sans); color: var(--muted);
  padding: 11px 16px; border-radius: 10px; border: 0; background: none; cursor: pointer; white-space: nowrap;
}
.tablist button svg { width: 17px; height: 17px; }
.tablist button:hover { color: var(--ink); background: #f0f3f8; }
.tablist button[aria-selected="true"] { color: var(--ink); background: #fff; box-shadow: 0 1px 2px rgba(11,26,46,.08), 0 0 0 1px var(--line); }
.panel { padding: 30px 34px 34px; }
@media (max-width: 600px) { .panel { padding: 22px 18px 26px; } }
.req { font: 500 13px var(--mono); color: var(--muted); margin: 0 0 22px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 50px; padding-bottom: 22px; }
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 6px; width: 1px; background: var(--line); }
.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 31px; height: 31px; border-radius: 50%;
  display: grid; place-items: center; font: 600 14px var(--mono); color: var(--blue);
  background: rgba(10,123,214,.08); border: 1px solid rgba(10,123,214,.2);
}
.steps h4 { margin: 3px 0 6px; font-size: 17px; color: var(--ink); letter-spacing: -.01em; }
.steps p { margin: 0 0 10px; font-size: 15.5px; }
.cmd { position: relative; margin: 10px 0 12px; background: var(--night); border-radius: 10px; }
.cmd pre { margin: 0; padding: 16px 18px; padding-right: 76px; overflow-x: auto; }
.cmd code { background: none; color: #d8e2ef; padding: 0; font-size: 13.5px; line-height: 1.75; overflow-wrap: normal; }
.copy {
  position: absolute; top: 10px; right: 10px;
  font: 500 12px var(--sans); color: #c7d3e3; background: #1a2436; border: 1px solid #2a3852;
  border-radius: 6px; padding: 5px 9px; cursor: pointer;
}
.copy:hover { background: #22304a; color: #fff; }
.more { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.more summary { cursor: pointer; font-weight: 600; color: var(--ink); font-size: 15px; }
.more p { font-size: 15px; }

.drivers { margin-top: 48px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-top: 16px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 13px; color: var(--muted); font-weight: 600; background: #fbfcfe; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { color: var(--ink); }
td code { white-space: nowrap; }

/* Browser section */
.browser { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 920px) { .browser { grid-template-columns: 1fr; gap: 32px; } .browser-art { max-width: 460px; } }
.browser p { margin: 0 0 18px; }
.browser .btn { margin-top: 8px; }
.br-frame { fill: #fff; stroke: var(--line); stroke-width: 1.5; }
.br-line { stroke: var(--line); stroke-width: 1.5; }
.br-dot { fill: #dfe5ee; }
.br-url { fill: #f1f4f9; }
.br-url-t { font: 11px var(--mono); fill: var(--muted); text-anchor: middle; }
.br-box { fill: #f6f9fd; stroke: #d6e2f0; stroke-width: 1.2; }
.br-big { font: 700 28px var(--sans); text-anchor: middle; fill: var(--ink); letter-spacing: -.02em; }
.br-mid { font: 600 17px var(--sans); text-anchor: middle; fill: var(--ink); }
.br-small { font: 11.5px var(--mono); text-anchor: middle; fill: var(--muted); }

/* Status */
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 36px; }
@media (max-width: 900px) { .status-grid { grid-template-columns: 1fr; } }
.status-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.status-col h4 { margin: 0 0 14px; }
.status-col ul { margin: 0; padding-left: 18px; font-size: 15px; }
.status-col li { margin-bottom: 8px; }
.badge { display: inline-block; font: 600 12.5px/1 var(--sans); padding: 6px 10px; border-radius: 999px; letter-spacing: .01em; }
.badge.ok { color: #0e7a4b; background: #e3f6ec; }
.badge.pending { color: #8a5a10; background: #fbf0dc; }
.badge.plan { color: #4e4fc4; background: #ecebff; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 56px 0 64px; background: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer-brand { max-width: 420px; }
.footer-brand p { margin: 14px 0 0; }
.footer-links { display: flex; gap: 64px; }
.footer-links h5 { margin: 0 0 12px; font-size: 13px; color: var(--ink); }
.footer-links a { display: block; font-size: 14.5px; color: var(--text); margin-bottom: 8px; }
.footer-links a:hover { color: var(--ink); }

/* Reveal on scroll (only when JS has run) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 600px) { .hero h1 br { display: none; } }
