/* ==========================================================================
   Thyra Tech — intro curtain.
   Ported from the previous site's effects.css. Two changes were deliberate:

   1. Tokens are remapped to the rebuild's palette (--canvas/--accent/--mono,
      and --relay-blue from variant.css, which is the same #4f8cff the old
      --color-accent-2 used).

   2. The old rule `html.intro .stage { transform: scale(.92); filter: blur(6px) }`
      is GONE. On the old site .stage was an ordinary div. Here it is the
      hero's `position: sticky` scroll-scrub container — and a transform or
      filter on a sticky element (or any ancestor of one) changes what it
      sticks to. Keeping that rule would trade a barely-visible flourish for
      a broken hero. The reveal is carried by the curtain instead.
   ========================================================================== */

/* FAIL-SAFE BY CONSTRUCTION. The curtain is `display: none` by default and
   only becomes visible when the inline head script adds `html.intro`. If
   JavaScript is disabled, blocked, or 404s, the class is never added, the
   curtain never renders, and the site is simply visible. The inverse
   (visible by default, hidden by JS) would mean one failed request leaves a
   permanent black screen over the whole site. The head script also arms a
   watchdog that tears the intro down if the sequence never reports
   completion. Do not "simplify" this to a JS-hides-it model. */
.curtain{display:none}
html.intro .curtain{
  position:fixed;inset:0;z-index:250;
  display:grid;place-items:center;
  background:var(--canvas);
  overflow:hidden;
}

/* The hero runs its own scroll-scrub off window scroll. Holding the scroll
   position while the curtain is up keeps a stray wheel event during the
   intro from dropping the visitor into the middle of that sequence. */
html.intro,html.intro body{overflow:hidden}

.curtain-skip{
  position:absolute;bottom:6vh;left:50%;transform:translateX(-50%);
  background:none;border:0;cursor:pointer;
  font-family:var(--mono);font-size:.62rem;letter-spacing:.2em;
  text-transform:uppercase;color:var(--text-secondary);
  padding:.85rem 1.2rem;min-height:44px;
}
.curtain-skip:hover,.curtain-skip:focus-visible{color:var(--accent)}
.curtain-skip:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- Blueprint door ---------- */
.bp-wrap{position:relative;width:min(70vw,380px);aspect-ratio:1;perspective:1400px}
.bp-door{width:100%;height:100%;transform-origin:left center;transform-style:preserve-3d}
.bp-svg{width:100%;height:100%;overflow:visible}
.bp-outline{fill:none;stroke:var(--relay-blue);stroke-width:2;stroke-dasharray:1600;stroke-dashoffset:1600}
.bp-fill{fill:var(--accent);opacity:0}
.bp-guide{stroke:rgba(79,140,255,.4);stroke-width:1;stroke-dasharray:4 5;opacity:0}
.bp-dim{fill:rgba(79,140,255,.75);font-family:var(--mono);font-size:13px;letter-spacing:.12em;opacity:0}
.bp-caption{
  position:absolute;left:50%;bottom:-3rem;transform:translateX(-50%);
  font-family:var(--mono);font-size:.62rem;letter-spacing:.3em;
  text-transform:uppercase;color:var(--text-secondary);white-space:nowrap;opacity:0;
}

/* Belt and braces: the head script already refuses to start the intro under
   reduced motion, but if the preference flips mid-session the curtain must
   not animate. */
@media (prefers-reduced-motion:reduce){
  html.intro .curtain{display:none}
}
