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

/* ─── Skip link (ADA) ────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: #d4cfc7; color: #060608;
  font-family: 'DM Mono', monospace; font-size: 0.75rem;
  letter-spacing: 0.1em; padding: 8px 16px;
  z-index: 1000; text-decoration: none; border-radius: 2px;
}
.skip-link:focus { top: 16px; }

/* ─── Body — Canyonlands pre-dawn palette ────────────────── */
html {
  height: 100%;
  height: 100dvh;   /* dynamic viewport — accounts for mobile browser chrome */
}
body {
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 35% 28% at 28% 30%, #160a04 0%, transparent 65%),
    linear-gradient(180deg, #020508 0%, #04040a 40%, #060408 100%);
  color: #d4cfc7;
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

/* ─── Backdrop SVG ───────────────────────────────────────── */
.backdrop { width: 100%;
  height: 100%;
  display: block; inset: 0; z-index: 0; }
  
/* ─── Vignette ───────────────────────────────────────────── */
.vignette {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 28%, rgba(3,6,16,0.75) 100%);
  z-index: 5; pointer-events: none;
}

/* ─── Noise overlay ───────────────────────────────────────── */
.noise {
  position: fixed; inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Center layout ──────────────────────────────────────── */
.site-center {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 20px;
}

/* ─── Brand block (logo + wordmark) ─────────────────────── */
.brand {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
}

/* Lucide chevrons-down icon rendered as SVG */
.logo-mark,
.monogram svg {
  display: block;
  width: 88px;
  height: 88px;
  color: #c8a020;          /* rich gold — inherited by stroke="currentColor" */
  stroke-width: 1.2px;
  filter: drop-shadow(0 0 12px rgba(200,160,32,0.35));
}

/* ─── Wordmark ───────────────────────────────────────────── */
/* WCAG AA: #d4cfc7 on ~#04040a ≈ 15:1 ✓ */
.wordmark {
  font-family: 'Bruno Ace SC', system-ui, sans-serif;
  font-weight: 400; font-size: clamp(1.4rem, 3.6vw, 3.4rem);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #d4cfc7; line-height: 1;
}

/* ─── Rule ───────────────────────────────────────────────── */
.rule {
  width: 48px; height: 1px;
  background: linear-gradient(to right, transparent, #5a5460, transparent);
}

/* ─── Tagline ────────────────────────────────────────────── */
/* WCAG AA: #888484 on #04040a ≈ 5.2:1 ✓ (non-bold, treated as normal text) */
.tagline {
  font-weight: 300; font-size: clamp(0.6rem, 1vw, 0.85rem);
  letter-spacing: 0.5em; text-transform: uppercase;
  color: #888484; line-height: 1;
}

/* ─── CTA button ─────────────────────────────────────────── */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  border: 1px solid rgba(200,160,32,0.28);
  border-radius: 2px;
  font-family: 'DM Mono', monospace;
  font-size: clamp(0.58rem, 0.8vw, 0.68rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #b8b2aa;
  text-decoration: none;
  background: rgba(200,160,32,0.04);
  box-shadow:
    0 0 18px rgba(200,160,32,0.12),
    0 0 40px rgba(200,160,32,0.05),
    inset 0 0 12px rgba(200,160,32,0.04);
  transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  margin-top: 4px;
}
.cta-button:hover,
.cta-button:focus-visible {
  color: #e8e2da;
  border-color: rgba(200,160,32,0.65);
  background: rgba(200,160,32,0.07);
  box-shadow:
    0 0 28px rgba(200,160,32,0.28),
    0 0 60px rgba(200,160,32,0.12),
    inset 0 0 16px rgba(200,160,32,0.06);
}
.cta-button:focus-visible {
  outline: 2px solid rgba(200,160,32,0.5);
  outline-offset: 3px;
}
.cta-arrow {
  width: 13px;
  height: 13px;
  color: #c8a020;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.cta-button:hover .cta-arrow {
  transform: translateX(3px);
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%); z-index: 10; white-space: nowrap;
}
.copyright {
  font-size: 0.46rem; letter-spacing: 0.3em;
  color: #686470; text-transform: uppercase;
}

/* ─── Animations — mesa layers reveal far → near ─────────── */
@media (prefers-reduced-motion: no-preference) {
  /* Sunrise glow builds */
  .sunrise { opacity: 0; animation: appear 3s ease 0.1s forwards; }

  /* Mesa layers: distant layers appear first, then closer ones */
  .mesa-5 { opacity: 0; animation: appear 1.2s ease 0.6s  forwards; }
  .mesa-4 { opacity: 0; animation: appear 1.2s ease 1.1s  forwards; }
  .mesa-3 { opacity: 0; animation: appear 1.2s ease 1.6s  forwards; }
  .mesa-2 { opacity: 0; animation: appear 1.2s ease 2.1s  forwards; }
  .mesa-1 { opacity: 0; animation: appear 1.2s ease 2.6s  forwards; }

  /* Strata appears in less than half a second after page load */
  .strata { opacity: 0; animation: appear 1s ease 0.4s forwards; }

  /* River draws right after strata */
  .river {
    stroke-dasharray: 1440;
    stroke-dashoffset: 1440;
    animation: draw 1.5s ease 1.4s forwards;
  }

  @keyframes appear { to { opacity: 1; } }
  @keyframes draw   { to { stroke-dashoffset: 720; } }

  .site-center, footer {
    opacity: 1;
  }
}


/* ─── Responsive ─────────────────────────────────────────── */

/* Backdrop: on portrait the panoramic SVG is sliced horizontally.
   Shift the anchor toward the bottom so mesa layers stay visible. */
@media (orientation: portrait) {
  .backdrop { object-position: center bottom; }
}

/* ── Mobile portrait (phones, ≤640px wide) ────────────────── */
@media (max-width: 640px) {
  .site-center {
    gap: 14px;
    padding: 0 28px;
  }
  .brand { gap: 8px; }
  .logo-mark {
    width: 60px;
    height: 60px;
  }
  .wordmark {
    font-size: clamp(1.2rem, 7vw, 2rem);
    letter-spacing: 0.12em;
  }
  .tagline {
    font-size: clamp(0.58rem, 2.4vw, 0.78rem);
    letter-spacing: 0.38em;
  }
  .cta-button {
    padding: 10px 18px;
    font-size: clamp(0.56rem, 2.8vw, 0.65rem);
    letter-spacing: 0.22em;
  }
  footer { bottom: 18px; }
}

/* ── Mobile landscape (short viewport, ≤560px tall) ──────── */
@media (max-height: 560px) and (orientation: landscape) {
  .site-center { gap: 8px; }
  .brand { gap: 5px; }
  .logo-mark {
    width: 44px;
    height: 44px;
  }
  .wordmark {
    font-size: clamp(1.1rem, 4vw, 1.8rem);
    letter-spacing: 0.12em;
  }
  .rule { width: 36px; }
  .tagline { letter-spacing: 0.3em; }
  footer { bottom: 10px; }
}

/* ── Tablet portrait (641px–1024px wide) ─────────────────── */
@media (min-width: 641px) and (max-width: 1024px) and (orientation: portrait) {
  .site-center { gap: 18px; }
  .logo-mark {
    width: 72px;
    height: 72px;
  }
  .wordmark {
    font-size: clamp(1.6rem, 5vw, 2.8rem);
  }
}
