/* ============================================================
   THE RIDGE HOUSE — Cinematic theme tokens
   Cool outside · warm inside · luxury restraint
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  /* PRIMARY ATMOSPHERE — outside the cabin */
  --glacier:        #F4F7FA;   /* page bg, snow */
  --mist:           #C9D4DC;   /* fog, secondary surfaces */
  --pine:           #1F2A2E;   /* deep text, valley shadow */
  --slate:          #4A5760;   /* sub-text, distant ridges */
  --stone:          #8A98A2;   /* tertiary, faded */

  /* WARMTH — inside the cabin */
  --hearth:         #C8741A;   /* primary CTA, fireplace glow */
  --candle:         #E8B863;   /* hover accents, gold */
  --cedar:          #5C3A21;   /* wood texture, cabin sections */
  --cedar-deep:     #3A2414;   /* darkest wood, cabin nav */

  /* ACCENT */
  --frost:          #7FA8C9;   /* links, ice highlight */
  --frost-soft:     #B8D0E0;

  /* Surfaces */
  --paper:          #FBFCFD;
  --frosted-glass:  rgba(244, 247, 250, 0.62);
  --frosted-warm:   rgba(255, 245, 230, 0.75);
  --frost-border:   rgba(127, 168, 201, 0.32);
  --hairline:       rgba(31, 42, 46, 0.10);

  /* TWEAKABLE — Tweaks panel writes here */
  --warmth:         0;            /* 0 = full cool, 1 = full warm cabin */
  --snow-density:   1;             /* 0 = none, 0.5 = drift, 1 = gentle, 2 = steady */

  /* TYPE */
  --display:        "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  --sans:           "DM Sans", "Söhne", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  /* SCALE — generous */
  --t-7xl: clamp(64px, 9vw, 144px);
  --t-6xl: clamp(56px, 7.2vw, 112px);
  --t-5xl: clamp(40px, 5.4vw, 80px);
  --t-4xl: clamp(32px, 4vw, 56px);
  --t-3xl: clamp(26px, 2.8vw, 40px);
  --t-2xl: 28px;
  --t-xl:  22px;
  --t-lg:  18px;
  --t-base:16px;
  --t-sm:  14px;
  --t-xs:  12px;

  /* MOTION */
  --slow:    900ms cubic-bezier(.2,.6,.2,1);
  --med:     500ms cubic-bezier(.2,.6,.2,1);
  --quick:   220ms cubic-bezier(.2,.6,.2,1);
  --hover-ease: 600ms cubic-bezier(.4,.0,.2,1);

  /* SHADOWS — long & soft = altitude */
  --shadow-altitude: 0 30px 60px -30px rgba(31, 42, 46, .35),
                     0 12px 24px -16px rgba(31, 42, 46, .18);
  --shadow-card:     0 18px 40px -24px rgba(31, 42, 46, .28),
                     0 4px 12px -6px rgba(31, 42, 46, .12);
  --shadow-glow-amber: 0 0 0 1px rgba(232, 184, 99, .35),
                       inset 0 0 24px rgba(232, 184, 99, .25),
                       0 8px 28px -10px rgba(200, 116, 26, .45);

  /* RADII */
  --r-sm: 2px;
  --r:    4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-pill: 999px;
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--glacier);
  color: var(--pine);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

img { display: block; max-width: 100%; }
button { font-family: inherit; }

::selection { background: var(--candle); color: var(--cedar-deep); }

/* ============================================================
   TYPE ROLES
   ============================================================ */
.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--pine);
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--slate);
}

.eyebrow--warm { color: var(--candle); }

.lede {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: var(--t-2xl);
  line-height: 1.4;
  color: var(--slate);
  text-wrap: balance;
}

.body-lg {
  font-size: 17px;
  line-height: 1.7;
  color: var(--slate);
}

.numeral {
  font-family: var(--display);
  font-feature-settings: "lnum";
  font-weight: 300;
  color: var(--slate);
}

/* ============================================================
   FROSTED-GLASS UTILITIES
   ============================================================ */
.frost {
  background: var(--frosted-glass);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border: 1px solid var(--frost-border);
}

.frost-warm {
  background: var(--frosted-warm);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid rgba(232, 184, 99, 0.30);
}

/* Mist gradient — fades photos at top + bottom (no sharp rectangles) */
.mist-mask-y {
  -webkit-mask-image: linear-gradient(180deg,
    transparent 0%, #000 14%, #000 86%, transparent 100%);
          mask-image: linear-gradient(180deg,
    transparent 0%, #000 14%, #000 86%, transparent 100%);
}
.mist-mask-all {
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at center,
    #000 50%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 75% at center,
    #000 50%, transparent 100%);
}
.mist-mask-bottom {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
}

/* ============================================================
   CTAs
   ============================================================ */
.btn {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  border-radius: var(--r);
  position: relative; overflow: hidden;
  transition: transform var(--quick), box-shadow var(--hover-ease), background var(--hover-ease);
  text-decoration: none;
}

.btn--primary {
  background: var(--hearth);
  color: #FFF6E8;
  box-shadow: 0 6px 20px -8px rgba(200, 116, 26, .55),
              inset 0 1px 0 rgba(255,255,255,.18);
}
.btn--primary:hover {
  background: linear-gradient(180deg, #D88A2C 0%, var(--hearth) 100%);
  box-shadow: var(--shadow-glow-amber);
  transform: translateY(-1px);
}
.btn--primary .spark { /* snowflake particle layer */
  position: absolute; inset: 0; pointer-events: none;
}

.btn--ghost {
  background: transparent;
  color: var(--pine);
  border: 1px solid var(--frost);
}
.btn--ghost:hover {
  background: rgba(127, 168, 201, .08);
  color: var(--frost);
}

.btn--ghost-warm {
  background: transparent;
  color: var(--cedar);
  border: 1px solid rgba(92, 58, 33, .35);
}
.btn--ghost-warm:hover {
  background: rgba(232, 184, 99, .14);
  border-color: var(--candle);
}

/* Tertiary inline link with slow gold underline */
.tlink {
  position: relative;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pine);
  text-decoration: none;
  padding-bottom: 4px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: color var(--quick), gap var(--quick);
}
.tlink::after {
  content: ""; position: absolute;
  left: 0; bottom: 0; height: 1px;
  width: 100%; background: var(--candle);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--hover-ease);
}
.tlink:hover { gap: 14px; color: var(--cedar); }
.tlink:hover::after { transform: scaleX(1); }
.tlink .arrow { transition: transform var(--hover-ease); }
.tlink:hover .arrow { transform: translateX(4px); }

/* ============================================================
   CONTAINER + SECTION SCAFFOLDING
   ============================================================ */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.container--wide { max-width: 1440px; }
.container--narrow { max-width: 920px; }

section {
  position: relative;
}

/* Section header pattern — eyebrow + display */
.section-head {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section-head__num {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 300;
  font-style: italic;
  color: var(--stone);
  letter-spacing: 0.05em;
}
.section-head h2 {
  font-family: var(--display);
  font-size: var(--t-4xl);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
.section-head h2 em {
  font-style: italic;
  color: var(--slate);
}

/* ============================================================
   ICONS — line, 1.5px stroke
   ============================================================ */
.ico {
  width: 32px; height: 32px;
  stroke: var(--slate);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke var(--hover-ease);
}
.ico-lg { width: 44px; height: 44px; }
.ico-sm { width: 18px; height: 18px; }

.ico-warm-on-hover:hover .ico { stroke: var(--hearth); }

/* ============================================================
   CABIN MODE — body.cabin overrides surfaces to warm
   ============================================================ */
body.cabin {
  background: #1B120B;
  color: #F5E6D0;
}
body.cabin .display { color: #FBEFD8; }
body.cabin .eyebrow { color: var(--candle); }
body.cabin .lede { color: #D9C4A6; }

/* Day → night gradient driven by --day-progress (0=dawn, 1=night) */
:root { --day-progress: 0; }
