/* ===========================================================================
   COMPONENTS — v2. Everything that touches the page is glass or a hairline.
   =========================================================================== */

.rail{
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 120;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--violet), var(--accent));
  box-shadow: 0 0 14px var(--accent-glow);
}

/* ---------------------------------------------------------------------------
   Header — a floating glass bar rather than a full-width band, so the stage
   keeps running underneath it.
   --------------------------------------------------------------------------- */
.site-header{
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: .75rem clamp(1rem, 3vw, 2rem) 0;
  transition: padding .4s var(--ease);
}
.bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  height: calc(var(--header-h) - 14px);
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 2vw, 1.5rem);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: background .45s var(--ease), border-color .45s var(--ease),
              box-shadow .45s var(--ease), backdrop-filter .45s var(--ease);
}
.site-header.scrolled .bar{
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-color: var(--glass-line);
  box-shadow: var(--glass-edge);
}
.wordmark{
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: .2em;
}
.site-nav{
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 2.2vw, 1.8rem);
  font-size: .9rem;
  color: var(--soft);
}
.site-nav a:hover { color: var(--ink); }
.nav-status{
  padding: .4rem .9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(217,61,240,.4);
  background: var(--accent-tint);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  transition: box-shadow .35s var(--ease), background .35s var(--ease);
}
.nav-status:hover{
  color: var(--accent);
  background: rgba(217,61,240,.24);
  box-shadow: 0 0 24px -4px var(--accent-glow);
}
@media (max-width: 640px){
  .site-nav a:not(.nav-status) { display: none; }
}

/* ---------------------------------------------------------------------------
   Buttons — a glass capsule that lights from within on hover.
   --------------------------------------------------------------------------- */
.btn-glass{
  position: relative;
  overflow: hidden;
  justify-self: start;
  margin-top: var(--s4);
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 46px;
  padding: .75rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(217,61,240,.44);
  background: var(--accent-tint);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  transition: transform .45s var(--settle), box-shadow .4s var(--ease),
              background .4s var(--ease);
}
.btn-glass::after{
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px var(--accent-glow);
}
.btn-glass:hover{
  transform: translateY(-2px);
  background: rgba(217,61,240,.24);
  box-shadow: 0 0 40px -8px var(--accent-glow), var(--glass-edge);
}

/* ---------------------------------------------------------------------------
   Panel innards
   --------------------------------------------------------------------------- */
.callout-row{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: var(--s4);
}
.callout-row li{
  padding: .42rem .9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--soft);
}

.checklist{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: .35rem var(--s3);
  margin-top: var(--s4);
}
.checklist li{
  display: flex;
  align-items: baseline;
  gap: .65rem;
  padding: .5rem .7rem;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid transparent;
  font-size: .92rem;
  color: var(--soft);
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.checklist li:hover{
  border-color: var(--glass-line);
  background: var(--glass-hi);
}
/* A strikethrough would say "we removed this". The check says "handled" — the
   work still happens, it just is not yours. */
.checklist li::before{
  content: "✓";
  font-size: .78rem;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

.embed-card{
  margin-top: var(--s4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-line);
  background: rgba(0,0,0,.32);
  overflow: hidden;
}
.embed-chrome{
  padding: .5rem .9rem;
  border-bottom: 1px solid var(--line);
  background: var(--glass-hi);
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--faint);
}
.embed-snippet{
  margin: 0;
  padding: var(--s2);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .74rem;
  line-height: 1.75;
  color: var(--soft);
}
.embed-snippet code { white-space: pre; }

/* ---------------------------------------------------------------------------
   Act index — v1's tick marks, not v3's glass rail.

   The rail was a box floating over the artwork with a border, a blur and a
   shadow: a piece of UI competing with the object for attention. These are
   seven hairlines. The current one grows and lights, and its label is the only
   one showing — everything else is a rule you barely register.

   They index the object's seven acts, which are now spread over three films —
   so the list is fixed to the viewport like the stage is, and dissolves with
   it at every handover. A per-film index would restart at one three times and
   imply three runs where there is one.

   No transition on the opacity: main.js writes it every frame from the film's
   share of the viewport, and a transition on a value that changes each frame
   is a value that never arrives.
   --------------------------------------------------------------------------- */
.act-dots{
  position: fixed;
  left: max(var(--edge), calc(var(--gutter) - 6rem));
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: grid;
  gap: .9rem;
  opacity: 0;
  pointer-events: none;
}

/* The index stands in the object's column, so it changes edges with the
   zig-zag — left to itself it would end up lying across the glass on every
   left-standing film.

   A class rather than a number, and the one place in the handover that is
   allowed to be discrete: main.js flips it from the same mirror value the
   camera reads, and only ever while the list is faded to nothing over a static
   section. A tick sliding across the page while lit would be an index that
   moved, and an index that moves is not one. */
.act-dots.is-right{
  left: auto;
  right: max(var(--edge), calc(var(--gutter) - 6rem));
}
.act-dots.is-right a { flex-direction: row-reverse; }
/* The label slides in from the outside edge, so on this side it comes from
   the right. The `transform: none` on hover and on the current tick is the
   pair of rules further down — both outrank this one by coming later. */
.act-dots.is-right a span { transform: translateX(6px); }

.act-dots a{
  display: flex;
  align-items: center;
  gap: .7rem;
  height: 18px;
}
.act-dots i{
  flex: none;
  width: 18px;
  height: 1px;
  background: var(--line-firm);
  transition: width .45s var(--ease), background .45s var(--ease),
              box-shadow .45s var(--ease);
}
.act-dots a span{
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--faint);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease),
              color .35s var(--ease);
}
.act-dots a:hover span { opacity: 1; transform: none; }
.act-dots a.is-current i{
  width: 34px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.act-dots a.is-current span { opacity: 1; transform: none; color: var(--soft); }
@media (max-width: 960px){ .act-dots { display: none; } }

/* ---------------------------------------------------------------------------
   Scroll hint
   --------------------------------------------------------------------------- */
.scroll-hint{
  position: absolute;
  bottom: var(--s4);
  /* Centred under the object, whichever column that is — see `--hint-x` on
     `.film` in layout.css. */
  left: var(--hint-x);
  transform: translateX(-50%);
  z-index: 4;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--faint);
  transition: opacity .5s var(--ease);
}
.scroll-hint::after{
  content: "";
  display: block;
  width: 1px;
  height: 28px;
  margin: .6rem auto 0;
  background: linear-gradient(var(--accent), transparent);
  animation: hint 2.4s var(--ease) infinite;
}
@keyframes hint{
  0%, 100% { transform: scaleY(.35); transform-origin: top; opacity: .25; }
  50%      { transform: scaleY(1);   transform-origin: top; opacity: .9; }
}
@media (max-width: 960px){ .scroll-hint { left: 50%; } }

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.site-footer{
  position: relative;
  z-index: 1;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding-block: var(--s6);
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--faint);
}
.footer-grid,
.footer-host{
  width: var(--frame-w);
  margin-inline: auto;
}
.footer-grid{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}
.footer-brand .wordmark{ font-family: "Outfit", system-ui, sans-serif; color: var(--ink); }
.footer-brand p{ margin: .4rem 0 0; }
.footer-nav{
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s4);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.footer-nav a{
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--soft);
  transition: color .3s var(--ease);
}
.footer-nav a:hover{ color: var(--ink); }
.footer-cta{ margin-top: 0; }
.footer-host{
  margin-top: var(--s5);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
}
.footer-host a:hover{ color: var(--soft); }

/* ---------------------------------------------------------------------------
   Debug scrubber (?debug=1)
   --------------------------------------------------------------------------- */
.scrub{
  position: fixed;
  inset: auto 0 0 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: .7rem clamp(1rem, 3vw, 2rem);
  background: rgba(5,7,10,.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-line);
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--soft);
}
.scrub input { flex: 1; accent-color: var(--accent); }
.scrub output { min-width: 4ch; color: var(--accent); }
