@layer components {

/* ------------------------------------------------------------ icons + buttons */
.icon { width: 18px; height: 18px; flex: none; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: var(--r-pill);
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  height: 40px; padding: 0 1rem;
  border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 500; color: var(--text);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { text-decoration: none; border-color: var(--blue); background: var(--tint-blue); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--blue) 86%, var(--text)); border-color: transparent; }
.btn-ghost { background: transparent; }

.chip-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  height: 32px; padding: 0 0.8rem; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.02em; color: var(--text-muted);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.chip-btn .icon { width: 15px; height: 15px; }
.chip-btn:hover { color: var(--text); border-color: var(--text-faint); }
.chip-btn[aria-pressed="true"] { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 55%, transparent); background: var(--tint-blue); }

/* ------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.topbar.is-scrolled { border-bottom-color: var(--border); }
.topbar-inner {
  display: flex; align-items: center; gap: var(--sp-5);
  height: 100%; width: min(100% - 2 * var(--gutter), var(--w-wide)); margin-inline: auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; color: var(--text);
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.topbar.is-scrolled .brand { opacity: 1; transform: none; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 28px; height: 28px; object-fit: contain; }
.topnav {
  display: flex; gap: 0.15rem; margin-left: auto;
  overflow-x: auto; scrollbar-width: none;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  padding: 0.35rem 0.6rem; border-radius: var(--r-pill);
  font-size: 0.8125rem; color: var(--text-muted); white-space: nowrap;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.topnav a:hover { color: var(--text); text-decoration: none; }
.topnav a[aria-current="true"] { color: var(--text); background: var(--surface-2); }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.progress span {
  display: block; height: 100%; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--blue), var(--teal) 60%, var(--yellow));
}

/* ------------------------------------------------------------ hero */
.hero { padding-top: clamp(2.5rem, 7vw, 5.5rem); position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 720px; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); align-items: center; gap: var(--sp-6); }
.hero-copy { max-width: 980px; }
.hero-art { position: relative; justify-self: center; width: min(100%, 420px); }
.hero-art::before {
  content: ""; position: absolute; inset: 12%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--yellow) 22%, transparent), transparent 70%);
  filter: blur(30px);
}
.hero-art video { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45)); }
[data-theme="light"] .hero-art video { filter: drop-shadow(0 24px 30px rgba(30, 30, 50, 0.18)); }
.venue-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.8rem 0.3rem 0.65rem; border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--yellow) 45%, transparent);
  background: var(--tint-ours);
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ours-text);
}
.venue-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--yellow) 25%, transparent); }

.hero h1 { margin-top: var(--sp-5); }
.title-name {
  display: block;
  font-size: var(--fs-hero); font-weight: 600; letter-spacing: -0.035em; line-height: 0.95;
  color: var(--text);
}
.title-name::after { content: "."; color: var(--yellow); }
.title-sub {
  display: block; margin-top: var(--sp-4); max-width: 22ch;
  font-size: clamp(1.45rem, 1rem + 1.9vw, 2.35rem); font-weight: 400; line-height: 1.18;
  color: var(--text-muted);
}

.authors {
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem;
  margin-top: var(--sp-6); font-size: var(--fs-md); font-weight: 500;
}
.authors a { color: var(--text); }
.authors a:hover { color: var(--blue); text-decoration: none; }
.authors sup { color: var(--text-faint); margin-left: 0.1em; }
.affils {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem;
  margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--text-muted);
}
.affils li { display: inline-flex; align-items: center; gap: 0.55rem; }
.affils sup { margin-right: 0.15em; }
.logo-chip {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px; background: var(--chip);
  box-shadow: 0 0 0 1px var(--border);
}
.logo-chip img { width: auto; height: 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: var(--sp-6); }

/* ------------------------------------------------------------ stages / viewers */
.teaser, .teaser-video { margin-top: clamp(2.5rem, 6vw, 4rem); }
.teaser-video + .teaser { margin-top: var(--sp-6); }
.stage-video { aspect-ratio: 16 / 9; }
.stage-video::after { display: none; }      /* no vignette over the film and its controls */
.stage-video video { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--stage); }
.video-sound {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(6px);
}
.stage {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); background: var(--stage);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 55%, color-mix(in srgb, var(--stage) 70%, transparent));
}
.stage-teaser { aspect-ratio: 16 / 8.2; min-height: 360px; }
.stage-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  pointer-events: none; transition: opacity 500ms var(--ease);
}
.stage.is-ready .stage-poster { opacity: 0; }
.stage-cta { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; display: none; }
.mv {
  width: 100%; height: 100%; display: block;
  background: transparent; --poster-color: transparent;
  --progress-bar-color: transparent; --progress-bar-height: 0;
}
.stage-loader {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 2;
  opacity: 0; transition: opacity 300ms var(--ease);
}
.stage-loader span { display: block; height: 100%; width: 0; background: var(--blue); transition: width 200ms linear; }
.is-loading > .stage-loader { opacity: 1; }
.is-loading > .mv { animation: shimmer 1.6s ease-in-out infinite; }
@keyframes shimmer { 50% { opacity: 0.55; } }

.stage-tag {
  position: absolute; top: 14px; left: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted);
  letter-spacing: 0.02em; white-space: nowrap;
}
.swatch { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.swatch-ours { background: var(--yellow); }
.swatch-visible { background: var(--visible); }
.swatch-hidden { background: var(--occluded); }
.input-inset {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  width: clamp(110px, 18%, 220px);
  border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--border-strong); background: var(--surface);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}
.input-inset img { width: 100%; aspect-ratio: 518 / 406; object-fit: cover; }
.input-inset figcaption {
  position: absolute; left: 6px; top: 6px; padding: 0 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(0, 0, 0, 0.55); color: #fff;
}
.stage-tools { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 2px; }
.stage-hint {
  position: absolute; right: 16px; bottom: 12px; z-index: 2;
  font-size: var(--fs-xs); color: var(--text-faint); pointer-events: none;
}

.carousel { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-4); }
.carousel-nav { flex: none; }
.carousel-track {
  position: relative;
  display: flex;
  display: flex; gap: 10px; overflow-x: auto; flex: 1;
  scroll-snap-type: x mandatory; scroll-padding-inline: 4px; padding: 4px;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
  mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.thumb {
  flex: none; scroll-snap-align: start;
  width: 118px; border-radius: var(--r-md); overflow: hidden; position: relative;
  border: 1px solid var(--border); background: var(--surface);
  opacity: 0.62;
  transition: opacity var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.thumb:hover { opacity: 1; }
.thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.thumb span {
  position: absolute; left: 6px; bottom: 5px;
  font-family: var(--font-mono); font-size: 10px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.thumb[aria-selected="true"] { opacity: 1; border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow); }

.caption {
  margin-top: var(--sp-4); font-size: var(--fs-sm); line-height: 1.6; color: var(--text-muted);
  max-width: 78ch;
}

:fullscreen { background: var(--bg); }
.is-fullscreen .stage-teaser { aspect-ratio: auto; height: calc(100vh - 140px); }

/* ------------------------------------------------------------ TL;DR + stats */
.tldr { padding-top: clamp(4rem, 9vw, 7rem); }
.eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue);
}
.tldr-text {
  margin-top: var(--sp-3);
  font-family: var(--font-serif); font-size: clamp(1.3rem, 1.05rem + 0.8vw, 1.6rem); line-height: 1.5;
  color: var(--text);
}
.ours-mark { color: var(--ours-text); font-weight: 600; }
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: var(--sp-7); border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: 0.35rem; padding: var(--sp-5) var(--sp-5) 0 0; }
.stat + .stat { padding-left: var(--sp-5); border-left: 1px solid var(--border); }
.stat-value {
  font-family: var(--font-serif); font-size: clamp(2.4rem, 1.6rem + 2.4vw, 3.4rem); font-weight: 500;
  line-height: 1; letter-spacing: -0.02em; color: var(--yellow);
  font-variant-numeric: tabular-nums;
}
[data-theme="light"] .stat-value { color: var(--ours-text); }
.stat-value .unit { font-size: 0.55em; margin-left: 0.06em; color: var(--text-muted); }
.stat-label { font-size: var(--fs-sm); font-weight: 500; color: var(--text); line-height: 1.4; }
.stat-detail { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); line-height: 1.5; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .topnav a:nth-child(n+6):not([aria-current="true"]) { display: none; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); margin-top: var(--sp-5); }
}
@media (max-width: 720px) {
  .stage-cta { display: inline-flex; }
  .stage.is-live .stage-cta { display: none; }
  .topnav { display: none; }
  .theme-toggle { margin-left: auto; }
  .stage-teaser { aspect-ratio: 4 / 5; min-height: 0; }
  .video-sound { display: none; }               /* tap-to-play starts with sound; native controls mute */
  .stage-hint { display: none; }
  .input-inset { width: 34%; }
  .thumb { width: 92px; }
  .carousel-nav { display: none; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { border-left: 0; padding-left: 0; }
  .stat + .stat { border-top: 1px solid var(--border); margin-top: var(--sp-4); }
}

}
