/* TripScan variant 1 — editorial rail + bento layout (mint trail atlas) */
:root {
  --page: #f4f8f6;
  --surface: #ffffff;
  --surface-alt: #e8f2ee;
  --text: #0c1814;
  --muted: #4f635c;
  --accent: #1d6b5c;
  --accent-alt: #8fd4b8;
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;
  --section-space: clamp(4rem, 8vw, 7.5rem);
  --rail-width: 280px;
  --content-max: 1180px;
  --font-display: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 280ms;
}

*,
*::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 8% 12%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 42%),
    radial-gradient(circle at 92% 88%, color-mix(in srgb, var(--accent-alt) 16%, transparent), transparent 38%);
}

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.05;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
  margin-bottom: 1.25rem;
  max-width: 18ch;
}

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

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

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

.page-shell {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  min-height: 100vh;
}

.site-rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.75rem 1.25rem 2rem;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, var(--page));
  backdrop-filter: blur(12px);
  z-index: 40;
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex: 0 0 auto;
}

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

.rail-brand small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

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

.rail-nav a {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.rail-nav a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent-alt) 22%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
}

.rail-cta {
  margin-top: auto;
}

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

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

.eyebrow,
.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--accent);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-alt) 28%, var(--surface));
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  max-width: 62ch;
  line-height: 1.55;
}

.button,
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid var(--accent);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.button-primary,
.header-cta {
  background: var(--accent);
  color: var(--page);
}

.button-primary:hover,
.header-cta:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--accent) 82%, var(--text));
}

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

.button-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

/* Hero — stacked editorial */
.component-hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 var(--section-space);
}

.hero-editorial {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
}

.hero-copy-block {
  display: grid;
  gap: 1.25rem;
  max-width: 920px;
}

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

.geo-line {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 0.5rem;
}

.hero-visual {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-alt) 70%, var(--surface));
  box-shadow: 0 28px 64px color-mix(in srgb, var(--accent) 12%, transparent);
}

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

.hero-visual:has(img)::before,
.hero-visual:has(img)::after,
.hero-visual:has(svg)::before,
.hero-visual:has(svg)::after {
  display: none !important;
}

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

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

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

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

/* Bento cards */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.bento-grid .card {
  grid-column: span 6;
}

.bento-grid .card:nth-child(1) {
  grid-column: span 7;
  grid-row: span 1;
}

.bento-grid .card:nth-child(2) {
  grid-column: span 5;
}

.bento-grid .card:nth-child(3) {
  grid-column: span 5;
}

.bento-grid .card:nth-child(4) {
  grid-column: span 7;
}

.card {
  min-width: 0;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

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

.card p {
  margin-bottom: 0;
}

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

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

.icon-draw path {
  stroke-dasharray: 34 8;
  animation: iconDraw 5.8s linear infinite;
}

.icon-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: iconPulse 3.8s ease-in-out infinite;
}

.icon-slide {
  animation: iconSlide 4.6s ease-in-out infinite;
}

.icon-spin {
  transform-box: fill-box;
  transform-origin: center;
  animation: iconSpin 10s linear infinite;
}

@keyframes iconDraw {
  to { stroke-dashoffset: -84; }
}

@keyframes iconPulse {
  50% { transform: scale(0.88); opacity: 0.72; }
}

@keyframes iconSlide {
  50% { transform: translateX(3px); }
}

@keyframes iconSpin {
  to { transform: rotate(360deg); }
}

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

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

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

/* Stagger rows */
.stagger-grid {
  display: grid;
  gap: 1rem;
}

.stagger-grid .card:nth-child(even) {
  margin-left: clamp(0px, 8vw, 5rem);
}

.stagger-grid .card:nth-child(odd) {
  margin-right: clamp(0px, 8vw, 5rem);
}

/* Process — editorial band */
.component-process .process-band {
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--surface-alt) 60%, var(--surface));
}

.process-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 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.4rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* Geography — vertical panels from chips */
.geo-chips {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.geo-chip {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) minmax(0, 1fr);
  gap: 1.25rem;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border-radius: var(--radius);
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.geo-chip strong {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.2;
}

.geo-chip span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.geo-stack {
  display: none;
}

/* Guide — two column flow */
.guide-body {
  min-width: 0;
  display: block;
  column-count: 2;
  column-gap: clamp(1.25rem, 3vw, 2rem);
}

.chapter {
  min-width: 0;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  break-inside: avoid;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

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

/* FAQ */
.faq-list {
  max-width: 920px;
  display: grid;
  gap: 0;
}

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

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  padding-right: 2rem;
}

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

.faq-list p {
  padding-right: 2rem;
  margin-top: 0.65rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.contact-grid > div:last-child {
  order: -1;
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: var(--surface);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: 0 20px 48px color-mix(in srgb, var(--accent) 8%, 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.85rem;
  border-radius: var(--radius-sm);
}

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

.form-message {
  color: var(--accent);
  margin: 0;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  background: color-mix(in srgb, var(--text) 92%, var(--accent));
  color: color-mix(in srgb, var(--page) 88%, white);
  border-top: 1px solid color-mix(in srgb, var(--accent-alt) 30%, transparent);
}

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

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

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

.site-footer h3 {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-alt);
  margin-bottom: 0.75rem;
}

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

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

.footer-coverage {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

/* Hide legacy header shell — rail replaces it */
.site-header {
  display: none;
}

/* Responsive */
  .page-shell {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .guide-body {
    column-count: 1;
  }

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

  .contact-grid > div:last-child {
    order: 0;
  }

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

  .geo-panel {
    grid-template-columns: 1fr;
  }

  .geo-chip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-rail {
    flex-direction: column;
    align-items: stretch;
  }

  .rail-nav {
    flex-direction: column;
  }

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

  .rail-cta .header-cta {
    width: 100%;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.1rem, 9vw, 3.2rem);
  }

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

  .bento-grid .card,
  .bento-grid .card:nth-child(n) {
    grid-column: span 1;
  }

  .stagger-grid .card:nth-child(even),
  .stagger-grid .card:nth-child(odd) {
    margin-left: 0;
    margin-right: 0;
  }

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

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

  .hero-visual {
    aspect-ratio: 4 / 3;
    max-height: none;
  }
}

@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 {
    animation: none !important;
  }

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