/* ==========================================================================
   Runway Chauffeurs — base.css
   Design tokens, fonts, reset, typography, global utilities.
   ========================================================================== */

/* ----- Fonts (self-hosted variable subsets, latin) ----------------------- */
@font-face {
  font-family: 'Cormorant';
  src: url('/assets/fonts/cormorant.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ----- Design tokens ----------------------------------------------------- */
:root {
  /* Surfaces */
  --bg:          #080808;
  --surface:     #101010;
  --surface-2:   #171717;
  --surface-3:   #1e1d1b;

  /* Gold */
  --gold:        #c6a15b;
  --gold-bright: #d8ba76;
  --gold-deep:   #a6813f;
  --gold-08:     rgba(198,161,91,0.08);
  --gold-14:     rgba(198,161,91,0.14);
  --gold-22:     rgba(198,161,91,0.22);
  --gold-40:     rgba(198,161,91,0.40);

  /* Text */
  --text:        #f4f0e8;
  --muted:       #a7a099;
  --muted-2:     #7c766f;
  --on-gold:     #0c0b09;

  /* Lines */
  --line:        rgba(244,240,232,0.10);
  --line-strong: rgba(244,240,232,0.16);
  --hairline:    rgba(198,161,91,0.28);

  /* Type */
  --font-display: 'Cormorant', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-body:    'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Fluid type scale (clamp) */
  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1rem, 0.96rem + 0.20vw, 1.13rem);
  --step-1:  clamp(1.20rem, 1.12rem + 0.40vw, 1.45rem);
  --step-2:  clamp(1.45rem, 1.30rem + 0.75vw, 1.95rem);
  --step-3:  clamp(1.80rem, 1.55rem + 1.25vw, 2.70rem);
  --step-4:  clamp(2.20rem, 1.80rem + 2.00vw, 3.60rem);
  --step-5:  clamp(2.70rem, 2.10rem + 3.00vw, 4.90rem);

  /* Spacing rhythm */
  --space-section: clamp(4.5rem, 3.5rem + 4vw, 8.5rem);
  --wrap:      1200px;
  --wrap-wide: 1400px;
  --gutter:    clamp(1.15rem, 0.7rem + 2.2vw, 2.75rem);

  /* Radius / shadow / motion */
  --radius:    3px;
  --radius-lg: 6px;
  --shadow:    0 30px 60px -30px rgba(0,0,0,0.85);
  --shadow-soft: 0 20px 45px -25px rgba(0,0,0,0.7);
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --dur:       0.5s;

  --header-h:  76px;
}

/* ----- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, picture { display: block; max-width: 100%; }
img { height: auto; }
svg { fill: none; }

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

ul, ol { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--gold); color: var(--on-gold); }

/* ----- Typography -------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: 0.004em; /* Cormorant benefits from a touch of positive tracking */
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: var(--step-5); font-weight: 500; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); font-weight: 600; }
h4 { font-size: var(--step-1); font-weight: 600; }

p { text-wrap: pretty; }
p a { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--gold-40); }
p a:hover { text-decoration-color: var(--gold-bright); }

strong { font-weight: 600; color: var(--text); }

/* ----- Global utility classes ------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: var(--wrap-wide); }
.wrap--narrow { max-width: 760px; }

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  max-width: 100%;
  overflow-wrap: break-word;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--gold-40);
  display: inline-block; vertical-align: middle; margin-right: 0.75em;
}
.eyebrow--center { text-align: center; }
.eyebrow--center::before { display: none; }

.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.6; max-width: 60ch; }

.text-gold { color: var(--gold); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.measure { max-width: 62ch; }

.section { padding-block: var(--space-section); position: relative; }
.section--tight { padding-block: clamp(3rem, 2.5rem + 2vw, 5rem); }
.section--surface { background: var(--surface); }
.section--surface-2 { background: var(--surface-2); }

.rule { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--hairline), transparent); }
.rule--left { background: linear-gradient(90deg, var(--hairline), transparent); }

.visually-hidden {
  position: absolute !important; 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: 10px; left: 10px; z-index: 1200;
  background: var(--gold); color: var(--on-gold);
  padding: 0.7rem 1.1rem; border-radius: var(--radius); font-weight: 600;
  transform: translateY(-160%); transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* Section heading block */
.section-head { max-width: 62ch; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 1.1rem; }
.section-head h2 { margin-bottom: 0.9rem; }
.section-head p { color: var(--muted); font-size: var(--step-1); }

/* Reveal-on-scroll (progressive enhancement; visible without JS) */
[data-reveal] { opacity: 1; }
.js [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}
