/* ==========================================================================
   Base — design tokens, reset, typography
   Capilano Bridge Park
   ========================================================================== */

:root {
  /* Editorial monochrome palette
     Variable names preserved for component compatibility,
     but values shifted from forest/gold to obsidian/bronze. */

  /* Dark surfaces (was forest greens) */
  --forest:        #14110C;   /* obsidian, warm undertone */
  --forest-deep:   #050402;   /* near-black, page floor */
  --forest-soft:   #2A251D;   /* graphite */

  /* Light surfaces */
  --cream:         #F4EFE3;   /* paper, warm white */
  --cream-soft:    #FBFAF4;   /* lighter paper */
  --paper:         #E8E0CC;   /* sand paper */

  /* Accent — minimal, used sparingly */
  --gold:          #B89968;   /* muted bronze (replaces bright gold) */
  --gold-deep:     #2D2519;   /* near-ink warm — italic em on light reads inky */
  --rust:          #88452A;   /* status indicator only */

  /* Ink */
  --ink:           #0F0D0A;
  --ink-soft:      #2A2620;
  --mist:          #6E6B62;   /* warmer neutral gray */
  --line:          rgba(15, 13, 10, 0.10);
  --line-strong:   rgba(15, 13, 10, 0.22);

  /* Type */
  --display: "Fraunces", "Times New Roman", serif;
  --body:    "Hanken Grotesk", -apple-system, sans-serif;

  /* Sizes */
  --fs-d1: clamp(3.5rem, 8vw, 7.5rem);
  --fs-d2: clamp(2.5rem, 5.2vw, 4.75rem);
  --fs-d3: clamp(1.875rem, 3.4vw, 3rem);
  --fs-h1: clamp(2.25rem, 4.6vw, 3.875rem);
  --fs-h2: clamp(1.625rem, 2.6vw, 2.25rem);
  --fs-h3: clamp(1.25rem, 1.8vw, 1.5rem);
  --fs-lg: 1.125rem;
  --fs-md: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;

  /* Spacing scale (8px base) */
  --s-1:  0.5rem;
  --s-2:  1rem;
  --s-3:  1.5rem;
  --s-4:  2rem;
  --s-5:  3rem;
  --s-6:  4.5rem;
  --s-7:  6rem;
  --s-8:  9rem;

  /* Layout */
  --container: 1280px;
  --container-narrow: 880px;
  --header-h: 88px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--body);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  font-feature-settings: "ss01", "ss02";
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

button {
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}

ul, ol { list-style: none; }

/* Typography */
.t-eyebrow {
  font-family: var(--body);
  font-size: var(--fs-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.t-eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* Eyebrow on top of imagery — readable against any tone */
.t-eyebrow--on-image {
  color: var(--cream);
  padding: 0.5rem 0.85rem;
  background: rgba(5, 4, 2, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(244, 239, 227, 0.18);
}
.t-eyebrow--on-image::before { display: none; }

.t-display {
  font-family: var(--display);
  font-weight: 350;
  font-style: normal;
  letter-spacing: -0.025em;
  line-height: 0.95;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
}

.t-display em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--ink);
}

h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
}

h1 { font-size: var(--fs-h1); font-weight: 350; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { max-width: 70ch; }

p + p { margin-top: var(--s-2); }

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

/* Container */
.wrap {
  width: 100%;
  max-width: var(--container);
  padding: 0 clamp(1rem, 4vw, 3rem);
  margin: 0 auto;
}

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

/* Surfaces */
.surface-forest { background: var(--forest); color: var(--cream); }
.surface-forest h1, .surface-forest h2, .surface-forest h3 { color: var(--cream); }
.surface-forest .t-eyebrow { color: var(--cream); opacity: 0.7; }
.surface-forest em { color: var(--gold); }

.surface-deep { background: var(--forest-deep); color: var(--cream); }
.surface-deep h1, .surface-deep h2, .surface-deep h3 { color: var(--cream); }
.surface-deep .t-eyebrow { color: var(--cream); opacity: 0.7; }
.surface-deep em { color: var(--gold); }

/* Section spacing */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

/* Decorative rule */
.rule {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--ink);
  margin: var(--s-3) 0;
  opacity: 0.6;
}

.surface-forest .rule, .surface-deep .rule { background: var(--cream); opacity: 0.4; }

/* Hide visually but keep for screen readers */
.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;
}

/* Focus visibility */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.surface-forest :focus-visible,
.surface-deep :focus-visible {
  outline-color: var(--cream);
}
