:root {
  --page: #f4f0e6;
  --surface: #fafaf6;
  --text: #1a2e22;
  --muted: #5c6b5e;
  --accent: #2d5a3d;
  --accent-alt: #8ba888;
  --cream: #f7f3ea;
  --forest-deep: #142820;
  --radius: 12px;
  --section-space: clamp(4rem, 8vw, 7.5rem);
  --rail-width: clamp(220px, 18vw, 280px);
  --content-max: min(1180px, calc(100% - 2rem));
  --hero-max-h-desktop: 55vh;
  --hero-max-h-tablet: 44vh;
  --hero-max-h-mobile: 38vh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  line-height: 1.6;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  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: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.04em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 4.8vw, 4.25rem);
  line-height: 0.98;
  margin-bottom: 1.25rem;
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.65rem, 3.2vw, 3rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

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

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

.visually-hidden-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

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

.site-rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 1.25rem 1rem 1.25rem 1.25rem;
  border-right: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  background: color-mix(in srgb, var(--cream) 92%, var(--surface));
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
  z-index: 20;
}

.rail-brand-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1rem;
  min-width: 0;
}

.brand span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  max-width: 64px;
  max-height: 64px;
  border-radius: 10px;
  object-fit: contain;
  overflow: hidden;
  flex: 0 0 auto;
  contain: paint;
  clip-path: inset(0 round 10px);
}

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

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

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.rail-nav a {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.55rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.rail-cta-wrap {
  margin-top: auto;
  padding-top: 1rem;
}

.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;
  max-width: 100%;
  text-align: center;
}

.header-cta {
  width: 100%;
  white-space: normal;
}

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

.button-secondary {
  border-color: color-mix(in srgb, var(--text) 22%, transparent);
  background: transparent;
  color: var(--text);
}

.page-main {
  min-width: 0;
  overflow-x: clip;
  max-width: 100%;
}

main {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.section-inner {
  width: var(--content-max);
  margin: 0 auto;
  min-width: 0;
}

.hero {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(2.5rem, 4vw, 3.5rem);
}

.hero-cinematic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.92fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}

.hero-copy {
  min-width: 0;
  padding-top: 0.5rem;
}

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

.lead {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 52ch;
}

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

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

.hero-stage-wrap {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  max-height: var(--hero-max-h-desktop);
  aspect-ratio: 16 / 11;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background:
    radial-gradient(circle at 72% 18%, color-mix(in srgb, var(--accent-alt) 35%, transparent), transparent 42%),
    linear-gradient(155deg, color-mix(in srgb, var(--forest-deep) 88%, var(--accent)), var(--forest-deep));
  box-shadow: 0 18px 48px color-mix(in srgb, var(--forest-deep) 18%, transparent);
  clip-path: inset(0 round calc(var(--radius) + 4px));
}

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

.section-heading {
  max-width: 820px;
  margin-bottom: 2rem;
}

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

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

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

.card {
  min-width: 0;
  padding: 1.35rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 10%, 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) 35%, transparent);
  box-shadow: 0 12px 32px 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: 44px;
  height: 44px;
  margin-bottom: 1rem;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 12px;
  flex: 0 0 44px;
}

.card-icon svg,
.step-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.7rem;
}

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

.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.process-list li {
  min-width: 0;
  display: flex;
  gap: 1rem;
  padding: 1.35rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}

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

.geo-chip {
  min-width: 0;
  padding: 1rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  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.35rem;
}

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

.chapter {
  padding: 1.25rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}

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

.faq-list {
  max-width: 900px;
}

.faq-list details {
  border-bottom: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  padding: 1rem 0;
}

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

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

.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);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  min-width: 0;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  min-width: 0;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  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);
  margin: 0;
}

.site-footer {
  padding: 3.5rem 0 4rem;
  background: color-mix(in srgb, var(--surface) 80%, var(--page));
  border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
}

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

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

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

.proof-band {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent);
}

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

  .site-rail {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.85rem 1rem;
    border-right: none;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  }

  .rail-brand-row {
    flex: 1 1 auto;
    min-width: 0;
  }

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

  .rail-nav a {
    font-size: 0.7rem;
    padding: 0.45rem 0.55rem;
  }

  .rail-cta-wrap {
    margin-top: 0;
    padding-top: 0;
    flex: 0 0 auto;
  }

  .header-cta {
    width: auto;
    white-space: nowrap;
    padding: 0.6rem 0.85rem;
  }

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

  .hero-visual {
    max-height: var(--hero-max-h-tablet);
  }

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

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

@media (max-width: 640px) {
  :root {
    --content-max: min(100% - 1.25rem, 1180px);
  }

  .page-shell,
  .site-rail,
  .page-main,
  .section-inner,
  .hero-cinematic,
  .hero-copy,
  .hero-stage-wrap {
    max-width: 100%;
    overflow-x: clip;
  }

  .section-inner {
    width: var(--content-max);
  }

  .site-rail {
    padding-inline: 0.75rem;
  }

  .brand {
    font-size: 0.92rem;
    max-width: calc(100% - 7.5rem);
  }

  h1 {
    font-size: clamp(1.75rem, 9vw, 2.6rem);
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .hero-visual {
    max-height: var(--hero-max-h-mobile);
    aspect-ratio: 4 / 3;
  }

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

  .card,
  .process-list li,
  .geo-chip {
    padding: 1.1rem;
  }

  .rail-nav {
    display: none;
  }

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

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

  .card {
    transition: none !important;
  }

  .card:hover {
    transform: none;
  }
}
