/**
 * Safari / dev fallback: plain file at /critical.css (no hashed chunk).
 * If Next/Turbopack CSS fails to load, this still applies layout + theme.
 * Keep roughly in sync with app/globals.css shell + hero + buttons.
 */
:root {
  --bg-base: #ffffff;
  --bg-surface: #f5f7fa;
  --bg-elevated: #ebeef4;
  --text-primary: #0b1120;
  --text-secondary: rgba(11, 17, 32, 0.58);
  --text-muted: rgba(11, 17, 32, 0.38);
  --border: rgba(11, 17, 32, 0.09);
  --accent-from: #0891b2;
  --accent-to: #0ea5e9;
  --accent-solid: #0891b2;
  --accent-glow: rgba(8, 145, 178, 0.12);
  --cta-primary: #0891b2;
  --cta-primary-fg: #ffffff;
}

.dark {
  --bg-base: #070d17;
  --bg-surface: #0d1520;
  --bg-elevated: #131e2e;
  --text-primary: #e8edf5;
  --text-secondary: rgba(232, 237, 245, 0.55);
  --text-muted: rgba(232, 237, 245, 0.3);
  --border: rgba(232, 237, 245, 0.08);
  --accent-from: #22d3ee;
  --accent-to: #38bdf8;
  --accent-solid: #22d3ee;
  --accent-glow: rgba(34, 211, 238, 0.14);
  --cta-primary: #0891b2;
  --cta-primary-fg: #ffffff;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  width: 100%;
  overflow-x: hidden;
  color-scheme: light;
}

html.dark {
  color-scheme: dark;
}

body {
  margin: 0;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-inter), system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

main {
  width: 100%;
  flex: 1 1 auto;
}

.site-container {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 640px) {
  .site-container {
    padding-inline: 2rem;
  }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
}

:root {
  --site-header-height: 6.25rem;
}

.page-main-offset {
  padding-top: var(--site-header-height);
}

#products,
#about,
#markets,
#reporting,
#contact {
  scroll-margin-top: var(--site-header-height);
}

.app-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.site-nav {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(0.75rem, 2vw, 1.5rem);
  min-height: 5rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.site-nav-side {
  display: flex;
  align-items: center;
  min-width: 0;
}

.site-nav-side:first-child {
  grid-column: 1;
  justify-self: start;
  z-index: 2;
}

.site-nav-side--end {
  grid-column: 3;
  justify-self: end;
  justify-content: flex-end;
  gap: 0.625rem;
  z-index: 2;
}

.site-nav-center {
  grid-column: 2;
  justify-self: center;
  display: none;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: min(100%, 28rem);
}

@media (min-width: 1024px) {
  .site-nav-center {
    display: flex;
  }
}

.site-nav-mobile-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .site-nav-mobile-toggle {
    display: none;
  }
}

.site-nav-cta {
  display: none;
}

@media (min-width: 1024px) {
  .site-nav-cta {
    display: inline-flex;
  }
}

.site-nav-mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 21, 32, 0.95);
}

html:not(.dark) .site-nav-mobile-menu {
  background: rgba(245, 247, 250, 0.95);
}

@media (min-width: 1024px) {
  .site-nav-mobile-menu {
    display: none;
  }
}

.nav-link {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-cta {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--accent-solid);
  height: 2.25rem;
  min-height: 2.25rem;
  color: var(--accent-solid);
  border-radius: 9999px;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.nav-cta:hover {
  background: var(--accent-solid);
  color: #fff;
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  row-gap: clamp(3.5rem, 11vh, 7.5rem);
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg-base);
}

html:not(.dark) .hero-section {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #ffffff 54%,
    #f9fafb 74%,
    var(--bg-surface) 100%
  );
}

.hero-content-shell {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
  width: 100%;
  padding-top: clamp(5.5rem, 4.5rem + 4vh, 7rem);
  padding-bottom: clamp(1.5rem, 3vh, 2.25rem);
}

.hero-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  gap: clamp(1.75rem, 3.5vh, 2.5rem);
}

.hero-layout-primary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(1.25rem, 2.5vh, 1.5rem);
  width: 100%;
}

.hero-layout-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.75rem, 3vh, 2.25rem);
  width: 100%;
}

@media (min-width: 768px) {
  .hero-layout-row {
    grid-template-columns: minmax(0, 1fr) 22rem;
    column-gap: clamp(2rem, 4vw, 3rem);
    row-gap: 0;
  }
}

.hero-layout-copy {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2.5vh, 1.5rem);
  min-width: 0;
  width: 100%;
}

@media (min-width: 768px) {
  .hero-layout-copy {
    grid-column: 1;
    grid-row: 1;
    max-width: 38rem;
  }
}

.hero-layout-details {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2.5vh, 1.5rem);
  min-width: 0;
  width: 100%;
}

.hero-layout-card {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .hero-layout-card {
    grid-column: 2;
    grid-row: 1;
    width: 22rem;
    max-width: 22rem;
    margin-inline: 0;
    margin-left: auto;
    justify-self: end;
    justify-content: flex-end;
  }
}

.hero-eyebrow {
  display: flex;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.1);
  padding: 0.5rem 0.875rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-solid);
}

html:not(.dark) .hero-badge {
  border-color: rgba(8, 145, 178, 0.35);
  background: rgba(8, 145, 178, 0.1);
}

.hero-layout-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  width: 100%;
}

.hero-headline {
  margin: 0;
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-subtext {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 28rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.875rem;
  width: 100%;
}

.hero-airports {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding-top: clamp(1.25rem, 2.5vh, 1.75rem);
  margin: 0;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
  .hero-airports {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1rem;
    row-gap: 0.75rem;
  }
}

@media (min-width: 640px) {
  .hero-airports {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1rem;
    row-gap: 0.75rem;
  }
}

.hero-airports-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.hero-airports-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-airport-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.text-gradient {
  display: inline;
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient.italic {
  display: inline-block;
  letter-spacing: normal;
  padding-inline-end: 0.14em;
  padding-block-end: 0.06em;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.5rem;
  border-radius: 9999px;
  border: 1.5px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--cta-primary-fg);
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.5rem;
  border-radius: 9999px;
  border: 1.5px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--bg-surface);
}

.section-grid-3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .section-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.live-ops-card-wrap {
  width: 100%;
  max-width: 22rem;
}

.live-ops-card {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-surface) 94%, var(--bg-base));
  box-shadow: none;
}

html:not(.dark) .live-ops-card {
  background: linear-gradient(
    168deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(248, 250, 252, 0.96) 45%,
    rgba(255, 255, 255, 0.94) 100%
  );
  border-color: rgba(8, 145, 178, 0.22);
  box-shadow: none;
}

.hero-tracks-band {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 100%;
  height: clamp(11rem, 16vh, 14rem);
  overflow: hidden;
  border-top: 1px solid var(--border);
}

@media (min-width: 1024px) {
  .hero-tracks-band {
    height: clamp(12rem, 14vh, 15rem);
  }
}

.hero-tracks-band .hero-track-zone {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  opacity: 0.6;
}

.hero-fade-bottom {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 62%,
    color-mix(in srgb, var(--bg-base) 45%, transparent) 84%,
    var(--bg-base) 100%
  );
}

html:not(.dark) .hero-fade-bottom {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 46%,
    rgba(8, 145, 178, 0.055) 68%,
    color-mix(in srgb, var(--bg-surface) 22%, transparent) 86%,
    color-mix(in srgb, var(--bg-surface) 38%, #ffffff) 100%
  );
}

.hero-live-dot {
  position: relative;
  display: inline-flex;
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 auto;
}

.hero-live-dot-ping {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--accent-solid);
  opacity: 0.5;
  animation: heroDotPing 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hero-live-dot-core {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: var(--accent-solid);
}

@keyframes heroDotPing {
  75%, 100% { transform: scale(2); opacity: 0; }
}

.hero-track-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.85;
  background: radial-gradient(ellipse 90% 80% at 50% 50%, rgba(34, 211, 238, 0.14), transparent 70%);
}

html:not(.dark) .hero-track-ambient {
  background: radial-gradient(ellipse 90% 80% at 50% 50%, rgba(8, 145, 178, 0.12), transparent 70%);
}

.hero-track-lane {
  position: absolute;
  left: -2%;
  right: -2%;
  height: 3.5rem;
  transform: translateY(-50%);
}

.hero-guideway {
  position: absolute;
  inset: 0;
  border-radius: 0.625rem;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.08) 0%, rgba(34, 211, 238, 0.04) 45%, rgba(34, 211, 238, 0.02) 100%);
  border: 1px solid rgba(34, 211, 238, 0.12);
  box-shadow: inset 0 1px 0 rgba(34, 211, 238, 0.22), inset 0 -8px 20px rgba(0, 0, 0, 0.25);
}

html:not(.dark) .hero-guideway {
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.08) 0%, rgba(8, 145, 178, 0.04) 45%, rgba(8, 145, 178, 0.02) 100%);
  border-color: rgba(8, 145, 178, 0.14);
}

.hero-tie-field {
  position: absolute;
  inset: 0.35rem 0;
  opacity: 0.55;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.12) 0,
    rgba(34, 211, 238, 0.12) 1px,
    transparent 1px,
    transparent 28px
  );
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
}

html:not(.dark) .hero-tie-field {
  background-image: repeating-linear-gradient(
    90deg,
    rgba(8, 145, 178, 0.12) 0,
    rgba(8, 145, 178, 0.12) 1px,
    transparent 1px,
    transparent 28px
  );
}

.hero-rail-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  overflow: hidden;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(34, 211, 238, 0.38) 12%,
    rgba(34, 211, 238, 0.62) 50%,
    rgba(34, 211, 238, 0.38) 88%,
    transparent 100%
  );
  box-shadow: 0 0 14px var(--accent-glow);
  opacity: 0.55;
}

.hero-rail-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.65) 45%,
    transparent 90%
  );
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: heroRailShimmer 5s linear infinite;
  opacity: 0.55;
}

.hero-rail-top { top: 0.55rem; }
.hero-rail-bottom { bottom: 0.55rem; }

@keyframes heroRailShimmer {
  0%   { transform: translateX(-30%); }
  100% { transform: translateX(330%); }
}

.hero-station-node {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1rem;
  height: 1rem;
  z-index: 2;
}

.hero-station-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.35);
  animation: heroStationPulse 3.2s ease-out infinite;
}

.hero-station-core {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.18);
  border: 1.5px solid rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 12px var(--accent-glow);
}

@keyframes heroStationPulse {
  0%   { transform: scale(0.85); opacity: 0.9; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

.hero-train-wrap {
  position: absolute;
  left: 0;
}

@keyframes heroTrainLTR {
  from { transform: translateX(-520px); }
  to   { transform: translateX(calc(100vw + 80px)); }
}

@keyframes heroTrainRTL {
  from { transform: translateX(calc(100vw + 80px)); }
  to   { transform: translateX(-520px); }
}
