/* ===========================================================
   REFRACTION / ВІДДЗЕРКАЛЕННЯ — site stylesheet
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@700&family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root{
  --bg:            #07070a;
  --bg-deep:       #020203;
  --panel:         #0e0e12;
  --panel-line:    rgba(243,237,226,0.10);
  --ink:           #f4efe4;
  --ink-dim:       #b7b0a2;
  --ink-faint:     #7c7669;

  --amber:         #ff8a4c;
  --amber-soft:    #ffbf8f;
  --amber-dim:     rgba(255,138,76,0.16);

  --ice:           #a9d8ff;
  --ice-soft:      #dff0ff;
  --ice-dim:       rgba(169,216,255,0.14);

  --gold:          #e2c58a;

  --font-display:  'IBM Plex Mono', ui-monospace, monospace;
  --font-body:     'IBM Plex Mono', ui-monospace, monospace;
  --font-title:    'Unbounded', sans-serif; /* only the animated particle title in the hero */

  --container:     1180px;
  --gutter:        clamp(20px, 5vw, 64px);

  --ease:          cubic-bezier(.16,.84,.44,1);
}

*, *::before, *::after{ box-sizing:border-box; }

html{
  scroll-behavior:smooth;
  background:var(--bg);
}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  font-weight:400;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; }
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4,p{ margin:0; }
button{ font-family:inherit; }

::selection{ background:var(--amber); color:#1a0f08; }

/* ---------- scrollbar (webkit) ---------- */
::-webkit-scrollbar{ width:10px; }
::-webkit-scrollbar-track{ background:var(--bg-deep); }
::-webkit-scrollbar-thumb{ background:#2a271f; border-radius:6px; }

/* ---------- helpers ---------- */
.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 var(--gutter);
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.6em;
  font-family:var(--font-display);
  font-size:11.5px;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:var(--amber-soft);
}
.eyebrow::before{
  content:'';
  width:22px; height:1px;
  background:var(--amber-soft);
  opacity:.8;
}
.section-head{
  max-width:720px;
  margin-bottom:clamp(28px,5vw,56px);
}
.section-head h2{
  font-family:var(--font-display);
  font-weight:600;
  font-size:clamp(28px,4.2vw,46px);
  line-height:1.12;
  margin-top:.5em;
  letter-spacing:-.01em;
}
.section-head p{
  margin-top:16px;
  color:var(--ink-dim);
  font-size:16px;
  max-width:56ch;
}
section{ position:relative; }
.pad{ padding:clamp(48px,5.5vw,84px) 0; }

/* fade-up reveal */
.reveal{
  opacity:0;
  transform:translateY(28px);
  transition:opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-in{ opacity:1; transform:none; }
.reveal-stagger > *{ transition-delay:calc(var(--i,0) * 90ms); }

/* ---------- language toggling ---------- */
[data-lang]{ display:none; }
html[data-active-lang="ua"] [data-lang="ua"]{ display:revert; }
html[data-active-lang="en"] [data-lang="en"]{ display:revert; }
html[data-active-lang="ua"] span[data-lang="ua"],
html[data-active-lang="en"] span[data-lang="en"]{ display:inline; }
/* the other language stays hidden even when a component sets its own display (grid, flex...) */
html[data-active-lang="ua"] [data-lang="en"],
html[data-active-lang="en"] [data-lang="ua"]{ display:none !important; }

/* ambient canvases */
#bg-grain{
  position:fixed; inset:0; z-index:2;
  pointer-events:none;
  opacity:.05;
  mix-blend-mode:overlay;
}
#bg-particles{
  position:fixed; inset:0; z-index:0;
  pointer-events:none;
}

/* ===========================================================
   HEADER
   =========================================================== */
.site-header{
  position:fixed; top:0; left:0; right:0; z-index:100;
  display:flex; align-items:center; justify-content:space-between;
  padding:20px var(--gutter);
  transition:background .4s var(--ease), padding .4s var(--ease), border-color .4s var(--ease);
  border-bottom:1px solid transparent;
}
.site-header.is-scrolled{
  background:rgba(5,5,7,0.82);
  backdrop-filter:blur(10px);
  padding-top:14px; padding-bottom:14px;
  border-bottom-color:var(--panel-line);
}
.brand{
  display:flex; flex-direction:column; line-height:1;
  font-family:var(--font-display);
  letter-spacing:.02em;
}
.brand-ua, .brand-en{ display:block; }
.brand strong{
  font-size:15px; font-weight:600; letter-spacing:.06em;
}
.brand span.sub{
  font-size:9.5px; letter-spacing:.24em; color:var(--ink-faint);
  text-transform:uppercase; margin-top:3px;
}

.site-nav{
  display:flex; align-items:center; gap:34px;
}
.site-nav a{
  font-size:13px; letter-spacing:.03em; color:var(--ink-dim);
  position:relative; padding:4px 0;
  transition:color .3s;
}
.site-nav a:hover{ color:var(--ink); }
.site-nav a::after{
  content:''; position:absolute; left:0; right:100%; bottom:0; height:1px;
  background:var(--amber-soft);
  transition:right .35s var(--ease);
}
.site-nav a:hover::after{ right:0; }
.site-nav a[aria-current="page"]{ color:var(--ink); }
.site-nav a[aria-current="page"]::after{ right:0; }
.mobile-nav a[aria-current="page"]{ color:var(--amber-soft); }

.header-tools{ display:flex; align-items:center; gap:18px; }

.lang-toggle{
  display:flex; border:1px solid var(--panel-line); border-radius:20px; overflow:hidden;
}
.lang-toggle button{
  background:none; border:none; color:var(--ink-faint);
  font-size:11.5px; letter-spacing:.1em; padding:7px 13px; cursor:pointer;
  transition:color .3s, background .3s;
}
.lang-toggle button.is-active{ background:var(--amber-dim); color:var(--amber-soft); }

.burger{
  display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; padding:6px;
}
.burger span{ width:22px; height:1px; background:var(--ink); display:block; }

/* mobile nav overlay */
.mobile-nav{
  position:fixed; inset:0; z-index:99;
  background:rgba(4,4,6,.97);
  display:flex; flex-direction:column; align-items:flex-start; justify-content:center;
  gap:26px; padding:0 34px;
  opacity:0; pointer-events:none;
  transition:opacity .4s var(--ease);
}
.mobile-nav.is-open{ opacity:1; pointer-events:auto; }
.mobile-nav a{
  font-family:var(--font-display); font-size:26px; color:var(--ink);
}

/* ===========================================================
   HERO
   =========================================================== */
.hero{
  --hero-title-size:clamp(30px, 7vw, 96px);
  height:100svh; min-height:620px;
  position:relative;
  display:grid; grid-template-rows:1fr auto 1fr;
  overflow:hidden;
}
.hero-center{
  grid-row:2;
  position:relative; top:-75px; z-index:2;
  display:flex; justify-content:center;
  padding:0 var(--gutter);
}
.hero-center::before{
  content:''; position:absolute; left:50%; top:50%; z-index:-1;
  width:min(1200px, 130vw); height:clamp(220px, 34vw, 420px);
  transform:translate(-50%,-50%);
  background:radial-gradient(ellipse at center, rgba(2,2,3,.78) 0%, rgba(2,2,3,.42) 42%, transparent 72%);
  opacity:calc(1 - var(--lamp, 0) * .45);
  pointer-events:none;
}
.hero-bg{
  position:absolute; inset:0; z-index:0;
  background:url('../img/bg/cave-hero.jpg') center 50% / cover no-repeat;
  animation:hero-drift 26s ease-in-out infinite alternate;
}
/* right side: the same photo at higher exposure, revealed through a soft mask,
   so the lit rock gets brighter while shadows keep their depth */
.hero-bg::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  background:inherit;
  animation:none;
  filter:brightness(1.75) saturate(1.25) contrast(1.05);
  -webkit-mask-image:radial-gradient(ellipse 52% 68% at 80% 42%, #000 0%, rgba(0,0,0,.65) 40%, transparent 74%);
          mask-image:radial-gradient(ellipse 52% 68% at 80% 42%, #000 0%, rgba(0,0,0,.65) 40%, transparent 74%);
}
/* Shelf lamps in the photo light up while the cursor moves over the title.
   --lamp (0..1) and the lamp position/size (--lamp-x/y/rx/ry, px) are set in JS.
   The layer drifts with the photo so the light stays on the lamps. */
.hero-lamps{
  position:absolute; inset:0; z-index:1; pointer-events:none;
  animation:hero-drift 26s ease-in-out infinite alternate;
}
.hero-lamps > div{ position:absolute; inset:0; }
.hero-lamps-shade{
  /* at rest the shelf area sits in darkness */
  background:radial-gradient(ellipse calc(var(--lamp-rx,0px) * 2.2) calc(var(--lamp-ry,0px) * 1.9) at var(--lamp-x,50%) var(--lamp-y,50%), rgba(0,0,0,.7) 0%, rgba(0,0,0,.35) 50%, transparent 100%);
  opacity:calc(1 - var(--lamp, 0));
}
.hero-lamps-glow{
  /* warm light spilling onto the cave around the shelf */
  background:radial-gradient(ellipse calc(var(--lamp-rx,0px) * 3.2) calc(var(--lamp-ry,0px) * 2.4) at var(--lamp-x,50%) var(--lamp-y,50%), rgba(255,196,140,.28) 0%, rgba(255,160,100,.1) 40%, transparent 72%);
  mix-blend-mode:screen;
  opacity:var(--lamp, 0);
}
.hero-lamps-lit,
.hero-lamps-bloom{
  background:url('../img/bg/cave-hero.jpg') center 50% / cover no-repeat;
  -webkit-mask-image:radial-gradient(ellipse var(--lamp-rx,0px) var(--lamp-ry,0px) at var(--lamp-x,50%) var(--lamp-y,50%), #000 0%, rgba(0,0,0,.6) 45%, transparent 100%);
          mask-image:radial-gradient(ellipse var(--lamp-rx,0px) var(--lamp-ry,0px) at var(--lamp-x,50%) var(--lamp-y,50%), #000 0%, rgba(0,0,0,.6) 45%, transparent 100%);
}
.hero-lamps-lit{
  /* saturate before brightening so each lamp keeps its own colour instead of clipping to white */
  filter:saturate(2) brightness(1.5);
  opacity:var(--lamp, 0);
}
.hero-lamps-bloom{
  /* soft coloured halo around each lamp */
  filter:blur(7px) saturate(2.2) brightness(1.6);
  mix-blend-mode:screen;
  opacity:calc(var(--lamp, 0) * .45);
}
@keyframes hero-drift{
  from{ transform:scale(1.04) translate3d(0,0,0); }
  to{ transform:scale(1.10) translate3d(-1%,-1%,0); }
}
.hero::before{
  content:''; position:absolute; inset:0; z-index:1;
  background:
    linear-gradient(180deg, rgba(3,3,4,.15) 0%, rgba(3,3,4,.05) 24%, rgba(3,3,4,.5) 48%, rgba(2,2,3,.82) 66%, rgba(2,2,3,.96) 85%, var(--bg) 100%);
}
.hero::after{
  content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
  /* light vignette: corners and edges softly fall off, centre stays open */
  background:
    /* left edge: starts at 90% black and fades out over ~150px */
    linear-gradient(90deg, rgba(0,0,0,.9) 0, rgba(0,0,0,.55) 55px, rgba(0,0,0,.2) 110px, transparent 150px),
    /* vignette centred right of middle, so the right side stays open and bright */
    radial-gradient(ellipse 85% 80% at 62% 42%, transparent 50%, rgba(0,0,0,.28) 78%, rgba(0,0,0,.55) 100%);
}
.hero-content{
  grid-row:3; align-self:end;
  position:relative; z-index:2;
  /* leaves room for the mirrored reflection drawn under the title */
  padding:calc(var(--hero-title-size) * .45 + 32px) var(--gutter) clamp(40px,5vw,72px);
}
.hero-title-wrap{
  position:relative;
  cursor:default;
  width:fit-content;
  max-width:100%;
  margin-left:auto;
  margin-right:auto;
}
.hero-title-particles{
  position:absolute; left:0; top:0;
  pointer-events:none;
  opacity:1;
}
.hero h1{
  font-family:var(--font-title); font-weight:700;
  font-size:var(--hero-title-size);
  line-height:1.02; letter-spacing:-.005em;
  text-transform:uppercase;
  text-align:center;
  white-space:nowrap;
  color:transparent;
  opacity:0;
}
@media (prefers-reduced-motion: reduce){
  .hero-title-particles{ display:none; }
  .hero h1{ opacity:1; color:#f4efe4; }
}
.hero-tagline{
  max-width:760px;
  font-size:clamp(15px,1.6vw,19px); color:var(--ink-dim); font-weight:300;
}
.hero-credit{
  margin-top:24px;
  display:flex; flex-direction:column; align-items:flex-start; /* role above name, whatever display the language toggle gives them */
  font-family:var(--font-display); font-size:12px; letter-spacing:.06em;
}
.hero-credit .role{
  color:var(--ink-faint); letter-spacing:.18em; text-transform:uppercase; font-size:10.5px; margin-bottom:6px;
}
.hero-credit .name{ font-size:17px; color:var(--amber-soft); }
.hero-year{
  margin-top:14px;
  font-family:var(--font-display); font-size:13px; letter-spacing:.14em; color:var(--ink-faint);
}

.scroll-cue{
  position:absolute; right:var(--gutter); bottom:36px; z-index:2;
  display:flex; flex-direction:column; align-items:center; gap:10px;
  color:var(--ink-faint); font-size:10.5px; letter-spacing:.2em; text-transform:uppercase;
  writing-mode:vertical-rl;
}
.scroll-cue .line{
  width:1px; height:52px; background:linear-gradient(var(--ink-faint), transparent);
  writing-mode:horizontal-tb;
  position:relative; overflow:hidden;
}
.scroll-cue .line::after{
  content:''; position:absolute; left:0; top:-100%; width:100%; height:100%;
  background:linear-gradient(var(--amber-soft), transparent);
  animation:cue-fall 2.6s ease-in-out infinite;
}
@keyframes cue-fall{
  0%{ top:-100%; } 60%{ top:100%; } 100%{ top:100%; }
}

/* ===========================================================
   ABOUT
   =========================================================== */
.about{ background:var(--bg); overflow-x:clip; } /* the quote's particle canvas reaches past the column */
.about-grid{
  display:grid; grid-template-columns:1fr; gap:clamp(30px,6vw,64px);
  align-items:start;
}
.about-text{ width:100%; max-width:980px; margin-left:auto; margin-right:auto; }
.about-video{ width:100%; max-width:820px; margin-left:auto; margin-right:auto; }
.about-text p{
  color:var(--ink-dim); font-size:16px; margin-bottom:18px;
}
.about-text p:first-of-type{
  color:var(--ink); font-size:clamp(17px,1.9vw,21px); font-weight:300; line-height:1.55;
}

.about-video .eyebrow{ margin-bottom:16px; }

.quote-block{
  margin-top:clamp(50px,8vw,90px);
  padding:clamp(28px,4vw,46px) clamp(24px,4vw,56px);
  border-top:1px solid var(--panel-line); border-bottom:1px solid var(--panel-line);
  position:relative;
}
.quote-block::before{
  content:'\201C';
  position:absolute; left:0; top:2px;
  font-family:var(--font-display); font-size:84px; color:var(--amber-dim); line-height:1;
}
.quote-block p{
  font-family:var(--font-display); font-weight:300;
  font-size:clamp(19px,2.6vw,30px); line-height:1.35; color:var(--ink);
  max-width:820px;
}
/* the quote is redrawn as dust particles (same engine as the hero title), with its reflection below */
.quote-particles{ position:absolute; left:0; top:0; pointer-events:none; }
.quote-block.pt-on{ padding-bottom:calc(clamp(28px,4vw,46px) + 44px); }
.quote-block.pt-on p{ color:transparent; }

/* ===========================================================
   VIDEO EMBED (used inside About)
   =========================================================== */
/* the wireframe box sits behind the video, so only its outer lines show */
.video-frame .video-embed{ z-index:1; }
.video-embed{
  position:relative; width:100%; aspect-ratio:16/9;
  border-radius:8px; overflow:hidden; cursor:pointer;
  border:1px solid var(--panel-line); background:#000;
  box-shadow:0 50px 90px -40px rgba(0,0,0,.75);
}
.video-embed-thumb{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  filter:brightness(.7) saturate(1.05);
  transition:filter .4s, transform .6s var(--ease);
}
.video-embed:hover .video-embed-thumb{ filter:brightness(.6) saturate(1.1); transform:scale(1.02); }
.video-embed-play{
  position:absolute; inset:0; margin:auto; width:78px; height:78px; border-radius:50%;
  background:var(--amber); border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:transform .3s var(--ease), background .3s;
  box-shadow:0 0 0 0 rgba(255,138,76,.5);
  animation:play-pulse 2.6s ease-in-out infinite;
}
.video-embed:hover .video-embed-play{ transform:scale(1.08); background:var(--amber-soft); }
.video-embed-play svg{ width:26px; height:26px; fill:#1a0f08; margin-left:4px; }
@keyframes play-pulse{
  0%, 100%{ box-shadow:0 0 0 0 rgba(255,138,76,.35); }
  50%{ box-shadow:0 0 0 18px rgba(255,138,76,0); }
}
.video-embed iframe{
  position:absolute; inset:0; width:100%; height:100%; border:0;
}

/* ===========================================================
   EXPERIENCE — interactive: the switch lights up the sculpture
   =========================================================== */
.visually-hidden{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.experience{ background:var(--bg); overflow:hidden; }
.exp-stage{
  --exp-gap:clamp(30px,5vw,64px);
  --exp-content:calc(min(100vw, var(--container)) - 2 * var(--gutter));
  /* same text position as the old two-column layout, moved 100px to the left */
  --exp-text-left:calc(max(0px, (100vw - var(--container)) / 2) + var(--gutter) + .45 * (var(--exp-content) - var(--exp-gap)) + var(--exp-gap) - 100px);
  --exp-text-w:calc(.55 * (var(--exp-content) - var(--exp-gap)));
  position:relative;
  min-height:clamp(560px, 80vh, 860px);
  padding:clamp(44px,5vw,80px) 0;
}
/* warm spill into the section once the light is on */
.exp-stage::before{
  content:''; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(ellipse 45% 60% at 20% 55%, rgba(255,140,70,.10), transparent 70%);
  opacity:0; transition:opacity 1.2s ease;
}
.experience.is-on .exp-stage::before{ opacity:1; }

.exp-gnome{
  position:absolute; left:0; top:0; bottom:0;
  width:calc(var(--exp-text-left) + 40px);
  /* left side runs off the screen edge; right, top and bottom melt into the background */
  -webkit-mask-image:
    linear-gradient(to right, #000 58%, transparent 97%),
    linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite:source-in;
          mask-image:
    linear-gradient(to right, #000 58%, transparent 97%),
    linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
          mask-composite:intersect;
}
.exp-gnome img{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; object-position:50% 48%;
}
.exp-gnome-on{ opacity:0; transition:opacity .6s ease; }
.experience.is-on .exp-gnome-on{ opacity:1; animation:gnome-flicker .9s ease-out; }
@keyframes gnome-flicker{
  0%{ opacity:0; } 8%{ opacity:.7; } 14%{ opacity:.12; } 22%{ opacity:.85; }
  30%{ opacity:.35; } 45%{ opacity:1; } 100%{ opacity:1; }
}

.exp-body{
  position:relative; z-index:1;
  display:flex; flex-direction:column;
  padding-left:var(--exp-text-left);
  padding-right:var(--gutter);
}
.exp-switch{
  --sw-w:clamp(120px, 11vw, 170px);
  --sw-h:calc(var(--sw-w) * 532 / 408);
  /* desktop: sits to the right of the first two lines of the text,
     moved 200px from the screen edge towards the text but never closer than 48px to it */
  position:absolute;
  left:max(var(--exp-text-left) + var(--exp-text-w) + 48px, 100% - var(--gutter) - var(--sw-w) - 200px);
  top:calc(var(--exp-line2) - var(--sw-h) * .37 + 200px); /* .37 = centre of the plate within the cut-out image; +200px lowers it on desktop */
  width:var(--sw-w); height:var(--sw-h);
  padding:0; border:0; background:none; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  --sw-flip:-1; /* mirrored horizontally */
  transform:scaleX(var(--sw-flip));
  transition:transform .25s var(--ease);
  animation:sw-pulse 2.4s ease-in-out infinite;
}
/* the image is cut out along the plate contour, so drop-shadow glows around the switch itself */
@keyframes sw-pulse{
  0%, 100%{ filter:drop-shadow(0 0 0 rgba(255,184,120,0)) brightness(1); }
  50%{ filter:drop-shadow(0 0 3px rgba(255,214,170,.28)) drop-shadow(0 0 16px rgba(255,160,90,.22)) brightness(1.12); }
}
.exp-switch img{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.exp-switch-on{ opacity:0; transition:opacity .25s ease; }
.experience.is-on .exp-switch-on{ opacity:1; }
/* game-style sweep of light across the plate, clipped to its shape */
.exp-switch::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(115deg, transparent 43%, rgba(255,230,200,.26) 47.5%, rgba(255,255,255,.62) 50%, rgba(255,230,200,.26) 52.5%, transparent 57%) no-repeat;
  background-size:260% 100%;
  background-position:130% 0;
  -webkit-mask:url('../img/exp/switch-off.webp') center / contain no-repeat;
          mask:url('../img/exp/switch-off.webp') center / contain no-repeat;
  mix-blend-mode:screen;
  animation:sw-shine 3.2s ease-in-out infinite;
}
@keyframes sw-shine{
  0%{ background-position:130% 0; }
  38%, 100%{ background-position:-30% 0; }
}
.exp-switch:hover{ transform:scale(calc(var(--sw-flip) * 1.04), 1.04); }
.exp-switch:active{ transform:scale(calc(var(--sw-flip) * .96), .96); }
.exp-switch:focus-visible{ outline:2px solid rgba(255,191,143,.7); outline-offset:6px; border-radius:6px; }
/* once the light is on the hint calms down to a steady warm glow */
.experience.is-on .exp-switch{ animation:none; filter:drop-shadow(0 0 10px rgba(255,150,80,.35)); }
.experience.is-on .exp-switch::after{ animation:none; opacity:0; }
@media (prefers-reduced-motion: reduce){
  .exp-switch, .exp-switch::after{ animation:none; }
}
/* 15–17" laptop screens: gnome photo and switch 20% smaller */
@media (min-width: 981px) and (max-width: 1680px){
  .exp-gnome{ transform:scale(.8); transform-origin:0 50%; }
  .exp-switch{ --sw-w:calc(clamp(120px, 11vw, 170px) * .8); }
  /* text 150px wider, grown to the left (the right side is taken by the switch) */
  .exp-body{ padding-left:calc(var(--exp-text-left) - 150px); }
  .exp-body .exp-text{ max-width:calc(var(--exp-text-w) + 150px); }
}
/* monitors larger than 17": text 75px wider (to the right), switch 50px further right */
@media (min-width: 1681px){
  .exp-body .exp-text{ max-width:calc(var(--exp-text-w) + 75px); }
  .exp-switch{ left:max(var(--exp-text-left) + var(--exp-text-w) + 75px + 48px, 100% - var(--gutter) - var(--sw-w) - 150px); }
}

.exp-text{
  /* vertical centre between the 1st and 2nd line of the first paragraph (eyebrow + gap + one line) */
  max-width:var(--exp-text-w);
}
.exp-body{ --exp-line2:calc(26px + 22px + clamp(16px,1.7vw,19px) * 1.75); }
.exp-text p{
  font-size:clamp(16px,1.7vw,19px); line-height:1.75; color:var(--ink-dim);
  font-weight:300; margin-top:24px;
}
.exp-text .eyebrow{ margin-bottom:6px; }
.exp-text > div > p:first-child{ margin-top:22px; }

/* ===========================================================
   GALLERY / ARTIFACTS
   =========================================================== */
.gallery{ background:var(--bg); }
/* objects of memory: images travel right-to-left around a large, flat-viewed circle.
   Size/radius come from JS (--orbit-s, --orbit-h); every item is positioned per frame. */
.orbit{
  --orbit-s:220px;
  position:relative;
  height:var(--orbit-h, 440px);
  margin-top:clamp(8px, 2vw, 24px);
  z-index:2;
  /* clip only the sides, so an enlarged image may spill over the text above and below;
     items fade out on their own as they turn towards the edges */
  overflow:hidden;
  overflow-x:clip; overflow-y:visible;
  touch-action:pan-y;
}
.orbit-item{
  position:absolute; left:50%; top:50%;
  width:var(--orbit-s); height:var(--orbit-s);
  margin:calc(var(--orbit-s) / -2) 0 0 calc(var(--orbit-s) / -2);
  will-change:transform, opacity;
  cursor:zoom-in;
  -webkit-tap-highlight-color:transparent;
}
.orbit-item img{
  width:100%; height:100%; object-fit:contain;
  pointer-events:none; user-select:none;
  /* the renders sit on near-black; fade the square edges into the section */
  -webkit-mask-image:radial-gradient(closest-side, #000 78%, transparent 100%);
          mask-image:radial-gradient(closest-side, #000 78%, transparent 100%);
  transition:filter .5s var(--ease);
}
.orbit-item.is-active img{ filter:brightness(1.1) saturate(1.05); }
/* one dot per object: the highlight glides along with the ring; press and sweep along the row to spin through */
.orbit-dots{
  --pitch:18px;
  position:relative; z-index:3;
  display:flex; justify-content:center;
  width:max-content; margin:clamp(14px, 2vw, 24px) auto 0;
  touch-action:none; cursor:grab;
}
.orbit-dot{
  --k:0;
  position:relative;
  width:var(--pitch); height:28px;
  padding:0; border:0; background:none; cursor:inherit;
  -webkit-tap-highlight-color:transparent;
}
.orbit-dot::before, .orbit-dot::after{
  content:''; position:absolute; left:50%; top:50%;
  width:6px; height:6px; margin:-3px 0 0 -3px; border-radius:3px;
  transform:scaleX(calc(1 + var(--k) * 2));
}
.orbit-dot::before{ background:rgba(236,228,218,.22); }
.orbit-dot::after{
  background:var(--amber);
  opacity:var(--k);
  box-shadow:0 0 8px rgba(255,170,100,.55);
}
.orbit-dots.is-dragging, .orbit-dots.is-dragging .orbit-dot{ cursor:grabbing; }
.orbit-dot:focus-visible{ outline:none; }
.orbit-dot:focus-visible::before{ box-shadow:0 0 0 2px rgba(255,191,143,.7); }
@media (max-width: 420px){ .orbit-dots{ --pitch:15px; } }

.gallery-note{
  margin-top:26px; font-size:12.5px; color:var(--ink-faint);
}


/* ===========================================================
   TEAM
   =========================================================== */
.team{ background:var(--panel); border-top:1px solid var(--panel-line); border-bottom:1px solid var(--panel-line); }
.team-grid{
  display:grid; grid-template-columns:repeat(4,1fr);
  gap:clamp(34px, 3.4vw, 48px);
  padding:28px 22px 12px 8px;           /* room for the wireframe boxes that reach past each card */
}
.team-card{
  padding:34px 24px; text-align:center;
  display:flex; flex-direction:column; gap:18px; min-height:220px;
  align-items:center; justify-content:center;
}
/* icon, role and name sit on rows shared by every card in the row, so they line up across the cards */
@supports (grid-template-rows:subgrid){
  .team-card{
    display:grid; grid-row:span 3; grid-template-rows:subgrid; row-gap:14px;
    justify-items:center; align-items:center;
  }
  .team-card .name{ align-self:start; }
}
.team-card{
  position:relative;
}
.team-glyph{ width:34px; height:34px; opacity:.85; }
.team-card .role{
  font-size:10.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--ink-faint);
}
.team-card .name{
  font-family:var(--font-display); font-size:19px; line-height:1.3; margin-top:6px; color:var(--ink);
}
/* hand-drawn wireframe box around each card (built in JS): cold white lines, like the VR scene */
.wf-card{ position:relative; }
.wf-card .wf{
  position:absolute; left:-28px; top:-28px; pointer-events:none; overflow:visible;
  filter:drop-shadow(0 0 2px rgba(170,205,255,.45));
  transition:filter .5s ease;
}
.wf line{
  fill:none; stroke-linecap:round;
  stroke-dasharray:1; stroke-dashoffset:1;   /* drawn in once the grid is revealed */
}
.wf .wf-front{ stroke:rgba(225,236,255,.78); stroke-width:1.3; }
.wf .wf-thin{ stroke:rgba(225,236,255,.4); stroke-width:.8; }
.wf .wf-back{ stroke:rgba(200,218,255,.38); stroke-width:1; }
.wf .wf-inner{ stroke:rgba(225,236,255,.28); stroke-width:1; }
.wf .wf-ray{ stroke:rgba(200,218,255,.2); stroke-width:1; }
.wf-grid.wf-play .wf line{ animation:wf-draw .9s var(--ease) forwards; animation-delay:var(--d); }
.wf-grid.wf-play .wf .wf-dash{ animation-name:wf-draw-dash; }
@keyframes wf-draw{ to{ stroke-dashoffset:0; } }
@keyframes wf-draw-dash{ 0%{ stroke-dasharray:.012 .018; stroke-dashoffset:1; opacity:0; } 100%{ stroke-dasharray:.012 .018; stroke-dashoffset:0; opacity:1; } }
.wf-grid.wf-now .wf line{ animation:none; stroke-dashoffset:0; }
.wf-grid.wf-now .wf .wf-dash{ stroke-dasharray:.012 .018; opacity:1; }
.wf-card:hover .wf{ filter:drop-shadow(0 0 3px rgba(170,205,255,.8)) brightness(1.35); }
@media (prefers-reduced-motion: reduce){
  .wf-grid .wf line{ animation:none !important; stroke-dashoffset:0; }
  .wf-grid .wf .wf-dash{ stroke-dasharray:.012 .018; }
}

/* ===========================================================
   SPECIFICATIONS
   =========================================================== */
.specs{ background:var(--bg); }
/* team + specs read as one group and, on a laptop, fit on one screen together */
.team-group .section-head{ margin-bottom:clamp(14px, 2vw, 24px); }
.team-group .team-grid{ padding-top:24px; padding-bottom:8px; }
.team-group .team-card{ min-height:0; padding:18px 16px; gap:10px; }
.team-group .team-card .name{ font-size:17px; margin-top:2px; }
.team-group .specs-layout{ margin-top:clamp(32px, 4vw, 48px); }
.team-group .spec{ padding:8px 0; }
.team-group .spec:first-child{ padding-top:0; }
.story{ background:var(--bg); }
.story .history-cta{ margin-top:0; }

/* photo on the left, a narrow column of specs on the right (photo first on phones);
   the rows use the same type as the "Special thanks" list */
.specs-layout{
  display:grid; grid-template-columns:minmax(0, 1.5fr) minmax(0, 1fr);
  gap:clamp(28px, 5vw, 72px); align-items:stretch;
}
.specs-photo{ margin:0; min-height:280px; border-radius:6px; overflow:hidden; border:1px solid var(--panel-line); }
.specs-photo img{ width:100%; height:100%; object-fit:cover; display:block; }
/* (the language toggle makes the eyebrow inline, so the gap lives on the list) */
.specs-grid{ display:flex; flex-direction:column; margin-top:14px; }
.spec{
  display:grid; grid-template-columns:minmax(0, .9fr) minmax(0, 1.1fr); gap:14px; align-items:baseline;
  padding:11px 0; border-bottom:1px solid var(--panel-line);
}
.spec:first-child{ padding-top:0; }
.spec .spec-label{ font-size:14.5px; color:var(--ink-faint); }
.spec .spec-value{ font-size:14.5px; color:var(--ink-dim); }
@media (max-width: 860px){ .specs-layout{ grid-template-columns:1fr; } .specs-photo{ min-height:0; aspect-ratio:16/9; } }

/* ===========================================================
   THANKS / MATERIALS
   =========================================================== */
.thanks-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:clamp(30px,6vw,80px);
}
.thanks-col h3{
  font-family:var(--font-display); font-size:13px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--amber-soft); margin-bottom:18px;
}
.thanks-col ul li{
  padding:11px 0; border-bottom:1px solid var(--panel-line);
  font-size:14.5px; color:var(--ink-dim);
}
.thanks-col ul li:first-child{ padding-top:0; }
.materials-list li{
  padding:14px 0; border-bottom:1px solid var(--panel-line);
  font-size:14px; color:var(--ink-dim); line-height:1.55;
}

/* ===========================================================
   CREDITS / PROGRAM
   =========================================================== */
.credits{ background:var(--bg); }
/* the residency text uses the same column and paragraph styles as the project description (.about-text) */
.credits-title{
  font-family:var(--font-display); font-weight:600;
  font-size:clamp(24px,3vw,34px); line-height:1.15; letter-spacing:-.01em;
  margin:.55em 0 .9em;
}
.implemented{
  margin-top:44px; display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px 30px;
}
.implemented li{
  font-family:var(--font-display); font-size:13.5px; color:var(--ink); letter-spacing:.02em;
  padding-left:16px; position:relative;
}
.implemented li::before{
  content:''; position:absolute; left:0; top:8px; width:6px; height:6px; background:var(--amber-soft); border-radius:50%;
}
.support-line,
.credits-copy p.support-line{
  margin-top:22px; font-size:12.5px; font-weight:400; line-height:1.6; color:var(--ink-faint);
}
.logo-strip{
  /* about the same distance as between two sections, and the same again below the logos
     (0.5 x section padding here + the section's own bottom padding = 1.5 x, like above) */
  margin-top:calc(1.5 * clamp(48px,5.5vw,84px));
  padding:10px 0 calc(10px + .5 * clamp(48px,5.5vw,84px));   /* padding, not margin: a trailing margin would collapse */
}
/* the partner logos are dark artwork: turn them white so they sit straight on the site background */
.logo-strip img{ width:100%; height:auto; display:block; filter:brightness(0) invert(1); opacity:.88; }

.history-cta{
  margin-top:56px; padding:clamp(30px,5vw,56px); border:1px solid var(--panel-line); border-radius:8px;
  display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap;
  background:linear-gradient(135deg, rgba(255,138,76,.06), rgba(169,216,255,.05));
}
.history-cta h3{ font-family:var(--font-display); font-size:clamp(20px,2.6vw,28px); font-weight:600; max-width:22ch; }
.history-cta p{ color:var(--ink-dim); margin-top:10px; max-width:44ch; font-size:14.5px; }
/* phones: the plaque stacks and everything is centred, the cart button included */
@media (max-width: 760px){
  .history-cta{ flex-direction:column; align-items:center; text-align:center; }
  .history-cta h3, .history-cta p{ margin-left:auto; margin-right:auto; }
}
/* "Read the story" button drawn as the wireframe mine cart; the label sits in the cart's empty side panel */
.btn-vagon{
  position:relative; display:block; flex:none;
  width:clamp(230px, 24vw, 300px); aspect-ratio:1426 / 999;
  background:url('../img/vagon.webp') center / contain no-repeat;
  color:var(--ink);
  transition:transform .5s var(--ease), filter .4s ease;
}
.btn-vagon-label{
  /* the panel's position inside the image */
  position:absolute; left:19.8%; top:14.2%; width:51.9%; height:30.4%;
  display:flex; align-items:center; justify-content:center; text-align:center;
  padding:0 6px;
  font-family:var(--font-display); font-size:12.5px; letter-spacing:.1em; text-transform:uppercase; line-height:1.3;
  transition:color .4s ease;
}
.btn-vagon:hover{ transform:translateX(8px); filter:drop-shadow(0 0 6px rgba(255,170,100,.45)) brightness(1.15); }
.btn-vagon:hover .btn-vagon-label{ color:var(--amber-soft); }
.btn-vagon:active{ transform:translateX(4px) scale(.98); }
.btn-vagon:focus-visible{ outline:2px solid rgba(255,191,143,.7); outline-offset:6px; border-radius:6px; }
.btn{
  display:inline-flex; align-items:center; gap:12px;
  padding:14px 26px; border:1px solid var(--ink); border-radius:40px;
  font-size:13px; letter-spacing:.04em; white-space:nowrap;
  transition:background .3s, color .3s, border-color .3s;
}
.btn:hover{ background:var(--amber); border-color:var(--amber); color:#1a0f08; }
.btn svg{ width:14px; height:14px; }

/* ===========================================================
   FOOTER
   =========================================================== */
.site-footer{
  border-top:1px solid var(--panel-line); padding:56px 0 34px;
  background:var(--bg-deep);
}
.footer-top{
  display:flex; justify-content:space-between; gap:40px; flex-wrap:wrap;
  padding-bottom:36px; margin-bottom:26px; border-bottom:1px solid var(--panel-line);
}
.footer-brand strong{ font-family:var(--font-display); font-size:18px; letter-spacing:.03em; }
.footer-brand p{ margin-top:10px; color:var(--ink-faint); font-size:13px; max-width:36ch; }
.footer-links{ display:flex; gap:56px; flex-wrap:wrap; }
.footer-links h4{
  font-size:10.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--ink-faint); margin-bottom:14px;
}
.footer-links a, .footer-links span{
  display:block; font-size:13.5px; color:var(--ink-dim); margin-bottom:10px;
}
.footer-links a:hover{ color:var(--amber-soft); }
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px;
  font-size:11.5px; color:var(--ink-faint);
}

/* ===========================================================
   HISTORY PAGE
   =========================================================== */
.history-hero{
  padding:clamp(150px,20vw,220px) 0 60px;
  background:radial-gradient(ellipse at 20% 0%, rgba(255,138,76,.10), transparent 55%), var(--bg);
  border-bottom:1px solid var(--panel-line);
}
.history-hero h1{
  /* two even lines: "Від першої зустрічі / до «Віддзеркалення»", small enough that neither line breaks again */
  font-family:var(--font-display); font-weight:600; font-size:clamp(24px, 5.4vw, 60px); line-height:1.12;
  max-width:none; text-wrap:balance; margin-top:.35em;
}
.history-hero p.lead{
  margin-top:20px; color:var(--ink-dim); font-size:17px; max-width:60ch; font-weight:300;
}
.history-body{
  max-width:760px; margin:0 auto; padding:clamp(50px,8vw,90px) var(--gutter);
}
.history-body p{
  font-size:17px; line-height:1.85; color:var(--ink-dim); margin-bottom:26px;
}
.history-body p:first-of-type::first-letter{
  font-family:var(--font-display); font-size:3.4em; float:left; line-height:.85; padding:.05em .08em 0 0; color:var(--amber-soft);
}
/* story photo galleries: a film strip wider than the text column, scrolled sideways, click to enlarge */
.sgal{
  position:relative; left:50%; transform:translateX(-50%);
  width:min(1100px, calc(100vw - 2 * var(--gutter)));
  margin:48px 0;
}
.sgal.reveal.is-in{ transform:translateX(-50%); }
.sgal-head{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom:16px; }
.sgal-count{ font-size:12px; letter-spacing:.08em; color:var(--ink-faint); }
.sgal-track{
  display:flex; gap:10px; overflow-x:auto; scroll-snap-type:x proximity; scroll-behavior:smooth;
  padding-bottom:10px; scrollbar-width:thin; scrollbar-color:rgba(255,191,143,.35) transparent;
}
.sgal-item{
  flex:none; height:clamp(180px, 22vw, 260px); padding:0; border:1px solid var(--panel-line); border-radius:4px;
  overflow:hidden; background:var(--panel); cursor:zoom-in; scroll-snap-align:start;
}
.sgal-item img{ height:100%; width:auto; display:block; filter:brightness(.92); transition:filter .4s ease, transform .7s var(--ease); }
.sgal-item:hover img, .sgal-item:focus-visible img{ filter:brightness(1.05); transform:scale(1.03); }
.sgal-item:focus-visible{ outline:2px solid rgba(255,191,143,.7); outline-offset:2px; }
.sgal-nav{ display:flex; justify-content:flex-end; gap:10px; margin-top:8px; }
.sgal-nav button, .sbox button{
  width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer;
  background:rgba(10,10,12,.7); border:1px solid var(--panel-line); color:var(--ink); transition:border-color .3s;
}
.sgal-nav button:hover, .sbox button:hover{ border-color:var(--amber-soft); }
.sgal-nav svg, .sbox svg{ width:18px; height:18px; }

.sbox{
  position:fixed; inset:0; z-index:300; background:rgba(3,3,5,.95);
  display:flex; align-items:center; justify-content:center; padding:56px 64px;
  opacity:0; transition:opacity .3s ease;
}
.sbox[hidden]{ display:none; }
.sbox.is-open{ opacity:1; }
.sbox img{ max-width:100%; max-height:100%; object-fit:contain; border-radius:4px; }
.sbox .sbox-close{ position:absolute; top:14px; right:14px; }
.sbox .sbox-prev{ position:absolute; left:12px; top:50%; transform:translateY(-50%); }
.sbox .sbox-next{ position:absolute; right:12px; top:50%; transform:translateY(-50%); }
.sbox-count{ position:absolute; bottom:16px; left:50%; transform:translateX(-50%); font-family:var(--font-display); font-size:11px; letter-spacing:.2em; color:var(--amber-soft); }
@media (max-width: 640px){ .sbox{ padding:56px 12px; } .sbox .sbox-prev, .sbox .sbox-next{ top:auto; bottom:6px; transform:none; } }

/* story chapters: on phones exactly the plain column as before; on computers a magazine layout */
.h-rail, .h-pull{ display:none; }
@media (min-width: 981px){
  .history-body{ max-width:1100px; }
  .h-chapter{
    display:grid; grid-template-columns:200px minmax(0, 1fr); gap:56px;
    margin:64px 0;
  }
  .h-chapter:first-child{ margin-top:8px; }
  /* year rail in the margin, staying beside the text while it scrolls */
  .h-rail{
    display:flex; flex-direction:column; gap:12px; align-self:start;
    position:sticky; top:110px;
    padding-top:16px; border-top:1px solid rgba(255,191,143,.45);
  }
  .h-year{ font-family:var(--font-display); font-size:30px; font-weight:600; line-height:1.15; color:var(--ink); }
  .h-rail-cap{ font-size:11.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--amber-soft); line-height:1.6; }
  /* chapters without a year (the story is about 2021) keep their text in the text column */
  .h-chapter > .h-text:first-child{ grid-column:2; }
  /* two columns with a hairline between them */
  .h-cols .h-text > div{ columns:2; column-gap:56px; column-rule:1px solid var(--panel-line); }
  .h-cols .h-text p{ font-size:16px; line-height:1.85; }
  /* only the opening chapter keeps the drop cap */
  .history-body .h-chapter ~ .h-chapter p:first-of-type::first-letter,
  .history-body .h-pull p::first-letter{
    font-family:inherit; font-size:inherit; float:none; line-height:inherit; padding:0; color:inherit;
  }
  /* the closing thought, set large */
  .h-finale .h-text p{ font-size:clamp(22px, 2vw, 27px); line-height:1.55; font-weight:300; color:var(--ink); margin-bottom:0; }
  /* pull quote between chapters */
  .h-pull{
    display:block; margin:72px 0 72px 256px; padding:6px 0 6px 32px;
    border-left:2px solid var(--amber-soft);
  }
  .h-pull p{
    font-family:var(--font-display); font-size:clamp(24px, 2.4vw, 32px); line-height:1.35; color:var(--amber-soft); max-width:24ch;
  }
  .history-body .history-signature, .history-body .history-signature + div{ margin-left:256px; }
}

.history-figure{
  margin:48px 0; border-radius:6px; overflow:hidden; border:1px solid var(--panel-line);
}
.history-figure img{ width:100%; }
.history-figure figcaption{
  padding:12px 16px; font-size:12px; color:var(--ink-faint); border-top:1px solid var(--panel-line);
}
.history-signature{
  margin-top:40px; padding-top:24px; border-top:1px solid var(--panel-line);
  font-family:var(--font-display); font-size:15px; color:var(--amber-soft);
}

/* ===========================================================
   TOUR PAGE: square photo + its text, two objects per row; enlarged viewer
   =========================================================== */
.tour{ padding-top:clamp(20px, 3vw, 40px); }
.tour-grid{
  display:grid; grid-template-columns:repeat(2, 1fr);
  gap:clamp(34px, 4vw, 56px) clamp(28px, 4vw, 56px);
}
.tour-item{
  display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:clamp(16px, 2vw, 26px);
  align-items:start;
}
.tour-photo{
  display:block; width:100%; aspect-ratio:1; padding:0; border:1px solid var(--panel-line); border-radius:4px;
  overflow:hidden; background:var(--panel); cursor:zoom-in;
}
.tour-photo img{
  width:100%; height:100%; object-fit:cover; display:block;
  filter:brightness(.9); transition:transform .7s var(--ease), filter .4s ease;
}
.tour-photo:hover img, .tour-photo:focus-visible img{ transform:scale(1.05); filter:brightness(1.05); }
.tour-photo:focus-visible{ outline:2px solid rgba(255,191,143,.7); outline-offset:3px; }
.tour-text{ display:flex; flex-direction:column; gap:10px; padding-top:4px; }
.tour-n{ font-family:var(--font-display); font-size:11px; letter-spacing:.2em; color:var(--amber-soft); }
.tour-text h3{ font-family:var(--font-display); font-weight:500; font-size:clamp(16px, 1.5vw, 19px); color:var(--ink); line-height:1.3; }
.tour-text p{ font-size:14px; line-height:1.65; color:var(--ink-dim); }
.tour-text p + p, .tour-box-text p + p{ margin-top:10px; }
/* in the list only the start of the story shows; the viewer has all of it */
.tour-text .tour-desc{
  max-height:calc(14px * 1.65 * 8); overflow:hidden;
  -webkit-mask-image:linear-gradient(to bottom, #000 62%, transparent);
          mask-image:linear-gradient(to bottom, #000 62%, transparent);
}
.tour-more{
  align-self:flex-start; padding:4px 0; border:0; background:none; cursor:pointer;
  font-family:var(--font-display); font-size:11.5px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--amber-soft); border-bottom:1px solid rgba(255,191,143,.35);
  transition:color .3s, border-color .3s;
}
.tour-more:hover{ color:var(--ink); border-color:var(--ink); }
@media (max-width: 1100px){ .tour-grid{ grid-template-columns:1fr; } }
@media (max-width: 560px){ .tour-item{ grid-template-columns:1fr; } }   /* photo, then its text below */

.tour-box{
  position:fixed; inset:0; z-index:300;
  background:rgba(3,3,5,.95);
  display:flex; align-items:center; justify-content:center;
  padding:clamp(56px, 6vw, 80px) clamp(16px, 4vw, 56px) clamp(24px, 4vw, 56px);
  opacity:0; transition:opacity .3s ease;
}
.tour-box[hidden]{ display:none; }
.tour-box.is-open{ opacity:1; }
.tour-box-inner{
  width:100%; max-width:1380px; max-height:100%;
  display:grid; grid-template-columns:minmax(0, 1fr) clamp(240px, 24vw, 340px); gap:clamp(20px, 3vw, 44px);
  align-items:center;
}
.tour-box-media{ position:relative; }
.tour-box-media img{ width:100%; max-height:calc(100vh - 150px); object-fit:contain; display:block; border-radius:4px; }
.tour-box-text{ display:flex; flex-direction:column; gap:12px; max-height:calc(100vh - 150px); overflow:auto; }
.tour-box-text h3{ font-family:var(--font-display); font-weight:500; font-size:clamp(20px, 2vw, 26px); color:var(--ink); }
.tour-box-text p{ font-size:15px; line-height:1.7; color:var(--ink-dim); }
.tour-box-count{ font-family:var(--font-display); font-size:11px; letter-spacing:.2em; color:var(--amber-soft); }
.tour-box-close, .tour-box-prev, .tour-box-next{
  position:absolute; width:46px; height:46px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  background:rgba(10,10,12,.7); border:1px solid var(--panel-line); color:var(--ink);
  transition:border-color .3s, background .3s;
}
.tour-box-close:hover, .tour-box-prev:hover, .tour-box-next:hover{ border-color:var(--amber-soft); background:rgba(20,16,14,.85); }
.tour-box-close svg, .tour-box-prev svg, .tour-box-next svg{ width:18px; height:18px; }
.tour-box-close{ top:14px; right:14px; }
.tour-box-prev{ left:12px; top:50%; transform:translateY(-50%); }
.tour-box-next{ right:12px; top:50%; transform:translateY(-50%); }
@media (max-width: 760px){
  /* phones: photo on top, its text underneath */
  .tour-box{ align-items:flex-start; overflow:auto; }
  .tour-box-inner{ grid-template-columns:1fr; }
  .tour-box-media img{ max-height:none; }
  .tour-box-text{ max-height:none; overflow:visible; }
  .tour-box-prev, .tour-box-next{ width:40px; height:40px; }
}

/* ===========================================================
   AR OBJECTS PAGE
   =========================================================== */
.ar{ padding-top:clamp(20px, 3vw, 40px); }
.ar-howto{
  padding:clamp(22px, 3vw, 34px); border:1px solid var(--panel-line); border-radius:8px;
  background:linear-gradient(135deg, rgba(255,138,76,.05), rgba(169,216,255,.04));
  margin-bottom:clamp(40px, 6vw, 72px);
}
.ar-steps{ list-style:none; padding:0; counter-reset:step; margin-top:18px; display:grid; gap:12px; }
.ar-steps li{ counter-increment:step; display:flex; gap:14px; align-items:baseline; font-size:15px; color:var(--ink); line-height:1.55; }
.ar-steps li::before{
  content:counter(step, decimal-leading-zero); flex:none;
  font-family:var(--font-display); font-size:11px; letter-spacing:.14em; color:var(--amber-soft);
}
.ar-req{ margin-top:18px; font-size:12.5px; color:var(--ink-faint); line-height:1.6; }

.ar-list{ display:grid; gap:clamp(44px, 6vw, 80px); }
.ar-item{
  display:grid; grid-template-columns:minmax(0, 1.15fr) minmax(0, 1fr); gap:clamp(24px, 4vw, 56px);
  align-items:center; scroll-margin-top:90px;
}
.ar-stage{
  border:1px solid var(--panel-line); border-radius:8px; overflow:hidden;
  background:radial-gradient(ellipse 60% 55% at 50% 58%, rgba(255,150,80,.12), transparent 70%), var(--panel);
}
.ar-viewer{
  display:block; width:100%; height:clamp(320px, 42vw, 520px);
  background:transparent; --poster-color:transparent; --progress-bar-color:var(--amber-soft);
}
.ar-info{ display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
.ar-n{ font-family:var(--font-display); font-size:11px; letter-spacing:.2em; color:var(--amber-soft); }
.ar-info h2{ font-family:var(--font-display); font-weight:600; font-size:clamp(26px, 3.2vw, 38px); line-height:1.1; }
.ar-size{ font-size:12.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-faint); }
.ar-info > p{ color:var(--ink-dim); font-size:15px; line-height:1.65; max-width:46ch; }
.ar-open{
  margin-top:10px; display:inline-flex; align-items:center; gap:12px;
  padding:16px 26px; border:0; border-radius:999px; cursor:pointer;
  background:var(--amber); color:#1a0f08;
  font-family:var(--font-display); font-size:14px; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
  box-shadow:0 10px 30px -10px rgba(255,138,76,.6);
  transition:transform .25s var(--ease), background .3s;
}
.ar-open svg{ width:22px; height:22px; }
.ar-open:active{ transform:scale(.97); }
.ar-item.is-target .ar-open{ animation:ar-call 1.6s ease-in-out 3; }
@keyframes ar-call{ 0%, 100%{ box-shadow:0 0 0 0 rgba(255,138,76,.55); } 50%{ box-shadow:0 0 0 16px rgba(255,138,76,0); } }
.ar-unsupported{ font-size:13px; color:var(--ink-faint); }
.ar-qr{ margin-top:10px; display:flex; align-items:center; gap:18px; }
.ar-qr-code{ flex:none; width:136px; height:136px; padding:8px; background:#f4efe4; border-radius:8px; }
.ar-qr-code svg{ display:block; width:100%; height:100%; }
.ar-qr p{ font-size:13px; color:var(--ink-dim); line-height:1.6; max-width:24ch; }
/* computers get the QR code, phones and tablets the AR button */
@media (hover: hover) and (pointer: fine){
  .ar-open, .ar-steps-phone, .ar-unsupported{ display:none !important; }
}
@media (hover: none), (pointer: coarse){
  .ar-qr, .ar-steps-desktop{ display:none !important; }
}
@media (max-width: 860px){
  .ar-item{ grid-template-columns:1fr; }
  .ar-open{ align-self:stretch; justify-content:center; }
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 980px){
  .site-nav{ display:none; }
  .burger{ display:flex; }
  .team-grid{ grid-template-columns:repeat(2,1fr); }
  .thanks-grid{ grid-template-columns:1fr; }
  /* stacked: sculpture on top across the full width, then switch and text */
  .exp-stage{ min-height:0; padding:0 0 clamp(60px,10vw,100px); }
  .exp-gnome{
    position:relative; width:100%; height:min(78vh, 620px);
    -webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 12%, #000 72%, transparent 100%);
            mask-image:linear-gradient(to bottom, transparent 0, #000 12%, #000 72%, transparent 100%);
  }
  .exp-body{ padding-left:var(--gutter); margin-top:calc(-1 * clamp(60px, 16vw, 120px)); }
  .exp-switch{ position:relative; left:auto; top:auto; align-self:flex-end; margin-bottom:clamp(16px, 4vw, 28px); }
  .exp-text{ max-width:none; }
}

@media (max-width: 560px){
  .hero{ --hero-title-size:7vw; }
  .team-grid{ grid-template-columns:1fr; }
}
