/* Shared motion + polish — Alpine Service static site */

.js .hero-content .eyebrow,
.js .hero-content .hero-kicker,
.js .hero-content h1,
.js .hero-content .hero-tags,
.js .hero-content .hero-meta,
.js .hero-content .hero-actions {
  opacity: 0;
  transform: translateY(24px);
}
.hero.is-ready .eyebrow,
.hero.is-ready .hero-kicker { animation: riseIn 0.95s cubic-bezier(.22,1,.36,1) forwards; }
.hero.is-ready h1 { animation: riseIn 1.05s cubic-bezier(.22,1,.36,1) 0.14s forwards; }
.hero.is-ready .hero-tags { animation: riseIn 1s cubic-bezier(.22,1,.36,1) 0.28s forwards; }
.hero.is-ready .hero-meta { animation: riseIn 1s cubic-bezier(.22,1,.36,1) 0.38s forwards; }
.hero.is-ready .hero-actions { animation: riseIn 1s cubic-bezier(.22,1,.36,1) 0.48s forwards; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero slideshow + Ken Burns */
.hero-slides {
  position: absolute;
  inset: 0;
}
.hero-slides .hero-img {
  opacity: 0;
  transition: opacity 1.8s ease;
  will-change: opacity, transform;
  transform-origin: 50% 50%;
}
.hero-slides .hero-img.is-on {
  opacity: 1;
  z-index: 1;
}
.hero-slides .hero-img.is-on.kb-a { animation: kenburnsA 14s ease-in-out forwards; }
.hero-slides .hero-img.is-on.kb-b { animation: kenburnsB 14s ease-in-out forwards; }
@keyframes kenburnsA {
  from { transform: scale(1) translate3d(0,0,0); }
  to { transform: scale(1.08) translate3d(-1.6%, -1%, 0); }
}
@keyframes kenburnsB {
  from { transform: scale(1.06) translate3d(1.2%, 0, 0); }
  to { transform: scale(1) translate3d(-0.8%, 1.2%, 0); }
}

/* Single-image heroes (Namibia) */
.hero-exp .hero-img.kb-solo {
  animation: kenburnsA 22s ease-in-out alternate infinite;
  will-change: transform;
}

.hero-progress {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
  width: min(280px, 50%);
}
.hero-progress button {
  flex: 1;
  height: 2px;
  padding: 10px 0 0;
  background: transparent;
  position: relative;
}
.hero-progress button:before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: rgba(243,239,230,0.28);
}
.hero-progress button:after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  height: 2px; width: 0;
  background: var(--accent);
}
.hero-progress button.is-on:after {
  width: 100%;
  transition: width 7s linear;
}
.hero-shade { z-index: 2; pointer-events: none; }
.hero-content { z-index: 3; }

/* Nav refinements */
.nav {
  transition:
    background .45s ease,
    border-color .45s ease,
    backdrop-filter .45s ease,
    box-shadow .45s ease,
    height .4s ease;
}
.nav.is-scrolled {
  background: rgba(12, 13, 15, 0.92);
  box-shadow: 0 10px 40px rgba(0,0,0,0.28);
}
.nav-links a:not(.en) {
  position: relative;
}
.nav-links a:not(.en):after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.nav-links a:not(.en):hover:after,
.nav-links a.is-current:after { transform: scaleX(1); }
.nav-links a, .btn, .social a {
  transition: color .25s ease, background .25s ease, border-color .25s ease;
}

/* Scroll reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s cubic-bezier(.22,1,.36,1), transform 0.85s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Stats band */
.stats-band {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 64px;
}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
  text-align: left;
}
.stat {
  padding: 8px 8px 8px 0;
  border-left: 1px solid rgba(201,163,106,0.35);
  padding-left: 24px;
}
.stat-num {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1;
  color: var(--accent-2);
  letter-spacing: 0.02em;
}
.stat-num sup {
  font-size: 0.42em;
  top: -0.55em;
  margin-left: 1px;
}
.stat-num .pair {
  font-size: 0.38em;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 8px 0 6px;
  font-family: var(--font-sans);
  font-weight: 400;
  vertical-align: middle;
}
.stat-label {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text);
}
.stat-src {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats-note {
  width: min(100% - 48px, var(--wide));
  margin: 28px auto 0;
  font-size: 12px;
  color: var(--muted-2);
  letter-spacing: 0.04em;
}

/* Works hover + caption veil */
.work {
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  display: block;
}
.work .frame { position: relative; }
.work .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(12,13,15,0.72) 100%);
  opacity: 0;
  transition: opacity .45s ease;
  display: flex;
  align-items: flex-end;
  padding: 16px 16px 14px;
}
.work .veil span {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  transform: translateY(8px);
  transition: transform .45s ease;
}
.work:hover img,
.work:focus-visible img { transform: scale(1.06); }
.work:hover .veil,
.work:focus-visible .veil { opacity: 1; }
.work:hover .veil span,
.work:focus-visible .veil span { transform: none; }
.work:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.svc-card { transition: border-color .35s ease, transform .45s ease; }
.svc-card img { transition: transform .8s ease; }
.svc-card:hover { transform: translateY(-4px); border-color: rgba(201,163,106,0.45); }
.svc-card:hover img { transform: scale(1.05); }

/* Lightbox */
.lb {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8,9,11,0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
.lb.is-open { opacity: 1; visibility: visible; }
.lb-frame {
  position: relative;
  width: min(1180px, calc(100% - 96px));
  max-height: calc(100svh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lb-frame img {
  max-width: 100%;
  max-height: calc(100svh - 180px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}
.lb-cap {
  margin-top: 16px;
  text-align: center;
  color: rgba(243,239,230,0.9);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.lb-cap small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
}
.lb-btn {
  position: absolute;
  width: 48px; height: 48px;
  border: 1px solid rgba(243,239,230,0.22);
  color: var(--text);
  background: rgba(12,13,15,0.4);
  font-size: 22px;
  line-height: 1;
  transition: border-color .2s, color .2s, background .2s;
}
.lb-btn:hover { border-color: var(--accent); color: var(--accent-2); }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 16px; right: 16px; font-size: 28px; }
.lb-btn:focus-visible { outline: 1px solid var(--accent); }

/* Namibia timeline */
.days.timeline { position: relative; }
.days.timeline:before {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: linear-gradient(180deg, rgba(201,163,106,0), rgba(201,163,106,0.45) 12%, rgba(201,163,106,0.45) 88%, rgba(201,163,106,0));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.5s cubic-bezier(.22,1,.36,1);
}
.days.timeline.is-in:before { transform: scaleY(1); }
.days.timeline .day-num { position: relative; padding-left: 28px; }
.days.timeline .day-num:after {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--bg);
  transform: scale(0);
  transition: transform .5s cubic-bezier(.22,1,.36,1) .1s;
}
.days.timeline .day.is-in .day-num:after { transform: scale(1); }

/* FAQ accordion */
.faq .a-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .42s cubic-bezier(.22,1,.36,1);
}
.faq details.is-open .a-wrap { grid-template-rows: 1fr; }
.faq .a-wrap > * { overflow: hidden; }
.faq summary { transition: color .25s ease; }
.faq summary:hover { color: var(--accent-2); }
.faq summary:after { transition: transform .3s ease, content 0s; }

.gallery figure { cursor: pointer; }
.gallery img { transition: transform .7s ease; }

/* Parallax wrapper */
.parallax {
  overflow: hidden;
  display: block;
}
.parallax > img {
  will-change: transform;
  transition: none;
}

@media (max-width: 980px) {
  .stats-inner { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .days.timeline { padding-left: 8px; }
  .lb-frame { width: calc(100% - 24px); }
  .lb-prev, .lb-next { display: none; }
}
@media (max-width: 780px) {
  .nav-links a:not(.en):after { display: none; }
  .hero-progress { width: min(200px, 60%); bottom: 18px; }
  .stats-band { padding: 56px 0; }
}
@media (max-width: 560px) {
  .stats-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero-content .eyebrow,
  .js .hero-content .hero-kicker,
  .js .hero-content h1,
  .js .hero-content .hero-tags,
  .js .hero-content .hero-meta,
  .js .hero-content .hero-actions,
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .hero-slides .hero-img,
  .hero-exp .hero-img.kb-solo,
  .work img,
  .svc-card img,
  .gallery img,
  .days.timeline:before,
  .days.timeline .day-num:after,
  .faq .a-wrap,
  .hero-progress button.is-on:after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  .hero-slides .hero-img { opacity: 0; }
  .hero-slides .hero-img.is-on { opacity: 1; }
}
