/* ═══════════════════════════════════════════════════
   IN-SIGHT Landing  ·  style.css
   ═══════════════════════════════════════════════════ */

/* ── Design tokens ─────────────────────────────────── */
:root {
  --bg:       #0a0e1a;
  --bg-alt:   #070a14;
  --surface:  #0f1420;
  --border:   rgba(255,255,255,.08);
  --border-a: rgba(0,180,255,.22);
  --accent:   #00b4ff;
  --accent-hi:#33c3ff;
  --accent-lo:rgba(0,180,255,.11);
  --glow:     rgba(0,180,255,.16);
  --txt:      #fff;
  --txt-2:    rgba(255,255,255,.6);
  --txt-3:    rgba(255,255,255,.3);

  --sans: 'IBM Plex Sans', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;

  --r:    12px;
  --r-sm:  8px;
  --shadow:   0 4px 28px rgba(0,0,0,.45);
  --shadow-a: 0 0 28px rgba(0,180,255,.14);
  --ease: cubic-bezier(.16,1,.3,1);

  --nav-h: 64px;
  --pad:   clamp(60px,8vw,120px);
}

/* ── Reset ─────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--txt);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img,svg { display:block; }
a { color:inherit; text-decoration:none; }
button,input,textarea { font-family:inherit; }

/* ── Container ─────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(16px,4vw,32px);
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition:
    transform .18s var(--ease),
    box-shadow .18s ease,
    background .15s ease,
    color .15s ease,
    border-color .15s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn--primary { background: var(--accent); color: #000; }
.btn--primary:hover {
  background: var(--accent-hi);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,180,255,.32);
}
.btn--ghost {
  background: rgba(255,255,255,.05);
  color: var(--txt-2);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.09);
  color: var(--txt);
  border-color: rgba(255,255,255,.18);
  transform: translateY(-2px);
}
.btn--sm {
  padding: 7px 14px;
  font-size: 13px;
  background: var(--accent-lo);
  color: var(--accent);
  border: 1px solid var(--border-a);
  border-radius: var(--r-sm);
}
.btn--sm:hover {
  background: rgba(0,180,255,.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,180,255,.18);
}
.btn--full { width:100%; justify-content:center; }

/* ── Nav ────────────────────────────────────────────── */
#nav {
  position: fixed;
  top:0; left:0; right:0;
  z-index: 100;
  height: var(--nav-h);
  transition: background .35s ease, backdrop-filter .35s ease, border-bottom-color .35s ease;
  border-bottom: 1px solid transparent;
}
#nav.is-scrolled {
  background: rgba(10,14,26,.9);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px,4vw,32px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.3px;
  flex-shrink: 0;
}
.logo-in    { color: var(--accent); }
.logo-sep   { color: var(--txt-3); }
.logo-sight { color: var(--txt); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  font-size: 14px;
  color: var(--txt-2);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color:var(--txt); background:rgba(255,255,255,.06); }
.nav-cta {
  background: var(--accent) !important;
  color: #000 !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 8px 18px !important;
  margin-left: 8px;
}
.nav-cta:hover { background: var(--accent-hi) !important; }
.nav-portal {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: transparent !important;
  color: var(--accent) !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  margin-left: 4px;
  border: 1px solid rgba(0,180,255,.35) !important;
  transition: background .2s, border-color .2s !important;
}
.nav-portal:hover {
  background: rgba(0,180,255,.08) !important;
  border-color: var(--accent) !important;
}
.nav-burger {
  display: none;
  background: none;
  border: none;
  color: var(--txt-2);
  padding: 8px;
  cursor: pointer;
  transition: color .15s;
}
.nav-burger:hover { color: var(--txt); }

/* ── Section base ────────────────────────────────────── */
.section { padding: var(--pad) 0; }
.section--alt { background: var(--bg-alt); }

.section-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px,4.5vw,52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}
.section-lead {
  font-size: clamp(15px,1.8vw,18px);
  color: var(--txt-2);
  line-height: 1.72;
  max-width: 580px;
  margin-bottom: 64px;
}

/* ── Hero ────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}
#ctc-board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

/* ── CTC signals (CSS-animated so prefers-reduced-motion works) ── */
.ctc-sig { fill: #00ff88; }
.ctc-sig.a { animation: sig-flash 6.2s infinite 0s; }
.ctc-sig.b { animation: sig-flash 5.8s infinite 1.3s; }
.ctc-sig.c { animation: sig-flash 4.9s infinite 2.6s; }
.ctc-sig.d { animation: sig-flash 6.5s infinite 0.7s; }
.ctc-sig.e { animation: sig-flash 5.5s infinite 3.9s; }
.ctc-sig.f { animation: sig-flash 7.1s infinite 1.8s; }
.ctc-sig.g { animation: sig-flash 5.2s infinite 3.1s; }
.ctc-sig.h { animation: sig-flash 6.8s infinite 0.4s; }
@keyframes sig-flash {
  0%, 42%  { fill: #00ff88; }
  48%, 88% { fill: #ff4444; }
  94%,100% { fill: #00ff88; }
}

/* Mobile: hide Line 3 corridor + trains 4 & 5 */
@media (max-width: 680px) {
  .ctc-l3 { display: none; }
}
/* Radial vignette — center slightly darkened for text legibility over CTC board */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 50%, rgba(7,10,20,.28) 0%, transparent 70%),
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 30%, rgba(7,10,20,.80) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 clamp(16px,4vw,32px);
  max-width: 860px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--txt-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 18px;
  margin-bottom: 44px;
  background: rgba(255,255,255,.025);
}
.badge-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse-ring 2.6s ease-in-out infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(0,180,255,.5); }
  70%  { box-shadow: 0 0 0 7px rgba(0,180,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,180,255,0); }
}

.hero-headline {
  font-size: clamp(44px,8.5vw,96px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: clamp(-2px,-0.04em,-3px);
  margin-bottom: 28px;
  text-shadow: 0 2px 40px rgba(7,10,20,.9), 0 0 80px rgba(7,10,20,.6);
}
.hero-headline span {
  display: inline-block;
  opacity: 0;
  transform: translateY(32px);
  will-change: transform, opacity;
}
.hero-headline.revealed span {
  animation: word-in .65s var(--ease) forwards;
}
@keyframes word-in {
  to { opacity:1; transform:translateY(0); }
}

.hero-sub {
  font-size: clamp(16px,2vw,20px);
  color: var(--txt-2);
  line-height: 1.68;
  margin-bottom: 44px;
  text-shadow: 0 1px 20px rgba(7,10,20,.8);
}
.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fade-in 1s ease 2.2s forwards;
}
@keyframes fade-in { to { opacity:1; } }
.scroll-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--txt-3);
}
.scroll-track {
  width: 24px;
  height: 36px;
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding: 5px 0;
}
.scroll-thumb {
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  opacity: .8;
  animation: scroll-bounce 2.4s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%,100% { transform:translateY(0); opacity:.8; }
  50%      { transform:translateY(10px); opacity:.25; }
}

/* ── Stats ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: clamp(24px,3vw,40px) clamp(20px,2.5vw,32px);
  transition: transform .25s var(--ease), box-shadow .25s ease, border-color .25s ease;
  opacity: 0;
  transform: translateY(24px);
}
.stat-card.is-visible { animation: slide-up .6s var(--ease) forwards; }
.stat-card--accent { border-color: var(--border-a); background: rgba(0,180,255,.04); }
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-a);
  border-color: var(--border-a);
}
@keyframes slide-up { to { opacity:1; transform:translateY(0); } }

.stat-number {
  font-family: var(--mono);
  font-size: clamp(52px,7vw,82px);
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -3px;
  margin-bottom: 20px;
}
.stat-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 20px;
}
.stat-desc {
  font-size: 14px;
  color: var(--txt-2);
  line-height: 1.65;
}
.stat-desc strong { color: var(--txt); font-weight: 500; }

/* ── Solution steps ──────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 52px;
  left: 56px;
  right: 56px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-a) 15%, var(--border-a) 85%, transparent);
  pointer-events: none;
  z-index: 0;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 22px;
  transition: transform .22s var(--ease), box-shadow .22s ease, border-color .22s ease;
  opacity: 0;
  transform: translateY(20px);
  position: relative;
  z-index: 1;
}
.step-card.is-visible { animation: slide-up .55s var(--ease) forwards; }
.step-card:hover {
  border-color: var(--border-a);
  transform: translateY(-4px);
  box-shadow: var(--shadow-a);
}
.step-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  transition: filter .22s ease;
}
.step-card:hover .step-icon {
  filter: drop-shadow(0 0 7px rgba(0,180,255,.45));
}
.step-icon svg { width:48px; height:48px; }
.step-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 10px;
}
.step-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -.3px;
}
.step-desc {
  font-size: 14px;
  color: var(--txt-2);
  line-height: 1.65;
}

/* ── Architecture ─────────────────────────────────────── */
.arch-wrap {
  background: rgba(255,255,255,.018);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: clamp(20px,3vw,40px);
  overflow-x: auto;
  margin-bottom: 36px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.arch-wrap::-webkit-scrollbar { height:4px; }
.arch-wrap::-webkit-scrollbar-track { background:transparent; }
.arch-wrap::-webkit-scrollbar-thumb { background:var(--border); border-radius:2px; }
#arch-svg { width:100%; height:auto; min-width:580px; display:block; }

.tech-pills { display:flex; flex-wrap:wrap; gap:10px; }
.tech-pill {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--txt-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  background: transparent;
  transition: color .15s, border-color .15s, background .15s;
  cursor: default;
}
.tech-pill:hover {
  color: var(--accent);
  border-color: var(--border-a);
  background: var(--accent-lo);
}

/* ── Docs ─────────────────────────────────────────────── */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 16px;
}
.doc-card {
  display: flex;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  transition: transform .22s var(--ease), box-shadow .22s ease, border-color .22s ease;
  opacity: 0;
  transform: translateY(16px);
}
.doc-card.is-visible { animation: slide-up .5s var(--ease) forwards; }
.doc-card:hover {
  border-color: var(--border-a);
  transform: translateY(-4px);
  box-shadow: var(--shadow-a);
}
.doc-icon { flex-shrink:0; width:36px; }
.doc-icon svg { width:36px; height:44px; }
.doc-body { flex:1; min-width:0; display:flex; flex-direction:column; }
.doc-body h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -.2px;
}
.doc-body p {
  font-size: 13px;
  color: var(--txt-2);
  line-height: 1.6;
  flex:1;
  margin-bottom: 16px;
}
.doc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.doc-size {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--txt-3);
}

/* ── Contact ─────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 64px;
  align-items: start;
}
.contact-lead {
  font-size: 16px;
  color: var(--txt-2);
  line-height: 1.72;
  margin-bottom: 28px;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--txt-2);
  margin-bottom: 28px;
  transition: color .15s;
}
.contact-email svg { color:var(--accent); flex-shrink:0; }
.contact-email:hover { color: var(--accent); }
.in3-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border-a);
  border-radius: var(--r-sm);
  background: rgba(0,180,255,.04);
  margin-bottom: 24px;
}
.in3-badge-mark {
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.in3-badge-text { display:flex; flex-direction:column; gap:3px; }
.in3-title { font-size:13px; font-weight:600; }
.in3-sub   { font-size:12px; color:var(--txt-3); }
.talgo-mention {
  font-size: 13px;
  color: var(--txt-3);
  line-height: 1.65;
}
.talgo-mention strong { color:var(--txt-2); font-weight:500; }

/* Contact form */
.contact-form { display:flex; flex-direction:column; gap:18px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-field { display:flex; flex-direction:column; gap:7px; }
.form-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--txt-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.form-field input,
.form-field textarea {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--txt);
  outline: none;
  transition: border-color .18s, background .18s;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  background: rgba(0,180,255,.04);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color:var(--txt-3); }
.form-note { font-size:12px; color:var(--txt-3); text-align:center; }

/* ── Footer ──────────────────────────────────────────── */
#footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 44px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 15px;
}
.footer-by { font-size:12px; color:var(--txt-3); }
.footer-nav { display:flex; flex-wrap:wrap; gap:2px; }
.footer-nav a {
  font-size: 13px;
  color: var(--txt-3);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.footer-nav a:hover { color:var(--txt); background:rgba(255,255,255,.05); }
.footer-copy { font-size:12px; color:var(--txt-3); }

/* ── Toast ────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: #182a16;
  border: 1px solid rgba(0,255,100,.26);
  border-radius: 10px;
  font-size: 14px;
  color: #92e888;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity .28s ease, transform .28s var(--ease);
  pointer-events: none;
}
#toast:not([hidden]) {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.toast-icon { flex-shrink:0; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 960px) {
  .steps-grid { grid-template-columns:repeat(2,1fr); }
  .steps-grid::before { display:none; }
  .contact-grid { grid-template-columns:1fr; gap:44px; }
}
@media (max-width: 720px) {
  :root { --pad:64px; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: var(--nav-h);
    left:0; right:0;
    background: rgba(10,14,26,.97);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 99;
  }
  .nav-links.is-open { display:flex; }
  .nav-links a { padding:12px 16px; border-radius:var(--r-sm); }
  .nav-cta { margin-left:0; text-align:center; }
  .nav-portal { margin-left:0; text-align:center; justify-content:center; }
  .nav-burger { display:block; }
  .stats-grid { grid-template-columns:1fr; }
  .docs-grid  { grid-template-columns:1fr; }
  .form-row   { grid-template-columns:1fr; }
  .footer-inner { flex-direction:column; align-items:flex-start; }
}
@media (max-width: 520px) {
  :root { --pad:52px; }
  .steps-grid { grid-template-columns:1fr; }
  .hero-headline { letter-spacing:-1.5px; }
  .hero-ctas { flex-direction:column; align-items:center; }
  .doc-card { flex-direction:column; gap:14px; }
}

/* ── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after {
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
  html { scroll-behavior:auto; }
  .hero-headline span,
  .stat-card,
  .step-card,
  .doc-card {
    opacity:1 !important;
    transform:none !important;
    animation:none !important;
  }
  .scroll-indicator { opacity:.6 !important; animation:none !important; }
  /* CTC board: static diagram only, no moving trains or telemetry */
  .ctc-trains, .ctc-telemetry { display: none; }
  .ctc-sig { animation: none !important; fill: #00ff88; }
}
