/* ==========================================================================
   ALPINE CLARITY COUNSELING — v2 SHARED DESIGN SYSTEM
   --------------------------------------------------------------------------
   Loaded on every /v2/ page AFTER the Tailwind CDN script.
   Tailwind handles layout utilities; this file owns the design system:
   tokens, type, nav, footer, buttons, cards, forms, section shells,
   animation utility classes and reduced-motion behavior.
   See /v2/DESIGN-SYSTEM.md for usage documentation.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette (logo-derived, as shipped on the live v1 site) */
  --ink:        #1F2D44;  /* headings, body-dark, primary buttons, footer */
  --ink-deep:   #16223A;  /* hover-darkened navy */
  --slate:      #5B6F8A;  /* secondary text on light, card accents */
  --mist:       #9DB1C9;  /* soft blue accents, mid mountains */
  --sky:        #B6C7D8;  /* faintest blue, far mountains */
  --sage:       #7E9485;  /* green section background, accents */
  --sage-deep:  #5F7770;  /* eyebrows, hover states on light */
  --peach:      #F2CFB7;  /* warm accent, CTAs on dark, quote section */
  --sun:        #F6D9C2;  /* brightest warm glow */
  --warm:       #FAF7F2;  /* main page background */
  --stone:      #EDE7DF;  /* alternate section background */
  --stone-deep: #E2D9CC;  /* borders/dividers on stone */
  --gold:       #C9A66B;  /* small highlights only: underlines, quote marks */

  /* On-dark text */
  --warm-75: rgba(250, 247, 242, 0.75);
  --warm-60: rgba(250, 247, 242, 0.60);

  /* On-light text */
  --ink-75: rgba(31, 45, 68, 0.75);
  --ink-60: rgba(31, 45, 68, 0.60);
  --ink-45: rgba(31, 45, 68, 0.45);

  /* Type */
  --font-serif: 'Cormorant Garamond', Garamond, Georgia, serif;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;

  /* Fluid type scale (390px -> 1440px) */
  --text-hero: clamp(2.625rem, 1.5rem + 4.8vw, 4.75rem);   /* 42 -> 76px */
  --text-h2:   clamp(2rem, 1.4rem + 2.6vw, 3.25rem);       /* 32 -> 52px */
  --text-h3:   clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);   /* 22 -> 28px */
  --text-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem); /* 17 -> 19px */
  --text-body: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);    /* 16 -> 17px */
  --text-sm:   0.875rem;
  --text-xs:   0.8125rem;

  /* Spacing rhythm */
  --section-pad: clamp(4.5rem, 3rem + 7vw, 8rem);          /* 72 -> 128px */
  --container-pad: clamp(1.5rem, 0.8rem + 2.2vw, 3rem);    /* 24 -> 48px */
  --container-max: 72rem;                                  /* 1152px */

  /* Radii */
  --radius-btn: 10px;
  --radius-card: 18px;
  --radius-feature: 24px;

  /* Motion */
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 240ms;
  --dur-base: 420ms;
  --dur-slow: 600ms;

  /* Layered, color-tinted shadows (never flat shadow-md) */
  --shadow-soft: 0 1px 2px rgba(31,45,68,0.04), 0 8px 24px rgba(31,45,68,0.06);
  --shadow-card: 0 1px 2px rgba(31,45,68,0.04), 0 8px 30px rgba(31,45,68,0.06), 0 24px 60px -20px rgba(31,45,68,0.08);
  --shadow-lift: 0 2px 4px rgba(31,45,68,0.06), 0 18px 50px rgba(31,45,68,0.10), 0 40px 100px -20px rgba(126,148,133,0.18);
  --shadow-btn:  0 1px 0 rgba(255,255,255,0.10) inset, 0 1px 2px rgba(31,45,68,0.20), 0 12px 28px -8px rgba(31,45,68,0.45);
  --shadow-deep: 0 2px 4px rgba(31,45,68,0.10), 0 24px 60px -16px rgba(31,45,68,0.28);

  /* Nav */
  --nav-height: 100px;
}

/* --------------------------------------------------------------------------
   2. BASE
   -------------------------------------------------------------------------- */
html {
  scroll-padding-top: calc(var(--nav-height) + 16px);
  overflow-x: clip;
}
body {
  background: var(--warm);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; /* hard guarantee: no horizontal scroll, ever */
}

h1, h2, h3, h4, .serif {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.15;
}
.display { letter-spacing: -0.012em; line-height: 1.06; }

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

/* Global focus ring — every interactive element gets a visible state */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  background: var(--ink);
  color: var(--warm);
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  font-size: var(--text-sm);
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-soft);
}
.skip-link:focus { transform: translateY(0); }

/* Container */
.container-site {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Section shells.
   overflow-x: clip contains pre-reveal transform states (data-reveal left/right)
   and decorative ornaments without creating a scroll container — position:sticky
   children keep working (unlike overflow: hidden). */
.section { padding-block: var(--section-pad); position: relative; overflow-x: clip; }
.section-warm  { background: var(--warm); }
.section-stone { background: var(--stone); }
.section-sage  { background: var(--sage);  color: var(--warm); }
.section-navy  { background: var(--ink);   color: var(--warm); }
.section-peach { background: var(--peach); color: var(--ink); }

/* SVG noise grain — depth without color. Parent needs position:relative */
.grain::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.grain > * { position: relative; z-index: 2; }

/* Eyebrow label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--sage-deep);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, currentColor 100%);
  opacity: 0.6;
}
.eyebrow-peach { color: var(--peach); }
.eyebrow-warm  { color: var(--warm-75); }

/* Decorative divider: line · dot · line */
.dot-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(31,45,68,0.15);
}
.dot-divider::before, .dot-divider::after {
  content: '';
  width: 60px; height: 1px;
  background: currentColor;
}
.dot-divider span {
  width: 5px; height: 5px; border-radius: 999px;
  background: var(--gold);
}

/* Oversized serif quote mark */
.quote-mark {
  font-family: var(--font-serif);
  font-size: clamp(72px, 9vw, 120px);
  line-height: 0.5;
  color: var(--gold);
  opacity: 0.5;
  user-select: none;
}

/* --------------------------------------------------------------------------
   3. BUTTONS & LINKS  (§14 CTA library styling)
   -------------------------------------------------------------------------- */
.btn-primary {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink);
  color: var(--warm);
  padding: 15px 28px;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  overflow: hidden;
  isolation: isolate;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 360ms var(--ease-soft),
              box-shadow 360ms var(--ease-soft);
}
.btn-primary::before { /* sliding warm highlight */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    rgba(246,217,194,0) 0%,
    rgba(246,217,194,0.30) 35%,
    rgba(157,177,201,0.45) 55%,
    rgba(126,148,133,0.30) 75%,
    rgba(246,217,194,0) 100%);
  transform: translateX(-110%);
  transition: transform 720ms var(--ease-soft);
  z-index: -1;
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--ink);
  z-index: -2;
  transition: background-color 360ms ease;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset,
              0 4px 8px rgba(31,45,68,0.25),
              0 22px 50px -10px rgba(31,45,68,0.60);
}
.btn-primary:hover::before { transform: translateX(110%); }
.btn-primary:hover::after  { background: var(--ink-deep); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 13.5px 26px;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  transition: color 360ms ease,
              border-color 360ms ease,
              transform 360ms var(--ease-soft),
              box-shadow 360ms var(--ease-soft);
}
.btn-secondary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, var(--peach) 0%, var(--sun) 50%, var(--mist) 100%);
  transform: translateX(-110%);
  transition: transform 720ms var(--ease-soft);
  z-index: -1;
  opacity: 0.85;
}
.btn-secondary:hover {
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -10px rgba(126,148,133,0.40);
}
.btn-secondary:hover::before { transform: translateX(0); }
.btn-secondary:active { transform: translateY(0); }

/* On dark backgrounds */
.btn-light {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--warm);
  color: var(--ink);
  padding: 16px 30px;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  overflow: hidden; isolation: isolate;
  border: none; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset,
              0 12px 30px -6px rgba(0,0,0,0.30);
  transition: transform 360ms var(--ease-soft),
              box-shadow 360ms var(--ease-soft);
}
.btn-light::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(242,207,183,0.85) 50%, transparent 100%);
  transform: translateX(-110%);
  transition: transform 720ms var(--ease-soft);
  z-index: -1;
}
.btn-light:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset,
              0 22px 50px -8px rgba(0,0,0,0.45);
}
.btn-light:hover::before { transform: translateX(110%); }
.btn-light:active { transform: translateY(0); }

/* Ghost button for dark backgrounds */
.btn-ghost-light {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent;
  color: var(--warm);
  border: 1.5px solid rgba(250,247,242,0.45);
  padding: 13.5px 26px;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-weight: 500; font-size: 15px;
  cursor: pointer;
  transition: border-color 360ms ease,
              background-color 360ms ease,
              transform 360ms var(--ease-soft);
}
.btn-ghost-light:hover {
  border-color: var(--peach);
  background: rgba(242,207,183,0.10);
  transform: translateY(-3px);
}
.btn-ghost-light:active { transform: translateY(0); }

/* Compact size modifier */
.btn-sm { padding: 11px 20px; font-size: 14px; }

/* Text link with animated arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: color 360ms ease, gap 360ms var(--ease-soft);
}
.link-arrow svg { transition: transform 360ms var(--ease-soft); flex: none; }
.link-arrow:hover { color: var(--sage-deep); gap: 14px; }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow-peach { color: var(--peach); }
.link-arrow-peach:hover { color: var(--warm); }

/* Underline link (gold ink-draw on hover) */
.link-underline {
  position: relative;
  color: var(--ink);
  font-weight: 500;
  transition: color 220ms var(--ease-soft);
}
.link-underline::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 320ms var(--ease-soft);
}
.link-underline:hover { color: var(--sage-deep); }
.link-underline:hover::after { transform: scaleX(1); }

/* --------------------------------------------------------------------------
   4. NAV  (fixed, blur, scroll-aware; mobile overlay menu)
   -------------------------------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #FFFFFF;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31,45,68,0.05);
  transition: box-shadow var(--dur-base) var(--ease-soft),
              background-color var(--dur-base) ease;
}
.site-nav.is-scrolled {
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(31,45,68,0.04), 0 12px 32px -12px rgba(31,45,68,0.12);
}
.nav-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 0 var(--container-pad);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.nav-brand img { height: 76px; width: auto; }
.nav-wordmark {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}
.nav-wordmark em {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate);
  display: block;
  margin-top: 4px;
}
.nav-links {
  display: none;
  align-items: center;
  gap: 34px;
  /* Links sit right, beside the CTA, instead of centered in the bar. */
  margin-left: auto;
  margin-right: 18px;
}
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-link {
  position: relative;
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
  padding: 4px 2px;
  transition: color 220ms var(--ease-soft);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 320ms var(--ease-soft);
}
.nav-link:hover { color: var(--sage-deep); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--sage-deep); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-cta { display: none; }
@media (min-width: 640px) { .nav-cta { display: inline-flex; } }

/* Burger */
.nav-burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 8px;
}
@media (min-width: 1024px) { .nav-burger { display: none; } }
.nav-burger span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--ink);
  transition: transform 360ms var(--ease-soft), opacity 240ms ease;
  transform-origin: center;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* Mobile menu panel */
.mobile-menu {
  position: fixed;
  inset: var(--nav-height) 0 auto 0;
  z-index: 99;
  background: rgba(250,247,242,0.98);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(31,45,68,0.08);
  box-shadow: 0 32px 60px -20px rgba(31,45,68,0.18);
  padding: 16px var(--container-pad) 32px;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 320ms var(--ease-soft), transform 320ms var(--ease-soft);
}
.mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu .nav-link {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  padding: 14px 0;
  border-bottom: 1px solid rgba(31,45,68,0.07);
}
.mobile-menu .nav-link::after { display: none; }
.mobile-menu-cta { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.mobile-menu-cta .btn-primary { justify-content: center; }
.mobile-menu-phone {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ink-60);
}
.mobile-menu-phone a { font-weight: 500; color: var(--ink); }

/* Scroll progress bar (thin, gradient, top of viewport above nav) */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  z-index: 110;
  pointer-events: none;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--peach) 0%, var(--mist) 55%, var(--sage) 100%);
  transform: scaleX(0);
  transform-origin: left center;
}

/* --------------------------------------------------------------------------
   5. CARDS
   -------------------------------------------------------------------------- */
.card {
  background: #ffffff;
  border: 1px solid rgba(31,45,68,0.06);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-base) var(--ease-soft),
              box-shadow var(--dur-base) var(--ease-soft),
              border-color 360ms ease;
  position: relative;
  overflow: hidden;
}
.card::before { /* animated gradient top border on hover */
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--slate) 0%, var(--mist) 45%, var(--peach) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-slow) var(--ease-soft);
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(31,45,68,0.10);
  box-shadow: var(--shadow-lift);
}
/* On tilt cards GSAP rotates .card in 3D, which can make its :hover flicker
   near the edges — drive the line from the untransformed wrapper too. */
.card:hover::before,
[data-tilt]:hover .card::before { transform: scaleX(1); }

.card-warm  { background: var(--warm); }
.card-stone { background: var(--stone); }

/* Card on dark sections (frosted) */
.card-frost {
  background: rgba(250,247,242,0.05);
  border: 1px solid rgba(250,247,242,0.12);
  border-radius: var(--radius-card);
  padding: 32px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background-color var(--dur-base) var(--ease-soft),
              border-color var(--dur-base) var(--ease-soft),
              transform var(--dur-base) var(--ease-soft),
              box-shadow var(--dur-base) var(--ease-soft);
}
.card-frost:hover {
  background: rgba(250,247,242,0.09);
  border-color: rgba(250,247,242,0.22);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,0.35);
}

/* Line-icon chip used at top of cards */
.card-icon {
  width: 56px; height: 56px;
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 16px;
  background: var(--stone);
  border: 1px solid rgba(31,45,68,0.06);
  color: var(--ink);
  margin-bottom: 20px;
  transition: transform var(--dur-slow) var(--ease-soft),
              background-color var(--dur-base) ease;
}
.card:hover .card-icon, .card-frost:hover .card-icon {
  transform: translateY(-3px) scale(1.06);
  background: var(--sun);
}

/* Image treatment — gradient + multiply tint for depth (anti-generic rule) */
.img-treated {
  position: relative;
  overflow: hidden;
}
.img-treated img {
  transition: transform 700ms var(--ease-soft);
  display: block;
}
.img-treated:hover img { transform: scale(1.02); }
.img-treated::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(31,45,68,0.12) 0%, rgba(242,207,183,0.08) 100%),
    linear-gradient(180deg, rgba(31,45,68,0) 60%, rgba(31,45,68,0.18) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   6. FORMS
   -------------------------------------------------------------------------- */
.form-input {
  background: #ffffff;
  border: 1px solid rgba(31,45,68,0.15);
  border-radius: var(--radius-btn);
  padding: 13px 16px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  width: 100%;
  transition: border-color 220ms var(--ease-soft),
              box-shadow 220ms var(--ease-soft);
}
.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,166,107,0.15);
}
.form-input::placeholder { color: var(--ink-45); }

/* --------------------------------------------------------------------------
   7. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--warm);
  border-top: 1px solid rgba(31,45,68,0.10);
  padding: 64px 0 40px;
}
.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 5fr 3fr 4fr; gap: 48px; }
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { height: 80px; width: auto; }
.footer-brand span { font-family: var(--font-serif); font-size: 20px; color: var(--ink); }
.footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--sage-deep);
  font-size: 17px;
  margin-bottom: 12px;
}
.footer-blurb {
  color: var(--ink-60);
  font-size: var(--text-sm);
  line-height: 1.65;
  max-width: 24rem;
}
.footer-heading {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-contact a {
  color: var(--ink-75);
  font-size: var(--text-sm);
  width: fit-content;
  transition: color 220ms ease;
}
.footer-links a:hover, .footer-contact a:hover { color: var(--sage-deep); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; color: var(--ink-75); font-size: var(--text-sm); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(31,45,68,0.10);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 12px;
  color: rgba(31,45,68,0.50);
}
.footer-crisis { font-style: italic; }

/* --------------------------------------------------------------------------
   8. ANIMATION UTILITIES  (driven by site.js data-attributes)
   --------------------------------------------------------------------------
   Initial hidden states apply ONLY when JS is running (html.js) and the
   user allows motion — so content is never invisible without JS.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  /* html.anim is added by an inline <head> snippet (motion allowed) and
     removed by site.js if GSAP failed to load — content is never stranded. */
  html.anim [data-reveal] { opacity: 0; }
  html.anim [data-reveal-group] > * { opacity: 0; }
  html.anim [data-split] .split-word { opacity: 0; }
}

/* Word-split wrappers (built by site.js) */
.split-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.split-word {
  display: inline-block;
  will-change: transform, opacity;
}

/* Scroll-drawn SVG paths */
[data-draw] { will-change: stroke-dashoffset; }

/* Tilt cards */
[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}
[data-tilt] .tilt-inner { transform: translateZ(24px); }

/* Marquee-free, calm float for atmospheric ornaments */
@keyframes ac-float {
  0%, 100% { transform: translateY(0) rotate(var(--float-rot, 0deg)); }
  50%      { transform: translateY(-14px) rotate(calc(var(--float-rot, 0deg) + 1.5deg)); }
}
.float-slow { animation: ac-float 11s ease-in-out infinite; will-change: transform; }

/* Soft drifting haze blobs (atmosphere on hero / CTA) */
@keyframes hazeA { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(18px,-22px) scale(1.08);} }
@keyframes hazeB { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(-22px,16px) scale(1.12);} }
.haze {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  will-change: transform;
  pointer-events: none;
}
.haze-a { animation: hazeA 12s ease-in-out infinite; }
.haze-b { animation: hazeB 15s ease-in-out infinite; }

/* Scroll cue (hero) */
.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(31, 45, 68, 0.62);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.scroll-cue::after {
  content: '';
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, rgba(31,45,68,0.62), transparent);
  animation: cueDrop 2.2s var(--ease-soft) infinite;
}
@keyframes cueDrop {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --------------------------------------------------------------------------
   9. HERO SCENE (three.js canvas + static fallback)
   -------------------------------------------------------------------------- */
.scene-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1200ms ease;
}
.scene-live .scene-canvas { opacity: 1; }
/* Static fallback: layered SVG ridges + gradient sky. Always present;
   softened (not removed) when WebGL takes over so the scene stays grounded. */
.scene-fallback {
  position: absolute;
  inset: 0;
  transition: opacity 1200ms ease;
}
.scene-live .scene-fallback .scene-ridges { opacity: 0.45; }
.scene-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 72% 18%, rgba(246,217,194,0.55) 0%, rgba(246,217,194,0) 60%),
    radial-gradient(ellipse 70% 60% at 18% 30%, rgba(182,199,216,0.40) 0%, rgba(182,199,216,0) 65%),
    linear-gradient(180deg, #FFFFFF 0%, var(--warm) 58%, #F3EDE4 100%);
}
.scene-ridges { position: absolute; inset: auto 0 0 0; height: 42%; transition: opacity 1200ms ease; }
.scene-ridges svg { position: absolute; inset: auto 0 0 0; width: 100%; height: 100%; display: block; }

/* Night hero — deep-navy variant of the alpine hero (About, Services).
   Dusk-gradient sky with a low peach alpenglow, three layered ridge
   silhouettes; only the nearest ridge drifts. */
.hero-night { color: var(--warm); }
/* Cap the ridge band so tall (stacked mobile) heroes don't grow giant peaks. */
.hero-night .scene-ridges { height: min(42%, 340px); }
.hero-night .scene-sky {
  background:
    radial-gradient(ellipse 60% 40% at 50% 85%, rgba(246,217,194,0.38) 0%, rgba(246,217,194,0) 70%),
    radial-gradient(ellipse 85% 55% at 70% 74%, rgba(242,207,183,0.20) 0%, rgba(242,207,183,0) 60%),
    radial-gradient(ellipse 70% 55% at 16% 20%, rgba(157,177,201,0.14) 0%, rgba(157,177,201,0) 65%),
    linear-gradient(180deg, #1A2840 0%, #223350 52%, #33486E 100%);
}
/* All three ridge layers drift; front = fastest, back = slowest */
.hero-night .ridge-near {
  width: 112%;
  left: -6%;
  animation: nightRidgeFast 26s ease-in-out -6s infinite alternate;
  will-change: transform;
}
.hero-night .ridge-mid {
  width: 110%;
  left: -5%;
  animation: nightRidgeMed 34s ease-in-out -4s infinite alternate;
  will-change: transform;
}
.hero-night .ridge-far {
  width: 108%;
  left: -4%;
  animation: nightRidgeSlow 42s ease-in-out -10s infinite alternate;
  will-change: transform;
}
@keyframes nightRidgeFast {
  from { transform: translateX(-3%); }
  to   { transform: translateX(3%); }
}
@keyframes nightRidgeMed {
  from { transform: translateX(-2%); }
  to   { transform: translateX(2%); }
}
@keyframes nightRidgeSlow {
  from { transform: translateX(-1.2%); }
  to   { transform: translateX(1.2%); }
}

/* --------------------------------------------------------------------------
   POP-HALO CARDS — hover enlarges the card, blooms a white ring + halo,
   and the icon chip inside glows gold. Additive: keeps the card's own look.
   -------------------------------------------------------------------------- */
.pop-card {
  position: relative;
  background: #FFFDF9;
  border: 1px solid rgba(31,45,68,0.07);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(31,45,68,0.05), 0 18px 44px -18px rgba(31,45,68,0.22);
  transition: transform 480ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 480ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.pop-card:hover, .pop-card:focus-visible, .pop-card:focus-within {
  transform: translateY(-6px) scale(1.045);
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,0.95),
    0 0 34px 6px rgba(255,255,255,0.55),
    0 26px 60px -12px rgba(31,45,68,0.40);
  z-index: 2;
}
.pop-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(126,148,133,0.14);
  border: 1.5px solid rgba(95,119,112,0.28);
  color: var(--ink);
  transition: filter 480ms ease, border-color 480ms ease,
              transform 480ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pop-card:hover .pop-icon, .pop-card:focus-within .pop-icon {
  filter: drop-shadow(0 0 14px rgba(201,166,107,0.75));
  border-color: rgba(201,166,107,0.6);
  transform: scale(1.08);
}
@media (prefers-reduced-motion: reduce) {
  .pop-card, .pop-icon { transition: none; }
  .pop-card:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   REFRAME FLIP CARDS — "You are not a problem to be fixed": tap a harsh
   self-label and it flips in 3D to its kinder, truer rewrite.
   -------------------------------------------------------------------------- */
.reframe-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 20px;
  perspective: 1000px;
  max-width: 660px;  /* wraps the 4 cards 2+2 instead of 3+1 */
  margin-inline: auto;
}
.reframe-card {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transform: rotate(var(--rot, 0deg));
  animation: reframeFloat 4s ease-in-out var(--float-delay, 0s) infinite alternate;
}
@keyframes reframeFloat {
  from { transform: rotate(var(--rot, 0deg)) translateY(0); }
  to   { transform: rotate(var(--rot, 0deg)) translateY(-7px); }
}
.reframe-inner {
  position: relative;
  display: grid;
  transform-style: preserve-3d;
  transition: transform 720ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reframe-card.is-flipped .reframe-inner { transform: rotateY(180deg); }
.reframe-face {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 26px;
  border-radius: 16px;
  font-size: 19px;
  line-height: 1.3;
  white-space: nowrap;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.reframe-front {
  position: relative;
  background: #FFFFFF;
  color: rgba(31,45,68,0.60);
  border: 1px solid rgba(31,45,68,0.08);
  box-shadow: 0 1px 2px rgba(31,45,68,0.08), 0 16px 36px -14px rgba(31,45,68,0.25);
}
/* Gold flip badge on each card corner — signals "this card turns over" */
.reframe-front::after {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #C9A66B url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4.5 9a8 8 0 0 1 14-3M19.5 15a8 8 0 0 1-14 3' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M18.5 2.8v3.4h-3.4M5.5 21.2v-3.4h3.4' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px 13px no-repeat;
  box-shadow: 0 2px 8px rgba(31,45,68,0.28);
}
/* Desktop-only tease: hovering peeks the card open a few degrees */
@media (hover: hover) and (pointer: fine) {
  .reframe-card:not(.is-flipped):hover .reframe-inner { transform: rotateY(-18deg); }
  .reframe-card.is-flipped:hover .reframe-inner { transform: rotateY(162deg); }
}
.reframe-back {
  background: var(--sage);
  color: var(--warm);
  transform: rotateY(180deg);
  box-shadow: 0 1px 2px rgba(31,45,68,0.10), 0 18px 40px -14px rgba(95,119,112,0.55);
}
.reframe-back svg { flex: none; color: #C9A66B; }
.reframe-card:focus-visible { outline: 2px solid #C9A66B; outline-offset: 4px; border-radius: 16px; }
.reframe-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.reframe-hint::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #C9A66B;
  animation: hintPulse 1.8s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50%      { transform: scale(1.5); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .reframe-card { animation: none; }
  .reframe-inner { transition: none; }
}

/* --------------------------------------------------------------------------
   HERO PILL FLASH — sequential attention flash after page load, 3 rounds.
   Stagger via --flash-delay per pill (left first, then middle, then right).
   Each 3.6s cycle is one full round: the pulse fills the first ~32% of the
   cycle (1.15s) so the pills fire in order without overlap, then the cycle
   repeats 3 times = 9 pulses total.
   -------------------------------------------------------------------------- */
@keyframes pillFlash {
  0%, 32%, 100% {
    background-color: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 0 0 0 rgba(242,207,183,0);
  }
  16% {
    background-color: rgba(242,207,183,0.45);
    border-color: rgba(242,207,183,0.95);
    box-shadow: 0 0 28px 4px rgba(242,207,183,0.55);
  }
}
/* Animation is armed by JS (initPillFlash) once the page has fully loaded,
   so the pulses can't play out before the hero is actually visible. */
.pill-flash.is-flashing { animation: pillFlash 3.6s ease-in-out var(--flash-delay, 0.8s) 3 both; }

/* --------------------------------------------------------------------------
   ROLLING CTA WATERMARK — scroll-scrubbed by initCtaRoll() in site.js.
   (Markup ships with inline translateY(-50%) as the no-JS resting state.)
   -------------------------------------------------------------------------- */
.cta-roll {
  will-change: transform;
  filter: drop-shadow(0 20px 60px rgba(246,217,194,0.25));
}
@media (max-width: 767px) {
  .cta-roll { display: none; }
}

/* --------------------------------------------------------------------------
   10. REDUCED MOTION — global guard
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .scene-canvas { display: none; }
  .scroll-cue::after { animation: none; }
}
