/* TNS public landing page.
 *
 * One accent (brand amber), cool neutrals, Geist + Geist Mono.
 * Radius rule: interactive controls and chips are pills, framed
 * surfaces (screenshots, cells, rail) use --r (14px), nothing else.
 * Dark is the default; light follows the OS or the toggle.
 */

:root {
  --bg: #0c0e11;
  --bg-2: #101318;
  --surface: #13161b;
  --line: #232831;
  --line-2: #2d333e;
  --ink: #e9ecf1;
  --muted: #98a1ae;
  --faint: #6b7380;
  --accent: #f5a623;
  --accent-deep: #d9910b;
  --on-accent: #1a1205;
  --accent-wash: rgba(245, 166, 35, .12);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
  --grid-dot: rgba(255, 255, 255, .055);
  --r: 14px;
  --wrap: 1240px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7f9;
    --bg-2: #eef0f3;
    --surface: #ffffff;
    --line: #e1e4ea;
    --line-2: #d3d8e0;
    --ink: #0f1217;
    --muted: #5a6472;
    --faint: #848c99;
    --accent-wash: rgba(217, 145, 11, .1);
    --shadow: 0 30px 70px -34px rgba(30, 41, 59, .35), 0 0 0 1px rgba(15, 18, 23, .04);
    --grid-dot: rgba(15, 18, 23, .07);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-2: #eef0f3;
  --surface: #ffffff;
  --line: #e1e4ea;
  --line-2: #d3d8e0;
  --ink: #0f1217;
  --muted: #5a6472;
  --faint: #848c99;
  --accent-wash: rgba(217, 145, 11, .1);
  --shadow: 0 30px 70px -34px rgba(30, 41, 59, .35), 0 0 0 1px rgba(15, 18, 23, .04);
  --grid-dot: rgba(15, 18, 23, .07);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
figure { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 12px; }

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

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .62em 1.15em; border-radius: 999px;
  font: 600 15px/1 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn i { font-size: .85em; transition: transform .18s ease; }
.btn:hover i { transform: translateX(3px); }
.btn-lg { padding: .9em 1.5em; font-size: 16px; }
.btn-accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 24px -10px rgba(245, 166, 35, .6); }
.btn-accent:hover { background: #ffb53c; }
.btn-ghost { border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--muted); background: var(--surface); }

.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  color: var(--muted); cursor: pointer; font-size: 15px;
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--muted); }
.icon-btn:active { transform: scale(.94); }

/* ── Nav ─────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav-sentinel { position: absolute; top: 0; height: 8px; width: 1px; }
.nav-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 8px; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-weight: 800; letter-spacing: -.02em; font-size: 17px; }
.brand small { font-size: 11.5px; color: var(--muted); letter-spacing: .01em; }
.brand-sm { gap: 8px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { font-size: 14.5px; color: var(--muted); text-decoration: none; transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-end { display: flex; align-items: center; gap: 10px; }

/* ── Frames (real screenshots) ──────────────────────────────────── */

.frame {
  position: relative; overflow: hidden;
  border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow);
}
.frame img { width: 100%; }
.frame-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  font: 500 12.5px/1 var(--mono); color: var(--faint);
  background: var(--bg-2);
}
.frame-bar i { font-style: normal; opacity: .5; }
.frame-bar .hl { color: var(--accent); }

/* ── Hero ────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 88px 0 40px;
  background:
    radial-gradient(60% 50% at 78% 30%, var(--accent-wash), transparent 70%),
    radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 0) 0 0 / 26px 26px;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 140px;
  background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px; align-items: center;
}
.hero h1 { font-size: clamp(44px, 6.2vw, 84px); line-height: 1.02; padding-bottom: .06em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { margin-top: 26px; max-width: 32ch; font-size: 19px; color: var(--muted); line-height: 1.55; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-shot { position: relative; margin-right: -120px; perspective: 1600px; }
.frame-lift {
  transform: rotateY(-9deg) rotateX(3deg) translateZ(0);
  transform-origin: left center;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.hero-shot:hover .frame-lift { transform: rotateY(-3deg) rotateX(1deg); }

.os-row {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  margin-top: 84px; padding-top: 26px; border-top: 1px solid var(--line);
}
.os-lead { font-size: 14px; color: var(--faint); }
.os-row ul { display: flex; flex-wrap: wrap; gap: 10px 40px; margin: 0; padding: 0; list-style: none; }
.os-row li { font: 600 20px/1 var(--mono); letter-spacing: -.02em; color: var(--muted); }

/* ── Sections ────────────────────────────────────────────────────── */

.sec { padding: 120px 0; }
.sec h2 { font-size: clamp(34px, 4.2vw, 56px); }
.sec-head { max-width: 760px; }
.sec-sub { margin-top: 20px; max-width: 58ch; color: var(--muted); font-size: 18px; }
.eyebrow { font: 600 13px/1 var(--mono); color: var(--accent); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 18px; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.split-copy p { margin-top: 20px; color: var(--muted); font-size: 18px; max-width: 46ch; }
.split-cap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split-cap .split-copy { order: 2; }
.split-cap .split-shot { order: 1; }

/* Alarm pipeline */
.flow { margin-top: 40px; display: grid; gap: 0; max-width: 440px; }
.flow-src { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; padding: 7px 13px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font: 500 13px/1 var(--mono); color: var(--ink); background: var(--surface);
}
.flow-pipe { position: relative; height: 46px; margin-left: 22px; width: 2px; background: var(--line-2); overflow: hidden; }
.flow-pipe-short { height: 32px; }
.flow-pipe i {
  position: absolute; left: -2px; top: -8px; width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
  animation: drip 2.4s linear infinite;
}
.flow-pipe i:nth-child(2) { animation-delay: .8s; }
.flow-pipe i:nth-child(3) { animation-delay: 1.6s; }
@keyframes drip { to { transform: translateY(70px); } }
.flow-node {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.flow-node > i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; background: var(--bg-2); color: var(--muted); font-size: 14px; }
.flow-node span { display: flex; flex-direction: column; gap: 2px; }
.flow-node b { font-weight: 600; font-size: 15px; }
.flow-node small { color: var(--muted); font-size: 13.5px; }
.flow-node-end { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.flow-node-end > i { background: var(--accent-wash); color: var(--accent); }

/* ── Change control ─────────────────────────────────────────────── */

.sec-change { background: var(--bg-2); border-block: 1px solid var(--line); }

.rail {
  margin-top: 56px; padding: 28px 28px 22px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.rail-steps {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0; padding: 0; list-style: none; position: relative;
}
.rail-steps::before {
  content: ""; position: absolute; left: 8.33%; right: 8.33%; top: 21px; height: 2px; background: var(--line-2);
}
.rail-steps::after {
  content: ""; position: absolute; left: 8.33%; top: 21px; height: 2px; background: var(--accent);
  width: calc((100% - 16.66%) * var(--rail-p, 0)); transition: width .6s cubic-bezier(.2, .7, .2, 1);
}
.rail-steps li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.rail-steps li i {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--line-2); color: var(--faint); font-size: 15px;
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.rail-steps li span { font-size: 14px; color: var(--faint); transition: color .35s ease; }
.rail-steps li.done i { border-color: var(--accent); color: var(--accent); }
.rail-steps li.done span { color: var(--muted); }
.rail-steps li.now i { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 6px var(--accent-wash); }
.rail-steps li.now span { color: var(--ink); font-weight: 600; }

.rail-status {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--line-2);
  font-size: 15px; color: var(--muted);
}
.rail-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.rail-clock { margin-left: auto; font: 600 28px/1 var(--mono); letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.rail.is-done .rail-clock { color: var(--muted); }

.bento {
  margin-top: 28px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px;
}
.cell figcaption { margin-top: 20px; color: var(--muted); font-size: 15.5px; max-width: 56ch; }
.cell figcaption h3 { font-size: 21px; letter-spacing: -.025em; color: var(--ink); }
.cell figcaption p { margin-top: 8px; }
.slide figcaption b { color: var(--ink); font-weight: 600; }
.roles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 18px 0 0; padding: 0; list-style: none; }
.roles li { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 500; }
.roles li i { color: var(--accent); font-size: 11px; }
.roles li + li::before { content: "\f054"; font: 900 9px/1 "Font Awesome 6 Free"; color: var(--faint); position: absolute; left: -16px; top: 50%; transform: translateY(-50%); }
.cell-a { grid-column: span 7; }
.cell-b { grid-column: span 5; align-self: start; }
.cell-c {
  grid-column: span 4; padding: 30px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  display: flex; flex-direction: column; justify-content: center;
}
.cell-c h3 { font-size: 26px; }
.cell-d { grid-column: span 8; }
.ticks { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 28px; color: var(--muted); font-size: 15.5px; line-height: 1.45; }
.ticks li::before {
  content: "\f00c"; font: 900 11px/1 "Font Awesome 6 Free";
  position: absolute; left: 0; top: 4px; width: 18px; height: 18px; display: grid; place-items: center;
  border-radius: 999px; background: var(--accent-wash); color: var(--accent);
}

/* ── Topology gallery ───────────────────────────────────────────── */

.gal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.gal-head h2 { max-width: 20ch; }
.gal-nav { display: flex; gap: 10px; flex: none; }
.gallery {
  margin-top: 52px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(840px, 78vw); gap: 28px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 10px max(28px, calc((100vw - var(--wrap)) / 2 + 28px)) 40px;
  scroll-padding-inline: max(28px, calc((100vw - var(--wrap)) / 2 + 28px));
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: start; }
.slide figcaption { margin-top: 18px; color: var(--muted); font-size: 16px; max-width: 60ch; }
.slide .num { font: 600 13px/1 var(--mono); color: var(--accent); margin-right: 12px; }

/* ── Capacity ────────────────────────────────────────────────────── */

.facts { margin: 36px 0 0; display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font: 500 13px/1.6 var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 0; font-size: 15.5px; }

/* ── Security ────────────────────────────────────────────────────── */

.sec-sec { border-top: 1px solid var(--line); }
.sec-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 72px; align-items: start; }
.sec-grid h2 { max-width: 14ch; }
.guard { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.guard li { display: flex; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); }
.guard li > i { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; background: var(--accent-wash); color: var(--accent); font-size: 14px; }
.guard b { display: block; font-weight: 600; font-size: 16px; }
.guard span { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* ── Marquee ─────────────────────────────────────────────────────── */

.more { padding: 40px 0 90px; }
.more-lead { color: var(--faint); font-size: 14px; margin-bottom: 22px; }
.marquee {
  display: flex; overflow: hidden; user-select: none;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  flex: none; display: flex; gap: 56px; margin: 0; padding: 0 28px; list-style: none;
  animation: slide 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track li { font-size: clamp(26px, 3.4vw, 44px); font-weight: 700; letter-spacing: -.035em; color: var(--faint); opacity: .55; white-space: nowrap; transition: color .2s ease, opacity .2s ease; }
.marquee-track li:hover { color: var(--ink); opacity: 1; }
@keyframes slide { to { transform: translateX(-100%); } }

/* ── Close + footer ──────────────────────────────────────────────── */

.close { padding: 40px 0 130px; }
.close-in {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding-top: 56px; border-top: 1px solid var(--line);
}
.close h2 { font-size: clamp(34px, 4.6vw, 64px); max-width: 16ch; }

.foot { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--faint); }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; }

/* ── Reveal on scroll ───────────────────────────────────────────── */

.js .rv { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }
.js .bento .rv:nth-child(2) { transition-delay: .08s; }
.js .bento .rv:nth-child(3) { transition-delay: .12s; }
.js .bento .rv:nth-child(4) { transition-delay: .18s; }

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-end { margin-left: auto; }
  .hero-shot { margin-right: 0; }
}

@media (max-width: 900px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .hero { padding-top: 56px; }
  .hero-grid, .split, .split-cap, .sec-grid { grid-template-columns: 1fr; gap: 40px; }
  .split-cap .split-copy, .split-cap .split-shot { order: 0; }
  .frame-lift, .hero-shot:hover .frame-lift { transform: none; }
  .os-row { margin-top: 56px; gap: 14px; }
  .os-row ul { gap: 10px 24px; }
  .os-row li { font-size: 17px; }
  .sec { padding: 88px 0; }
  .bento { grid-template-columns: 1fr; }
  .cell-a, .cell-b, .cell-c, .cell-d { grid-column: auto; }
  .rail { padding: 22px 16px 18px; }
  .rail-steps li span { font-size: 11.5px; }
  .rail-steps li i { width: 34px; height: 34px; font-size: 12px; }
  .rail-steps::before, .rail-steps::after { top: 16px; }
  .rail-clock { font-size: 22px; }
  .gal-head { flex-direction: column; align-items: flex-start; }
  .gal-nav { display: none; }
  .gallery { grid-auto-columns: 86vw; gap: 16px; padding-inline: 20px; scroll-padding-inline: 20px; }
  .guard { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 96px 1fr; }
}

@media (max-width: 520px) {
  .brand small { display: none; }
  .nav-in { gap: 12px; }
  .rail-steps li span { display: none; }
  .rail-steps li.now span { display: block; position: absolute; top: 44px; white-space: nowrap; }
  .rail-status { margin-top: 38px; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
  .frame-lift { transform: none; }
  .marquee-track { animation: none; }
  .marquee { flex-wrap: wrap; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; mask-image: none; -webkit-mask-image: none; }
  .marquee-track[aria-hidden="true"] { display: none; }
  .marquee-track { flex: 1 1 100%; flex-wrap: wrap; gap: 12px 32px; padding: 0; }
}
