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

:root {
  /* in-capilano — "Daylight Forest" palette
     Fresh coastal-rainforest daylight: airy cream-green light surfaces,
     deep forest-green dark surfaces, moss-leaf accent.
     Variable names preserved for component compatibility. */

  /* Dark surfaces (deep forest greens) */
  --forest:        #1E3A2A;   /* deep forest */
  --forest-deep:   #14281D;   /* darkest — footer / feature cards */
  --forest-soft:   #2E5440;   /* mid forest */

  /* Light surfaces */
  --cream:         #F4F8EF;   /* airy paper, cool green-white */
  --cream-soft:    #FCFEF9;   /* lighter paper */
  --paper:         #E4EFD9;   /* soft sage */

  /* Accent — moss / new-leaf green */
  --gold:          #7FBE63;   /* moss-leaf, on dark surfaces */
  --gold-deep:     #2E6B3C;   /* deep leaf, accent on light */
  --rust:          #B5703A;   /* status indicator only */

  /* Ink */
  --ink:           #14241C;   /* near-black forest ink */
  --ink-soft:      #2E4034;
  --mist:          #6E7E70;   /* sage-neutral gray */
  --line:          rgba(20, 36, 28, 0.10);
  --line-strong:   rgba(20, 36, 28, 0.22);

  /* Type */
  --display: "Bricolage Grotesque", system-ui, sans-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);
}
