/* Homepage-only styles: the full-bleed photographic hero, the "Earth to Pamir" arrival
   intro, and the light section that follows. Loaded in addition to style.css. */

/* ---------- Hero ---------- */

.hl-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Reserves real space for the nav bar pinned at the top (see .hl-nav), so on short
     viewports the bottom-anchored heading can never grow up into it — it just makes the
     hero taller instead. */
  padding-top: clamp(96px, 14vh, 150px);
}

.hl-hero-photo {
  position: absolute;
  inset: -2%;
  background-image: url('https://commons.wikimedia.org/wiki/Special:FilePath/Karakul_lake_Tajikistan.jpg?width=2000');
  background-size: cover;
  background-position: 50% 48%;
  will-change: transform;
}
/* The slow zoom AND the scroll parallax both animate `transform` on this element, so
   common.js drives both together in one rAF loop (a CSS animation here would fight a JS
   scroll handler for the same property) — see "Homepage hero" in common.js. */

.hl-hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(10,14,12,.72) 0%, rgba(10,14,12,.42) 34%, rgba(10,14,12,0) 60%),
    linear-gradient(0deg, rgba(8,11,9,.6) 0%, rgba(8,11,9,0) 42%);
}

.hl-nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 22px clamp(18px, 4vw, 48px);
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease, opacity 1.1s ease;
}
.hl-nav .brand { color: #fff; }
.hl-nav nav.site-nav a { color: rgba(255,255,255,.85); }
.hl-nav nav.site-nav a:hover, .hl-nav nav.site-nav a.active { color: #fff; }
.hl-nav .lang-switch, .hl-nav .lang-switch a { color: rgba(255,255,255,.75); }
.hl-nav .lang-switch a:hover, .hl-nav .lang-switch a.active { color: #fff; }
.hl-nav .lang-switch a:hover { background: rgba(255,255,255,.14); }

.hl-nav.is-solid {
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px -16px rgba(30,25,15,.35);
  padding-top: 14px; padding-bottom: 14px;
}
.hl-nav.is-solid .brand { color: var(--ink); }
.hl-nav.is-solid nav.site-nav a { color: var(--ink-soft); }
.hl-nav.is-solid nav.site-nav a:hover, .hl-nav.is-solid nav.site-nav a.active { color: var(--ink); }
.hl-nav.is-solid .lang-switch, .hl-nav.is-solid .lang-switch a { color: var(--ink-soft); }
.hl-nav.is-solid .lang-switch a:hover, .hl-nav.is-solid .lang-switch a.active { color: var(--ink); }
.hl-nav.is-solid .lang-switch a:hover { background: var(--paper); }

.hl-hero-content {
  position: relative; z-index: 2;
  padding: 0 clamp(20px, 5vw, 56px) clamp(64px, 11vh, 108px);
  max-width: 640px;
  color: #fff;
}

/* Nav/content/scroll-hint stay invisible (matching how the intro overlay already hides
   them) until the arrival finishes, then fade in — rather than just instantly appearing
   the moment the overlay is gone or moved behind. */
body:not(.pamir-arrived) .hl-nav,
body:not(.pamir-arrived) .hl-hero-content,
body:not(.pamir-arrived) .hl-scroll-hint { opacity: 0; }
.hl-hero-content, .hl-scroll-hint { transition: opacity 1.1s ease; }

.hl-eyebrow {
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.75); margin: 0 0 16px;
}

.hl-hero-content h1 {
  margin: 0 0 20px;
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  text-shadow: 0 2px 24px rgba(0,0,0,.25);
}
.hl-hero-content h1 em { color: rgba(255,255,255,.85); }

.hl-hero-content p {
  margin: 0 0 30px;
  font-size: 1.12rem;
  line-height: 1.6;
  max-width: 46ch;
  color: rgba(255,255,255,.9);
}

.hl-cta-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.hl-cta {
  display: inline-flex; align-items: center; gap: 12px;
  background: #fff; color: #16201a;
  text-decoration: none;
  font-size: .95rem; font-weight: 600;
  padding: 15px 26px;
  border-radius: 10px;
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s ease;
}
.hl-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(0,0,0,.45); }
.hl-cta svg { width: 16px; height: 16px; transition: transform .25s ease; }
.hl-cta:hover svg { transform: translateX(3px); }

.hl-cta-secondary {
  color: #fff; text-decoration: none; font-size: .92rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.4);
  padding-bottom: 2px;
  transition: border-color .2s ease, opacity .2s ease;
}
.hl-cta-secondary:hover { border-color: #fff; }

.hl-scroll-hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  opacity: .6; pointer-events: none; z-index: 2;
}
.hl-scroll-hint .line { width: 1px; height: 26px; background: rgba(255,255,255,.6); }
.hl-scroll-hint svg { width: 11px; height: 11px; color: #fff; animation: hl-scroll-bob 1.9s ease-in-out infinite; }
@keyframes hl-scroll-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .hl-scroll-hint svg { animation: none; } }
@media (max-width: 600px) { .hl-scroll-hint { display: none; } }

/* ---------- Below the hero: a light, editorial intro strip + three plain feature notes ---------- */

.hl-intro {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(64px, 10vh, 110px) 20px 10px;
  text-align: center;
}
.hl-intro .hl-eyebrow2 {
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sky-dark);
  margin: 0 0 14px;
}
.hl-intro h2 {
  margin: 0 0 18px; font-weight: 500; color: var(--ink);
  font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.2;
}
.hl-intro p { margin: 0; color: var(--ink-soft); font-size: 1.08rem; line-height: 1.65; }

.hl-features {
  max-width: 1080px; margin: 0 auto; padding: 44px 20px 10px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.hl-feature { background: var(--paper-2); padding: 30px 26px; }
.hl-feature .icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--paper);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  color: var(--clay-dark);
}
.hl-feature .icon svg { width: 19px; height: 19px; }
.hl-feature h3 { margin: 0 0 8px; font-size: 1.02rem; font-weight: 600; color: var(--ink); }
.hl-feature p { margin: 0; font-size: .9rem; color: var(--ink-soft); line-height: 1.55; }

@media (max-width: 780px) {
  .hl-features { grid-template-columns: 1fr; }
}

/* ---------- Earth → Pamir arrival intro overlay ---------- */

#hl-intro-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: #05070c;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 1s ease, background-color 1.4s ease;
}
#hl-intro-overlay.is-hidden { opacity: 0; pointer-events: none; }
/* Once the arrival sequence finishes, the same map keeps running — the overlay just
   stops covering the page and drops behind it instead, becoming the page's living
   background rather than being torn down and rebuilt. */
#hl-intro-overlay.is-background {
  z-index: -2;
  background: transparent;
  pointer-events: none;
}
#hl-intro-map { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
#hl-intro-map.is-visible { opacity: 1; }
.hl-hero-photo.is-hidden { opacity: 0; transition: opacity 1.2s ease; }
#hl-intro-label {
  position: relative; z-index: 2; color: #fff; text-align: center;
  font-size: .82rem; letter-spacing: .22em; text-transform: uppercase;
  opacity: .85; transition: opacity .5s ease;
}
#hl-intro-skip {
  position: absolute; right: clamp(16px,3vw,32px); bottom: clamp(16px,3vw,32px); z-index: 3;
  color: rgba(255,255,255,.8); background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.3); border-radius: 999px;
  padding: 9px 18px; font-size: .8rem; font-weight: 500; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
#hl-intro-skip:hover { background: rgba(255,255,255,.18); color: #fff; }
.hl-intro-star {
  position: absolute; border-radius: 50%; background: #fff;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  .hl-hero-content h1 { font-size: clamp(2.1rem, 9vw, 2.8rem); }
  .hl-hero-content p { font-size: 1rem; }
  .hl-cta { padding: 13px 22px; }
}
