/* ==========================================================================
   Treadic — global stylesheet
   Tokens, shared chrome (nav/footer), components, layout primitives.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #06121A;
  --ink-deep: #04161C;
  --slate: #0A1C26;
  --navy: #0A2430;

  --teal: #25A1B0;
  --teal-mid: #37B6C6;
  --teal-light: #7FE0EC;
  --on-teal: #04161C;

  --text-primary: #FFFFFF;
  --text-body: #E9EEF1;
  --text-body-2: #CFE1E8;
  --text-muted: #B6C9D1;
  --text-muted-2: #A9BEC7;
  --text-dim: #93A9B3;
  --text-dim-2: #8FA5AF;
  --text-faint: #7F97A2;
  --text-faint-2: #6E8792;
  --text-faint-3: #5E7681;

  --warn: #C77A66;
  --warn-light: #E1A08F;

  --hair: rgba(255, 255, 255, 0.09);
  --hair-11: rgba(255, 255, 255, 0.11);
  --hair-12: rgba(255, 255, 255, 0.12);
  --hair-16: rgba(255, 255, 255, 0.16);
  --hair-18: rgba(255, 255, 255, 0.18);
  --hair-30: rgba(255, 255, 255, 0.3);

  --display: 'Archivo', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;

  --pad-x: 40px;
  --pad-y: 110px;
  --max: 1440px;
  --max-narrow: 1180px;

  /* default cell background for hairline grids; overridden per section */
  --cell: var(--ink);
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text-body);
  font-family: var(--body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--teal-mid); text-decoration: none; transition: color 150ms ease, border-color 150ms ease, background 150ms ease; }
a:hover { color: var(--teal-light); }

p { text-wrap: pretty; }

h1, h2, h3, h4 { text-wrap: balance; }

input, textarea, select, button { font-family: inherit; }

::selection { background: var(--teal); color: var(--ink); }

:focus-visible { outline: 2px solid var(--teal-light); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Layout primitives ---------- */
.wrap { max-width: var(--max); margin: 0 auto; }
.wrap-narrow { max-width: var(--max-narrow); margin: 0 auto; }

.section { padding: var(--pad-y) var(--pad-x); }
.section-ink { background: var(--ink); --cell: var(--ink); }
.section-deep { background: var(--ink-deep); --cell: var(--ink-deep); }
.section-slate { background: var(--slate); --cell: var(--slate); }
.section-navy { background: var(--navy); --cell: var(--navy); }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* Two-column editorial split */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 70px; }
.split-80 { gap: 80px; }
.split-wide-left { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.split-wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }

/* 1px hairline grid: container paints the hairline, cells paint the section bg */
.hairgrid {
  display: grid;
  gap: 1px;
  background: var(--hair-11);
  border: 1px solid var(--hair-11);
}
.hairgrid > * { background: var(--cell); }
.hairstack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--hair-12);
  border-top: 1px solid var(--hair-12);
  border-bottom: 1px solid var(--hair-12);
}
.hairstack > * { background: var(--cell); }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--teal-mid);
  font-weight: 600;
}
.eyebrow-rule { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.eyebrow-rule::before { content: ""; width: 44px; height: 1px; background: var(--teal); flex: none; }

.label {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-faint);
}

.h1-page {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(40px, 6.4vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--text-primary);
  text-transform: uppercase;
}
.h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 3.8vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--text-primary);
}
.h2-lg {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 4.4vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--text-primary);
  text-transform: uppercase;
}
.h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 25px;
  line-height: 1.1;
  margin: 0;
  color: var(--text-primary);
}
.upper { text-transform: uppercase; }

.lede { font-size: 18px; line-height: 1.7; color: var(--text-muted); }
.body-lg { font-size: 17px; line-height: 1.72; color: var(--text-muted-2); }
.body { font-size: 16px; line-height: 1.7; color: var(--text-dim); }
.body-sm { font-size: 14.5px; line-height: 1.6; color: var(--text-dim); }
.caption { font-size: 12.5px; line-height: 1.6; color: var(--text-faint); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 18px 34px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn-primary { background: var(--teal); color: var(--on-teal); }
.btn-primary:hover { background: var(--teal-light); color: var(--on-teal); }
.btn-secondary { border-color: var(--hair-30); color: var(--text-body); background: transparent; }
.btn-secondary:hover { border-color: var(--teal-mid); color: var(--teal-light); }
.btn-block { display: block; width: 100%; }

.link-arrow {
  font-size: 12.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal-mid);
}
.link-arrow:hover { color: var(--teal-light); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Chips ---------- */
.chip {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted-2);
  border: 1px solid var(--hair-16);
  padding: 7px 13px;
  border-radius: 100px;
}
.chip-lg {
  font-size: 12.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-body-2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 100px;
  padding: 9px 18px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(37, 161, 176, 0.5);
  background: rgba(37, 161, 176, 0.1);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 11.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--teal-light);
  font-weight: 700;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-mid); flex: none; }

/* ---------- Forms ---------- */
.field { display: block; }
.field > span {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim-2);
  font-weight: 700;
  margin-bottom: 9px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--hair-16);
  color: var(--text-body);
  font-size: 15px;
  padding: 13px 14px;
  border-radius: 2px;
  outline: none;
  transition: border-color 150ms ease;
}
.field-on-slate input,
.field-on-slate select,
.field-on-slate textarea { background: var(--slate); }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--teal-mid); }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint-2); }
.field textarea { resize: vertical; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238FA5AF' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field-span2 { grid-column: span 2; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-card {
  background: var(--ink);
  border: 1px solid var(--hair-12);
  padding: 44px 44px 48px;
}
.form-note { margin: 16px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--text-faint-2); }

/* Honeypot — off-screen rather than display:none, which some bots skip */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(199, 122, 102, 0.5);
  background: rgba(199, 122, 102, 0.1);
  font-size: 14px;
  line-height: 1.6;
  color: var(--warn-light);
}
.form-error a { color: var(--warn-light); text-decoration: underline; }
.form-error a:hover { color: #FFF; }

.btn[disabled] { opacity: 0.6; cursor: default; }

.success {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.check-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--teal);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 26px;
}
[hidden] { display: none !important; }

/* ---------- Page header (interior pages) ---------- */
.page-header {
  position: relative;
  background: var(--navy);
  padding: clamp(200px, 24vh, 260px) var(--pad-x) 100px;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(85% 120% at var(--glow-x, 15%) 0%, rgba(37, 161, 176, 0.26) 0%, rgba(10, 36, 48, 0) 60%);
  pointer-events: none;
}
.page-header > .wrap { position: relative; }
.breadcrumb {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 26px;
}
.breadcrumb a { color: var(--text-faint); }
.breadcrumb a:hover { color: var(--teal-light); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  background: var(--navy);
  padding: 100px var(--pad-x);
  overflow: hidden;
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 140% at 50% 20%, rgba(37, 161, 176, 0.3) 0%, rgba(10, 36, 48, 0) 65%);
  pointer-events: none;
}
.cta-band > .wrap-narrow { position: relative; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Media bands ---------- */
.band {
  position: relative;
  overflow: hidden;
  height: 70vh;
  min-height: 520px;
}
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(4, 20, 28, 0.9) 0%, rgba(4, 20, 28, 0.45) 55%, rgba(4, 20, 28, 0.2) 100%);
}
.band .band-inner {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 0 8vw;
}

/* ---------- Images & placeholders ---------- */
.imgbox { position: relative; overflow: hidden; }

/* A real photo dropped into any .imgbox fills it the same way a placeholder did. */
.imgbox > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background-color: var(--navy);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(127, 224, 236, 0.045) 0 10px,
    rgba(127, 224, 236, 0) 10px 20px
  );
  border: 1px dashed rgba(127, 224, 236, 0.3);
}
.ph::before {
  content: "Photo placeholder";
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal-light);
  border: 1px solid rgba(127, 224, 236, 0.35);
  border-radius: 100px;
  padding: 6px 13px;
}
.ph::after {
  content: attr(data-label);
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
}
.ph-sm::before { font-size: 9.5px; letter-spacing: 0.2em; padding: 5px 10px; }
.ph-sm::after { font-size: 12px; }

/* ---------- Site nav ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  font-family: var(--body);
}
.announce {
  background: var(--teal);
  color: #032027;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
  padding: 9px 16px;
}
.announce a { color: #032027; }
.announce a:hover { color: var(--ink); }
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  flex-wrap: wrap;
  padding: 14px 32px;
  background: rgba(6, 18, 26, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hair);
}
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 38px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.nav-links a { color: var(--text-body); white-space: nowrap; }
.nav-links a:hover { color: var(--teal-mid); }
.nav-links a[aria-current="page"] { color: var(--teal-light); }
.nav-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.nav-phone {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #9FB4BE;
  white-space: nowrap;
}
.nav-phone:hover { color: var(--text-body); }
.nav-cta { padding: 13px 22px; font-size: 12.5px; letter-spacing: 0.12em; white-space: nowrap; }

.nav-toggle {
  display: none;
  width: 44px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--hair-18);
  border-radius: 2px;
  color: var(--text-body);
  cursor: pointer;
}
.nav-toggle span {
  position: relative;
  display: block;
  width: 18px; height: 1.5px;
  background: currentColor;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px; height: 1.5px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.site-nav.is-open .nav-toggle span { background: transparent; }
.site-nav.is-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.site-nav.is-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Site footer ---------- */
.site-footer {
  background: var(--ink-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 70px 40px 34px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  padding-bottom: 56px;
}
.footer-logo { height: 42px; width: auto; margin-bottom: 22px; }
.footer-blurb { margin: 0 0 24px; font-size: 15px; line-height: 1.7; color: var(--text-dim-2); max-width: 320px; }
.footer-heading {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint-3);
  font-weight: 700;
  margin-bottom: 20px;
}
.footer-links { display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: var(--text-muted); }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--teal-light); }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-btn {
  border: 1px solid var(--hair-18);
  padding: 9px 15px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-body-2);
  font-weight: 600;
}
.social-btn:hover { border-color: var(--teal-mid); color: var(--teal-light); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-bottom span { font-size: 13px; color: var(--text-faint-3); }

/* ---------- Animations ---------- */
@keyframes tdc-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tdc-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(9px); } }
@keyframes tdc-scanline { from { transform: translateY(-100%); } to { transform: translateY(1100%); } }
@keyframes tdc-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.marquee {
  background: var(--teal);
  color: var(--on-teal);
  overflow: hidden;
  padding: 15px 0;
  white-space: nowrap;
}
.marquee-track { display: inline-flex; animation: tdc-marquee 34s linear infinite; }
.marquee-run {
  display: inline-flex;
  gap: 44px;
  padding-right: 44px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track,
  .scan-beam,
  .bob,
  .badge .dot { animation: none !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 44px; }
}

@media (max-width: 1080px) {
  :root { --pad-y: 90px; --pad-x: 32px; }
  .split,
  .split-wide-left,
  .split-wide-right { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  /* Mobile nav: collapse links + CTA into a drawer */
  .nav-bar { padding: 12px 20px; flex-wrap: wrap; row-gap: 0; }
  .nav-toggle { display: flex; }
  .nav-links,
  .nav-right {
    display: none;
    width: 100%;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    order: 3;
  }
  .site-nav.is-open .nav-links,
  .site-nav.is-open .nav-right {
    display: flex;
    background: rgba(6, 18, 26, 0.96);
    /* full-bleed past the nav bar's own horizontal padding */
    margin: 0 -20px;
    flex-basis: calc(100% + 40px);
  }
  .site-nav.is-open .nav-links { padding: 24px 20px 10px; font-size: 15px; }
  .site-nav.is-open .nav-right { padding: 0 20px 26px; align-items: stretch; }
  .site-nav.is-open .nav-cta { text-align: center; }
  .nav-bar { position: relative; }

  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
  .band { height: auto; min-height: 460px; }
  .band .band-inner { position: relative; padding: 80px 32px; }
  .form-card { padding: 32px 24px 36px; }
}

@media (max-width: 720px) {
  :root { --pad-y: 64px; --pad-x: 20px; }
  .g2, .g3, .g4, .g6 { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .field-span2 { grid-column: span 1; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .site-footer { padding: 56px 20px 28px; }
  .page-header { padding-top: clamp(180px, 22vh, 220px); padding-bottom: 64px; }
  .btn { padding: 16px 26px; }
  .band .band-inner { padding: 64px 20px; }
}
