:root {
  --page: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #d97706;
  --accent-alt: #f59e0b;
  --accent-soft: #fef3c7;
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --radius: 18px;
  --radius-sm: 10px;
  --section-space: clamp(4rem, 8vw, 7rem);
  --rail-width: clamp(220px, 18vw, 280px);
  --max-content: 1440px;
  --font-display: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hero-max-h-desktop: 55vh;
  --hero-max-h-tablet: 44vh;
  --hero-max-h-mobile: 38vh;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  line-height: 1.62;
  font-family: var(--font-body);
  background: var(--page);
  color: var(--text);
}

body, button, input, select, textarea { font: inherit; }

a { color: inherit; text-decoration: none; }

img, svg, video, canvas, iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.035em;
  font-weight: 650;
}

h1 {
  font-size: clamp(2.35rem, 4.8vw, 4.6rem);
  line-height: 1.02;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.85rem, 3.2vw, 3rem);
  line-height: 1.08;
  margin-bottom: 0.85rem;
}

h3 {
  font-size: clamp(1.08rem, 1.6vw, 1.35rem);
  line-height: 1.22;
}

p { color: var(--muted); }

.altitude-shell {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  min-height: 100vh;
  max-width: 2160px;
  margin: 0 auto;
}

.side-rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: clamp(1.25rem, 2vw, 2rem);
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, var(--page));
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 20;
}

.rail-brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 56px;
  height: 56px;
  max-width: 64px;
  max-height: 64px;
  border-radius: 14px;
  object-fit: contain;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-logo svg { width: 100%; height: 100%; }

.brand small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.rail-nav a {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rail-nav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 80%, var(--accent-soft));
}

.rail-cta-wrap { margin-top: auto; padding-top: 1rem; }

.header-cta, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-cta {
  width: 100%;
  white-space: nowrap;
}

.button-primary, .header-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: #1c1917;
  border-color: var(--accent);
}

.button-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.button:hover, .header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 22%, transparent);
}

.main-canvas {
  min-width: 0;
  position: relative;
}

.main-canvas::before,
.main-canvas::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 8%, var(--line) 92%, transparent);
  pointer-events: none;
  z-index: 1;
}

.main-canvas::before { left: clamp(1.5rem, 4vw, 3.5rem); }
.main-canvas::after { right: clamp(1.5rem, 4vw, 3.5rem); }

.section-inner {
  width: min(var(--max-content), calc(100% - clamp(2rem, 6vw, 5rem)));
  margin: 0 auto;
}

.hero {
  padding: clamp(2rem, 5vw, 4rem) 0 var(--section-space);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.92fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-copy { min-width: 0; z-index: 2; }

.eyebrow, .section-kicker {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 750;
  margin-bottom: 0.85rem;
  color: var(--accent);
}

.lead {
  font-size: clamp(1.02rem, 1.55vw, 1.28rem);
  max-width: 38rem;
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.75rem 0 1rem;
}

.geo-line {
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-visual-slot {
  justify-self: stretch;
  min-width: 0;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-height: var(--hero-max-h-desktop);
  aspect-ratio: 4 / 3;
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(145deg, #334155, #1e293b 55%, #0f172a);
  clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%);
  box-shadow:
    0 24px 60px color-mix(in srgb, #0f172a 28%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 45%);
  pointer-events: none;
}

.hero-proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.proof-chip {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
  color: var(--muted);
}

.proof-chip strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.section {
  padding: var(--section-space) 0;
  position: relative;
}

.section:nth-of-type(even) {
  background: color-mix(in srgb, var(--surface) 65%, var(--page));
}

.section-heading {
  max-width: 46rem;
  margin-bottom: 2.25rem;
}

.section-heading > p { font-size: 1.02rem; }

.layered-cards {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.layered-cards .card {
  grid-column: span 4;
  position: relative;
}

.layered-cards .card:nth-child(3n+2) {
  transform: translateY(1.25rem);
  z-index: 2;
}

.layered-cards .card:nth-child(3n+3) {
  transform: translateY(-0.65rem);
  z-index: 1;
}

.card {
  min-width: 0;
  padding: 1.45rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow:
    0 16px 40px color-mix(in srgb, #0f172a 8%, transparent),
    8px 10px 0 color-mix(in srgb, var(--accent) 12%, transparent);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px) !important;
  box-shadow:
    0 22px 48px color-mix(in srgb, #0f172a 12%, transparent),
    10px 12px 0 color-mix(in srgb, var(--accent) 18%, transparent);
}

.card p { margin-bottom: 0; }

.card-icon, .step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 12px;
}

.card-icon svg, .step-icon svg { width: 28px; height: 28px; overflow: visible; }

.card-label {
  display: block;
  color: var(--accent);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.65rem;
}

.card small {
  display: block;
  color: var(--muted);
  margin-top: 0.45rem;
}

.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.process-list li {
  min-width: 0;
  display: flex;
  gap: 1rem;
  padding: 1.35rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 6px 8px 0 color-mix(in srgb, var(--accent) 10%, transparent);
}

.step-icon { flex: 0 0 44px; margin-bottom: 0; }

.geo-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.geo-chip {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 5px 6px 0 color-mix(in srgb, var(--accent) 8%, transparent);
}

.geo-chip strong, .geo-chip span { display: block; }
.geo-chip span { color: var(--muted); font-size: 0.88rem; margin-top: 0.35rem; }

.guide-body { min-width: 0; }

.chapter {
  min-width: 0;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.chapter li { color: var(--muted); margin: 0.45rem 0; }

.faq-list { max-width: 52rem; }

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 750;
  color: var(--text);
}

.faq-list p { padding-right: 1.5rem; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px color-mix(in srgb, #0f172a 10%, transparent);
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--page);
  color: var(--text);
  padding: 0.82rem;
  border-radius: var(--radius-sm);
}

textarea { min-height: 110px; resize: vertical; }

.form-message { color: var(--accent); margin: 0; }

.tripscan-disclaimer {
  font-size: 0.78rem !important;
  padding: 0.65rem 0.8rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.site-footer {
  padding: 3.5rem 0 4rem;
  background: color-mix(in srgb, var(--surface) 85%, var(--page));
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand { font-size: 1.4rem; color: var(--text); }

.site-footer a {
  display: block;
  color: var(--muted);
  margin: 0.35rem 0;
}

.contract-defs {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .altitude-shell { grid-template-columns: 1fr; }

  .side-rail {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 1rem clamp(1rem, 4vw, 2rem);
  }

  .rail-brand-row { flex: 1 1 auto; }

  .rail-nav {
    flex-direction: row;
    flex-wrap: wrap;
    order: 3;
    width: 100%;
    margin-top: 0;
  }

  .rail-cta-wrap {
    margin-top: 0;
    margin-left: auto;
    padding-top: 0;
    width: auto;
  }

  .header-cta { width: auto; }

  .hero-grid { grid-template-columns: 1fr; }

  .hero-visual {
    max-height: var(--hero-max-h-tablet);
    max-width: min(100%, 720px);
    margin: 0 auto;
  }

  .layered-cards .card { grid-column: span 6; }
  .process-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-proof-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .section-inner { width: min(100% - 1.75rem, var(--max-content)); }

  .main-canvas::before, .main-canvas::after { display: none; }

  .brand-logo { width: 48px; height: 48px; }

  .hero-visual { max-height: var(--hero-max-h-mobile); }

  .layered-cards { grid-template-columns: 1fr; }
  .layered-cards .card { grid-column: auto; transform: none !important; }

  .process-list, .geo-chips, .footer-grid, .hero-proof-strip {
    grid-template-columns: 1fr;
  }

  h1 { font-size: clamp(2rem, 11vw, 2.85rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .card, .button, .header-cta, .rail-nav a {
    transition: none !important;
  }

  .layered-cards .card:nth-child(3n+2),
  .layered-cards .card:nth-child(3n+3) {
    transform: none;
  }
}
