:root {
  --page: #e8e4df;
  --surface: #f6f3ef;
  --surface-glass: rgba(246, 243, 239, 0.72);
  --text: #2a2830;
  --muted: #6e6878;
  --accent: #7b5bb5;
  --accent-alt: #9b8ac4;
  --accent-soft: #c4b8d9;
  --ink-on-accent: #1a1524;
  --hairline: rgba(42, 40, 48, 0.14);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --section-space: clamp(4rem, 8vw, 7rem);
  --rail-width: clamp(220px, 18vw, 280px);
  --content-max: min(1180px, calc(100% - var(--rail-width) - 3rem));
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-body: "Segoe UI", Candara, "Trebuchet MS", sans-serif;
  --hero-max-h: min(55vh, 520px);
}

*, *::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.donor-layout-tripc86-top {
  background:
    radial-gradient(ellipse 80% 55% at 92% 8%, rgba(123, 91, 181, 0.1), transparent 55%),
    radial-gradient(ellipse 60% 45% at 8% 92%, rgba(155, 138, 196, 0.08), transparent 50%),
    linear-gradient(165deg, #ebe7e2 0%, var(--page) 42%, #f0ece8 100%);
  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.06;
}

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

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

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

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

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

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

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

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

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

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

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

.rail-nav a {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.25s ease;
}

.rail-nav a:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateX(3px);
}

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

.header-cta, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-family: var(--font-body);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s ease;
}

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

.header-cta, .button-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-alt) 72%, var(--accent)));
  color: #fff;
}

.button-secondary {
  border-color: color-mix(in srgb, var(--text) 22%, transparent);
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
}

.button:hover, .header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(123, 91, 181, 0.18);
}

.page-main {
  min-width: 0;
  padding: 0 clamp(1rem, 2.5vw, 2.5rem) 0 clamp(0.75rem, 2vw, 2rem);
}

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

.hero {
  padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(2.5rem, 6vw, var(--section-space));
  border-bottom: 1px solid var(--hairline);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

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

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

.lead {
  font-size: clamp(1.02rem, 1.55vw, 1.28rem);
  max-width: 42rem;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
}

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

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

.hero-visual {
  overflow: hidden;
  width: 100%;
  max-height: var(--hero-max-h);
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, var(--accent-soft)), var(--surface)),
    repeating-linear-gradient(
      -12deg,
      transparent 0 18px,
      rgba(123, 91, 181, 0.04) 18px 19px
    );
  box-shadow:
    0 18px 48px rgba(42, 40, 48, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  position: relative;
  clip-path: inset(0 round var(--radius-lg));
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 12% 8% auto;
  height: 1px;
  background: var(--hairline);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto 14% 10% 14%;
  height: 1px;
  background: var(--hairline);
}

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

.section-heading {
  display: grid;
  grid-template-columns: minmax(110px, 0.32fr) minmax(0, 1fr);
  column-gap: clamp(1rem, 3vw, 2rem);
  max-width: none;
  margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
}

.section-heading > p {
  grid-column: 2;
  font-size: 1.04rem;
}

.section-kicker {
  grid-row: 1 / 3;
  padding-top: 0.45rem;
  border-top: 3px solid var(--accent);
}

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

.proof-band .card:nth-child(1) { grid-column: span 5; transform: rotate(-0.6deg); }
.proof-band .card:nth-child(2) { grid-column: span 4; margin-top: 1.5rem; transform: rotate(0.45deg); }
.proof-band .card:nth-child(3) { grid-column: span 3; transform: rotate(-0.25deg); }
.proof-band .card:nth-child(4) { grid-column: 4 / span 5; margin-top: -0.5rem; transform: rotate(0.35deg); }

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

.services-asymmetric .card:nth-child(1) { grid-column: 1 / span 4; }
.services-asymmetric .card:nth-child(2) { grid-column: 5 / span 4; margin-top: 2rem; }
.services-asymmetric .card:nth-child(3) { grid-column: 9 / span 4; }
.services-asymmetric .card:nth-child(4) { grid-column: 2 / span 3; margin-top: -0.75rem; }
.services-asymmetric .card:nth-child(5) { grid-column: 6 / span 4; margin-top: 1rem; }
.services-asymmetric .card:nth-child(6) { grid-column: 11 / span 2; margin-top: 2.5rem; }

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

.cards-grid .card:nth-child(1) { grid-column: span 4; }
.cards-grid .card:nth-child(2) { grid-column: span 4; margin-top: 1.25rem; }
.cards-grid .card:nth-child(3) { grid-column: span 4; }
.cards-grid .card:nth-child(4) { grid-column: 3 / span 4; margin-top: -0.5rem; }

.card {
  min-width: 0;
  padding: 1.35rem 1.4rem 1.45rem;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--hairline);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 14px 32px rgba(42, 40, 48, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.25s ease;
  position: relative;
}

.card::after {
  content: "";
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--page) 60%, var(--accent-soft)));
  opacity: 0.55;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px) rotate(0deg);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 22px 44px rgba(123, 91, 181, 0.14);
}

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

.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.65rem;
  font-family: var(--font-body);
}

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

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

.process-list li:nth-child(1) { grid-column: 1 / span 3; }
.process-list li:nth-child(2) { grid-column: 4 / span 3; margin-top: 1.5rem; }
.process-list li:nth-child(3) { grid-column: 7 / span 3; }
.process-list li:nth-child(4) { grid-column: 10 / span 3; margin-top: 1.5rem; }
.process-list li:nth-child(5) { grid-column: 3 / span 8; margin-top: -0.25rem; }

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

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

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

.geo-chip:nth-child(1) { grid-column: 1 / span 5; }
.geo-chip:nth-child(2) { grid-column: 6 / span 4; margin-top: 1rem; }
.geo-chip:nth-child(3) { grid-column: 10 / span 3; }
.geo-chip:nth-child(4) { grid-column: 2 / span 4; margin-top: -0.25rem; }
.geo-chip:nth-child(5) { grid-column: 7 / span 6; }

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

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

.chapter {
  min-width: 0;
  padding: 1.35rem 0;
  border-top: 1px solid var(--hairline);
}

.chapter:first-child { border-top: 0; padding-top: 0; }

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

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

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

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
  font-family: var(--font-display);
}

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

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
}

.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 color-mix(in srgb, var(--text) 18%, transparent);
  background: color-mix(in srgb, var(--page) 88%, var(--surface));
  color: var(--text);
  padding: 0.82rem;
  border-radius: var(--radius-sm);
}

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

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

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

.site-footer {
  padding: 3.5rem 0 4rem;
  background: color-mix(in srgb, var(--surface) 82%, var(--page));
}

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

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .page-shell { grid-template-columns: 1fr; }
  .site-rail {
    position: relative;
    min-height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }
  .rail-brand-row { flex: 1 1 auto; }
  .rail-nav {
    flex-direction: row;
    flex-wrap: wrap;
    order: 3;
    width: 100%;
  }
  .rail-cta-wrap { margin-top: 0; width: auto; }
  .header-cta { width: auto; padding: 0.65rem 0.95rem; }
  .page-main { padding: 0 1rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual {
    max-height: min(44vh, 420px);
    order: -1;
  }
  .section-heading { display: block; }
  .section-kicker { margin-bottom: 0.75rem; }
  .proof-band .card,
  .services-asymmetric .card,
  .cards-grid .card,
  .process-list li,
  .geo-chip {
    grid-column: 1 / -1 !important;
    margin-top: 0 !important;
    transform: none !important;
  }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero-visual { max-height: min(38vh, 320px); }
  .section { padding: 3.75rem 0; }
  h1 { font-size: clamp(2rem, 11vw, 2.75rem); }
  h2 { font-size: clamp(1.65rem, 8vw, 2.2rem); }
  .card { padding: 1.1rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button, .header-cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .button, .header-cta, .rail-nav a { transition: none !important; }
  .card:hover { transform: none; }
}
