/* ==========================================================================
   The Untold Gold African Safaris: design tokens & base layer
   Palette: brass gold on warm ivory, deep espresso ink.
   Type: Cormorant Garamond (display) + Jost (UI / body).
   ========================================================================== */

:root {
  /* Brand */
  --color-ink: #17130E;
  --color-ink-soft: #2B241B;
  --color-ink-mute: #6E6455;
  --color-gold: #BE8A31;
  --color-gold-deep: #96691F;
  --color-gold-light: #E2B968;
  --color-gold-wash: #F3E4C6;
  --color-sand: #F6EFE1;
  --color-sand-deep: #EBDDCA;
  --color-cream: #FCF8F1;
  --color-white: #FFFFFF;
  --color-olive: #39412F;
  --color-clay: #8C422B;
  --color-line: rgba(23, 19, 14, 0.12);
  --color-line-light: rgba(255, 255, 255, 0.22);

  /* Type */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --text-xs: 0.72rem;
  --text-sm: 0.85rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.35rem;
  --text-2xl: 1.7rem;
  --text-3xl: 2.2rem;
  --text-4xl: 3rem;
  --text-5xl: 3.9rem;
  --text-6xl: 5rem;

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --tracking-label: 0.18em;
  --tracking-tight: -0.01em;

  /* Space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.75rem;
  --space-8: 3.5rem;
  --space-9: 4.5rem;
  --space-10: 6rem;
  --space-11: 8rem;

  /* Shape */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(23, 19, 14, 0.06);
  --shadow-sm: 0 4px 16px rgba(23, 19, 14, 0.07);
  --shadow-md: 0 12px 34px rgba(23, 19, 14, 0.1);
  --shadow-lg: 0 24px 70px rgba(23, 19, 14, 0.16);

  --ease: 240ms cubic-bezier(0.2, 0.7, 0.3, 1);
  --ease-slow: 600ms cubic-bezier(0.16, 0.8, 0.3, 1);

  --z-header: 200;
  --z-float: 300;
  --z-drawer: 400;
  --z-modal: 500;

  --container: 1220px;
  --container-narrow: 780px;
  --container-wide: 1440px;
  --header-height: 76px;
  --touch: 46px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(190, 138, 49, 0.55);
  background-clip: padding-box;
  border: 3px solid transparent;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(150, 105, 31, 0.82);
  background-clip: padding-box;
}

::-webkit-scrollbar-button,
::-webkit-scrollbar-corner {
  display: none;
  background: transparent;
}

@supports (-moz-appearance: none) {
  html,
  .modal__body,
  .table-wrap {
    scrollbar-width: thin;
    scrollbar-color: var(--color-gold) transparent;
  }
}

/* Several components set their own display (cards, the empty state, the
   cookie notice). Without this the hidden attribute loses to those rules. */
[hidden] {
  display: none !important;
}

body {
  background: var(--color-cream);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img,
svg,
picture,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--color-gold-wash);
  color: var(--color-ink);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  line-height: 1.06;
  letter-spacing: var(--tracking-tight);
}

h1 {
  font-size: clamp(2.6rem, 6.2vw, var(--text-6xl));
}

h2 {
  font-size: clamp(2rem, 4.4vw, var(--text-4xl));
}

h3 {
  font-size: clamp(1.35rem, 2.4vw, var(--text-2xl));
  line-height: 1.14;
}

h4 {
  font-size: var(--text-xl);
  line-height: 1.2;
}

p {
  max-width: 68ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-gold-deep);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.eyebrow--plain::before {
  display: none;
}

.eyebrow--light {
  color: var(--color-gold-light);
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.7;
  color: var(--color-ink-soft);
}

.script {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--weight-light);
}

.text-gold {
  color: var(--color-gold);
}

.muted {
  color: var(--color-ink-mute);
}

.small {
  font-size: var(--text-sm);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
  position: relative;
}

.section--tight {
  padding-block: clamp(2.5rem, 4.5vw, 4rem);
}

.section--sand {
  background: var(--color-sand);
}

.section--ink {
  background: var(--color-ink);
  color: var(--color-cream);
}

.section--ink .muted {
  color: rgba(252, 248, 241, 0.66);
}

.section-head {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
  max-width: 720px;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.section-head--center p {
  margin-inline: auto;
}

.section-head p {
  color: var(--color-ink-mute);
}

.section--ink .section-head p {
  color: rgba(252, 248, 241, 0.68);
}

.section-head--split {
  max-width: none;
  grid-template-columns: 1fr;
  align-items: end;
}

@media (min-width: 900px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: var(--space-6);
  }

  .section-head--split p {
    justify-self: end;
    text-align: right;
  }
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.divider {
  height: 1px;
  background: var(--color-line);
  border: 0;
}

.rule-gold {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-gold);
}

.rule-gold::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}

/* --------------------------------------------------------------------------
   Focus, accessibility
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 0.7rem 1.1rem;
  background: var(--color-ink);
  color: var(--color-cream);
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  transition: top var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

/* Reveal-on-scroll is an enhancement, not a prerequisite for reading. The
   pre-rendered content stays visible when JavaScript never runs; only the
   js-ready class, set by an inline head script, hides the starting point. */
.reveal {
  transition: opacity var(--ease-slow), transform var(--ease-slow);
  will-change: opacity, transform;
}

.js-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.js-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal--d1 {
  transition-delay: 90ms;
}

.reveal--d2 {
  transition-delay: 180ms;
}

.reveal--d3 {
  transition-delay: 270ms;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

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