/* TripScan variant 1 — side-rail editorial field journal (olive-terracotta) */
:root {
  --page: #efe0cd;
  --surface: #fffaf4;
  --surface-alt: #f3e8d8;
  --text: #2a1f18;
  --muted: #5c5349;
  --accent: #b96a4c;
  --accent-alt: #607556;
  --ink-deep: #7b2524;
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --radius: 18px;
  --radius-lg: 28px;
  --section-space: clamp(72px, 8vw, 120px);
  --rail-width: clamp(240px, 18vw, 300px);
  --content-max: 1680px;
  --gutter: clamp(20px, 2.5vw, 40px);
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::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.65;
  font-family: var(--font-body);
  background: var(--page);
  color: var(--text);
  background-image:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--accent-alt) 12%, transparent), transparent 42%),
    linear-gradient(180deg, var(--page), color-mix(in srgb, var(--surface) 70%, var(--page)));
}

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.03em;
  line-height: 1.08;
  color: var(--ink-deep);
}

h1 {
  font-size: clamp(2.2rem, 4.8vw, 4.4rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.85rem, 3.2vw, 3rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  margin-bottom: 0.65rem;
}

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

/* Page shell — side rail + balanced main canvas */
.page-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.side-rail {
  position: relative;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, var(--page));
  border-bottom: 1px solid var(--line);
}

.side-rail-header {
  position: sticky;
  top: 0;
}

.site-header {
  backdrop-filter: blur(12px);
}

.header-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  min-height: 72px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  min-width: 0;
}

.brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1rem;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  max-width: 64px;
  max-height: 64px;
  border-radius: 12px;
  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);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  min-width: 0;
}

.site-header nav a {
  font-size: 0.74rem;
  color: var(--muted);
  padding: 0.48rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  white-space: nowrap;
}

.site-header nav a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.header-cta, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.header-cta {
  margin-left: auto;
  flex: 0 0 auto;
}

.button-primary, .header-cta {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 75%, var(--ink-deep)));
  color: var(--surface);
  border-color: var(--accent);
}

.button-secondary {
  background: transparent;
  color: var(--ink-deep);
  border-color: color-mix(in srgb, var(--accent-alt) 45%, var(--line));
}

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

.page-main {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section-inner {
  width: 100%;
  max-width: 100%;
}

/* Hero — editorial split, visual ready for integrator */
.hero {
  padding: clamp(2.5rem, 5vw, 5rem) 0 var(--section-space);
}

.editorial-hero-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-copy { min-width: 0; }

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

.lead {
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  max-width: 54ch;
  color: var(--muted);
}

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

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

.hero-visual {
  overflow: hidden;
  width: 100%;
  min-height: clamp(280px, 38vw, 520px);
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--accent-alt) 28%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, var(--accent-alt));
  box-shadow: 0 24px 64px color-mix(in srgb, var(--text) 10%, transparent);
}

.hero-visual svg { width: 100%; height: 100%; }

/* Sections */
.section {
  padding: var(--section-space) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 720px;
  margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
}

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

/* Process — vertical timeline rail */
.process-shell .process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  position: relative;
}

.process-shell .process-list::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-alt));
  opacity: 0.35;
}

.process-shell .process-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem 1.25rem;
  padding: 1.35rem 0 1.35rem 0;
  min-width: 0;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.process-shell .process-list li:last-child { border-bottom: 0; }

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--surface);
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

.step-icon svg { width: 26px; height: 26px; }

/* Services — bento mosaic */
.services-shell .cards-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.services-shell .card:nth-child(1) { grid-column: span 3; }
.services-shell .card:nth-child(2) { grid-column: span 3; }
.services-shell .card:nth-child(3) { grid-column: span 2; }
.services-shell .card:nth-child(4) { grid-column: span 2; }
.services-shell .card:nth-child(5) { grid-column: span 2; }

/* Geography — 2x2 editorial tiles */
.geography-shell .geo-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.geo-chip {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 100%;
}

.geo-chip strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ink-deep);
}

.geo-chip span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Scenarios + benefits — staggered cards */
.scenarios-shell .cards-grid,
.benefits-shell .cards-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.scenarios-shell .card,
.benefits-shell .card {
  grid-column: span 6;
}

.scenarios-shell .card:nth-child(odd),
.benefits-shell .card:nth-child(odd) {
  transform: translateY(0);
}

.scenarios-shell .card:nth-child(even),
.benefits-shell .card:nth-child(even) {
  transform: translateY(12px);
}

.card {
  min-width: 0;
  padding: 1.45rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--text) 6%, transparent);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.card p { margin-bottom: 0; }

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

.card-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-value {
  display: block;
  margin-top: 1rem;
  color: var(--ink-deep);
  font-size: 1.05rem;
}

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

/* Guide — two-column magazine */
.guide-shell .section-inner {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  align-items: start;
}

.guide-shell .section-heading {
  position: sticky;
  top: calc(var(--rail-width) * 0.15 + 5rem);
  margin-bottom: 0;
  max-width: none;
}

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

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

.chapter:first-child { padding-top: 0; }

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

/* FAQ — split band */
.faq-shell .section-inner {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
}

.faq-shell .section-heading { margin-bottom: 0; max-width: none; }

.faq-list { max-width: none; }

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

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink-deep);
}

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

/* Contact */
.contact-shell .contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  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-lg);
  border: 1px solid var(--line);
}

.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.85rem;
  border-radius: calc(var(--radius) * 0.65);
}

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

.form-message {
  color: var(--accent-alt);
  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);
}

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

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

.footer-brand { font-size: 1.35rem; color: var(--ink-deep); }

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

.site-footer a:hover { color: var(--accent); }

.footer-coverage { font-size: 0.85rem; }

/* Icon motion */
.icon-draw path { stroke-dasharray: 34 8; animation: iconDraw 12s linear infinite; }
.icon-pulse { transform-box: fill-box; transform-origin: center; animation: iconPulse 12s ease-in-out infinite; }
.icon-slide { animation: iconSlide 12s ease-in-out infinite; }
.icon-spin { transform-box: fill-box; transform-origin: center; animation: iconSpin 14s linear infinite; }

@keyframes iconDraw { to { stroke-dashoffset: -84; } }
@keyframes iconPulse { 50% { transform: scale(0.9); opacity: 0.75; } }
@keyframes iconSlide { 50% { transform: translateX(3px); } }
@keyframes iconSpin { to { transform: rotate(360deg); } }

/* Wide desktop — side rail layout */
@media (min-width: 1100px) {
  .page-shell {
    grid-template-columns: var(--rail-width) minmax(0, 1fr);
    align-items: start;
  }

  .side-rail {
    position: sticky;
    top: 0;
    height: 100vh;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .side-rail-header { position: static; }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: 100%;
    min-height: 100vh;
    padding: 1.5rem 1.25rem 2rem;
    gap: 1.5rem;
  }

  .brand {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

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

  .site-header nav {
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    flex: 1;
  }

  .site-header nav a {
    text-align: left;
    border-radius: var(--radius);
  }

  .header-cta {
    margin-left: 0;
    width: 100%;
  }

  .page-main {
    padding: 0 clamp(24px, 3vw, 56px);
  }

  .editorial-hero-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
    gap: clamp(2rem, 4vw, 4.5rem);
  }

  .process-shell .process-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 2rem;
  }

  .process-shell .process-list::before { display: none; }

  .process-shell .process-list li {
    grid-template-columns: 44px 1fr;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: var(--surface);
  }
}

@media (min-width: 1440px) {
  :root { --rail-width: 280px; }

  .editorial-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(480px, 1.15fr);
  }

  .services-shell .cards-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

@media (min-width: 1800px) {
  .page-main {
    max-width: calc(var(--content-max) - var(--rail-width));
  }

  .scenarios-shell .card,
  .benefits-shell .card {
    grid-column: span 3;
  }
}

/* Tablet */
@media (max-width: 1099px) {
  .site-header nav { display: none; }

  .header-cta { margin-left: auto; }

  .editorial-hero-grid,
  .contact-shell .contact-grid,
  .guide-shell .section-inner,
  .faq-shell .section-inner {
    grid-template-columns: 1fr;
  }

  .guide-shell .section-heading { position: static; }

  .services-shell .cards-grid,
  .scenarios-shell .cards-grid,
  .benefits-shell .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-shell .card { grid-column: auto !important; }

  .scenarios-shell .card,
  .benefits-shell .card {
    grid-column: auto;
    transform: none !important;
  }

  .process-shell .process-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-shell .process-list::before { display: none; }

  .process-shell .process-list li {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.15rem;
    background: var(--surface);
  }

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

/* Mobile */
@media (max-width: 640px) {
  .header-inner { padding-inline: 16px; }

  .page-main { padding-inline: 16px; }

  .hero { padding-top: 2rem; }

  .hero-visual { min-height: 240px; }

  .services-shell .cards-grid,
  .scenarios-shell .cards-grid,
  .benefits-shell .cards-grid,
  .geo-chips,
  .process-shell .process-list,
  .footer-grid,
  .contact-shell .contact-grid {
    grid-template-columns: 1fr;
  }

  .section { padding: 64px 0; }

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

  h2 { font-size: clamp(1.65rem, 8vw, 2.35rem); }

  .card { padding: 1.15rem; }

  .hero-actions { flex-direction: column; }

  .hero-actions .button { width: 100%; }
}

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

  .card-icon, .step-icon, .card-icon svg, .step-icon svg,
  .card-icon path, .step-icon path, .card {
    animation: none !important;
    transition: none !important;
  }

  .scenarios-shell .card,
  .benefits-shell .card {
    transform: none !important;
  }
}
