/* TripScan variant 1 — lumora-style editorial rail + full-width canvas */

:root {
  --page: #f5f0e8;
  --surface: #fffdf9;
  --text: #1a1f24;
  --muted: #5c6670;
  --accent: #c45a1a;
  --accent-alt: #2d6a4f;
  --rail-w: clamp(240px, 16vw, 280px);
  --radius: 18px;
  --radius-lg: 28px;
  --section-space: clamp(3.5rem, 6vw, 6.5rem);
  --font-display: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --hairline: color-mix(in srgb, var(--text) 12%, transparent);
  --shadow-soft: 0 18px 48px color-mix(in srgb, var(--text) 8%, transparent);
}

*,
*::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.03em;
  line-height: 1.08;
}

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

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

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

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

/* ── Page shell: rail + fluid main (balanced at 2160px) ── */

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

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

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

/* ── Side rail ── */

.side-rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.5rem;
  padding: clamp(1rem, 2vw, 1.75rem);
  background: color-mix(in srgb, var(--surface) 92%, var(--page));
  border-right: 1px solid var(--hairline);
  z-index: 40;
  overflow: hidden;
}

.rail-brand-row,
.rail-nav-row,
.rail-cta-row {
  display: flex;
  min-width: 0;
}

.rail-brand-row {
  align-items: center;
}

.rail-nav-row {
  align-items: flex-start;
  align-self: stretch;
}

.rail-cta-row {
  align-items: flex-end;
}

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

.brand-logo {
  display: block;
  width: clamp(44px, 4vw, 64px);
  height: clamp(44px, 4vw, 64px);
  max-width: 64px;
  max-height: 64px;
  border-radius: 12px;
  object-fit: contain;
  overflow: hidden;
  flex-shrink: 0;
}

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

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

.side-rail nav {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}

.side-rail nav a {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

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

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

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

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

/* ── Bands: full-width within main canvas ── */

.band {
  width: 100%;
  border-bottom: 1px solid var(--hairline);
}

.band-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--section-space) clamp(1.25rem, 3.5vw, 4.5rem);
}

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

.section-heading {
  width: 100%;
  max-width: min(72rem, 100%);
  margin-bottom: clamp(1.5rem, 3vw, 2.75rem);
}

.section-heading > p {
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  max-width: 68ch;
}

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

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

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

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

/* ── Hero split (uses full main width) ── */

.band-hero {
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, color-mix(in srgb, var(--accent-alt) 14%, transparent), transparent 55%),
    linear-gradient(165deg, var(--page), color-mix(in srgb, var(--surface) 90%, var(--page)));
}

.band-hero .band-inner {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(1.75rem, 4vw, 5rem);
  align-items: center;
  width: 100%;
}

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

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

.hero-visual {
  width: 100%;
  min-width: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 90%, var(--accent-alt));
  border: 1px solid color-mix(in srgb, var(--accent-alt) 22%, transparent);
  box-shadow: var(--shadow-soft);
}

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

/* ── Cards & grids (expand at wide) ── */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.85rem, 1.5vw, 1.25rem);
  width: 100%;
}

.card {
  min-width: 0;
  padding: clamp(1.1rem, 2vw, 1.6rem);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--hairline);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: var(--shadow-soft);
}

.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) 28%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-radius: 12px;
}

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

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

.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(--accent);
  font-size: 1.1rem;
  font-weight: 700;
}

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

/* ── Process ── */

.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.85rem, 1.5vw, 1.25rem);
  width: 100%;
}

.process-list li {
  min-width: 0;
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

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

/* ── Geography ── */

.geo-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.25vw, 1rem);
  width: 100%;
}

.geo-chip {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.geo-chip span {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

/* ── Guide ── */

.guide-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  width: 100%;
}

.chapter {
  min-width: 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

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

/* ── FAQ ── */

.faq-list {
  width: 100%;
  max-width: min(56rem, 100%);
}

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

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
}

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

/* ── Forms ── */

.contact-grid,
.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  width: 100%;
}

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

.contact-form label,
.calculator-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(--hairline);
  background: var(--page);
  color: var(--text);
  padding: 0.82rem;
  border-radius: calc(var(--radius) * 0.65);
}

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

output {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 800;
}

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

/* ── Footer ── */

.band-footer {
  background: color-mix(in srgb, var(--text) 6%, var(--page));
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  width: 100%;
}

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

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

/* ── Wide desktop: use full canvas deliberately ── */

@media (min-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (min-width: 1440px) {
  .band-inner {
    padding-inline: clamp(2rem, 4vw, 5rem);
  }

  .hero-split {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(2.5rem, 4vw, 5.5rem);
  }
}

@media (min-width: 1920px) {
  .guide-body {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .geo-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ── Tablet ── */

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

  .side-rail {
    position: relative;
    height: auto;
    grid-template-rows: auto auto auto;
    border-right: none;
    border-bottom: 1px solid var(--hairline);
  }

  .rail-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .rail-nav-row {
    align-self: auto;
  }

  .side-rail nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .side-rail nav a {
    text-align: center;
    font-size: 0.72rem;
    padding: 0.5rem 0.4rem;
  }

  .rail-cta-row .header-cta {
    width: auto;
    margin-left: auto;
  }

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

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

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

  .guide-body {
    grid-template-columns: 1fr;
  }

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

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

/* ── Mobile ── */

@media (max-width: 640px) {
  .band-inner {
    padding-inline: 1rem;
    padding-block: 3.5rem;
  }

  .side-rail nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

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

@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;
  }
}
