/* TripScan variant 1 — field atlas / desert-sediment editorial side-rail */

:root {
  --page: #f8f1de;
  --surface: #ffffff;
  --surface-alt: #f0e8d4;
  --text: #4f220f;
  --muted: #7a5c42;
  --accent: #9c6638;
  --accent-alt: #b0ba98;
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --rail-width: clamp(220px, 18vw, 300px);
  --canvas-max: 1440px;
  --section-space: clamp(72px, 8vw, 112px);
  --radius: 10px;
  --radius-lg: 18px;
  --font-display: "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", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.28s;
}

*,
*::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.donor-layout-tripc86-top {
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, color-mix(in srgb, var(--accent-alt) 28%, transparent), transparent 55%),
    radial-gradient(ellipse 90% 60% at 0% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 50%),
    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.02em;
  line-height: 1.08;
  color: var(--text);
}

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

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

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

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

/* Shell: side rail + balanced canvas */

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

.page-canvas {
  min-width: 0;
  padding: 0 clamp(20px, 3vw, 48px) clamp(32px, 4vw, 64px);
}

.page-main {
  max-width: var(--canvas-max);
  margin: 0 auto;
}

/* Desktop side rail */

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

.rail-inner {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 1.5rem;
  height: 100%;
  padding: clamp(20px, 2.5vw, 32px) clamp(16px, 2vw, 24px);
  min-width: 0;
}

.brand {
  display: grid;
  grid-template-columns: min(64px, 18vw) minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1rem;
  min-width: 0;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: min(64px, 100%);
  height: min(64px, 100%);
  aspect-ratio: 1;
  flex-shrink: 0;
}

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

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

.rail-nav {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-width: 0;
  overflow: hidden;
}

.rail-nav a {
  display: block;
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  color: var(--text);
  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;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.82rem;
  background: var(--accent);
  color: var(--page);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: transform var(--dur) var(--ease), filter var(--dur) var(--ease);
}

.header-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* Hero — vexon-inspired asymmetric split */

.hero {
  padding: clamp(32px, 5vw, 72px) 0 var(--section-space);
}

.atlas-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
}

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

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

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

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

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

.hero-visual {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 2;
  min-height: 280px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-alt) 80%, var(--accent-alt));
  box-shadow: 0 24px 64px color-mix(in srgb, var(--text) 8%, 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;
}

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

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

.button-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

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

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

/* Sections */

.section {
  padding: var(--section-space) 0;
  border-top: 1px solid var(--line);
}

.section:first-of-type {
  border-top: none;
}

.section-inner {
  width: 100%;
}

.section-heading {
  max-width: 720px;
  margin-bottom: clamp(24px, 3vw, 40px);
}

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

/* Bento services grid */

.atlas-bento-five {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 18px);
}

.atlas-bento-five .card:nth-child(1) { grid-column: span 4; }
.atlas-bento-five .card:nth-child(2) { grid-column: span 4; }
.atlas-bento-five .card:nth-child(3) { grid-column: span 4; }
.atlas-bento-five .card:nth-child(4) { grid-column: span 6; }
.atlas-bento-five .card:nth-child(5) { grid-column: span 6; }

.card {
  min-width: 0;
  padding: clamp(18px, 2vw, 26px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px 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: 1rem;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent-alt) 35%, var(--surface));
  border-radius: calc(var(--radius) + 2px);
}

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

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

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

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

/* Card rows — benefits & scenarios */

.atlas-card-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 18px);
}

/* Process timeline */

.atlas-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
  counter-reset: atlasstep;
}

.atlas-timeline li {
  counter-increment: atlasstep;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(16px, 2vw, 22px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--accent);
  position: relative;
}

.atlas-timeline li::before {
  content: counter(atlasstep, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

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

/* Geography stack */

.atlas-geo-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 18px);
}

.geo-chip {
  padding: clamp(16px, 2vw, 24px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent-alt);
}

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

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

/* Guide chapters */

.atlas-chapters {
  display: grid;
  gap: clamp(20px, 2.5vw, 32px);
}

.chapter {
  padding: clamp(20px, 2.5vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

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

/* FAQ */

.atlas-faq {
  max-width: 900px;
  display: grid;
  gap: 0;
}

.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: 1.5rem;
  margin-top: 0.65rem;
}

/* Contact */

.atlas-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  padding: clamp(24px, 3vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.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.8rem 0.85rem;
  border-radius: var(--radius);
}

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

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

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

/* Footer */

.site-footer {
  margin-top: var(--section-space);
  padding: clamp(32px, 4vw, 56px) 0;
  background: color-mix(in srgb, var(--surface-alt) 70%, var(--page));
  border-top: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.atlas-footer {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
}

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

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

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

/* Icon motion — slowed for contract */

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

/* Map animations inside hero — min 10s loops */

.hero-visual .route-main {
  animation-duration: 12s !important;
}

.hero-visual .city-halo {
  animation-duration: 12s !important;
}

/* Wide desktop balance */

@media (min-width: 1440px) {
  .page-shell {
    padding-left: clamp(0px, calc((100vw - 2160px) / 2), 120px);
  }

  .atlas-hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(400px, 1fr);
  }
}

/* Tablet */

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

  .site-rail {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .rail-inner {
    grid-template-rows: auto auto auto;
    height: auto;
    gap: 1rem;
  }

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

  .rail-nav a {
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.72rem;
    padding: 0.5rem 0.35rem;
  }

  .header-cta {
    justify-self: start;
  }

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

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

  .atlas-bento-five .card {
    grid-column: span 1 !important;
  }

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

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

  .atlas-card-row {
    grid-template-columns: 1fr;
  }

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

/* Mobile */

@media (max-width: 560px) {
  .page-canvas {
    padding-inline: 16px;
  }

  .brand {
    grid-template-columns: 48px 1fr;
  }

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

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

  .hero-visual {
    min-height: 220px;
  }

  .atlas-bento-five,
  .atlas-timeline {
    grid-template-columns: 1fr;
  }

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

  h2 {
    font-size: clamp(1.55rem, 8vw, 2.1rem);
  }

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

  .button,
  .header-cta {
    width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover,
  .button-primary:hover,
  .header-cta:hover {
    transform: none;
  }
}
