/* =============================================================================
   components.css — reusable UI parts (buttons, nav, pills, specimens, marquee, logo, splash)
   Section-specific layout lives in sections.css.
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  height: 48px; padding: 0 1.4rem; border-radius: 15px; border: 0;
  font-weight: 500; letter-spacing: -0.02em; font-size: 1rem; white-space: nowrap;
  transition: transform .5s var(--ease-out), background .3s, color .3s, box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.98); }
.btn--dark { background: var(--ink); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 10px 24px -12px rgba(0,0,0,.6); }
.btn--dark:hover { background: #000; }
.btn--ghost { background: rgba(13,13,13,.06); color: var(--ink); backdrop-filter: blur(10px); }
.btn--ghost:hover { background: rgba(13,13,13,.1); }
.btn--xl { height: 62px; padding: 0 2.1rem; font-size: 1.15rem; border-radius: 20px; }

.pill {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .04em;
  background: rgba(255,255,255,.78); color: var(--ink); backdrop-filter: blur(10px);
}

/* ---------- Logo (inline SVG from js/brand/logotype.js) ---------- */
.bt-logo { display: block; height: 100%; width: auto; overflow: visible; }

/* ---------- Navigation: two floating frosted pills ---------- */
.nav {
  position: fixed; inset: 14px var(--gutter) auto; z-index: var(--z-nav);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  pointer-events: none;
}
.nav__pill {
  pointer-events: auto; display: flex; align-items: center;
  background: rgba(236,236,233,.74); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border-radius: 20px; padding: 8px 10px; box-shadow: 0 1px 0 rgba(255,255,255,.65) inset, 0 12px 30px -20px rgba(0,0,0,.35);
  transition: background .4s, transform .6s var(--ease-out);
}
.nav__main { gap: 26px; padding-left: 20px; flex: 0 1 auto; min-height: 58px; }
.nav__brand { display: inline-flex; align-items: center; height: 24px; color: var(--ink); }
.nav__links { display: flex; gap: 2px; }
.nav__links a { padding: 8px 14px; border-radius: 12px; font-weight: 450; letter-spacing: -0.015em; transition: background .25s; }
.nav__links a:hover { background: rgba(13,13,13,.06); }
.nav__links a.is-active { background: rgba(13,13,13,.08); }
.nav__cta .btn { height: 42px; border-radius: 13px; }
.nav__burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; position: relative; border-radius: 12px; }
.nav__burger i { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .5s var(--ease-out), top .5s var(--ease-out); }
.nav__burger i:nth-child(1) { top: 17px; } .nav__burger i:nth-child(2) { top: 25px; }
.nav.is-open .nav__burger i:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav.is-open .nav__burger i:nth-child(2) { top: 21px; transform: rotate(-45deg); }
.nav.is-hidden .nav__pill { transform: translateY(-140%); }
.nav.is-open .nav__pill { transform: none; }

/* Mobile full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: var(--z-menu); background: var(--ink); color: var(--on-dark);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2rem; padding: 110px var(--gutter) 36px;
  clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--ease-io); visibility: hidden;
}
.nav.is-open ~ .menu, .menu.is-open { clip-path: inset(0); visibility: visible; }
.menu a.menu__link { font-size: clamp(2.5rem, 11vw, 4.5rem); font-weight: 500; letter-spacing: -0.05em; line-height: 1.05; display: block; }
.menu a.menu__link:hover { color: var(--volt); }
.menu__foot { color: var(--on-dark-muted); font-family: var(--font-mono); font-size: .8rem; }
.menu__logo { margin-bottom: auto; height: 30px; }

@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .nav__main { flex: 1; justify-content: space-between; padding-right: 6px; }
}

/* ---------- Specimens: small artwork panels (shader art from js/gl/tile-shaders.js, SPECIMENS) ----------
   Framed like plates in a technical folio: a hairline edge, a figure number and a note in mono. */
.spec { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: hidden; background: var(--ink-2); isolation: isolate; }
.spec canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.spec::before, .spec::after { position: absolute; z-index: 1; font: 500 .58rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(244,244,242,.55); text-shadow: 0 0 8px #000, 0 0 2px #000; pointer-events: none; }
.spec::before { content: "Fig. " attr(data-fig); left: 12px; top: 12px; }
.spec::after { content: attr(data-note); right: 12px; bottom: 12px; }
.spec { outline: 1px solid rgba(255,255,255,.09); outline-offset: -1px; transition: outline-color .4s; }   /* outlines paint over the canvas */

/* inline artwork pills inside running text (statement) */
.ipill {
  display: inline-block; position: relative; width: 1.9em; height: .92em; margin: 0 .08em; vertical-align: -.06em;
  border-radius: var(--r-pill); overflow: hidden; background: var(--ink); transition: opacity .25s linear;
}
.ipill canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Marquee (infinite scroll, pure CSS animation; js/modules/marquee.js clones the items) ---------- */
.marquee { overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee var(--speed, 60s) linear infinite var(--dir, normal); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }   /* track = 2 identical halves */
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- Range inputs ---------- */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: ew-resize; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #f4f4f2; border: 0; box-shadow: 0 0 0 4px rgba(198,244,50,.0), 0 2px 6px rgba(0,0,0,.5); transition: box-shadow .3s; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #f4f4f2; border: 0; }
input[type="range"]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(198,244,50,.35), 0 2px 6px rgba(0,0,0,.5); }

/* ---------- Intro splash: the mark's two halves lock together, the cut flashes lime, the curtain lifts ---------- */
.intro { position: fixed; inset: 0; z-index: 1000; background: var(--bg); display: none; place-items: center; clip-path: inset(0); transition: clip-path .9s var(--ease-io); }
.intro.is-on { display: grid; }
.intro.is-leaving { clip-path: inset(0 0 100% 0); }
.intro__mark { height: clamp(150px, 24vw, 260px); }
.intro__mark svg { height: 100%; width: auto; overflow: visible; }
.intro__mark .bt-up { animation: lockUp 1s var(--ease-out) both; }
.intro__mark .bt-lo { animation: lockLo 1s var(--ease-out) both; }
.intro__mark .bt-cut { animation: cutFlash 1.4s ease-out .55s both; }
@keyframes lockUp { from { transform: translate(-.08px, -.5px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lockLo { from { transform: translate(.08px, .5px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cutFlash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
html.is-intro { overflow: hidden; }
