/* ============================================
   ATLAS UNITED — SHARED DESIGN SYSTEM
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Surfaces */
  --bg: #FFFFFF;
  --bg-warm: #F5F1EA;
  --bg-sand: #ECE5D8;
  --bg-deep: #0E1116;
  --bg-deeper: #07090C;

  /* Ink */
  --ink: #0E1116;
  --ink-soft: #4A5560;
  --ink-mute: #8A95A0;

  /* Lines */
  --line: #E4DED2;
  --line-faint: #EFEAE0;
  --line-dark: rgba(255, 255, 255, 0.10);
  --line-dark-faint: rgba(255, 255, 255, 0.05);

  /* Accent */
  --accent: #D14A1F;
  --accent-soft: #F2C9B8;
  --accent-deep: #A53814;

  /* Status */
  --good: #2F6B3A;
  --warn: #F97316;
  --bad: #B5421F;

  /* Grade colors */
  --grade-a: #2F6B3A;
  --grade-b: #6B9B3F;
  --grade-c: #D4A017;
  --grade-d: #D67520;
  --grade-f: #B5421F;

  /* Type */
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Layout */
  --nav-h: 76px;
  --container: 1280px;
  --container-wide: 1440px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

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

/* ============================================
   PILL NAV
   ============================================ */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 40px);
  max-width: 1080px;
}
.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 20px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(228, 222, 210, 0.6);
  border-radius: 999px;
  box-shadow: 0 4px 24px -8px rgba(14, 17, 22, 0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled .nav-pill {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 32px -10px rgba(14, 17, 22, 0.12);
  border-color: rgba(228, 222, 210, 0.95);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.nav-brand img { width: 26px; height: 26px; }
.nav-brand .name { font-size: 15px; font-weight: 600; white-space: nowrap; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}
.nav-links a {
  position: relative;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(245, 241, 234, 0.85);
  border-radius: 999px;
  z-index: -1;
}

/* Industries dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { display: inline-flex; align-items: center; gap: 4px; }
.nav-dropdown-trigger svg { width: 11px; height: 11px; transition: transform 0.25s ease; }
.nav-dropdown:hover .nav-dropdown-trigger svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 280px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 16px 48px -16px rgba(14, 17, 22, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink);
}
.nav-dropdown-menu a:hover { background: var(--bg-warm); color: var(--ink); }
.nav-dropdown-menu a .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}
.nav-dropdown-menu a:hover .num { color: var(--accent); }
.nav-dropdown-menu .label {
  display: block;
  font-weight: 500;
  font-size: 13.5px;
}
.nav-dropdown-menu .desc {
  display: block;
  font-size: 11.5px;
  color: var(--ink-mute);
  margin-top: 1px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover { background: var(--accent); }
.nav-cta svg { width: 13px; height: 13px; transition: transform 0.2s ease; }
.nav-cta:hover svg { transform: translateX(2px); }

.nav-mobile-toggle { display: none; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.22s var(--ease-out);
  white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; transition: transform 0.22s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: var(--bg-warm); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--accent); color: #fff; }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, 0.30); background: transparent; }
.btn-outline-light:hover { border-color: #fff; }

/* Magnetic hover state — JS adds .magnetic-active for compound effects */
.btn.magnetic { transition: transform 0.18s var(--ease-out), background 0.22s var(--ease-out); }

/* ============================================
   TYPE
   ============================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.eyebrow.dot::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}

.section-title {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 28px;
  text-wrap: balance;
}
.section-title .serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.section-lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 680px;
  text-wrap: pretty;
}

/* ============================================
   SECTIONS
   ============================================ */
section.block { padding: 140px 0; position: relative; }
section.block-tight { padding: 100px 0; }
section.dark {
  background: var(--bg-deep);
  color: #fff;
}
section.dark .section-title { color: #fff; }
section.dark .section-lead { color: rgba(255, 255, 255, 0.65); }
section.dark .eyebrow { color: var(--accent); }
section.warm { background: var(--bg-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ============================================
   PAGE HEAD (subhero used on inner pages)
   ============================================ */
.page-head {
  padding: calc(var(--nav-h) + 80px) 0 80px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-head-inner { max-width: 880px; }
.page-head h1 {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 24px;
  text-wrap: balance;
}
.page-head h1 .serif { font-family: var(--serif); font-style: italic; font-weight: 400; }
.page-head p {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
  text-wrap: pretty;
}
.page-head .breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 32px;
}
.page-head .breadcrumb a { color: var(--ink-mute); transition: color 0.2s; }
.page-head .breadcrumb a:hover { color: var(--accent); }
.page-head .breadcrumb svg { width: 12px; height: 12px; opacity: 0.5; }

/* ============================================
   FOOTER
   ============================================ */
footer.site {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 80px 0 32px;
  font-size: 14px;
  color: var(--ink-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand img { width: 30px; height: 30px; }
.footer-brand-name { font-weight: 600; font-size: 18px; }
.footer-desc {
  font-size: 14px;
  line-height: 1.55;
  max-width: 320px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.footer-cta:hover { color: var(--accent); }
.footer-cta svg { width: 12px; height: 12px; transition: transform 0.2s; }
.footer-cta:hover svg { transform: translateX(2px); }

.footer-col h5 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--ink); transition: color 0.2s; font-size: 14px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-mute);
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================
   COMMON UI: STATS BAND
   ============================================ */
.stats-band {
  background: var(--bg-warm);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 80px 0;
}
.stats-band-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-cell {
  padding: 0 32px;
  border-right: 1px solid var(--line);
}
.stat-cell:first-child { padding-left: 0; }
.stat-cell:last-child { border-right: none; padding-right: 0; }
.stat-num {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 10px;
}
.stat-num .serif { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.stat-label { font-size: 14px; color: var(--ink-soft); line-height: 1.45; max-width: 220px; }

/* ============================================
   COMMON UI: MARQUEE
   ============================================ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 26px 0;
  overflow: hidden;
  position: relative;
}
.marquee.dark { background: var(--bg-deep); border-color: var(--line-dark); }
.marquee-row {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
  width: max-content;
}
.marquee.fast .marquee-row { animation-duration: 24s; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.marquee.dark .marquee-item { color: rgba(255, 255, 255, 0.55); }
.marquee-item .agency { color: var(--ink); font-weight: 600; }
.marquee.dark .marquee-item .agency { color: #fff; }
.marquee-item .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.marquee.dark .marquee-item .sep { background: var(--line-dark); }

/* ============================================
   COMMON UI: LIVE DATA TAPE (Atlas)
   Bloomberg-style production telemetry strip
   ============================================ */
.datatape {
  background: #0e1116;
  color: #cdd3dc;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.datatape-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 40px;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.datatape .dt-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
}
.datatape .dt-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6fa867;
  box-shadow: 0 0 0 0 rgba(111,168,103,0.6);
  animation: dtPulse 1.6s ease-out infinite;
}
@keyframes dtPulse {
  0% { box-shadow: 0 0 0 0 rgba(111,168,103,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(111,168,103,0); }
  100% { box-shadow: 0 0 0 0 rgba(111,168,103,0); }
}
.datatape .dt-time {
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
}
.datatape .dt-meta {
  margin-left: auto;
  color: rgba(255,255,255,0.4);
}
.datatape-tape {
  overflow: hidden;
  padding: 18px 0;
  position: relative;
}
.datatape-tape::before,
.datatape-tape::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.datatape-tape::before { left: 0; background: linear-gradient(90deg, #0e1116, transparent); }
.datatape-tape::after { right: 0; background: linear-gradient(-90deg, #0e1116, transparent); }
.datatape-row {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: marquee 90s linear infinite;
  width: max-content;
  padding: 0 32px;
}
.datatape:hover .datatape-row { animation-play-state: paused; }
.dti {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  position: relative;
  padding-right: 24px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.dti:last-child { border-right: 0; }
.dti-k {
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.dti-v {
  color: #fff;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.dti-v i {
  font-style: normal;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  margin-left: 1px;
  letter-spacing: 0.05em;
}
.dti-v.up { color: #8fc486; }
.dti-v.up::before {
  content: '▲ ';
  font-size: 9px;
  margin-right: 2px;
  color: #8fc486;
  vertical-align: 1px;
}
.dti-v.warn { color: #d8a04a; }
.dti-v.warn::before {
  content: '● ';
  color: #d8a04a;
  font-size: 8px;
  vertical-align: 2px;
  margin-right: 2px;
}
.dti-d {
  color: rgba(255,255,255,0.32);
  font-size: 11px;
  letter-spacing: 0.04em;
}
@media (max-width: 720px) {
  .datatape-head { padding: 12px 20px; gap: 12px; flex-wrap: wrap; font-size: 10px; }
  .datatape .dt-meta { display: none; }
  .dti { gap: 8px; padding-right: 18px; }
  .dti-v { font-size: 14px; }
}

/* ============================================
   GRADE BADGE
   ============================================ */
.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  letter-spacing: 0.02em;
}
.grade-badge.lg { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; }
.grade-a { background: var(--grade-a); }
.grade-b { background: var(--grade-b); }
.grade-c { background: var(--grade-c); }
.grade-d { background: var(--grade-d); }
.grade-f { background: var(--grade-f); }

/* ============================================
   CARDS
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.card {
  background: #fff;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}
.card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: var(--bg-warm);
  transition: height 0.4s var(--ease-out);
  z-index: 0;
}
.card:hover::after { height: 100%; }
.card > * { position: relative; z-index: 1; }
.card .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.10em;
  position: absolute;
  top: 32px;
  right: 32px;
}
.card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 8px;
}
.card-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.card-desc { font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

/* ============================================
   MOTION SYSTEM (Linear/Vercel level: subtle, everywhere)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 300ms; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 360ms; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 420ms; }

/* Tilt cards (JS adds the transforms) */
.tilt {
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease-out);
}
.tilt-content {
  transform: translateZ(20px);
  transition: transform 0.4s var(--ease-out);
}

/* SVG draw-on for icons */
.draw-svg path,
.draw-svg circle,
.draw-svg line,
.draw-svg rect {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.6s var(--ease-out);
}
.draw-svg.in path,
.draw-svg.in circle,
.draw-svg.in line,
.draw-svg.in rect {
  stroke-dashoffset: 0;
}

.hero-map-photo {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  aspect-ratio: 16/10;
}
.hero-map-photo svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============================================
   PAGE TRANSITION CURTAIN
   ============================================ */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.curtain-panel {
  background: var(--bg-deep);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.6s var(--ease-out);
}
.curtain.entering .curtain-panel {
  transform: scaleY(1);
  transition: transform 0.5s var(--ease-out);
}
.curtain.entering .curtain-panel:nth-child(1) { transition-delay: 0ms; }
.curtain.entering .curtain-panel:nth-child(2) { transition-delay: 40ms; }
.curtain.entering .curtain-panel:nth-child(3) { transition-delay: 80ms; }
.curtain.entering .curtain-panel:nth-child(4) { transition-delay: 120ms; }
.curtain.entering .curtain-panel:nth-child(5) { transition-delay: 160ms; }
.curtain.entering .curtain-panel:nth-child(6) { transition-delay: 200ms; }
.curtain.leaving .curtain-panel {
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.5s var(--ease-out);
}
.curtain.leaving .curtain-panel:nth-child(1) { transition-delay: 200ms; }
.curtain.leaving .curtain-panel:nth-child(2) { transition-delay: 160ms; }
.curtain.leaving .curtain-panel:nth-child(3) { transition-delay: 120ms; }
.curtain.leaving .curtain-panel:nth-child(4) { transition-delay: 80ms; }
.curtain.leaving .curtain-panel:nth-child(5) { transition-delay: 40ms; }
.curtain.leaving .curtain-panel:nth-child(6) { transition-delay: 0ms; }

/* Loading mark in center of curtain */
.curtain-mark {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.curtain-mark.show { opacity: 1; }
.curtain-mark img {
  width: 48px;
  height: 48px;
  animation: markSpin 1.4s linear infinite;
  filter: invert(1);
}
@keyframes markSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   CUSTOM CURSOR (hero region only)
   ============================================ */
.cursor-zone { cursor: auto; }
.cursor-zone .cursor-zone-fallback { cursor: auto; }
.cursor-dot,
.cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 9000;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(209, 74, 31, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, width 0.25s var(--ease-out), height 0.25s var(--ease-out), border-color 0.25s ease;
}
.cursor-active .cursor-dot,
.cursor-active .cursor-ring { opacity: 1; }
.cursor-grow .cursor-ring { width: 56px; height: 56px; border-color: var(--accent); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .container, .container-wide { padding: 0 32px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .footer-grid .footer-brand-block { grid-column: 1 / -1; }
  .footer-grid > .footer-col:first-of-type { grid-column-start: 1; }
}
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
  }
  .nav-mobile-toggle svg { width: 18px; height: 18px; }
  .stats-band-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 0; }
  .stat-cell { border-right: none; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .stat-cell:nth-last-child(-n+2) { border-bottom: none; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
/* ===== mobile hamburger menu — open state (added 2026-05-17) ===== */
@media (max-width: 1024px) {
  .nav.nav-open .nav-mobile-toggle {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
  }
  .nav.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 20px 50px -14px rgba(14, 17, 22, 0.28);
  }
  .nav.nav-open .nav-links > a,
  .nav.nav-open .nav-dropdown-trigger {
    padding: 13px 14px;
    font-size: 15px;
    border-radius: 12px;
  }
  .nav.nav-open .nav-links > a:hover,
  .nav.nav-open .nav-dropdown-trigger:hover { background: var(--bg-warm); }
  .nav.nav-open .nav-dropdown { width: 100%; }
  .nav.nav-open .nav-dropdown-trigger { display: flex; justify-content: space-between; }
  /* expand the Industries submenu inline so every link is tappable */
  .nav.nav-open .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    min-width: 0;
    padding: 2px 0 6px 12px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (max-width: 640px) {
  .container, .container-wide { padding: 0 20px; }
  section.block { padding: 80px 0; }
  section.block-tight { padding: 64px 0; }
  .page-head { padding: calc(var(--nav-h) + 56px) 0 56px; }
  .nav { top: 12px; width: calc(100% - 24px); }
  .nav-pill { padding: 6px 6px 6px 16px; }
  .nav-cta { padding: 8px 14px; font-size: 12.5px; }
  .nav-brand .name { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .card-grid { grid-template-columns: 1fr; }
  .curtain { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
  .draw-svg path, .draw-svg circle, .draw-svg line, .draw-svg rect { stroke-dashoffset: 0; }
}

/* ===== mobile responsiveness pass (added 2026-05-17) ===== */
html, body { overflow-x: hidden; max-width: 100%; }
@media (max-width: 760px) {
  /* wide code samples scroll inside their own box, never push the page */
  .code-block { max-width: 100%; }
  .code-block pre { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* comparison tables shrink to fit small screens */
  .compare-table { font-size: 11px; }
  .compare-table th, .compare-table td { padding: 8px 7px; }
  /* media never wider than the viewport */
  img, svg, video, iframe { max-width: 100%; }
}

/* ===== site refresh additions (added 2026-05-21) — additive only, no design changes ===== */

/* footer USPTO patent line — purely a small mono label, sits in footer-bottom */
.footer-patent {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.footer-patent:hover { color: var(--ink); }

/* investors nav-link accent — uses existing --accent color, adds a small leading dot
   higher specificity so the existing `.nav-links a` color rule doesn't override us */
.nav-links a.nav-link-accent,
a.nav-link-accent { color: var(--accent); font-weight: 500; }
.nav-links a.nav-link-accent:hover,
a.nav-link-accent:hover { color: var(--accent); }
.nav-link-accent::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
  transform: translateY(-1px);
}

/* badges (promoted from inline on investors.html so industries pages can reuse) */
.badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.badge {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #fff;
}
.badge.accent {
  border-color: var(--accent);
  color: var(--accent);
}

/* compare.html table wrapper — horizontal scroll inside, not the page */
.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  margin: 0;
}

/* ===== mobile hardening (added 2026-05-21) ===== */

/* scroll lock when mobile menu is open — prevents body scrolling behind the menu */
body.nav-open { overflow: hidden; }

/* industries dropdown tap support for tablets (>1024px touch) */
.nav-dropdown.tap-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* mobile: chevron points up since submenu items are always inline-visible in mobile menu */
@media (max-width: 1024px) {
  .nav.nav-open .nav-dropdown-trigger svg {
    transform: rotate(180deg);
    transition: transform 0.2s ease;
  }
  /* hide the leading accent dot in the vertical mobile menu — looks weird inline-stacked */
  .nav.nav-open .nav-link-accent::before { display: none; }
  /* clean up the industries dropdown items so the desc text doesn't break the row */
  .nav.nav-open .nav-dropdown-menu a {
    padding: 8px 12px;
    border-radius: 8px;
  }
  .nav.nav-open .nav-dropdown-menu a .num { font-size: 10px; opacity: 0.7; }
  .nav.nav-open .nav-dropdown-menu a .label { font-size: 14px; }
  .nav.nav-open .nav-dropdown-menu a .desc { display: none; }
}

/* global inline 2-col grid collapse on mobile — overrides inline styles on every page
   only matches the exact 2-col patterns used in section heroes/blocks across the site */
@media (max-width: 760px) {
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1.4fr 1fr"],
  div[style*="grid-template-columns:1.4fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  /* data.html layer-row collapse — hide decorative badge columns, stack the rest */
  .layer-row {
    grid-template-columns: 1fr !important;
    padding: 14px 16px !important;
    gap: 8px !important;
  }
  .layer-row > *:nth-child(1),
  .layer-row > *:nth-child(5) { display: none; }
  /* product.html pipeline stage — release the 460px min-height that overflows phones */
  .pipeline-stage { min-height: auto !important; }
  /* footer-patent on its own line on phones */
  .footer-bottom .footer-patent { margin-top: 8px; font-size: 9px; }
  /* tighten section padding for phones — 80px is too much */
  section.block { padding: 56px 0 !important; }
  section.block-tight { padding: 40px 0 !important; }
  /* tighten hero padding too */
  .about-hero, .inv-hero { padding: 96px 0 56px !important; }
  .page-head { padding: calc(var(--nav-h) + 36px) 0 36px !important; }
  /* hero headlines stay clamp-sized but shrink the bottom-margin */
  .about-hero h1, .inv-hero h1 { margin-bottom: 0 !important; }
  /* badge row wraps gracefully on phones */
  .badges { gap: 8px !important; margin-top: 28px !important; }
  .badge { padding: 6px 10px !important; font-size: 10px !important; }
  /* container padding tighter so content doesn't bleed off-screen */
  .container, .container-wide { padding: 0 18px !important; }
  /* numbers grid stacks tighter */
  .numbers, .moat-grid, .fund-grid, .shipped-grid {
    grid-template-columns: 1fr !important;
  }
  /* patent card on investors: stack with no extra spacing */
  .patent-card { padding: 28px 22px !important; gap: 18px !important; }
  .patent-card h3 { font-size: 26px !important; }
  /* footer-bottom column layout cleaner on phones */
  .footer-bottom { gap: 6px; padding-bottom: 24px; }
}
