/* =========================================================
   TNSCO — Design System
   Ink navy vault base, brass/currency accent, teal data accent.
   Display: Space Grotesk / Body: Inter / Data: JetBrains Mono
========================================================= */

:root {
  /* Brand core — kept consistent with existing TNS identity */
  --white: #FFFFFF;
  --orange: #fc712f;      /* TNS orange — exact brand hex, for backgrounds/buttons only */
  --orange-bright: #FF8F51;
  --gray-medium: #6E7175; /* existing TNS medium gray */

  /* New tech-forward complements */
  --slate: #37495C;       /* slate blue — dark sections, secondary accent */
  --slate-soft: #46617D;
  --slate-bright: #6E93B3; /* lighter slate-blue for links/accents on dark */
  --cool-50: #F6F7F8;     /* cool light gray — alt section background */
  --cool-100: #ECEEF0;
  --ink: #1D242B;         /* cool near-black — replaces flat black for dark sections */
  --ink-soft: #242C34;

  /* Mapped working tokens (keeps the rest of the stylesheet's logic intact) */
  --steel: var(--slate);
  --steel-soft: var(--slate-soft);
  --paper: var(--cool-50);
  --paper-dim: var(--cool-100);
  --brass: var(--orange);
  --brass-bright: var(--orange-bright);
  --teal: var(--slate-soft);
  --teal-bright: var(--slate-bright);
  --ink-text: #23282D;
  --muted: var(--gray-medium);
  --muted-on-dark: #A9B7C4;
  --line: rgba(29, 36, 43, 0.12);
  --line-on-dark: rgba(255, 255, 255, 0.14);

  --font-display: "Poppins", "Arial", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  --container: 1200px;
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: url('../img/hero-bg-healed.png') center top / 1800px auto repeat, var(--cool-50);
  color: var(--ink-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.08;
}
h2, h3 { line-height: 1.25; }

.mono {
  font-family: var(--font-body); font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

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

.eyebrow {
  font-family: var(--font-body); font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow-statement {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.eyebrow.eyebrow-statement::before { display: none; }
.eyebrow.eyebrow-nodash::before { display: none; }
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body); font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--brass);
  color: var(--ink);
}
.btn-primary:hover { background: var(--brass-bright); }
.btn-ghost {
  border-color: var(--line);
  color: var(--ink-text);
}
.btn-ghost:hover { border-color: var(--ink-text); }
.btn-ghost-dark {
  border-color: var(--line);
  color: var(--ink-text);
}
.btn-ghost-dark:hover { border-color: var(--ink-text); }

/* ---------- Header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-text);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 32px; width: auto; display: block; }
.brand .tagline {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.25;
  color: var(--ink-text);
  letter-spacing: 0;
  text-transform: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink-text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--slate);
}
.nav-cta {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #FFFFFF;
  background: var(--slate);
  padding: 10px 18px;
  border-radius: 6px;
}
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: transparent;
  color: var(--ink-text);
  position: relative;
  overflow: hidden;
  padding: 96px 0 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  grid-template-areas: "text visual" "actions visual";
  column-gap: 40px;
  row-gap: 8px;
  align-items: start;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px 80px;
  position: relative;
}
.hero h1 {
  font-size: clamp(38px, 4.6vw, 64px);
  color: var(--ink-text);
}
.hero h1 em {
  font-style: normal;
  color: var(--slate);
}
.hero p.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 480px;
  margin: 24px 0 16px;
}
.hero p.lede + p.lede { margin-top: 0; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Signature: bill-counter stack + LCD readout */
.counter-rig {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.bill-stack {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  width: 320px;
}
.bill {
  height: 34px;
  margin-bottom: -22px;
  border-radius: 3px;
  border: 1px solid rgba(238,241,240,0.18);
  position: relative;
  box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}
.bill:nth-child(1) { background: linear-gradient(135deg, #2A3742, var(--slate)); transform: translateX(-14px) rotate(-2deg); }
.bill:nth-child(2) { background: linear-gradient(135deg, var(--slate), var(--slate-soft)); transform: translateX(10px) rotate(1.5deg); }
.bill:nth-child(3) { background: linear-gradient(135deg, var(--slate-soft), var(--slate-bright)); transform: translateX(-6px) rotate(-1deg); }
.bill:nth-child(4) { background: linear-gradient(135deg, var(--orange), var(--orange-bright)); transform: translateX(4px) rotate(1deg); }
.bill:nth-child(5) { background: linear-gradient(135deg, #8B929A, #A9AEB4); transform: translateX(0) rotate(0); }

.lcd {
  position: absolute;
  top: 0;
  right: 0;
  width: 240px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 20px 50px rgba(29,36,43,0.08);
}
.lcd-label {
  font-family: var(--font-body); font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.lcd-value {
  font-family: var(--font-body); font-weight: 600;
  font-size: 30px;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
}
.lcd-sub {
  font-family: var(--font-body); font-weight: 600;
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}
.lcd + .lcd { margin-top: 16px; }
.lcd-group { position: absolute; top: 10px; right: 0; display: flex; flex-direction: column; gap: 14px; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section-dark { background: transparent; color: var(--ink-text); }
.section-steel { background: transparent; color: var(--ink-text); }

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head h2 {
  font-size: clamp(28px, 3.2vw, 40px);
}
.section-head p {
  color: var(--muted);
  font-size: 16px;
  margin-top: 16px;
}
.section-dark .section-head p, .section-steel .section-head p { color: var(--muted); }
.headline-with-lockup { display: flex; align-items: center; column-gap: 16px; margin-bottom: 56px; flex-wrap: wrap; }
.headline-with-lockup h2 { font-size: clamp(28px, 3.2vw, 40px); margin: 0; }
@media (max-width: 720px) {
  .headline-with-lockup { flex-direction: column; align-items: center; row-gap: 20px; }
  .headline-with-lockup img { max-width: 160px !important; }
}

/* Grid cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.industry-divider {
  height: 2px;
  background: var(--orange);
  border: none;
  opacity: 0.5;
  max-width: 270px;
  margin: 0 auto;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(16,27,46,0.08); }
.card .idx {
  font-family: var(--font-body); font-weight: 600;
  font-size: 24px;
  color: var(--teal);
  margin-bottom: 4px;
  min-height: 52px;
}
.card h3 { font-size: 20px; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15px; }

.card-dark {
  background: #FFFFFF;
  border: 1px solid var(--line);
}
.card-dark h3 { color: var(--ink-text); }
.card-dark p { color: var(--muted); }
.card-dark .idx { color: var(--slate); }

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.stat {
  padding: 32px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat .num {
  font-family: var(--font-body); font-weight: 600;
  font-size: 28px;
  color: var(--slate);
}
.stat .label {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 10px;
}

/* Table (specs) */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.spec-table th {
  font-family: var(--font-body); font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  color: var(--muted);
}
.spec-table td.mono { color: var(--ink-text); }

/* Process list */
.process { display: flex; flex-direction: column; }
.process-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.process-row:last-child { border-bottom: 1px solid var(--line); }
.process-row .step {
  font-family: var(--font-body); font-weight: 600;
  font-size: 13px;
  color: var(--teal);
}
.process-row h4 { font-size: 18px; margin-bottom: 8px; }
.process-row p { color: var(--muted); font-size: 15px; margin: 0; }

/* CTA band */
.cta-band {
  background: var(--brass);
  color: var(--ink);
  text-align: left;
  border-radius: var(--radius);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: 30px; max-width: 480px; }
.cta-band .btn-primary { background: #FFFFFF; color: var(--ink-text); }
.cta-band .btn-primary:hover { background: var(--cool-50); }

/* Footer */
footer {
  background: var(--ink);
  color: var(--muted-on-dark);
  padding: 64px 0 32px;
  border-top: 1px solid var(--line-on-dark);
  position: relative;
  overflow: hidden;
}
.footer-flower {
  position: absolute;
  bottom: -20px;
  right: 40px;
  width: 60px;
  opacity: 0.55;
  pointer-events: none;
  transform: rotate(-4deg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-grid h4 {
  font-family: var(--font-body); font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--paper);
  margin-bottom: 18px;
}
.footer-grid a, .footer-grid p { color: var(--muted-on-dark); font-size: 14px; display: block; margin-bottom: 10px; }
.footer-grid a:hover { color: var(--paper); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--line-on-dark);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

/* Page hero (interior pages) */
.page-hero {
  background: transparent;
  color: var(--ink-text);
  padding: 140px 0 72px;
}
.page-hero .eyebrow { color: var(--slate); }
.page-hero .eyebrow::before { background: var(--slate); }
.page-hero h1 { font-size: clamp(32px, 4vw, 50px); }
.page-hero p { color: var(--muted); max-width: 620px; margin-top: 18px; font-size: 17px; }

/* Contact form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
label {
  display: block;
  font-family: var(--font-body); font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
input, textarea, select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  background: #fff;
  color: var(--ink-text);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 2px;
}
.card-dark a:focus-visible, .section-dark a:focus-visible, footer a:focus-visible {
  outline-color: #fff;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink-text);
  color: #fff;
  padding: 14px 24px;
  z-index: 9999;
  font-weight: 600;
  border-radius: 0 0 6px 0;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}
textarea { resize: vertical; min-height: 140px; }

/* Utility */
.text-center { text-align: center; margin-left: auto; margin-right: auto; }
.mt-64 { margin-top: 64px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.two-col-actions { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: min-content min-content; column-gap: 56px; row-gap: 8px; align-items: start; }
.industry-section-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; row-gap: 8px; align-items: start; }
.industry-section-grid.type-a { grid-template-areas: "text card" "text actions"; }
.industry-section-grid.type-b { grid-template-areas: "card text" "actions text"; }
.tag {
  display: inline-block;
  font-family: var(--font-body); font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  margin-right: 8px;
  margin-bottom: 8px;
}

/* Product illustration panel */
.device-panel {
  background: var(--cool-100);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.device-panel.light {
  background: var(--cool-100);
}
.device-panel svg { width: 100%; max-width: 260px; height: auto; }

/* Software mockup — Apple-like clean dashboard visual */
.software-mockup {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(29,36,43,0.12), 0 8px 24px rgba(29,36,43,0.06);
  overflow: hidden;
  width: 100%;
  max-width: 420px;
}
.software-mockup .chrome {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--cool-50);
}
.software-mockup .dot { width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.software-mockup .dot.r { background: #E8B4B0; }
.software-mockup .dot.y { background: #EFD6A0; }
.software-mockup .dot.g { background: #A8CDB6; }
.software-mockup .chrome span {
  margin-left: 10px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 500;
}
.software-mockup .body { padding: 28px 26px 30px; }
.software-mockup .status { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.software-mockup .check {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--slate);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; flex-shrink: 0;
}
.software-mockup .status h4 { font-size: 16px; margin: 0 0 2px; }
.software-mockup .status p { margin: 0; font-size: 13px; color: var(--muted); }
.software-mockup .chart { display: flex; align-items: flex-end; gap: 10px; height: 90px; }
.software-mockup .bar { flex: 1; border-radius: 4px 4px 0 0; background: var(--cool-100); }
.software-mockup .bar.accent { background: var(--orange); }
.software-mockup .chart-caption { margin-top: 10px; font-size: 12px; color: var(--muted); }
.hero-visual-caption {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
  max-width: 380px;
}

.hero-device-bleed {
  align-self: flex-start;
  margin-top: 72px;
  margin-left: 70px;
  margin-bottom: 0;
  width: 135%;
  max-width: 375px;
  filter: drop-shadow(0 45px 55px rgba(29,36,43,0.35)) drop-shadow(0 14px 20px rgba(29,36,43,0.25));
}
.hero-device-bleed img { width: 100%; height: auto; display: block; }

/* Hero brand lockup — larger version of the nav logo + tagline */
.hero-lockup {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 22px;
  margin-top: 30px;
}
.hero-lockup img { height: 150px; width: auto; display: block; flex-shrink: 0; }
.hero-lockup .tagline {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 54px;
  line-height: 1.12;
  color: var(--ink-text);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "text" "visual" "actions"; row-gap: 24px; }
  .counter-rig { margin-top: 8px; }
  .hero-lockup { margin-top: 16px; }
  .hero-lockup img { height: 90px; }
  .hero-lockup .tagline { font-size: 34px; white-space: normal; }
  .grid-3, .grid-2, .two-col { grid-template-columns: 1fr !important; }
  .two-col-actions { grid-template-columns: 1fr !important; grid-template-areas: "text" "visual" "actions" !important; row-gap: 16px; }
  .desktop-tight-actions { margin-top: 0 !important; }
  .industry-section-grid { grid-template-columns: 1fr !important; grid-template-areas: "card" "text" "actions" !important; row-gap: 16px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat { padding: 18px; }
  .stat .num { font-size: 19px; }
  .stat .label { font-size: 13px; line-height: 1.35; margin-top: 6px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col.mobile-reorder > *:first-child { order: 2; }
  .two-col.mobile-reorder > *:last-child { order: 1; }
  .hero-device-bleed { width: 85%; max-width: 320px; margin: 28px auto 0; }
  .about-pcb-img { width: 100% !important; margin: 0 auto !important; }
  .footer-grow-flower { width: 55px !important; top: -128px !important; right: 16px !important; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; background: none; border: none; color: var(--ink-text); font-size: 22px; cursor: pointer; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .cta-band h2 { white-space: normal !important; max-width: 480px !important; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .comma-break { display: none; }
}
