/* ============ MNTN design language: tokens ============ */
:root {
  --navy-950: #091a30;
  --navy-900: #0e2440;
  --navy-800: #163257;
  --navy-700: #1e3f6b;
  --gold: #ffd68e;
  --fern: #8fca79;
  --sky: #9fd8ff;
  --white: #ffffff;
  --text-dim: rgba(232, 241, 255, 0.86);
  --text-faint: rgba(212, 228, 248, 0.66);
  --line: rgba(255, 255, 255, 0.18);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--navy-900); }

a, button { touch-action: manipulation; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
.skip-link {
  position: fixed; top: -60px; left: 20px; z-index: 300;
  background: var(--navy-950);
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 700; font-size: 0.85rem;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }

/* ============ Preloader ============ */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--navy-950);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 28px;
  transition: transform 1s var(--ease-out), visibility 1s;
}
.preloader.is-done { transform: translateY(-100%); visibility: hidden; }
.preloader-inner {
  display: flex; align-items: baseline; gap: 24px;
}
.preloader-name {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: 0.35em;
  color: var(--white);
}
.preloader-count {
  font-size: 0.9rem; color: var(--gold);
  min-width: 3ch; text-align: right;
  font-variant-numeric: tabular-nums;
}
.preloader-bar {
  width: min(320px, 60vw); height: 1px;
  background: var(--line); overflow: hidden;
}
.preloader-bar span {
  display: block; width: 0%; height: 100%;
  background: var(--gold);
}

/* ============ Custom cursor ============ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 150;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--gold);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(251, 215, 132, 0.5);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
    border-color 0.3s, background 0.3s;
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  background: rgba(251, 215, 132, 0.08);
  border-color: rgba(251, 215, 132, 0.9);
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ============ Header ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px clamp(24px, 6vw, 80px);
  transition: transform 0.5s var(--ease-out), background 0.4s, padding 0.4s;
}
.site-header.is-scrolled {
  background: rgba(9, 26, 48, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding-top: 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.site-header.is-hidden { transform: translateY(-110%); }

.logo {
  font-family: var(--serif);
  font-size: 1.7rem; letter-spacing: 0.3em;
  font-weight: 500;
}
.main-nav { display: flex; gap: clamp(22px, 3.2vw, 50px); }
.main-nav a, .header-cta {
  font-size: 0.98rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  position: relative; padding: 4px 0;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.header-cta {
  display: flex; align-items: center; gap: 8px;
  color: var(--gold);
}
.header-cta:hover { color: var(--white); }

.menu-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px;
  flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.menu-toggle span {
  display: block; width: 26px; height: 2px;
  background: var(--white);
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
}
.menu-toggle.is-open span:first-child { transform: translateY(4.5px) rotate(45deg); }
.menu-toggle.is-open span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ============ Mobile menu ============ */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(7, 20, 29, 0.97);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 48px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.mobile-menu nav a {
  font-family: var(--serif); font-size: 2rem;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.mobile-menu.is-open nav a { opacity: 1; transform: none; }
.mobile-menu.is-open nav a:nth-child(2) { transition-delay: 0.06s; }
.mobile-menu.is-open nav a:nth-child(3) { transition-delay: 0.12s; }
.mobile-menu.is-open nav a:nth-child(4) { transition-delay: 0.18s; }
.mobile-menu.is-open nav a:nth-child(5) { transition-delay: 0.24s; }
.mobile-menu-foot { display: flex; gap: 28px; }
.mobile-menu-foot a {
  font-size: 0.8rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold);
}

/* ============ Rails ============ */
.rail {
  position: fixed; top: 50%; transform: translateY(-50%);
  z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.rail-left { left: clamp(16px, 3vw, 48px); }
.rail-right { right: clamp(16px, 3vw, 48px); }
.rail-label {
  writing-mode: vertical-rl;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
}
.rail-left a {
  color: var(--text-dim);
  padding: 10px;
  margin: -6px 0;
  transition: color 0.22s, transform 0.22s var(--ease-out);
}
.rail-left a:hover { color: var(--gold); transform: translateY(-3px); }

.slider-nav { display: flex; flex-direction: column; gap: 18px; align-items: flex-end; }
.slider-nav a {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--text-faint);
  position: relative; padding-right: 18px;
  transition: color 0.3s;
}
.slider-nav a::after {
  content: ""; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 100%; min-height: 20px;
  background: transparent; border-radius: 2px;
  transition: background 0.3s;
}
.slider-nav a.is-active { color: var(--white); }
.slider-nav a.is-active::after { background: var(--gold); }
.slider-nav a:hover { color: var(--gold); }

/* ============ Hero ============ */
.hero {
  position: relative;
  height: 130vh;
  min-height: 780px;
  overflow: hidden;
  background: linear-gradient(180deg, #0c2440 0%, #1a3a66 40%, #4679ab 72%, #a6d0ec 94%, #cfe7f7 100%);
}
.hero-sky { position: absolute; inset: -5% 0 0 0; }

/* Aurora bands */
.aurora {
  position: absolute;
  width: 70vw; height: 46vh;
  border-radius: 50%;
  filter: blur(34px);
  opacity: 0.75;
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
  animation: aurora-drift var(--ad, 24s) ease-in-out infinite alternate;
}
.aurora-a {
  top: 2%; left: -12%;
  background: linear-gradient(100deg, rgba(142, 205, 242, 0.5), rgba(142, 205, 242, 0) 70%);
  transform: rotate(-12deg);
}
.aurora-b {
  top: 14%; left: 26%;
  --ad: 31s;
  background: linear-gradient(95deg, rgba(127, 176, 105, 0.42), rgba(127, 176, 105, 0) 72%);
  transform: rotate(-6deg);
  animation-direction: alternate-reverse;
}
.aurora-c {
  top: -4%; right: -16%;
  --ad: 27s;
  background: linear-gradient(115deg, rgba(246, 207, 133, 0.42), rgba(246, 207, 133, 0) 70%);
  transform: rotate(10deg);
}
@keyframes aurora-drift {
  from { transform: translate3d(-4%, -2%, 0) rotate(-10deg) scaleY(1); }
  to { transform: translate3d(5%, 4%, 0) rotate(-2deg) scaleY(1.25); }
}
.stars { position: absolute; inset: 0; }
.star {
  position: absolute; border-radius: 50%;
  background: #fff;
  animation: twinkle var(--tw, 3s) ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: 0.15; }
  to { opacity: 0.9; }
}
.moon {
  position: absolute; top: 12%; right: 16%;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fffbee, #ffd98e 55%, rgba(255, 217, 142, 0.6));
  box-shadow: 0 0 90px 34px rgba(255, 217, 142, 0.28), 0 0 260px 130px rgba(255, 217, 142, 0.12);
}
.shooting-star {
  position: absolute; top: 14%; left: 62%;
  width: 130px; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), transparent);
  transform: rotate(-28deg);
  opacity: 0;
  animation: shoot 9s linear infinite;
  animation-delay: 3s;
}
.shooting-star.delay { top: 30%; left: 20%; animation-delay: 7.5s; }
@keyframes shoot {
  0% { opacity: 0; transform: rotate(-28deg) translateX(0); }
  2% { opacity: 1; }
  6% { opacity: 0; transform: rotate(-28deg) translateX(-340px); }
  100% { opacity: 0; transform: rotate(-28deg) translateX(-340px); }
}

.mountain-layer {
  position: absolute; left: -4%; right: -4%; bottom: -2%;
  will-change: transform;
}
.mountain-layer svg { width: 100%; height: auto; }
.m-far { opacity: 0.95; }
.m-near { filter: drop-shadow(0 -18px 40px rgba(0, 0, 0, 0.35)); }

.fog {
  position: absolute; left: 0; right: 0; height: 140px;
  background: linear-gradient(180deg, transparent, rgba(148, 222, 255, 0.13), transparent);
  filter: blur(12px);
  animation: drift 26s ease-in-out infinite alternate;
  will-change: transform;
}
.fog-a { bottom: 30%; }
.fog-b { bottom: 12%; animation-duration: 34s; animation-direction: alternate-reverse; }
@keyframes drift {
  from { transform: translateX(-6%); }
  to { transform: translateX(6%); }
}

.forest-layer {
  position: absolute; left: -2%; right: -2%; bottom: -1%;
  will-change: transform;
  filter: drop-shadow(0 -10px 30px rgba(4, 12, 24, 0.5));
}
.forest-layer svg {
  width: 100%; height: clamp(180px, 24vh, 280px);
  display: block;
}

.hero-grain {
  position: absolute; inset: 0; z-index: 6;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='240'%20height='240'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.9'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='matrix'%20values='0%200%200%200%201%200%200%200%200%201%200%200%200%200%201%200%200%200%200.6%200'/%3E%3C/filter%3E%3Crect%20width='240'%20height='240'%20filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  opacity: 0.07;
  mix-blend-mode: soft-light;
}

.hero-content {
  position: absolute; z-index: 5;
  top: 35%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(1120px, 90vw);
  display: flex; align-items: center; gap: clamp(30px, 4vw, 60px);
  text-align: left;
}
.hero-portrait {
  flex: none;
  width: clamp(150px, 15vw, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(140deg, var(--gold), rgba(142, 205, 242, 0.7) 55%, rgba(127, 176, 105, 0.7));
  box-shadow: 0 0 60px rgba(246, 207, 133, 0.3), 0 18px 50px rgba(4, 12, 26, 0.55);
}
.hero-portrait img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--navy-950);
}
.hero-text { min-width: 0; }
.hero-sub {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  max-width: 36em;
  text-shadow: 0 2px 18px rgba(4, 12, 26, 0.6);
}
.hero-eyebrow { margin-bottom: 26px; }
.eyebrow {
  display: flex; align-items: center; gap: 20px;
  color: var(--gold);
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.42em; text-transform: uppercase;
}
.hero-eyebrow {
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  letter-spacing: 0.3em;
}
.eyebrow.centered { justify-content: center; }
.eyebrow-line {
  display: inline-block; width: 60px; height: 2px;
  background: var(--gold); flex: none;
  transform-origin: left;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6.4vw, 5.2rem);
  line-height: 1.12;
  text-transform: capitalize;
  text-shadow: 0 4px 34px rgba(4, 12, 26, 0.5);
}
.hero-title .word { display: inline-block; overflow: hidden; vertical-align: top; }
.hero-title .word > span { display: inline-block; transform: translateY(110%); }

.scroll-cue {
  margin-top: 40px;
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.1em;
}
.scroll-cue svg { animation: cue 2s ease-in-out infinite; }
@keyframes cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}
.hero-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30vh;
  background: linear-gradient(180deg, transparent, var(--navy-900));
  z-index: 4; pointer-events: none;
}
