/* ==========================================================
   MAKOLIYA SAFARI · NEW TEMPLATE · SECTIONS (part 1)
   Hero, ticker, manifesto, mountains, treks, how it works
   ========================================================== */

/* ---------- HERO: headline lives between sky and summit ---------- */
.hero {
  --img-h: 84%;
  position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; color: var(--snow);
  background: linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-join) calc(100% - var(--img-h) + 1px), var(--sky-join) 100%);
}
.hero__stage { position: absolute; inset: 0; will-change: transform; }
.hero__img {
  position: absolute; left: 0; bottom: 0; width: 100%; height: var(--img-h);
  object-fit: cover; object-position: 50% 0; user-select: none; pointer-events: none;
}
.hero__img--bg { transform-origin: 50% 30%; animation: heroZoom 2.8s var(--ease-expo) both; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 9%); mask-image: linear-gradient(to bottom, transparent, #000 9%); }
.hero__img--fg { z-index: 2; transform-origin: 50% 30%; animation: heroZoom 2.8s var(--ease-expo) both; }
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }

/* Summit sits at 23.5% of the photo's height; the title's bottom edge rests just above it */
.hero__title {
  position: absolute; z-index: 1; left: 0; right: 0;
  bottom: calc(100% - (100% - var(--img-h)) - var(--img-h) * 0.235 + 0.5rem);
  text-align: center; font-size: var(--step-5); font-weight: 800; line-height: 0.98; letter-spacing: -0.02em;
  color: var(--snow); text-shadow: 0 6px 40px rgba(13, 43, 30, 0.25); padding-inline: var(--gutter);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero__title .line > span { display: inline-block; }
.hero__title em { font-style: italic; font-weight: 500; color: #fff6d8; }

/* Page-load choreography, timed to the loader lifting */
.hero { --intro: 1.75s; }
.no-loader .hero { --intro: 0.15s; }
.hero__img--bg, .hero__img--fg { animation-delay: calc(var(--intro) - 0.9s); }
.js-motion .hero__title .line > span { animation: rise 1.3s var(--ease-expo) var(--intro) both; }
.js-motion .hero__title .line + .line > span { animation-delay: calc(var(--intro) + 0.12s); }
.js-motion .hero__content { animation: fadeUp 1.1s var(--ease-out) calc(var(--intro) + 0.35s) both; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }

.hero__shade {
  position: absolute; inset: auto 0 0; height: 62%; z-index: 3; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 29, 20, 0.92) 8%, rgba(8, 29, 20, 0.55) 45%, transparent);
}
.hero__content {
  position: absolute; z-index: 4; inset: auto 0 0; padding-bottom: clamp(1.5rem, 5vh, 3.5rem);
}
.hero__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem 4rem; align-items: end; }
.hero__lede { font-size: var(--step-1); line-height: 1.5; max-width: 34ch; color: rgba(255, 255, 255, 0.92); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero__proof { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; justify-self: end; }
.hero__proof li { display: grid; gap: 0.1rem; padding-top: 0.75rem; border-top: 1px solid rgba(255, 255, 255, 0.25); }
.hero__proof strong { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1; color: var(--gold-bright); }
.hero__proof span { font-family: var(--font-ui); font-size: 0.8rem; font-weight: 500; color: rgba(255, 255, 255, 0.78); }
.hero__cue {
  position: absolute; z-index: 4; left: 50%; bottom: 1rem; transform: translateX(-50%);
  width: 1px; height: 46px; background: rgba(255, 255, 255, 0.25); overflow: hidden;
}
.hero__cue::after { content: ""; position: absolute; inset: 0; background: var(--gold); animation: cue 2.2s var(--ease-out) infinite; }
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

@media (max-width: 900px) {
  .hero { --img-h: 70%; min-height: 600px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__proof { display: none; }
  .hero__lede { font-size: 1.1rem; }
  .hero__cue { display: none; }
}
@media (max-width: 900px) and (max-height: 700px) { .hero { --img-h: 64%; } }

/* ---------- TICKER ---------- */
.ticker { background: var(--gold); color: var(--pine); overflow: hidden; padding-block: 1rem; }
.ticker__track { display: flex; width: max-content; animation: ticker 48s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  display: inline-flex; align-items: center; gap: 1.25rem; padding-right: 1.25rem; white-space: nowrap;
  font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + 0.8vw, 1.6rem); font-weight: 700;
}
.ticker__item small { font-family: var(--font-ui); font-size: 0.75em; font-weight: 600; opacity: 0.7; }
.ticker__item svg { width: 16px; height: 16px; opacity: 0.6; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- MANIFESTO ---------- */
.topo { background-color: var(--pine); background-image: url("../images/topo.svg"); background-size: 820px; background-position: 70% 20%; }
.manifesto { color: var(--snow); padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.manifesto__text {
  font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; line-height: 1.35; letter-spacing: -0.005em;
  max-width: 38ch; text-wrap: pretty;
}
.manifesto__text .w { transition: opacity 0.2s; }
.manifesto__text .hl { color: var(--gold-bright); font-family: var(--font-hand); font-style: normal; font-weight: 600; letter-spacing: 0; font-size: 1.12em; }
.manifesto__foot { margin-top: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; }
.manifesto__sign { font-family: var(--font-hand); font-style: normal; font-weight: 600; letter-spacing: 0; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); color: var(--gold); line-height: 1; }
.manifesto__note { font-family: var(--font-ui); font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); max-width: 40ch; }

/* ---------- MOUNTAINS: chart + range gallery ---------- */
.mountains__head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem 4rem; align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.mountains__head h2 { max-width: 14ch; }
.chart { position: relative; border-radius: var(--radius-lg); background: var(--mist); padding: clamp(1rem, 3vw, 2.5rem) clamp(0.5rem, 2vw, 2rem) 1rem; }
.chart__svg { width: 100%; height: auto; overflow: visible; }
.chart__grid line { stroke: var(--line); stroke-dasharray: 3 6; }
.chart__grid text { font-family: var(--font-ui); font-size: 12px; fill: #5f6b65; }
.chart__base { stroke: var(--ink); stroke-opacity: 0.35; }
.chart__fill { fill: url(#peakFill); opacity: 0.9; transition: opacity 0.4s; }
.chart__line { fill: none; stroke: var(--forest); stroke-width: 2; stroke-linejoin: round; }
.chart__peak[data-zone="Eastern Arc"] .chart__line { stroke: var(--moss); }
.chart__peak[data-zone="Southern Highlands"] .chart__line { stroke: var(--gold-deep); }
.chart__dot { fill: var(--gold); stroke: var(--snow); stroke-width: 2; transition: transform 0.4s var(--ease-out); transform-box: fill-box; transform-origin: center; }
.chart__name { font-family: var(--font-ui); font-size: 14px; font-weight: 700; fill: var(--ink); }
.chart__elev { font-family: var(--font-ui); font-size: 12px; font-weight: 500; fill: #4a5650; }
.chart__peak { cursor: default; outline: none; }
.chart__peak:hover .chart__fill, .chart__peak:focus-visible .chart__fill { opacity: 1; fill: var(--forest); }
.chart__peak:hover .chart__dot, .chart__peak:focus-visible .chart__dot { transform: scale(1.6); }
.chart__legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1rem; padding-inline: 1rem; font-family: var(--font-ui); font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.chart__legend span { display: inline-flex; align-items: center; gap: 0.5rem; }
.chart__legend i { width: 18px; height: 3px; border-radius: 2px; background: var(--forest); }
.chart__legend i.ea { background: var(--moss); }
.chart__legend i.sh { background: var(--gold-deep); }
@media (max-width: 700px) {
  .chart { overflow-x: auto; padding-inline: 0.5rem; }
  .chart__svg { width: 760px; max-width: none; }
  .mountains__head { grid-template-columns: 1fr; }
}

.range { margin-top: clamp(3rem, 6vw, 5rem); }
.range__bar { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.range__bar h3 { font-size: var(--step-2); }
.range__hint { font-family: var(--font-ui); font-size: 0.85rem; color: var(--ink-soft); }
.range__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scroll-behavior: smooth; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.range__viewport::-webkit-scrollbar { display: none; }
.range__track { display: flex; gap: clamp(0.9rem, 1.6vw, 1.5rem); width: max-content; padding-bottom: 0.5rem; }
.is-pinned-range .range__viewport { overflow: visible; }

.peak-card {
  position: relative; width: clamp(270px, 28vw, 400px); aspect-ratio: 3 / 4.1; border-radius: var(--radius-lg);
  overflow: hidden; scroll-snap-align: start; color: var(--snow); background: var(--forest); isolation: isolate;
}
.peak-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease-expo); }
.peak-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8, 29, 20, 0.95) 12%, rgba(8, 29, 20, 0.35) 55%, rgba(8, 29, 20, 0.05)); }
.peak-card:hover img, .peak-card:focus-within img { transform: scale(1.07); }
.peak-card__zone {
  position: absolute; top: 1rem; left: 1rem; padding: 0.35rem 0.8rem; border-radius: 999px;
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 700; background: rgba(255, 255, 255, 0.92); color: var(--pine);
}
.peak-card__body { position: absolute; inset: auto 0 0; padding: 1.4rem; display: grid; gap: 0.5rem; }
.peak-card__elev { font-family: var(--font-ui); font-size: 0.85rem; font-weight: 700; color: var(--gold-bright); }
.peak-card h4 { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.05; }
.peak-card__meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-family: var(--font-ui); font-size: 0.78rem; font-weight: 500; color: rgba(255, 255, 255, 0.82); }
.peak-card__desc {
  font-size: 0.95rem; line-height: 1.5; color: rgba(255, 255, 255, 0.88);
  display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.6s var(--ease-expo), opacity 0.5s;
}
.peak-card__desc > span { overflow: hidden; }
.peak-card:hover .peak-card__desc, .peak-card:focus-within .peak-card__desc { grid-template-rows: 1fr; opacity: 1; }
.peak-card__go { margin-top: 0.4rem; color: var(--gold-bright); }
.peak-card__go::after, .peak-card__view::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.peak-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; margin-top: 0.5rem; }
.peak-card__view { min-height: 42px; padding: 0.55rem 1.1rem; font-size: 0.82rem; position: static; }
.peak-card__view::before { display: none; }
.peak-card__plan { position: relative; z-index: 1; color: var(--gold-bright); font-size: 0.85rem; }
.trek__more { color: var(--gold-bright); font-size: 0.86rem; }
@media (hover: none) { .peak-card__desc { grid-template-rows: 1fr; opacity: 1; } }

/* ---------- TREKS: bento of most-booked climbs ---------- */
.treks { background: var(--mist); padding-top: clamp(2.5rem, 5vw, 4rem); }
.treks__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.treks__head h2 { max-width: 15ch; }
.treks__grid { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto; gap: clamp(1rem, 2vw, 1.5rem); }
.trek {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 330px; color: var(--snow);
  display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; background: var(--forest);
  padding-top: 4.25rem; /* keeps the badge clear of the text */
}
.trek--feature { grid-row: span 2; min-height: 640px; }
.trek img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.4s var(--ease-expo); }
.trek::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8, 29, 20, 0.96) 18%, rgba(8, 29, 20, 0.4) 60%, rgba(8, 29, 20, 0.1)); }
.trek:hover img { transform: scale(1.06); }
.trek__badge {
  position: absolute; top: 1.25rem; left: 1.25rem; padding: 0.4rem 0.9rem; border-radius: 999px;
  font-family: var(--font-ui); font-size: 0.75rem; font-weight: 700; background: var(--gold); color: var(--pine);
}
.trek__badge--moss { background: var(--moss); color: var(--snow); }
.trek__badge--snow { background: var(--snow); color: var(--pine); }
.trek__body { padding: clamp(1.25rem, 2.5vw, 2rem); display: grid; gap: 0.75rem; }
.trek__mtn { font-family: var(--font-ui); font-size: 0.85rem; font-weight: 600; color: var(--gold-bright); }
.trek h3 { font-size: var(--step-2); }
.trek--feature h3 { font-size: var(--step-3); }
.trek__desc { color: rgba(255, 255, 255, 0.85); max-width: 46ch; font-size: 1rem; }
.trek__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; }
.trek__tags li { font-family: var(--font-ui); font-size: 0.75rem; font-weight: 600; padding: 0.3rem 0.75rem; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.trek__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.5rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.trek__price { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1; }
.trek__price small { font-family: var(--font-ui); font-size: 0.8rem; font-weight: 500; opacity: 0.75; }
.trek .btn { min-height: 46px; padding: 0.7rem 1.3rem; font-size: 0.88rem; }
@media (max-width: 900px) {
  .treks__grid { grid-template-columns: 1fr; }
  .trek--feature { grid-row: auto; min-height: 520px; }
  .trek { min-height: 440px; }
}

/* ---------- HOW: a real three-step sequence ---------- */
.how { color: var(--snow); }
.how__head { max-width: 760px; margin-bottom: clamp(3rem, 6vw, 5rem); }
.how__steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 4rem); list-style: none; }
.how__route { position: absolute; left: 0; right: 0; top: 42px; height: 40px; width: 100%; overflow: visible; pointer-events: none; }
.how__route path { fill: none; stroke: var(--gold); stroke-width: 2; stroke-dasharray: 6 10; opacity: 0.7; }
.how__step { position: relative; display: grid; gap: 1rem; align-content: start; }
.how__num {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--gold-bright);
  background: var(--pine); box-shadow: inset 0 0 0 1.5px var(--gold); position: relative; z-index: 1;
}
.how__step h3 { font-size: var(--step-2); }
.how__step p { color: rgba(255, 255, 255, 0.78); max-width: 34ch; }
@media (max-width: 860px) {
  .how__steps { grid-template-columns: 1fr; }
  .how__route { display: none; }
  .how__step { grid-template-columns: 84px 1fr; column-gap: 1.25rem; }
  .how__step h3, .how__step p { grid-column: 2; }
  .how__num { grid-row: span 2; }
}

/* ---------- HERO slideshow: four mountains, slide 1 keeps the layered Kilimanjaro ---------- */
.hero { --hero-dur: 7s; }
.hslide { position: absolute; inset: 0; visibility: hidden; z-index: 0; }
.hslide.is-active { visibility: visible; z-index: 2; }
.hslide.is-leaving { visibility: visible; z-index: 1; }
.hslide.is-entering { animation: slideWipe 1.35s var(--ease-expo) both; }
@keyframes slideWipe { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
/* Photo slides fill the frame; a soft top shade keeps the headline readable on bright skies */
.hslide--photo { background: var(--pine); }
.hslide--photo .hslide__img { height: 100%; object-position: 50% 40%; transform-origin: 60% 45%; }
.hslide--photo::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(8, 29, 20, 0.55) 0%, rgba(8, 29, 20, 0.18) 42%, transparent 62%); }
.hslide--photo .hero__title { z-index: 2; }
.hslide--photo.is-active .hslide__img, .hslide--photo.is-leaving .hslide__img { animation: kenBurns calc(var(--hero-dur) + 2.5s) linear both; }
@keyframes kenBurns { from { transform: scale(1.14); } to { transform: scale(1.02); } }
/* Re-entering Kilimanjaro: both layers zoom together so the cut-out stays aligned */
.hslide.is-entering .hero__img--bg, .hslide.is-entering .hero__img--fg { animation: slideZoom 1.6s var(--ease-expo) both; }
@keyframes slideZoom { from { transform: scale(1.1); } to { transform: none; } }
.hslide.is-entering .hero__title .line > span { animation: slideRise 1.1s var(--ease-expo) 0.3s both; }
.hslide.is-entering .hero__title .line + .line > span { animation-delay: 0.42s; }
@keyframes slideRise { from { transform: translateY(105%); } to { transform: none; } }
.hslide.is-leaving .hero__title { opacity: 0; transition: opacity 0.45s ease-in; }

/* Mountain tabs: the old stats grid, now the slideshow's controls */
.hero__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; justify-self: end; min-width: min(100%, 420px); }
.hero__tab { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0.15rem 0.6rem; padding: 0.85rem 0 0.2rem; text-align: left; color: var(--snow); opacity: 0.58; transition: opacity 0.4s; }
.hero__tab:hover, .hero__tab.is-on, .hero__tab:focus-visible { opacity: 1; }
.hero__tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
.hero__bar { position: absolute; inset: 0 0 auto; height: 2px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.hero__bar i { position: absolute; inset: 0; background: var(--gold); transform: scaleX(0); transform-origin: left; }
.hero__tab.is-on .hero__bar i { animation: tabFill var(--hero-dur) linear var(--bar-delay, 0s) forwards; }
.hero.is-paused .hero__tab.is-on .hero__bar i { animation-play-state: paused; }
@keyframes tabFill { to { transform: scaleX(1); } }
.hero__tab strong { grid-row: span 2; font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1; color: var(--gold-bright); }
.hero__tabname { font-family: var(--font-ui); font-size: 0.82rem; font-weight: 700; color: var(--snow); }
.hero__tabmeta { font-family: var(--font-ui); font-size: 0.76rem; font-weight: 500; color: rgba(255, 255, 255, 0.72); }
@media (max-width: 900px) {
  .hero__tabs { grid-template-columns: repeat(4, 1fr); gap: 0.6rem; justify-self: stretch; min-width: 0; margin-top: 0.5rem; }
  .hero__tab { grid-template-columns: 1fr; padding-top: 0.7rem; }
  .hero__tab strong, .hero__tabmeta { display: none; }
  .hero__tabname { font-size: 0.72rem; }
  .hero__content { padding-bottom: 5.75rem; }
  .hero__lede { font-size: 1rem; }
  .hero__ctas { margin-top: 1rem; }
  /* Start the tab row clear of the floating calendar icon */
  .hero__tabs { margin-left: 70px; gap: 0.45rem; }
  .hero__ctas { margin-top: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hslide.is-entering, .hslide--photo .hslide__img, .hslide.is-entering .hero__img--bg, .hslide.is-entering .hero__img--fg,
  .hslide.is-entering .hero__title .line > span { animation: none !important; }
  .hero__tab.is-on .hero__bar i { animation: none; transform: scaleX(1); }
}
