/* ============================================================
   IMMERSIVE MODE
   The home page becomes a full-viewport dark scene. Serious mode
   is untouched.
   ============================================================ */

:root{ --ease-out: cubic-bezier(.16,1,.3,1); }

/* ---------- the switch (both modes) ---------- */
.mode-toggle{
  all:unset; cursor:pointer; display:inline-flex; align-items:center; gap:8px;
  padding:7px 14px 7px 10px; border-radius:999px;
  border:1px solid var(--rule); color:var(--faint);
  font-family:var(--body); font-size:.74rem; font-weight:600;
  letter-spacing:.1em; text-transform:uppercase; white-space:nowrap;
  transition:border-color .4s var(--ease-out), color .4s var(--ease-out), background .4s var(--ease-out);
}
.mode-toggle:hover, .mode-toggle:focus-visible{ border-color:var(--ink); color:var(--ink); }
.mode-toggle .knob{
  width:7px; height:7px; border-radius:50%; background:var(--faint);
  transition:background .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
header[data-theme="dark"] .mode-toggle{ border-color:rgba(247,244,238,.26); color:rgba(247,244,238,.68); }
header[data-theme="dark"] .mode-toggle:hover{ border-color:var(--paper); color:var(--paper); }
header[data-theme="dark"] .mode-toggle .knob{ background:rgba(247,244,238,.5); }
:root[data-mode="playful"] .mode-toggle .knob{
  background:var(--accent); box-shadow:0 0 0 4px rgba(255,110,30,.22);
}
@media (max-width:1180px){
  .nav-right{ gap:18px; }
  .navlinks{ gap:22px; }
  .mode-toggle{ padding:6px 11px 6px 8px; font-size:.68rem; letter-spacing:.08em; }
}
@media (max-width:1060px) and (min-width:761px){
  .mode-toggle .label{ display:none; }
  .mode-toggle{ padding:7px 9px; }
}
@media (max-width:520px){
  .mode-toggle{ padding:6px 11px 6px 8px; font-size:.68rem; }
  .mode-toggle .label{ display:none; }
}

/* ============================================================
   THE SCENE
   ============================================================ */
.im-stage{
  position:relative; width:100%; height:100svh; min-height:560px;
  background:#0B0A09; overflow:hidden;
  margin-bottom:clamp(40px,7vh,90px);
}
.im-canvas{ display:block; width:100%; height:100%; }

.im-ui{
  position:absolute; left:0; right:0; bottom:clamp(76px,11vh,124px);
  display:flex; flex-direction:column; align-items:center; gap:22px;
  padding:0 20px; pointer-events:none;
}
.im-ui > *{ pointer-events:auto; }

.im-dots{ display:flex; gap:8px; }
.im-dots button{
  all:unset; cursor:pointer; width:30px; height:2px; border-radius:2px;
  background:rgba(247,244,238,.22);
  transition:background .4s var(--ease-out), width .4s var(--ease-out);
}
.im-dots button[aria-current="true"]{ background:var(--accent); width:46px; }
.im-dots button:hover{ background:rgba(247,244,238,.5); }

.im-cta .hero-cta{ margin:0; justify-content:center; }
.im-cta .btn-solid{
  background:var(--accent); color:#120F0C; border-color:transparent;
}
.im-cta .btn-solid:hover{ background:#F7F4EE; color:#15140F; }
.im-cta .btn-ghost{ border-color:rgba(247,244,238,.3); color:#F7F4EE; }
.im-cta .btn-ghost:hover{ border-color:#F7F4EE; background:rgba(247,244,238,.07); }

.im-hint{
  font-family:var(--body); font-size:.68rem; font-weight:600;
  letter-spacing:.17em; text-transform:uppercase; color:rgba(247,244,238,.3);
}
.im-scroll{
  position:absolute; left:50%; bottom:26px; transform:translateX(-50%);
  display:flex; align-items:center; gap:10px;
  font-family:var(--body); font-size:.66rem; font-weight:600;
  letter-spacing:.2em; text-transform:uppercase; color:rgba(247,244,238,.34);
  pointer-events:none;
}
.im-scroll span{
  width:1px; height:26px; background:linear-gradient(rgba(247,244,238,.05), rgba(247,244,238,.6));
  animation:imPulse 2.6s var(--ease-out) infinite;
}
@keyframes imPulse{
  0%,100%{ opacity:.35; transform:scaleY(.6); transform-origin:bottom; }
  50%    { opacity:1;   transform:scaleY(1);  transform-origin:bottom; }
}

/* the paper hero steps aside while the scene is up */
:root.im-on .hero{ display:none; }
:root.im-on .stats{ padding-top:0; }

@media (max-width:760px){
  .im-stage{ height:84svh; min-height:480px; }
  .im-ui{ bottom:clamp(64px,10vh,100px); gap:18px; }
}
@media (prefers-reduced-motion:reduce){
  .im-scroll span{ animation:none; }
}

/* ============================================================
   DEPTH ON THE OTHER PAGES
   ============================================================ */
:root[data-mode="playful"] .btn,
:root[data-mode="playful"] .nav-cta,
:root[data-mode="playful"] .navlinks a,
:root[data-mode="playful"] .hc-media,
:root[data-mode="playful"] .stat{
  transition:transform .65s var(--ease-out), background .5s var(--ease-out),
             border-color .5s var(--ease-out), box-shadow .65s var(--ease-out), color .4s var(--ease-out);
}
:root[data-mode="playful"] .btn:hover{ transform:translateY(-2px); }
:root[data-mode="playful"] .stat:hover{ transform:translateY(-3px); }

:root[data-mode="playful"] .card h3,
:root[data-mode="playful"] .door h3{
  font-variation-settings:'opsz' 144,'SOFT' 20,'wght' 500;
  transition:font-variation-settings .7s var(--ease-out);
}
:root[data-mode="playful"] .card:hover h3,
:root[data-mode="playful"] .door:hover h3{
  font-variation-settings:'opsz' 144,'SOFT' 46,'wght' 620;
}

:root[data-mode="playful"] .grid,
:root[data-mode="playful"] .doors-grid{ perspective:1600px; }
:root[data-mode="playful"] .card,
:root[data-mode="playful"] .door{
  transform-style:preserve-3d; position:relative;
  transition:transform .85s var(--ease-out), background .5s var(--ease-out), box-shadow .85s var(--ease-out);
}
:root[data-mode="playful"] .card.tilt,
:root[data-mode="playful"] .door.tilt{
  transition:transform .14s linear, background .5s var(--ease-out), box-shadow .5s var(--ease-out);
  box-shadow:0 40px 80px -30px rgba(21,20,15,.3), 0 2px 8px rgba(21,20,15,.05);
  z-index:2;
}
:root[data-mode="playful"] .card::after,
:root[data-mode="playful"] .door::after{
  content:''; position:absolute; inset:0; pointer-events:none; opacity:0;
  transition:opacity .6s var(--ease-out);
  background:radial-gradient(420px circle at var(--mx,50%) var(--my,50%),
            rgba(255,255,255,.75), rgba(255,255,255,.2) 42%, transparent 68%);
  mix-blend-mode:soft-light;
}
:root[data-mode="playful"] .card.tilt::after,
:root[data-mode="playful"] .door.tilt::after{ opacity:1; }

:root[data-mode="playful"] .hc-media img,
:root[data-mode="playful"] .prod-media img{
  transition:transform 1s var(--ease-out), box-shadow 1s var(--ease-out);
}
:root[data-mode="playful"] .hc-media:hover img{ transform:scale(1.022); }
:root[data-mode="playful"] .prod-media:hover img{
  transform:scale(1.012); box-shadow:0 32px 70px -34px rgba(21,20,15,.34);
}
:root[data-mode="playful"] [data-par]{ will-change:transform; }

@media (prefers-reduced-motion:reduce){
  :root[data-mode="playful"] .card, :root[data-mode="playful"] .door,
  :root[data-mode="playful"] [data-par]{ transform:none !important; transition:none !important; }
}

/* ============================================================
   THE WHOLE SITE GOES DARK IN IMMERSIVE MODE
   The scene bleeds straight into the page instead of sitting
   on top of a different-looking site.
   ============================================================ */
:root[data-mode="playful"]{
  --paper:#0C0B0A;
  --panel:#15130F;
  --ink:#F2EDE4;
  --muted:rgba(242,237,228,.62);
  --faint:rgba(242,237,228,.40);
  --rule:rgba(242,237,228,.13);
  --accent:#FF5E22;
  --accent-deep:#FF9163;
  --slate:#9BABD2;
  --good:#5ECB8E;
}
:root[data-mode="playful"] body{ background:var(--paper); color:var(--ink); }

/* a little light in the grain, not more shadow */
:root[data-mode="playful"] body::after{
  content:''; position:fixed; inset:0; z-index:1; pointer-events:none; opacity:.05;
  background-image:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'>\
<filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/>\
<feColorMatrix type='saturate' values='0'/></filter>\
<rect width='180' height='180' filter='url(%23n)' opacity='.6'/></svg>");
  mix-blend-mode:screen;
}

/* ---- header ---- */
:root[data-mode="playful"] header{ background:rgba(12,11,10,.84); }
:root[data-mode="playful"] header[data-theme="dark"]{ background:rgba(12,11,10,.9); }
:root[data-mode="playful"] header[data-theme="dark"] .wordmark,
:root[data-mode="playful"] .wordmark{ color:var(--ink); }
:root[data-mode="playful"] header[data-theme="dark"] .navlinks{ background:var(--panel); }
:root[data-mode="playful"] .menu-toggle span{ background:var(--ink); }

/* ---- sections that were already dark become raised panels ---- */
:root[data-mode="playful"] .approach,
:root[data-mode="playful"] .contact,
:root[data-mode="playful"] .howto{
  background:#17140E; color:var(--ink);
  border-top:1px solid var(--rule); border-bottom:1px solid var(--rule);
}
:root[data-mode="playful"] .approach h2,
:root[data-mode="playful"] .contact h2,
:root[data-mode="playful"] .howto h2{ color:var(--ink); }
:root[data-mode="playful"] .contact .btn-ghost{ color:var(--ink); border-color:var(--rule); }
:root[data-mode="playful"] .contact .btn-ghost:hover{ border-color:var(--ink); }

/* ---- the light-surface hardcodes ---- */
:root[data-mode="playful"] .card .num{ color:rgba(242,237,228,.16); }
:root[data-mode="playful"] .card .tags .tag{ color:var(--faint); }
:root[data-mode="playful"] .tag{ background:rgba(242,237,228,.07); color:var(--muted); }
:root[data-mode="playful"] .hc-tag{ background:rgba(12,11,10,.82); color:#F2EDE4; }
:root[data-mode="playful"] .case-bar{ background:rgba(12,11,10,.92); }
:root[data-mode="playful"] .slot{ background:rgba(242,237,228,.03); }
:root[data-mode="playful"] .ba-handle,
:root[data-mode="playful"] .ba-knob{ background:#F7F4EE; color:#15140F; }
:root[data-mode="playful"] .ba-lab{ background:rgba(12,11,10,.78); color:#F7F4EE; }
:root[data-mode="playful"] footer{
  background:#0C0B0A; border-top:1px solid var(--rule); color:var(--faint);
}
:root[data-mode="playful"] .card.tilt,
:root[data-mode="playful"] .door.tilt{
  box-shadow:0 44px 90px -34px rgba(0,0,0,.8), 0 0 0 1px rgba(242,237,228,.06);
}
:root[data-mode="playful"] .hc-media:hover{ box-shadow:0 40px 90px -40px rgba(0,0,0,.85); }
:root[data-mode="playful"] .prod-media:hover img{ box-shadow:0 32px 70px -34px rgba(0,0,0,.8); }
:root[data-mode="playful"] .btn-solid{ background:var(--ink); color:#15140F; }
:root[data-mode="playful"] .btn-solid:hover{ background:var(--accent); color:#15140F; }
:root[data-mode="playful"] .btn-ghost{ color:var(--ink); }

/* images carry their own light, so take a touch of glare off them */
:root[data-mode="playful"] .card img,
:root[data-mode="playful"] .prod-media img,
:root[data-mode="playful"] .about-portrait,
:root[data-mode="playful"] .hc-media img{ filter:brightness(.94) contrast(1.03); }

/* the scene now runs straight into the page */
:root[data-mode="playful"] .im-stage{ margin-bottom:0; }
:root.im-on .stats{ padding-top:clamp(40px,7vh,86px); }

/* card tags stay as plain small caps, not pills */
:root[data-mode="playful"] .card .tags .tag{
  background:none; padding:0; border-radius:0; color:var(--faint);
}

/* ---- everything that assumed ink was dark and paper was light ---- */
:root[data-mode="playful"] .principle{ background:#17140E; }
:root[data-mode="playful"] .principle h4{ color:var(--ink); }
:root[data-mode="playful"] .chip[aria-pressed="true"]{
  background:var(--ink); border-color:var(--ink); color:#15140F;
}
:root[data-mode="playful"] .case-close:hover{
  background:var(--ink); color:#15140F; border-color:var(--ink);
}
:root[data-mode="playful"] .contact .btn-ghost:hover{ border-color:var(--ink); }
:root[data-mode="playful"] header[data-theme="dark"] .navlinks a.current,
:root[data-mode="playful"] header[data-theme="dark"] .navlinks a:hover{ color:var(--ink); }
:root[data-mode="playful"] .ba-range::-webkit-slider-thumb{ background:#F7F4EE; }
:root[data-mode="playful"] .ba-range::-moz-range-thumb{ background:#F7F4EE; }

/* ============================================================
   THE FIELD: one sky behind every page
   ============================================================ */
.im-field{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  width:100%; height:100%; display:block;
}
.im-field.warping{ z-index:9997; }
.im-veil{
  position:fixed; inset:0; z-index:9996; pointer-events:none;
  background:#070605; opacity:0;
  transition:opacity .42s cubic-bezier(.65,.05,.36,1);
}
.im-veil.on{ opacity:1; }
.im-veil.instant{ transition:none; }
.im-glow{
  position:fixed; top:0; left:0; z-index:1; pointer-events:none;
  width:620px; height:620px; border-radius:50%;
  transform:translate3d(-9999px,-9999px,0) translate(-50%,-50%);
  background:radial-gradient(circle, rgba(255,140,60,.11), rgba(255,120,40,.045) 38%, transparent 68%);
  mix-blend-mode:screen; will-change:transform;
}

/* content floats above the sky */
:root.im-field-on body{ background:#090807; }
:root.im-field-on header,
:root.im-field-on main,
:root.im-field-on footer,
:root.im-field-on .im-stage{ position:relative; z-index:2; }
:root.im-field-on body::after{ z-index:3; }

/* sections go transparent so the stars read through them */
:root.im-field-on .section,
:root.im-field-on .prods,
:root.im-field-on .doors,
:root.im-field-on .p-hero,
:root.im-field-on .p-cta{ background:transparent; }
:root.im-field-on .im-stage{ background:transparent; }
:root.im-field-on footer{ background:rgba(7,6,5,.72); }

/* panels become glass floating in it */
:root.im-field-on .card,
:root.im-field-on .door{
  background:rgba(17,15,13,.62);
  backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px);
}
:root.im-field-on .card:hover,
:root.im-field-on .door:hover{ background:rgba(26,23,19,.76); }
:root.im-field-on .grid,
:root.im-field-on .doors-grid{ background:rgba(242,237,228,.09); }
:root.im-field-on .approach,
:root.im-field-on .contact,
:root.im-field-on .howto{ background:rgba(20,17,13,.72); }
:root.im-field-on .principle{ background:rgba(20,17,13,.5); }
:root.im-field-on dialog#case{ background:rgba(10,9,8,.96); backdrop-filter:blur(14px); }
:root.im-field-on .case-bar{ background:rgba(10,9,8,.8); }
:root.im-field-on header{ background:rgba(9,8,7,.72); }
:root.im-field-on header[data-theme="dark"]{ background:rgba(9,8,7,.82); }

/* arrivals come out of depth instead of sliding up */
:root[data-mode="playful"] .reveal{
  opacity:0; transform:translate3d(0,40px,0) scale(.965);
}
:root[data-mode="playful"] .reveal.in{
  opacity:1; transform:none;
  transition:opacity .95s var(--ease-out), transform 1.15s var(--ease-out);
}
:root[data-mode="playful"] .grid,
:root[data-mode="playful"] .doors-grid,
:root[data-mode="playful"] .prods{ perspective:1600px; }

@media (prefers-reduced-motion:reduce){
  .im-glow{ display:none !important; }
  :root[data-mode="playful"] .reveal{ opacity:1; transform:none; }
}
@media (hover:none), (pointer:coarse){
  .im-glow{ display:none !important; }
  :root.im-field-on .card,
  :root.im-field-on .door{ backdrop-filter:none; -webkit-backdrop-filter:none; background:rgba(17,15,13,.82); }
}

/* ============================================================
   TITLE CARDS ON THE INNER PAGES
   ============================================================ */
.im-stage.im-band{
  height:52svh; min-height:330px; margin-bottom:clamp(20px,4vh,54px);
}
@media (max-width:760px){ .im-stage.im-band{ height:42svh; min-height:250px; } }

/* ============================================================
   THE CROSSING
   ============================================================ */
.im-portal{
  position:fixed; inset:0; z-index:10000; pointer-events:none;
  background:#050403; opacity:0;
  display:flex; align-items:center; justify-content:center;
  transition:opacity .35s ease;
}
.im-portal.on{ opacity:1; }
.im-portal.open{ opacity:0; transition:opacity .85s cubic-bezier(.16,1,.3,1); }
.im-portal-ring{
  position:absolute; width:12px; height:12px; border-radius:50%;
  border:1.5px solid rgba(255,110,30,.9);
  box-shadow:0 0 40px rgba(255,110,30,.5);
  animation:imRing 2s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes imRing{
  0%   { width:12px;  height:12px;  opacity:0; border-width:2px; }
  18%  { opacity:1; }
  100% { width:230vmax; height:230vmax; opacity:0; border-width:1px; }
}
.im-portal-copy{
  position:relative; text-align:center; color:#F2EDE4;
  animation:imCopy 2s cubic-bezier(.16,1,.3,1) forwards;
}
.im-portal-copy span{
  display:block; font-family:var(--body); font-size:.7rem; font-weight:600;
  letter-spacing:.34em; text-transform:uppercase; color:rgba(242,237,228,.45);
}
.im-portal-copy b{
  display:block; margin-top:14px; font-family:var(--display); font-weight:500;
  font-size:clamp(1.3rem,3vw,2.1rem); letter-spacing:-.015em;
  font-variation-settings:'opsz' 144,'SOFT' 20;
}
@keyframes imCopy{
  0%   { opacity:0; transform:scale(.94); letter-spacing:.02em; }
  22%  { opacity:1; transform:scale(1); }
  72%  { opacity:1; }
  100% { opacity:0; transform:scale(1.08); }
}
@media (prefers-reduced-motion:reduce){
  .im-portal-ring, .im-portal-copy{ animation:none; }
  .im-portal{ transition:none; }
}

/* ============================================================
   THE MAP
   ============================================================ */
.im-map-btn{
  all:unset; cursor:pointer; display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:50%; border:1px solid var(--rule); color:var(--muted);
  transition:border-color .4s var(--ease-out), color .4s var(--ease-out), transform .5s var(--ease-out);
}
.im-map-btn svg{ width:18px; height:18px; }
.im-map-btn:hover, .im-map-btn:focus-visible{
  border-color:var(--accent); color:var(--accent); transform:scale(1.06);
}
.im-map{
  position:fixed; inset:0; z-index:9999; display:flex; opacity:0; pointer-events:none;
  background:rgba(5,4,3,.82); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  transition:opacity .5s var(--ease-out);
}
.im-map.on{ opacity:1; pointer-events:auto; }
.im-map-canvas{ position:absolute; inset:0; width:100%; height:100%; }
.im-map-title{
  position:absolute; top:clamp(74px,12vh,120px); left:0; right:0; text-align:center; margin:0;
  font-family:var(--body); font-size:.7rem; font-weight:600;
  letter-spacing:.3em; text-transform:uppercase; color:rgba(242,237,228,.4);
}
.im-map-nodes{ position:absolute; inset:0; }
.im-node{
  position:absolute; top:0; left:0; text-decoration:none; text-align:center;
  display:flex; flex-direction:column; align-items:center; gap:7px;
  padding:14px 18px; border-radius:10px; min-width:132px;
  transition:background .4s var(--ease-out);
}
.im-node .dot{
  width:11px; height:11px; border-radius:50%; background:rgba(242,237,228,.6);
  box-shadow:0 0 0 0 rgba(255,110,30,.5);
  transition:background .35s var(--ease-out), box-shadow .5s var(--ease-out), transform .5s var(--ease-out);
}
.im-node .nm{
  font-family:var(--display); font-size:1.12rem; font-weight:600; color:#F2EDE4;
  letter-spacing:-.012em; font-variation-settings:'opsz' 144,'SOFT' 20;
  transition:color .35s var(--ease-out);
}
.im-node .sb{
  font-family:var(--body); font-size:.68rem; font-weight:600; letter-spacing:.13em;
  text-transform:uppercase; color:rgba(242,237,228,.34);
}
.im-node:hover .dot, .im-node:focus-visible .dot{
  background:#FF6E1E; box-shadow:0 0 0 9px rgba(255,110,30,.14); transform:scale(1.25);
}
.im-node:hover .nm{ color:#FF9163; }
.im-node:hover{ background:rgba(242,237,228,.04); }
.im-node.current .dot{ background:#FF6E1E; box-shadow:0 0 0 6px rgba(255,110,30,.1); }
.im-map-close{
  all:unset; cursor:pointer; position:absolute; top:22px; right:26px;
  width:40px; height:40px; border-radius:50%; border:1px solid rgba(242,237,228,.2);
  display:grid; place-items:center; color:rgba(242,237,228,.7);
  transition:border-color .3s, color .3s, background .3s;
}
.im-map-close svg{ width:16px; height:16px; }
.im-map-close:hover{ border-color:#F2EDE4; color:#F2EDE4; background:rgba(242,237,228,.06); }
:root.im-map-open{ overflow:hidden; }

/* ============================================================
   NOTHING SITS PERFECTLY STILL
   ============================================================ */
@keyframes imDrift{
  0%,100%{ transform:translate3d(0,0,0); }
  50%    { transform:translate3d(0,-6px,0); }
}
/* only free-standing media drifts: the card and panel grids share
   hairline gaps, and moving those would tear the rules between them */
:root[data-mode="playful"] .prod-media,
:root[data-mode="playful"] .hc-media{
  animation:imDrift 10s ease-in-out infinite;
}
:root[data-mode="playful"] .prod-media:nth-of-type(2n){ animation-duration:12.5s; animation-delay:-3s; }
:root[data-mode="playful"] .prod-media:hover,
:root[data-mode="playful"] .hc-media:hover{ animation-play-state:paused; }
@media (prefers-reduced-motion:reduce){
  :root[data-mode="playful"] .prod-media,
  :root[data-mode="playful"] .hc-media{ animation:none; }
}

/* ============================================================
   THE UNIVERSE (home page, immersive only)
   ============================================================ */
.uni{
  position:relative; width:100%; height:100svh; min-height:580px;
  overflow:hidden; cursor:default;
}
.uni.pointing{ cursor:pointer; }
.uni-canvas{ display:block; width:100%; height:100%; }

/* the rest of the home steps aside entirely */
:root.uni-on .im-stage,
:root.uni-on .hero,
:root.uni-on .stats,
:root.uni-on .doors,
:root.uni-on .contact,
:root.uni-on footer{ display:none; }
:root.uni-on .im-map-btn{ display:none; }

.uni-hint{
  position:absolute; left:0; right:0; bottom:38px; margin:0; text-align:center;
  font-family:var(--body); font-size:.68rem; font-weight:600;
  letter-spacing:.2em; text-transform:uppercase; color:rgba(242,237,228,.3);
  transition:opacity .6s var(--ease-out);
}
.uni.is-map .uni-hint{ opacity:0; }

.uni-crumb{
  position:absolute; top:26px; left:0; right:0; text-align:center;
  font-family:var(--body); font-size:.66rem; font-weight:600;
  letter-spacing:.2em; text-transform:uppercase; color:rgba(242,237,228,.3);
  pointer-events:none;
}
.uni-crumb i{ font-style:normal; margin:0 10px; opacity:.4; }
.uni-crumb .now{ color:var(--accent); }

.uni-back{
  all:unset; cursor:pointer; position:absolute; top:20px; left:24px;
  display:inline-flex; align-items:center; gap:8px; padding:8px 15px 8px 11px;
  border:1px solid rgba(242,237,228,.18); border-radius:999px;
  font-family:var(--body); font-size:.7rem; font-weight:600;
  letter-spacing:.14em; text-transform:uppercase; color:rgba(242,237,228,.6);
  opacity:0; pointer-events:none;
  transition:opacity .5s var(--ease-out), border-color .3s, color .3s;
}
.uni-back svg{ width:14px; height:14px; }
.uni-back:hover{ border-color:#F2EDE4; color:#F2EDE4; }
.uni.is-map .uni-back{ opacity:1; pointer-events:auto; }

/* ---- the five parts of the site, as stars ---- */
.uni-labels{ position:absolute; inset:0; pointer-events:none; }
.uni-label{
  all:unset; position:absolute; top:0; left:0; cursor:pointer;
  width:190px; margin-left:-95px; text-align:center;
  opacity:0; pointer-events:none;
  transition:opacity .55s var(--ease-out), transform .2s linear;
}
.uni.is-map .uni-label{ opacity:1; pointer-events:auto; }
.uni.is-proj .uni-label:not(.proj){ opacity:0; pointer-events:none; }
.uni.is-case .uni-label:not(.proj){ opacity:0; pointer-events:none; }
.uni-label .t{
  display:block; font-family:var(--display); font-size:1.12rem; font-weight:600;
  color:rgba(242,237,228,.62); letter-spacing:-.012em;
  font-variation-settings:'opsz' 144,'SOFT' 20;
  transition:color .35s var(--ease-out), font-size .35s var(--ease-out);
}
.uni-label .f{
  display:block; margin-top:6px; font-family:var(--body); font-size:.64rem;
  font-weight:600; letter-spacing:.14em; text-transform:uppercase;
  color:rgba(242,237,228,.26); transition:color .35s var(--ease-out);
}
.uni-label.lit .t{ color:#FFF3E9; font-size:1.3rem; }
.uni-label.lit .f{ color:var(--accent); }

/* ---- the case, deeper in ---- */
.uni-panel{
  position:absolute; top:0; right:0; bottom:0; left:0;
  width:min(700px, 90vw); margin:0 auto; padding:148px 52px 72px;
  overflow-y:auto; overscroll-behavior:contain;
  background:linear-gradient(to right, rgba(8,7,6,0) 0,
    rgba(8,7,6,.94) 52px, rgba(8,7,6,.94) calc(100% - 52px), rgba(8,7,6,0) 100%);
  opacity:0; transform:translateY(22px); pointer-events:none;
  transition:opacity .6s var(--ease-out), transform .8s var(--ease-out);
}
.uni-panel.on{ opacity:1; transform:none; pointer-events:auto; }
.uni-panel .k{
  margin:0; font-family:var(--body); font-size:.66rem; font-weight:600;
  letter-spacing:.17em; text-transform:uppercase; color:var(--accent);
}
.uni-panel h2{
  margin:14px 0 0; font-family:var(--display); font-weight:500;
  font-size:clamp(1.5rem,2.6vw,2rem); line-height:1.14; letter-spacing:-.02em;
  color:#F6F1E8; font-variation-settings:'opsz' 144,'SOFT' 20;
}
.uni-panel .fig{
  margin:16px 0 0; font-size:.84rem; color:rgba(242,237,228,.45);
  letter-spacing:.02em;
}
.uni-panel .fig b{
  font-family:var(--display); font-size:1.5rem; font-weight:600; color:#F6F1E8;
  margin-right:7px; letter-spacing:-.02em;
}
.uni-body{
  margin-top:26px; padding-top:24px; border-top:1px solid rgba(242,237,228,.12);
  font-size:.95rem; line-height:1.62; color:rgba(242,237,228,.68);
}
.uni-body h3, .uni-body h4{
  font-family:var(--body); font-size:.66rem; font-weight:600; letter-spacing:.16em;
  text-transform:uppercase; color:rgba(242,237,228,.34); margin:26px 0 8px;
}
.uni-body p{ margin:0 0 14px; }
.uni-body b, .uni-body strong{ color:#F6F1E8; font-weight:600; }
.uni-body img{ width:100%; height:auto; margin:18px 0; border:1px solid rgba(242,237,228,.1); }
.uni-body ul{ margin:0 0 16px; padding-left:18px; }
.uni-body li{ margin-bottom:8px; }
.uni-go, .uni-body a{ color:var(--accent); }
.uni-panel::-webkit-scrollbar{ width:7px; }
.uni-panel::-webkit-scrollbar-thumb{ background:rgba(242,237,228,.16); border-radius:4px; }

@media (max-width:900px){
  .uni{ height:100svh; }
  .uni-panel{
    top:auto; left:0; width:100%; height:62%;
    padding:28px 22px 44px;
    background:linear-gradient(to top, rgba(8,7,6,.98) 78%, rgba(8,7,6,0));
    transform:translateY(26px);
  }
  .uni-label{ width:134px; margin-left:-67px; }
  .uni-label .t{ font-size:.76rem; }
}
@media (prefers-reduced-motion:reduce){
  .uni-label, .uni-panel, .uni-back, .uni-hint{ transition:none; }
}

/* the two galaxies carry their own name */
.uni-cluster{
  position:absolute; top:0; left:0; transform:translate(-50%,-50%);
  margin-left:0; pointer-events:none; opacity:0;
  font-family:var(--body); font-size:.64rem; font-weight:600;
  letter-spacing:.3em; text-transform:uppercase; color:rgba(242,237,228,.26);
  white-space:nowrap; transition:opacity .6s var(--ease-out);
}
.uni-cluster::before{ content:''; }
.uni.is-map .uni-cluster{ opacity:1; }
.uni-cluster.pr{ color:rgba(255,150,100,.3); }
.uni-label{ transition:opacity .35s var(--ease-out), transform .2s linear; }

/* ---- depth three: a constellation of its own ---- */
.uni-grid{ position:absolute; inset:0; pointer-events:none; }
.uni.is-proj .uni-grid{ pointer-events:none; }
.uni-label.proj{
  width:216px; margin-left:-108px; opacity:0; pointer-events:none;
}
.uni.is-proj .uni-label.proj{ pointer-events:auto; }
.uni-label.proj .t{
  font-size:.92rem; line-height:1.26; color:rgba(242,237,228,.6);
  font-variation-settings:'opsz' 36,'SOFT' 20;
}
.uni-label.proj.lit .t{ font-size:1.02rem; color:#FFF3E9; }
.uni-label.proj .f{ font-size:.6rem; margin-top:5px; }

/* the photograph that floats beside a star */
.uni-peek{
  position:absolute; top:0; left:0; margin:0; width:240px; z-index:4;
  background:rgba(14,12,10,.86); border:1px solid rgba(242,237,228,.14);
  backdrop-filter:blur(7px); -webkit-backdrop-filter:blur(7px);
  opacity:0; transform:translateY(10px) scale(.97); pointer-events:none;
  transition:opacity .4s var(--ease-out), transform .55s var(--ease-out);
  overflow:hidden;
}
.uni-peek.on{ opacity:1; transform:none; }
.uni-peek img{
  display:block; width:100%; aspect-ratio:16/10; object-fit:cover;
  filter:brightness(.92);
}
.uni-peek figcaption{
  display:block; padding:12px 13px 14px; font-family:var(--body);
  font-size:.76rem; line-height:1.4; color:rgba(242,237,228,.74);
}
.uni-peek figcaption b{
  display:block; margin-bottom:5px; font-size:.58rem; font-weight:600;
  letter-spacing:.15em; text-transform:uppercase; color:var(--accent);
}
.uni.is-case .uni-peek{ opacity:0; }

/* the breadcrumb is now a path you can click back along */
.uni-crumb{ pointer-events:auto; }
.uni-crumb button{
  all:unset; cursor:pointer; color:inherit;
  transition:color .3s var(--ease-out);
}
.uni-crumb button:hover{ color:#F2EDE4; }

.uni-strip{
  display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; margin-top:6px;
}
.uni-strip img{ width:100%; aspect-ratio:1/1; object-fit:cover; display:block;
  border:1px solid rgba(242,237,228,.1); }
.uni-cap{
  margin:12px 0 0; font-family:var(--body); font-size:.72rem; line-height:1.5;
  color:rgba(242,237,228,.42);
}
.uni-body .strip{ display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin:14px 0; }
.uni-body .strip img{ margin:0; width:100%; aspect-ratio:1/1; object-fit:cover; }
.uni-body video, .uni-panel video.hero-shot{ width:100%; display:block; background:#000; }
.uni-body video{ margin:18px 0; border:1px solid rgba(242,237,228,.1); }

.uni-panel .hero-shot{
  width:100%; height:auto; margin:22px 0 0; display:block;
  border:1px solid rgba(242,237,228,.12);
}

/* the nav lives in the constellation now */
:root[data-mode="playful"] .navlinks{ display:none; }
:root[data-mode="playful"] .menu-toggle{ display:none; }

@media (max-width:820px){
  .uni-grid{ padding:92px 18px 60px; grid-template-columns:repeat(auto-fill, minmax(168px, 1fr)); }
  .uni-label{ width:150px; margin-left:-75px; }
  .uni-label .t{ font-size:.96rem; }
}

/* the constellation button is now a way back, with a label */
.im-map-btn{
  width:auto; height:34px; padding:0 13px 0 10px; border-radius:999px; gap:7px;
  font-family:var(--body); font-size:.7rem; font-weight:600;
  letter-spacing:.12em; text-transform:uppercase; text-decoration:none;
}
.im-map-btn svg{ width:15px; height:15px; }
@media (max-width:1180px){ .im-map-btn span{ display:none; } .im-map-btn{ width:34px; padding:0; } }

/* the sky stays legible at the edges, the reading column does not */
.uni.is-case .uni-panel{
  background:linear-gradient(to right, rgba(8,7,6,0) 0,
    rgba(8,7,6,.97) 56px, rgba(8,7,6,.97) calc(100% - 56px), rgba(8,7,6,0) 100%);
}
@media (max-width:900px){
  .uni.is-case .uni-panel{
    background:linear-gradient(to top, rgba(8,7,6,.99) 88%, rgba(8,7,6,.9) 97%, rgba(8,7,6,0));
  }
}

/* the path sits above the reading column, clear of it */
@media (min-width:901px){
  .uni.is-case .uni-crumb{ z-index:3; }
  .uni.is-case .uni-crumb .now{ display:inline-block; max-width:34ch; overflow:hidden;
    text-overflow:ellipsis; white-space:nowrap; vertical-align:bottom; }
}

/* the figure now lives only in the panel, so give it weight */
.uni-panel .fig{
  margin:18px 0 0; display:flex; align-items:baseline; gap:10px;
  padding-bottom:20px; border-bottom:1px solid rgba(242,237,228,.12);
}
.uni-panel .fig b{
  font-family:var(--display); font-size:clamp(2rem,3.6vw,2.9rem); font-weight:600;
  color:var(--accent); margin:0; line-height:1; letter-spacing:-.03em;
  font-variation-settings:'opsz' 144,'SOFT' 20;
}
.uni-panel .fig{ font-size:.8rem; letter-spacing:.11em; text-transform:uppercase;
  color:rgba(242,237,228,.46); }
