/* TunnelIQ landing — dark, kinetic, industrial-modern. */

:root {
  --bg: #07080b;
  --bg-2: #0c0e13;
  --surface: #13151c;
  --surface-2: #1a1d26;
  --line: #232732;
  --line-2: #2f3441;
  --ink: #f4f6fa;
  --ink-2: #cbd2dd;
  --muted: #8a93a4;
  --accent: #ff7a1a;
  --accent-2: #ffa84a;
  --accent-glow: rgba(255, 122, 26, 0.55);
  --danger: #f87171;
  --ok: #34d399;
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 8px 32px rgba(0,0,0,.4);
  --shadow-glow: 0 0 0 1px rgba(255,122,26,.25), 0 8px 32px rgba(255,122,26,.18);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(at 100% 0%, rgba(255,122,26,.08) 0, transparent 45%),
    radial-gradient(at 0% 100%, rgba(80, 120, 255, .05) 0, transparent 40%);
  background-attachment: fixed;
  min-height: 100dvh;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #1a1408; }

a { color: var(--accent-2); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }

code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  background: rgba(255,255,255,.06);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.9em;
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.container {
  max-width: var(--maxw);
  padding: 0 28px;
  margin: 0 auto;
}

/* ============================ NAV ================================== */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 8, 11, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__row {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -0.2px; font-size: 19px;
  color: var(--ink);
}
.brand__mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(255,168,74,.4), 0 4px 16px rgba(255,122,26,.45);
  flex-shrink: 0;
}
.brand__mark svg { width: 18px; height: 18px; }
.nav nav { display: flex; gap: 4px; align-items: center; }
.nav nav a {
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.nav nav a:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.nav nav a[aria-current="page"] { color: var(--accent); }
@media (max-width: 700px) {
  .nav nav a:not(.cta) { display: none; }
  .nav__row { height: 60px; }
}

/* ============================ CTA ================================== */

.cta {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #190d02;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid rgba(255,168,74,.45);
  box-shadow: var(--shadow-glow);
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease, filter .18s ease;
  cursor: pointer;
  white-space: nowrap;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255,168,74,.55), 0 14px 36px rgba(255,122,26,.35);
  filter: brightness(1.06);
  color: #190d02;
}
.cta:active { transform: translateY(0); }
.cta::after {
  content: "→";
  transition: transform .18s ease;
}
.cta:hover::after { transform: translateX(3px); }
.cta--small { padding: 9px 16px; font-size: 14px; }
.cta--small::after { display: none; }
.cta--ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-2);
  box-shadow: none;
}
.cta--ghost:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,168,74,.45);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(255,168,74,.2);
}
.cta--ghost::after { color: var(--accent-2); }

/* ============================ HERO ================================= */

.hero {
  position: relative;
  padding: 100px 0 96px;
  overflow: hidden;
  isolation: isolate;
}
.hero__orb {
  position: absolute;
  width: 760px; height: 760px;
  left: 50%; top: 0;
  transform: translate(-50%, -55%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%,
      rgba(255,122,26,.45) 0%,
      rgba(255,122,26,.18) 30%,
      transparent 65%);
  filter: blur(60px);
  z-index: -1;
  animation: orb-drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero__orb--2 {
  left: 100%; top: 100%;
  width: 520px; height: 520px;
  background: radial-gradient(circle at 50% 50%,
    rgba(80,120,255,.28) 0%, rgba(80,120,255,.08) 35%, transparent 65%);
  animation: orb-drift-2 22s ease-in-out infinite alternate;
}
@keyframes orb-drift {
  0%   { transform: translate(-50%, -55%) scale(1); opacity: .85; }
  100% { transform: translate(-46%, -50%) scale(1.08); opacity: 1; }
}
@keyframes orb-drift-2 {
  0%   { transform: translate(-30%, -50%) scale(1); opacity: .65; }
  100% { transform: translate(-50%, -65%) scale(1.12); opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__orb { animation: none; }
}

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  background: rgba(255,122,26,.08);
  border: 1px solid rgba(255,122,26,.25);
  border-radius: 999px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 24px;
}
.kicker .dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255,122,26,.25);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,122,26,.5); }
  50%      { box-shadow: 0 0 0 6px rgba(255,122,26,.05); }
}

.hero h1 {
  font-size: clamp(38px, 6.4vw, 76px);
  line-height: 1.02;
  margin: 0 0 22px;
  letter-spacing: -1.6px;
  font-weight: 800;
  max-width: 14ch;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 60%, #ff5e0e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .lede {
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 0 36px;
  line-height: 1.55;
}

.cta-row {
  display: flex; gap: 14px; flex-wrap: wrap;
  align-items: center;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 8px 36px;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.hero-stat__num {
  font-size: 26px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.4px;
}
.hero-stat__num .accent {
  color: var(--accent);
}
.hero-stat__label {
  font-size: 12.5px; color: var(--muted); margin-top: 2px;
  letter-spacing: 0.5px; text-transform: uppercase;
}

.small { color: var(--muted); font-size: 14px; margin: 0; }
.hint { color: var(--muted); font-size: 14px; margin: 14px 0 0; max-width: 540px; }

/* ============================ SECTIONS ============================= */

.section {
  padding: 96px 0;
  position: relative;
}
.section--muted {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  margin: 0 0 14px;
  letter-spacing: -0.8px;
  font-weight: 700;
  line-height: 1.1;
  max-width: 22ch;
}
.section h2 .accent {
  background: linear-gradient(90deg, var(--accent-2) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section .deck {
  font-size: 17.5px;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 0 48px;
  line-height: 1.55;
}
.section__head {
  display: flex; align-items: end; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
  margin-bottom: 48px;
}
.section__head h2 { margin-bottom: 0; }
.section__head .deck { margin: 12px 0 0; }
.eyebrow {
  font-size: 12.5px; color: var(--accent-2);
  letter-spacing: 1.4px; text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 14px;
}

/* ============================ GRID ================================= */

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 880px) {
  .grid--3 { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  position: relative;
  transition: transform .25s cubic-bezier(.2,.7,.3,1),
              border-color .25s ease,
              box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-1);
}
.card__icon {
  width: 48px; height: 48px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255,122,26,.18), rgba(255,122,26,.06));
  border: 1px solid rgba(255,122,26,.25);
  display: grid; place-items: center;
  margin-bottom: 20px;
}
.card__icon svg { width: 24px; height: 24px; color: var(--accent); }
.card h3 {
  font-size: 19px; margin: 0 0 10px;
  color: var(--ink); font-weight: 700; letter-spacing: -0.2px;
}
.card p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.6;
  font-size: 15px;
}
.card__step {
  position: absolute; top: 20px; right: 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  opacity: .7;
}

/* feature pill list */
.feature-list, .plain {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 800px) { .feature-list, .plain { grid-template-columns: 1fr; } }
.feature-list li, .plain li {
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  transition: border-color .2s ease, transform .2s ease;
}
.feature-list li:hover, .plain li:hover {
  border-color: rgba(255,122,26,.35);
  transform: translateY(-2px);
}
.feature-list strong, .plain strong {
  color: var(--ink); font-weight: 700;
  display: inline-block; margin-right: 4px;
}

/* numbered steps */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 14px;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 22px 24px 22px 76px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-2);
  counter-increment: step;
  line-height: 1.55;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 24px; top: 22px;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255,122,26,.08);
  border: 1px solid rgba(255,122,26,.3);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.4px;
}
.steps strong { color: var(--ink); font-weight: 700; }
.steps em {
  color: var(--accent-2); font-style: normal;
  background: rgba(255,122,26,.08);
  padding: 1px 6px; border-radius: 4px;
  border: 1px solid rgba(255,122,26,.2);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

/* ============================ FLOW DIAGRAM ========================= */

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  padding: 40px 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 56px 0 0;
}
@media (max-width: 720px) {
  .flow { grid-template-columns: 1fr; gap: 16px; padding: 30px 22px; }
  .flow__arrow { transform: rotate(90deg); justify-self: center; }
}
.flow__node {
  text-align: center;
  padding: 28px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .25s ease, transform .25s ease;
}
.flow__node:hover { border-color: rgba(255,122,26,.35); transform: translateY(-2px); }
.flow__icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,122,26,.18), rgba(255,122,26,.04));
  border: 1px solid rgba(255,122,26,.3);
  display: grid; place-items: center;
}
.flow__icon svg { width: 28px; height: 28px; color: var(--accent); }
.flow__node h4 {
  margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.1px;
}
.flow__node p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.flow__arrow {
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 32px;
  font-weight: 300;
  position: relative;
}
.flow__arrow::before {
  content: ""; position: absolute;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  top: 50%;
}
.flow__arrow span { position: relative; background: var(--surface); padding: 0 6px; }

/* ============================ JOIN PAGE =========================== */

.join-shell {
  max-width: 480px; margin: 80px auto 60px;
  padding: 0 24px; text-align: center;
}
.join-shell h1 {
  font-size: 34px; margin: 0 0 10px;
  letter-spacing: -0.8px; font-weight: 700;
}
.join-shell .lede { color: var(--ink-2); margin: 0 0 36px; font-size: 16px; }
.join-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-1);
}
.join-form label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 10px;
  text-align: left;
  font-weight: 600;
}
.join-input {
  width: 100%; padding: 18px 16px;
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
  font-size: 26px; letter-spacing: 0.18em; text-align: center;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-transform: uppercase;
  transition: border-color .18s ease, box-shadow .18s ease;
  font-weight: 700;
}
.join-input::placeholder { color: var(--muted); opacity: .5; }
.join-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,122,26,.15);
}
.join-btn {
  display: block; width: 100%; margin-top: 16px;
  padding: 16px;
  font-size: 15px; font-weight: 700;
  border: 0; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #190d02;
  box-shadow: 0 0 0 1px rgba(255,168,74,.35), 0 6px 20px rgba(255,122,26,.3);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
  letter-spacing: 0.2px;
}
.join-btn:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 0 0 1px rgba(255,168,74,.5), 0 10px 28px rgba(255,122,26,.4);
}
.join-btn:disabled { opacity: .35; cursor: not-allowed; }
.join-error {
  margin-top: 14px; padding: 12px 14px;
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.3);
  color: #fca5a5;
  border-radius: 8px;
  font-size: 14px;
  text-align: left;
  line-height: 1.5;
}
.join-hint {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ============================ FOOTER ============================== */

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 80px;
  background: var(--bg-2);
}
footer .small { color: var(--muted); }
footer a { color: var(--ink-2); }
footer a:hover { color: var(--accent); }

/* ============================ ANIM ON SCROLL ====================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1);
  will-change: transform, opacity;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================ FOCUS RINGS ========================= */

a:focus-visible, button:focus-visible, .cta:focus-visible, .join-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}
