/* ==========================================================================
   OTR Select Tours — design system
   Session 1. Tokens + base components only. No page-specific styles.

   Palette is MEASURED from the logo artwork, not guessed. See CLAUDE.md.
   Cache-busting: linked as styles.css?vN — bump N in every page when this
   file changes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts — self-hosted, latin subset only
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/fraunces-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/fraunces-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/inter-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-normal.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Backgrounds */
  --bg: #0e0d0c;
  --bg-elev: #161513;
  --bg-card: #1c1a17;

  /* Borders */
  --border: #2a2723;
  --border-bright: #3a352e;

  /* Text — cream measured from the logo wordmark */
  --cream: #f7e3ca;
  --cream-muted: #cbc1ad;
  --cream-dim: #8a8273;

  /* Accent — gold measured from the logo globe.
     8.29:1 on --bg, 7.42:1 on --bg-card. Both AAA. */
  --gold: #cba366;
  --gold-hover: #dcb87f;
  --gold-glow: rgba(203, 163, 102, 0.18);
  --gold-faint: rgba(203, 163, 102, 0.28);

  /* Type families */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* Type scale — fluid, clamped */
  --fs-eyebrow: 0.6875rem;                        /* 11px, fixed */
  --fs-micro: 0.625rem;                           /* 10px, footer headings */
  --fs-body: 1rem;                                /* 16px */
  --fs-lede: clamp(1.0625rem, 0.4vw + 1rem, 1.125rem);
  --fs-h3: clamp(1.25rem, 0.6vw + 1.1rem, 1.5rem);
  --fs-h2: clamp(1.75rem, 2vw + 1.2rem, 2.75rem);
  --fs-h1: clamp(2.5rem, 4.5vw + 1rem, 4rem);
  --fs-stat: clamp(2.5rem, 3.5vw + 1.2rem, 3.75rem);
  --fs-nav-mobile: clamp(1.75rem, 6vw, 2rem);

  /* Leading */
  --lh-tight: 1.1;
  --lh-snug: 1.3;
  --lh-body: 1.65;

  /* Tracking */
  --tracking-mono: 0.15em;

  /* Spacing — 8px base */
  --sp-1: 0.5rem;    /*  8px */
  --sp-2: 1rem;      /* 16px */
  --sp-3: 1.5rem;    /* 24px */
  --sp-4: 2rem;      /* 32px */
  --sp-5: 2.5rem;    /* 40px */
  --sp-6: 3rem;      /* 48px */
  --sp-8: 4rem;      /* 64px */
  --sp-10: 5rem;     /* 80px */
  --sp-12: 6rem;     /* 96px */
  --sp-15: 7.5rem;   /* 120px */

  /* Section rhythm — three weights. Spacing is the only separator; no rules. */
  --section-y-sm: clamp(3.5rem, 6vw, 5rem);       /* 56 -> 80  */
  --section-y: clamp(4rem, 7vw, 6rem);            /* 64 -> 96  */
  --section-y-lg: clamp(5rem, 9vw, 7.5rem);       /* 80 -> 120 */

  /* Layout */
  --container: 75rem;                              /* 1200px */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --measure-lede: 55ch;
  --measure-body: 65ch;

  /* Card padding */
  --card-pad: clamp(1.375rem, 2vw, 1.625rem);      /* 22 -> 26px */

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 200ms;

  /* Sharp corners everywhere. Token exists so the rule is explicit. */
  --radius: 0;
}

/* --------------------------------------------------------------------------
   3. Reset
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--cream-muted);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
  /* Photos never get rounded corners — matches the sharp card treatment. */
  border-radius: var(--radius);
}

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

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

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

/* --------------------------------------------------------------------------
   4. Base typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-optical-sizing: auto;
  color: var(--cream);
  line-height: var(--lh-tight);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }

p {
  text-wrap: pretty;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--gold-hover);
}

strong {
  color: var(--cream);
  font-weight: 600;
}

/* The signature display lockup: upright statement + muted italic phrase. */
.u-italic {
  font-style: italic;
  color: var(--cream-muted);
}

/* --------------------------------------------------------------------------
   5. Layout
   -------------------------------------------------------------------------- */

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

.section {
  padding-block: var(--section-y);
}

.section--sm { padding-block: var(--section-y-sm); }
.section--lg { padding-block: var(--section-y-lg); }

/* Elevation is how importance is signalled — not borders, not dividers. */
.section--elev { background: var(--bg-elev); }

/* Two-column content/media split. Stacks below 800px. */
.split {
  display: grid;
  gap: clamp(var(--sp-4), 5vw, var(--sp-8));
  align-items: center;
}

@media (min-width: 50em) {
  .split {
    grid-template-columns: 3fr 2fr;
  }

  .split--even {
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------------------------------------------------
   6. Typographic components
   -------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-2);
}

.lede {
  font-size: var(--fs-lede);
  color: var(--cream-muted);
  max-width: var(--measure-lede);
}

.prose {
  max-width: var(--measure-body);
}

.prose > * + * {
  margin-top: var(--sp-3);
}

/* Text link with a nudging arrow — the soft "learn more" cue.
   Deliberately not a button; buttons are for primary actions only. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--gold);
}

.link-arrow::after {
  content: '\2192';
  transition: transform var(--dur) var(--ease);
}

.link-arrow:hover::after {
  transform: translateX(0.25rem);
}

/* Metadata line — LOCATION · MONTH YEAR */
.meta {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* --------------------------------------------------------------------------
   7. Buttons

   ACCESSIBILITY GATE: gold is a light accent. Anything sitting ON gold must
   be dark. #0e0d0c on --gold is 8.29:1; white on --gold is 2.34:1 and FAILS
   WCAG AA. The secondary button fills with gold on hover, so its label has to
   swap from gold to dark at the same moment.
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  padding: 0.875rem 1.75rem;
  min-height: 3rem;                 /* 48px — comfortable tap target */
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--bg);
}

.btn--secondary {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}

.btn--secondary:hover {
  background: var(--gold);
  color: var(--bg);          /* the swap — never leave this as cream */
}

/* Side-by-side on desktop, stacked full-width on mobile. */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

@media (max-width: 29.99em) {
  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.card__media {
  position: relative;
  aspect-ratio: 4 / 5;             /* portrait default — the library is portrait-heavy */
  overflow: hidden;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__media--wide { aspect-ratio: 3 / 2; }

.card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--card-pad);
}

/* Status pill — sits over the card image, top-left. */
.pill {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pill--upcoming {
  background: var(--gold);
  color: var(--bg);
}

.pill--past {
  background: rgba(14, 13, 12, 0.72);
  border-color: var(--gold-faint);
  color: var(--cream-muted);
  backdrop-filter: blur(4px);
}

/* Card grid — 3-up desktop, single column mobile. */
.card-grid {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: 1fr;
}

@media (min-width: 45em) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   9. Stats
   -------------------------------------------------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5) var(--sp-3);
}

@media (min-width: 45em) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat__value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-stat);
  line-height: 1;
  color: var(--cream);
}

.stat__label {
  margin-top: var(--sp-1);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   10. Media treatment

   Every photo carries the same gradient so type stays legible if it overlaps,
   and so images read as one consistent system across the site.
   -------------------------------------------------------------------------- */

.media-scrim {
  position: relative;
}

.media-scrim::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(14, 13, 12, 0.45) 0%,
    rgba(14, 13, 12, 0.15) 30%,
    rgba(14, 13, 12, 0.55) 78%,
    rgba(14, 13, 12, 0.85) 100%
  );
}

/* Warm radial glow — the hero's signature light. */
.glow {
  position: relative;
}

.glow::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center 40%,
    var(--gold-glow),
    transparent 60%
  );
}

/* --------------------------------------------------------------------------
   11. Accessibility
   -------------------------------------------------------------------------- */

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

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: var(--sp-1) var(--sp-2);
  background: var(--gold);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-120%);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--bg);
}

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

/* --------------------------------------------------------------------------
   12. Motion

   Transform and opacity only — nothing that triggers layout. Everything
   non-essential lives behind prefers-reduced-motion.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .card:hover {
    border-color: var(--border-bright);
    transform: translateY(-2px);
  }

  .glow::before {
    animation: glow-breathe 12s var(--ease) infinite;
  }

  @keyframes glow-breathe {
    0%, 100% { opacity: 0.75; }
    50%      { opacity: 1; }
  }
}

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