/* =========================================================
   ResortVest — Design Tokens
   Alpine / resort-luxury palette: pine green + warm stone + alpenglow gold
   ========================================================= */

:root,
[data-theme='light'] {
  /* Surfaces — warm stone / alabaster */
  --color-bg: #f6f3ea;
  --color-surface: #fbf9f3;
  --color-surface-2: #ffffff;
  --color-surface-offset: #eee9dc;
  --color-surface-offset-2: #e6dfce;
  --color-surface-dynamic: #dcd4be;
  --color-divider: #dfd8c6;
  --color-border: #d2c9b0;

  /* Text */
  --color-text: #201f19;
  --color-text-muted: #6b6559;
  --color-text-faint: #a79f8c;
  --color-text-inverse: #fbf9f3;

  /* Primary — Alpine Pine */
  --color-primary: #1f4a3b;
  --color-primary-hover: #163828;
  --color-primary-active: #102a1e;
  --color-primary-highlight: #d3dfd4;

  /* Gold — Alpenglow (secondary accent, used sparingly) */
  --color-gold: #b8863e;
  --color-gold-hover: #9c6f2e;
  --color-gold-active: #7d5824;
  --color-gold-highlight: #ede0c8;

  /* Functional */
  --color-warning: #96501f;
  --color-warning-hover: #713b16;
  --color-warning-highlight: #e3d2c2;
  --color-error: #9c3b3b;
  --color-error-hover: #7a2c2c;
  --color-error-highlight: #e2cfcb;
  --color-success: #3f7a45;
  --color-success-hover: #2c5c31;
  --color-success-highlight: #d3e0d1;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows — warm pine-tinted */
  --shadow-sm: 0 1px 2px oklch(0.25 0.03 150 / 0.08);
  --shadow-md: 0 4px 16px oklch(0.25 0.03 150 / 0.1);
  --shadow-lg: 0 16px 40px oklch(0.25 0.03 150 / 0.16);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 1040px;
  --content-wide: 1240px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Instrument Serif', 'Georgia', serif;
  --font-body: 'Switzer', 'Inter', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #14160f;
  --color-surface: #1a1d14;
  --color-surface-2: #1f2318;
  --color-surface-offset: #21241a;
  --color-surface-offset-2: #262a1e;
  --color-surface-dynamic: #2e3324;
  --color-divider: #262a1d;
  --color-border: #3a3f2e;

  --color-text: #e7e3d3;
  --color-text-muted: #a29c85;
  --color-text-faint: #6c6852;
  --color-text-inverse: #1a1d14;

  --color-primary: #7bb497;
  --color-primary-hover: #97c6ac;
  --color-primary-active: #b1d6c0;
  --color-primary-highlight: #263329;

  --color-gold: #d9a354;
  --color-gold-hover: #e6b872;
  --color-gold-active: #f0c989;
  --color-gold-highlight: #362b1a;

  --color-warning: #c98a52;
  --color-warning-hover: #d9a06e;
  --color-warning-highlight: #3a2e20;
  --color-error: #c47a7a;
  --color-error-hover: #d29494;
  --color-error-highlight: #3a2626;
  --color-success: #83b787;
  --color-success-hover: #9dc9a0;
  --color-success-highlight: #263a28;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.36);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #14160f;
    --color-surface: #1a1d14;
    --color-surface-2: #1f2318;
    --color-surface-offset: #21241a;
    --color-surface-offset-2: #262a1e;
    --color-surface-dynamic: #2e3324;
    --color-divider: #262a1d;
    --color-border: #3a3f2e;
    --color-text: #e7e3d3;
    --color-text-muted: #a29c85;
    --color-text-faint: #6c6852;
    --color-text-inverse: #1a1d14;
    --color-primary: #7bb497;
    --color-primary-hover: #97c6ac;
    --color-primary-active: #b1d6c0;
    --color-primary-highlight: #263329;
    --color-gold: #d9a354;
    --color-gold-hover: #e6b872;
    --color-gold-active: #f0c989;
    --color-gold-highlight: #362b1a;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 4px 16px oklch(0 0 0 / 0.36);
    --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
  }
}

/* Type scale */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);
  --text-hero: clamp(2.5rem, 0.5rem + 4.6vw, 5.25rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* =========================================================
   Base Elements
   ========================================================= */

body {
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

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

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--wide {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--narrow {
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}
section.section--tight {
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
}
.eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--color-gold);
}

/* =========================================================
   Header / Nav
   ========================================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header--hidden {
  transform: translateY(-100%);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-text);
}
.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  padding-block: var(--space-1);
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--color-text);
  border-bottom-color: var(--color-gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  z-index: 99;
  background: var(--color-bg);
  padding: var(--space-24) var(--space-6) var(--space-6);
  flex-direction: column;
  gap: var(--space-6);
}
.mobile-nav.is-open {
  display: flex;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
}

@media (max-width: 1040px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  min-height: 44px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}
.btn-primary:active {
  background: var(--color-primary-active);
}
.btn-outline {
  border: 1px solid oklch(from var(--color-text) l c h / 0.22);
  color: var(--color-text);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-surface-offset);
  border-color: oklch(from var(--color-text) l c h / 0.35);
}
.btn-ghost {
  color: var(--color-text);
  padding-inline: var(--space-2);
}
.btn-ghost:hover {
  color: var(--color-primary);
}
.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 84vh;
  color: #f6f3ea;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    oklch(0.15 0.03 150 / 0.35) 0%,
    oklch(0.13 0.03 150 / 0.35) 40%,
    oklch(0.1 0.02 150 / 0.88) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: var(--space-12) var(--space-12);
}
.hero .eyebrow {
  color: #e3c98a;
}
.hero .eyebrow::before {
  background: #e3c98a;
}
.hero h1 {
  font-size: var(--text-hero);
  font-weight: 400;
  font-style: italic;
  line-height: 1.08;
  max-width: 21ch;
  margin-block: var(--space-3) var(--space-5);
  color: #fbf9f3;
}
.hero p {
  font-size: var(--text-base);
  max-width: 50ch;
  color: oklch(0.96 0.01 90 / 0.86);
  margin-bottom: var(--space-6);
}
.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.hero-actions .btn-outline {
  border-color: oklch(1 0 0 / 0.4);
  color: #fbf9f3;
}
.hero-actions .btn-outline:hover {
  background: oklch(1 0 0 / 0.12);
}

.page-hero {
  min-height: 56vh;
}

/* =========================================================
   Cards & Grids
   ========================================================= */

.card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}
.split--reverse .split-media {
  order: 2;
}
.split-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.split-media {
  position: relative;
}
.split h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-5);
}
.split p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  padding-block: var(--space-8);
  border-block: 1px solid oklch(from var(--color-text) l c h / 0.1);
}
.stat-num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  font-style: italic;
  line-height: 1;
  margin-bottom: var(--space-2);
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: 22ch;
}
.stat-source {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.stat-source a {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pathways {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
.pathway-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.pathway-card:hover {
  box-shadow: var(--shadow-md);
}
.pathway-card h3 {
  font-size: var(--text-xl);
}
.pathway-card p {
  color: var(--color-text-muted);
}
.pathway-card .btn-ghost {
  margin-top: auto;
  align-self: flex-start;
}

.process-list {
  counter-reset: step;
  display: flex;
  flex-direction: column;
}
.process-item {
  counter-increment: step;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: var(--space-6);
  padding-block: var(--space-8);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.1);
}
.process-item:last-child {
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.1);
}
.process-item::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--color-gold);
}
.process-item h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.process-item p {
  color: var(--color-text-muted);
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}
.region-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3.1;
  box-shadow: var(--shadow-sm);
}
.region-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.region-card:hover img {
  transform: scale(1.05);
}
.region-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, oklch(0.12 0.03 150 / 0.85) 100%);
}
.region-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: var(--space-6);
  color: #f6f3ea;
}
.region-copy .eyebrow {
  color: #e3c98a;
}
.region-copy .eyebrow::before {
  background: #e3c98a;
}
.region-copy h3 {
  font-size: var(--text-lg);
  margin-block: var(--space-2) var(--space-1);
}
.region-copy p {
  font-size: var(--text-sm);
  color: oklch(0.96 0.01 90 / 0.85);
  max-width: 34ch;
}

.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xl);
  line-height: 1.4;
  color: var(--color-text);
  max-width: 42ch;
  border-left: none;
  position: relative;
  padding-left: var(--space-8);
}
.pull-quote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 2px;
  height: calc(100% - 0.6em);
  background: var(--color-gold);
}
.pull-quote cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}

.disclosure {
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.disclosure h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.disclosure p + p {
  margin-top: var(--space-3);
}

.cta-band {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.cta-band h2 {
  font-size: var(--text-xl);
  max-width: 22ch;
  color: var(--color-text-inverse);
}
.cta-band .btn-outline {
  border-color: oklch(1 0 0 / 0.45);
  color: var(--color-text-inverse);
}
.cta-band .btn-outline:hover {
  background: oklch(1 0 0 / 0.14);
}

/* =========================================================
   Forms
   ========================================================= */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-field--full {
  grid-column: 1 / -1;
}
.form-field label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.form-field input,
.form-field select,
.form-field textarea {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-primary);
}
.form-field textarea {
  min-height: 120px;
  resize: vertical;
}
.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.form-status {
  display: none;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.form-status.is-success {
  display: block;
  background: var(--color-success-highlight);
  color: var(--color-success);
}
.form-status.is-error {
  display: block;
  background: var(--color-error-highlight);
  color: var(--color-error);
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  background: var(--color-surface-offset);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
  padding-block: var(--space-16) var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}
.footer-brand .brand {
  margin-bottom: var(--space-4);
}
.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 32ch;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.footer-col a:hover {
  color: var(--color-text);
}
.footer-legal {
  padding-top: var(--space-8);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
  display: flex;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-legal p {
  max-width: 70ch;
}

/* =========================================================
   Scroll reveal
   ========================================================= */

.reveal {
  opacity: 0;
  clip-path: inset(0 0 12% 0);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    clip-path 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  clip-path: inset(0 0 0% 0);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
  .split,
  .pathways,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .split-media {
    order: -1 !important;
  }
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .region-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    gap: var(--space-8);
  }
  .process-item {
    grid-template-columns: 56px 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 92vh;
    align-items: flex-end;
  }
  .hero-content {
    padding-bottom: var(--space-12);
  }
  .footer-legal {
    flex-direction: column;
  }
  .header-actions {
    gap: var(--space-2);
  }
  .header-actions > .btn {
    display: none;
  }
}

.citation-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: oklch(from currentColor l c h / 0.4);
}
.citation-link:hover {
  text-decoration-color: currentColor;
}
