/* TripScan variant 1 — editorial field-atlas layout (Lumora + desert-sediment) */

:root {
  --page: #f8f1de;
  --surface: #fffdf8;
  --surface-alt: #efe8d4;
  --text: #4f220f;
  --muted: #7a5c42;
  --accent: #b15f2c;
  --accent-alt: #607556;
  --line: color-mix(in srgb, var(--text) 16%, transparent);
  --radius: 12px;
  --radius-lg: 20px;
  --section-space: clamp(4rem, 8vw, 7rem);
  --rail-width: 260px;
  --content-max: 1120px;
  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --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);
  color: var(--text);
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, color-mix(in srgb, var(--accent-alt) 14%, transparent), transparent 55%),
    linear-gradient(180deg, var(--page) 0%, color-mix(in srgb, var(--surface-alt) 70%, var(--page)) 100%);
  background-attachment: fixed;
}

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: 700;
  letter-spacing: -0.02em;
}

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

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

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

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

/* Shell: side rail + flowing content */
.page-shell {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  min-height: 100vh;
}

.side-rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, var(--page));
  z-index: 40;
}

.rail-header {
  height: 100%;
}

.rail-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.75rem;
  padding: 1.75rem 1.25rem;
  min-height: 100%;
}

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

.brand-logo {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid var(--line);
}

.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-header nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

.site-header nav a {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.55rem 0.75rem;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

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

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

.header-cta {
  margin-top: auto;
  width: 100%;
}

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

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

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

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

.content-flow {
  min-width: 0;
}

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

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

.section:nth-child(even) {
  background: color-mix(in srgb, var(--surface-alt) 55%, transparent);
  border-block: 1px solid var(--line);
}

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

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

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

.lead {
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  max-width: 38rem;
}

/* Hero — editorial stack */
.hero {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: var(--section-space);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-alt) 10%, var(--page)), var(--page)),
    repeating-linear-gradient(
      -12deg,
      transparent 0 28px,
      color-mix(in srgb, var(--accent) 5%, transparent) 28px 29px
    );
}

.hero-editorial {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
}

.hero-copy {
  max-width: 46rem;
  border-left: 4px solid var(--accent);
  padding-left: clamp(1rem, 2.5vw, 1.75rem);
}

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

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

.hero-visual {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow:
    0 24px 48px color-mix(in srgb, var(--text) 10%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--surface) 80%, var(--accent));
}

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

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

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

.bento-grid .card {
  grid-column: span 4;
  min-width: 0;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--text) 5%, transparent);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.bento-grid .card:nth-child(1) { grid-column: span 7; }
.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; }

.bento-grid .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px color-mix(in srgb, var(--text) 9%, transparent);
}

.card p { margin-bottom: 0; }

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

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

.icon-draw path { stroke-dasharray: 34 8; animation: iconDraw 10s linear infinite; }
.icon-pulse { transform-box: fill-box; transform-origin: center; animation: iconPulse 10s ease-in-out infinite; }
.icon-slide { animation: iconSlide 10s 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-alt);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.55rem;
  font-weight: 700;
}

.card-value {
  display: block;
  margin-top: 0.85rem;
  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;
}

/* Process — vertical timeline */
.process-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  position: relative;
  max-width: 52rem;
}

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

.process-timeline li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 1rem 1.25rem;
  padding: 1.25rem 0 1.25rem 0;
  position: relative;
}

.process-timeline li + li {
  border-top: 1px dashed color-mix(in srgb, var(--text) 12%, transparent);
}

.process-timeline .step-icon {
  margin: 0;
  position: relative;
  z-index: 1;
  border-radius: 50%;
  background: var(--surface);
}

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

/* Geography bands */
.geo-bands {
  display: grid;
  gap: 0.85rem;
}

.geo-chip {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 1rem 1.5rem;
  align-items: start;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.geo-chip strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.geo-chip span {
  color: var(--muted);
  font-size: 0.92rem;
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .geo-chip span { grid-column: 2; }
}

/* Guide magazine columns */
.guide-magazine {
  columns: 1;
  column-gap: 2rem;
}

.chapter {
  break-inside: avoid;
  margin-bottom: 1.75rem;
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

/* FAQ */
.faq-list { max-width: 44rem; }

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 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 summary::before {
  content: "+";
  display: inline-block;
  width: 1.25rem;
  color: var(--accent);
  font-weight: 800;
}

.faq-list details[open] summary::before { content: "−"; }

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

/* Contact stack */
.contact-stack {
  display: grid;
  gap: 2rem;
  max-width: 40rem;
}

.contact-intro h2 { margin-bottom: 0.75rem; }

.contact-form {
  display: grid;
  gap: 0.9rem;
  background: var(--surface);
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--text) 6%, transparent);
}

.contact-form label {
  display: grid;
  gap: 0.3rem;
  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.8rem 0.85rem;
  border-radius: calc(var(--radius) - 2px);
}

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

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

/* Footer */
.site-footer {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: color-mix(in srgb, var(--text) 92%, var(--accent));
  color: color-mix(in srgb, var(--surface) 88%, white);
  border-top: 3px solid var(--accent);
}

.site-footer h3,
.site-footer .footer-brand {
  color: var(--surface);
  font-family: var(--font-display);
}

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

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

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

.footer-brand { font-size: 1.35rem; }

.site-footer a {
  display: block;
  margin: 0.3rem 0;
}

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

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

  .rail-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1rem;
    min-height: auto;
  }

  .site-header nav {
    flex-direction: row;
    flex-wrap: wrap;
    order: 3;
    width: 100%;
  }

  .site-header nav a {
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: var(--radius);
    padding: 0.45rem 0.65rem;
  }

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

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

  .guide-magazine { columns: 1; }

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

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

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

  .header-cta {
    margin-left: auto;
    padding: 0.6rem 0.85rem;
    font-size: 0.82rem;
  }

  .hero-copy {
    border-left-width: 3px;
    padding-left: 1rem;
  }

  .hero-visual {
    aspect-ratio: 4 / 3;
    min-height: 240px;
  }

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

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

  .process-timeline::before { left: 18px; }

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

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

  .section { padding: 3.5rem 0; }
}

@media (min-width: 900px) {
  .guide-magazine { columns: 2; }
}

@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,
  .bento-grid .card {
    animation: none !important;
    transition: none !important;
  }

  .bento-grid .card:hover { transform: none; }
}
