/* ============================================================
   SusiandtheElephants — Trans-Afrika Expedition
   Editorial expedition design system
   ============================================================ */

:root {
  /* Palette — sand/dust/charcoal (editorial cream lean) */
  --bg: #f3eee5;
  --bg-soft: #ebe4d6;
  --bg-deep: #e0d6c2;
  --paper: #faf6ec;
  --ink: #1f1d1a;
  --ink-soft: #3a352e;
  --muted: #6b6450;
  --muted-2: #8b8170;
  --rule: #c8bda6;
  --accent: #6b6450;
  --shadow: 0 1px 0 rgba(31, 29, 26, 0.06);

  /* Dark variants for hero/CTA sections */
  --night: #14130f;
  --night-2: #1f1d18;
  --night-ink: #e8dfce;

  /* Typography */
  --serif: "Cormorant Garamond", "Cormorant", "Times New Roman", serif;
  --sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Spacing scale (density tuned) */
  --space-xs: 8px;
  --space-s: 16px;
  --space-m: 32px;
  --space-l: 64px;
  --space-xl: 120px;
  --space-2xl: 200px;
  --section-pad: clamp(72px, 11vw, 160px);

  /* Layout */
  --max: 1440px;
  --gutter: clamp(24px, 5vw, 80px);
}

/* Density: spacious */
[data-density="spacious"] {
  --section-pad: clamp(120px, 18vw, 260px);
  --space-xl: 160px;
  --space-2xl: 240px;
}
[data-density="tight"] {
  --section-pad: clamp(56px, 9vw, 130px);
  --space-xl: 80px;
  --space-2xl: 130px;
}

/* Palette themes */
[data-palette="sand"] {
  --bg: #f3eee5;
  --bg-soft: #ebe4d6;
  --bg-deep: #e0d6c2;
  --paper: #faf6ec;
  --ink: #1f1d1a;
  --muted: #6b6450;
  --rule: #c8bda6;
  --accent: #6b6450;
}
[data-palette="olive"] {
  --bg: #ece4d3;
  --bg-soft: #e0d8c2;
  --bg-deep: #cfc4a8;
  --paper: #f5efe0;
  --ink: #2a2820;
  --muted: #6e6a55;
  --rule: #b6ac8e;
  --accent: #5a5a3e;
}
[data-palette="dark"] {
  --bg: #1f1d1a;
  --bg-soft: #14130f;
  --bg-deep: #0e0c0a;
  --paper: #2a2722;
  --ink: #e8dfce;
  --ink-soft: #c9be9f;
  --muted: #9b8f72;
  --rule: #3a3530;
  --accent: #c9b896;
}

/* Type pairing presets */
[data-type="serif-sans"] {
  --serif: "Cormorant Garamond", "Cormorant", "Times New Roman", serif;
  --sans: "Inter Tight", "Inter", sans-serif;
}
[data-type="all-serif"] {
  --serif: "Cormorant Garamond", "Cormorant", serif;
  --sans: "Cormorant Garamond", "Cormorant", serif;
}
[data-type="modern"] {
  --serif: "Fraunces", "Cormorant Garamond", serif;
  --sans: "Inter Tight", "Inter", sans-serif;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "kern";
}
img, picture, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

/* ============================================================
   Typography
   ============================================================ */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.eyebrow.no-rule::before { display: none; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(56px, 11vw, 180px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.display .roman { font-style: normal; }

.headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
.headline.italic { font-style: italic; }

.subhead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  max-width: 30ch;
}

.body-l {
  font-family: var(--sans);
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 58ch;
  text-wrap: pretty;
}

.body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 60ch;
}

.caption {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-wide {
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section {
  padding: var(--section-pad) 0;
}
.section.dark {
  background: var(--night);
  color: var(--night-ink);
}
.section.dark .display,
.section.dark .headline,
.section.dark .subhead { color: var(--night-ink); }
.section.dark .body-l,
.section.dark .body,
.section.dark .lede { color: rgba(232, 223, 206, 0.78); }
.section.dark .eyebrow,
.section.dark .caption { color: rgba(232, 223, 206, 0.6); }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  transition: background 0.4s ease, color 0.4s ease, backdrop-filter 0.4s ease, padding 0.3s ease;
  color: #f3eee5;
  mix-blend-mode: normal;
}
.nav.scrolled {
  background: rgba(243, 238, 229, 0.92);
  backdrop-filter: saturate(120%) blur(12px);
  -webkit-backdrop-filter: saturate(120%) blur(12px);
  color: var(--ink);
  padding: 14px var(--gutter);
  border-bottom: 1px solid rgba(31, 29, 26, 0.06);
}
.nav-logo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-logo .amp { font-style: normal; opacity: 0.6; margin: 0 4px; }
.nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-left .nav-link {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  opacity: 0.78;
  transition: opacity 0.2s;
}
.nav-left .nav-link:hover, .nav-left .nav-link.active { opacity: 1; }
.nav-left .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-self: end;
}
.nav-menu .nav-link {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  opacity: 0.78;
  transition: opacity 0.2s;
}
.nav-menu .nav-link:hover, .nav-menu .nav-link.active { opacity: 1; }
.nav-menu .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.nav-cta {
  margin-left: 12px;
  padding: 12px 22px;
  font-size: 12px;
}
.nav .nav-cta {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.nav .nav-cta:hover {
  background: transparent;
  color: var(--ink);
}
.nav.scrolled .nav-cta {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav-menu a:hover, .nav-menu a.active { opacity: 1; }
.nav-menu a.active::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.nav-cta {
  justify-self: end;
}

@media (max-width: 900px) {
  .nav-menu .nav-link, .nav-left .nav-link { display: none; }
  .nav { grid-template-columns: 1fr auto auto; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn.solid {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn.solid:hover {
  background: transparent;
  color: var(--ink);
}
.btn.light {
  background: rgba(243, 238, 229, 0.95);
  color: var(--ink);
  border-color: transparent;
}
.btn.light:hover {
  background: var(--bg);
}
.btn.ghost { border-color: rgba(255,255,255,0.4); color: #fff; }
.btn.ghost:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.7); color: #fff; }

.btn .arrow {
  display: inline-block;
  width: 14px;
  height: 1px;
  background: currentColor;
  position: relative;
  transition: transform 0.3s;
}
.btn .arrow::after {
  content: "";
  position: absolute;
  right: 0; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
  transform-origin: right center;
}
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   Image slots
   ============================================================ */
image-slot {
  width: 100%;
  height: 100%;
  background: var(--bg-deep);
  display: block;
}
.image-frame {
  position: relative;
  background: var(--bg-deep);
  overflow: hidden;
}
.image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.12) 100%);
  pointer-events: none;
  z-index: 1;
}
.image-frame.no-grad::after { display: none; }
.image-caption {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.35);
  padding: 6px 12px;
  border-radius: 2px;
  backdrop-filter: blur(6px);
}

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease, transform 1.2s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease, transform 1s cubic-bezier(0.2, 0.6, 0.2, 1);
  transition-delay: var(--d, 0ms);
}
.reveal-stagger.in > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--night);
  color: var(--night-ink);
  padding: 100px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 80px;
  border-bottom: 1px solid rgba(232, 223, 206, 0.12);
}
.footer-grid h4 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0 0 20px;
  color: rgba(232,223,206,0.5);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-grid a:hover { opacity: 0.7; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  font-size: 12px;
  color: rgba(232,223,206,0.5);
  letter-spacing: 0.04em;
}
.footer-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
  margin-bottom: 24px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}
