/* TripScan variant 1 — olive-terracotta editorial side-rail layout */

:root {
  --page: #efe0cd;
  --surface: #fffdf9;
  --surface-alt: #f5ebe0;
  --text: #2a1810;
  --muted: #607556;
  --accent: #b96a4c;
  --accent-deep: #7b2524;
  --accent-soft: #607556;
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --rail-w: clamp(220px, 18vw, 280px);
  --content-max: 1480px;
  --section-space: clamp(4rem, 8vw, 7rem);
  --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;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::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);
}

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);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

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

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  margin-bottom: 0.85rem;
}

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

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

/* ── Page shell: side rail + main canvas ── */

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

.site-rail {
  position: sticky;
  top: 0;
  align-self: start;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-height: 100vh;
  max-height: 100vh;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  background: color-mix(in srgb, var(--surface) 92%, var(--accent-soft));
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.site-header {
  display: contents;
}

.brand {
  display: grid;
  grid-template-columns: min(64px, 100%) 1fr;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  max-width: 64px;
  max-height: 64px;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

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

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

.site-rail nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

.site-rail nav a {
  display: block;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
  white-space: normal;
  word-break: break-word;
}

.site-rail nav a:hover {
  color: var(--accent-deep);
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: auto;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: normal;
  text-align: center;
  border: 1px solid var(--accent-deep);
  border-radius: var(--radius-md);
  background: var(--accent-deep);
  color: var(--surface);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.header-cta:hover {
  background: color-mix(in srgb, var(--accent-deep) 88%, var(--accent));
}

.page-canvas {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 1 auto;
  min-width: 0;
}

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

/* ── Hero: editorial stack ── */

.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 var(--section-space);
  background:
    radial-gradient(ellipse 80% 60% at 85% 10%, color-mix(in srgb, var(--accent-soft) 22%, transparent), transparent 55%),
    linear-gradient(165deg, var(--surface-alt), var(--page));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
}

.hero-copy {
  min-width: 0;
  max-width: 52rem;
}

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

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 42rem;
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
}

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

.button,
.header-cta {
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.button-primary {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--surface);
}

.button-primary:hover {
  background: color-mix(in srgb, var(--accent-deep) 90%, var(--accent));
}

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

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

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

.hero-visual {
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 24px 64px color-mix(in srgb, var(--text) 8%, transparent);
}

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

/* ── Sections ── */

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

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

.section-heading {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

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

/* Services: bento grid */

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

.component-services .card {
  grid-column: span 4;
}

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

/* Process: vertical timeline */

.component-process .process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  position: relative;
}

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

.component-process .process-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.5rem 0 1.5rem 0;
  background: transparent;
  border-radius: 0;
  position: relative;
}

.component-process .step-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 44px;
  margin: 0;
}

/* Benefits: alternating rows */

.component-benefits .cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.component-benefits .card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem 1.5rem;
  align-items: start;
}

.component-benefits .card:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) auto;
}

.component-benefits .card:nth-child(even) .card-icon {
  order: 2;
}

.component-benefits .card:nth-child(even) > :not(.card-icon) {
  text-align: right;
}

/* Scenarios: horizontal strip */

.component-scenarios .cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
}

.component-scenarios .card {
  scroll-snap-align: start;
  min-height: 100%;
}

/* Geography: 2×2 panel grid */

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

.geo-chip {
  padding: 1.35rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  border-top: 3px solid var(--accent-soft);
}

.geo-chip strong,
.geo-chip span { display: block; }

.geo-chip strong {
  color: var(--text);
  margin-bottom: 0.5rem;
}

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

/* Guide: chapter stack with numbers */

.component-guide .section-inner {
  max-width: 920px;
}

.guide-body {
  display: grid;
  gap: 2.5rem;
}

.chapter {
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--line);
}

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

.chapter h3 {
  color: var(--accent-deep);
}

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

.chapter ul {
  padding-left: 1.25rem;
}

/* Cards shared */

.card {
  min-width: 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: 0 12px 32px color-mix(in srgb, var(--text) 6%, 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: 0.85rem;
  color: var(--accent-deep);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border-radius: var(--radius-sm);
}

.step-icon { margin-bottom: 0; }

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

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

.card-value {
  display: block;
  margin-top: 0.85rem;
  color: var(--accent-deep);
  font-size: 1.05rem;
  font-weight: 700;
}

.card small {
  display: block;
  color: var(--muted);
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

/* FAQ: two columns */

.component-faq .faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  max-width: none;
}

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

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

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list p {
  padding-right: 0.5rem;
  margin-bottom: 0;
}

/* Contact: reversed split */

.component-contact .contact-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: var(--surface);
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

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

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

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

.form-message {
  color: var(--accent-deep);
  margin: 0;
  font-weight: 600;
}

.tripscan-disclaimer {
  font-size: 0.78rem !important;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent-soft);
  background: color-mix(in srgb, var(--accent-soft) 12%, transparent);
  margin-top: 1rem;
}

/* Footer */

.site-footer {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  background: color-mix(in srgb, var(--accent-deep) 92%, #000);
  color: color-mix(in srgb, var(--surface) 88%, transparent);
  border-top: none;
}

.site-footer p,
.site-footer a { color: color-mix(in srgb, var(--surface) 72%, transparent); }

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

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

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

.site-footer h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--surface);
  margin-bottom: 0.5rem;
}

/* Icon motion — slow ambient */

.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.92); opacity: 0.78; } }
@keyframes iconSlide { 50% { transform: translateX(3px); } }
@keyframes iconSpin { to { transform: rotate(360deg); } }

/* ── Responsive ── */

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

  .site-rail {
    position: relative;
    min-height: auto;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem clamp(1rem, 3vw, 1.5rem);
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    grid-template-columns: 48px 1fr;
    flex: 1 1 auto;
    min-width: min(100%, 220px);
  }

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

  .site-rail nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1 1 100%;
    order: 3;
    gap: 0.35rem;
  }

  .site-rail nav a {
    border-left: none;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.65rem;
    font-size: 0.76rem;
  }

  .header-cta {
    margin-top: 0;
    margin-left: auto;
    padding: 0.6rem 0.9rem;
    font-size: 0.76rem;
  }

  .component-services .cards-grid,
  .component-services .card,
  .component-services .card:nth-child(n) {
    grid-column: span 6;
  }

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

  .component-faq .faq-list {
    grid-template-columns: 1fr;
  }

  .component-contact .contact-grid {
    grid-template-columns: 1fr;
  }

  .component-benefits .card,
  .component-benefits .card:nth-child(even) {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .component-benefits .card:nth-child(even) > :not(.card-icon) {
    text-align: left;
  }

  .component-benefits .card:nth-child(even) .card-icon {
    order: 0;
  }
}

@media (max-width: 720px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .component-services .cards-grid,
  .component-services .card,
  .component-services .card:nth-child(n) {
    grid-column: span 12;
  }

  .component-geography .geo-chips,
  .component-scenarios .cards-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .component-process .process-list::before {
    left: 17px;
  }

  .component-process .process-list li {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 1rem;
  }

  .step-icon,
  .card-icon {
    width: 36px;
    height: 36px;
  }

  .step-icon svg,
  .card-icon svg {
    width: 22px;
    height: 22px;
  }

  h1 { font-size: clamp(1.9rem, 9vw, 2.6rem); }
  h2 { font-size: clamp(1.5rem, 7vw, 2rem); }

  .section { padding: 3.5rem 0; }
}

@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,
  .icon-draw, .icon-pulse, .icon-slide, .icon-spin {
    animation: none !important;
  }

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