/* ============================================================
   V4 "Discover Uganda" — central CTA + camera-shutter reveal
   ============================================================ */

/* ---- circular "See routes" button (sits bottom-right of the hero grid) ---- */
.routes-btn{
  position:relative;margin:0;justify-self:end;align-self:end;
  z-index:4;width:clamp(118px,12vw,158px);aspect-ratio:1;border-radius:50%;
  display:grid;place-items:center;text-align:center;cursor:pointer;
  font-family:var(--font-ui);font-size:.78rem;font-weight:600;letter-spacing:.18em;
  text-transform:uppercase;line-height:1.35;color:var(--cream);
  background:rgba(26,24,19,.22);backdrop-filter:blur(3px);
  border:1.5px solid rgba(246,246,210,.85);
  transition:transform .4s var(--ease),background .4s var(--ease),color .4s var(--ease);
}
.routes-btn::before{ /* rotating dashed ring */
  content:"";position:absolute;inset:-12px;border-radius:50%;
  border:1px dashed rgba(246,246,210,.45);
  animation:routes-spin 18s linear infinite;
}
.routes-btn:hover{transform:scale(1.06);background:var(--cream);color:var(--ink);border-color:var(--cream);}
.routes-btn:focus-visible{outline:2px solid var(--cream);outline-offset:6px;}
@keyframes routes-spin{to{transform:rotate(360deg);}}

/* ---- full-screen 3D map stage ---- */
.map-stage{position:relative;height:100svh;background:#0b0a07;}
.map-stage .map3d{position:absolute;inset:0;width:100%;height:100%;border:0;display:block;}

/* ============================================================
   CAMERA SHUTTER — true 6-flap aperture
   Ref: https://codepen.io/shshaw/pen/yLMMBxa
   ============================================================ */
.shutter{position:fixed;inset:0;z-index:9000;pointer-events:none;
  opacity:0;visibility:hidden;overflow:hidden;
  --flaps:6;}
.shutter.active{opacity:1;visibility:visible;}

.shutter .flap{
  width:150vmax;height:150vmax;position:absolute;bottom:50%;right:50%;
  pointer-events:none;will-change:transform;
  background:#000;
  border:solid 4px #000;
  --p:calc(var(--i) / var(--flaps));
  transform-origin:bottom right;
  transform:rotate(-0.5turn) rotate(calc(1turn * var(--p))) skewX(30deg) translateX(-100%) translateY(90%);
}
.shutter.closing .flap{animation:hns-shutter-close .9s cubic-bezier(.5,0,.5,1) both;}
.shutter.opening .flap{animation:hns-shutter-open  .9s cubic-bezier(.5,0,.5,1) both;}
/* frozen "closed" state — no animation. Used when arriving with ?reveal=1 */
.shutter.instant-closed .flap{
  transform:rotate(-0.25turn) rotate(calc(1turn * var(--p))) skewX(30deg) translateX(0%) translateY(0%);
}

@keyframes hns-shutter-close{
  from{transform:rotate(-0.5turn) rotate(calc(1turn * var(--p))) skewX(30deg) translateX(-100%) translateY(90%);}
  to  {transform:rotate(-0.25turn) rotate(calc(1turn * var(--p))) skewX(30deg) translateX(0%) translateY(0%);}
}
@keyframes hns-shutter-open{
  from{transform:rotate(-0.25turn) rotate(calc(1turn * var(--p))) skewX(30deg) translateX(0%) translateY(0%);}
  to  {transform:rotate(-0.5turn) rotate(calc(1turn * var(--p))) skewX(30deg) translateX(-100%) translateY(90%);}
}

/* hero context — copy anchored bottom-left, routes button bottom-right */
.hero--discover{align-items:flex-end;}

/* ============================================================
   MAP MODE — once the map is revealed it is the only view
   (you leave it from the menu, not by scrolling)
   ============================================================ */
html.map-locked, html.map-locked body{overflow:hidden;height:100%;}
.map-stage.map-fixed{position:fixed;inset:0;height:100svh;z-index:5;}

/* on the map the header keeps the normal logo (left) + burger (right); map back-btn sits below */

/* ============================================================
   PANEL OPEN — pack panel is showing; hide the header and
   put a "back" button where the logo was.
   ============================================================ */
.site-header{transition:opacity .35s var(--ease), visibility .35s;}
body.panel-open .site-header{opacity:0;visibility:hidden;pointer-events:none;}
.panel-back{
  position:fixed;
  top:max(18px, calc((var(--header-h) - 40px) / 2));
  left:clamp(16px, 2.6vw, 44px);
  z-index:9100;
  display:none;
  align-items:center;gap:8px;
  background:rgba(34,33,28,.78);backdrop-filter:blur(6px);
  border:1px solid rgba(246,246,210,.22);
  color:var(--cream);font:600 13px/1 var(--font-ui);
  letter-spacing:.06em;text-transform:uppercase;
  padding:11px 18px 11px 14px;border-radius:24px;cursor:pointer;
  transition:background .25s var(--ease),transform .25s var(--ease);
}
.panel-back:hover{background:rgba(34,33,28,.95);transform:translateX(-2px);}
body.panel-open .panel-back{display:inline-flex;}

@media (prefers-reduced-motion:reduce){
  .routes-btn::before{animation:none;}
  .shutter{display:none;}
}
