/* One recorded scene fills the shared masthead/hero opening viewport. */
.opening-stage {
  position: relative; isolation: isolate; background: var(--blue);
}
.opening-stage .intro { font-size: 1.2rem; line-height: 1.75; max-width: 612px; }
.hero h1, .hero .intro { cursor: default; }
.hero h1 { font-size: clamp(2.85rem, 5.58vw, 5.025rem); letter-spacing: -.035em; line-height: .95; }
.hero h1 .hero-line { display: block; color: var(--paper); }
.hero h1 .hero-line:last-child { color: #dad3ff; }
.opening-content {
  position: relative; min-height: 100dvh;
  display: grid; grid-template-rows: auto 1fr;
}
.masthead.wrap { position: relative; width: calc(100% - 64px); min-height: 128px; margin-inline: 32px; padding-block: 24px; border: 0; }
.menu-toggle { display: none; }
.masthead nav {
  margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 20px;
  width: fit-content; border: 0; border-radius: 8px; font-size: 1.05rem; line-height: 1.4;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}
.masthead nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 12px 24px; border-radius: 4px; text-decoration: none; white-space: nowrap; }
.masthead nav a:hover { background-color: #ffffff10; text-decoration: none; }
.masthead nav a:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.masthead nav .nav-recordings { color: var(--blue); background: linear-gradient(135deg, #f5f0ffeb, #e5dcffe0); text-shadow: none; box-shadow: inset 0 1px 0 #ffffff70; }
.masthead nav .nav-recordings:hover { background: #f4eeff; }
.brand-sprout {
  display: block; width: 70px; height: 70px; background: currentColor;
  mask-image: url('assets/asabeko-sprout-life.svg'); mask-mode: luminance;
  mask-size: contain; mask-position: center; mask-repeat: no-repeat;
}
.hero { position: relative; display: grid; grid-template-columns: 1fr; padding: clamp(3rem, 8svh, 7rem) 0; }
.hero-world {
  position: absolute; z-index: 0; inset: 0; overflow: hidden; pointer-events: none;
}
/* Let the scene emerge near the header through a long, eased blue fade.
   This static layer follows the existing media stack and never catches input. */
.hero-world::after {
  content: ''; position: absolute; inset: 0 0 auto; pointer-events: none;
  height: clamp(320px, 38svh, 420px);
  background: linear-gradient(to bottom, var(--blue) 0%,
    #2b00fff0 12%, #2b00ffbf 28%, #2b00ff80 46%,
    #2b00ff3d 64%, #2b00ff0f 82%, #2b00ff00 100%);
}
.hero-content {
  position: relative; display: grid; grid-template-columns: 1fr;
  align-items: center; gap: 40px; min-height: 0;
}
.hero-copy { position: relative; max-width: 55.2rem; }
.hero-copy::before {
  content: ''; position: absolute; z-index: 1; pointer-events: none;
  inset: -110px -105px -100px -100px;
  background: #2b00ff70;
  backdrop-filter: blur(8px);
  mask-image: radial-gradient(ellipse at 45% 48%, #000c 14%, #0009 38%, #0004 62%, transparent 83%);
}
/* Keep letter strokes stable as bright sprites cross them. Difference blending
   reaches near-equal foreground/background contrast at intermediate colours.
   A compact haze follows the glyphs; the surrounding scene remains visible. */
.masthead :is(.brand, nav),
.hero :is(h1, .eyebrow, .intro, .text-link) {
  position: relative; z-index: 2;
  color: var(--paper);
  text-shadow: 0 1px 1px #170087, 0 0 4px #180094f2, 0 0 12px #2100cfbf;
}
.hero h1 > span { color: #dad3ff; }

/* A light blue haze keeps the brand readable over the recorded scene. */

.masthead .brand::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  inset: -24px -38px;
  background: #2b00ff78;
  mask-image: radial-gradient(ellipse at center, #000 12%, #000b 42%, #0005 66%, transparent 86%);
}
.masthead .brand::before { inset: -22px -36px; }

.hero .signal { background: currentColor; }
.hero .paper-button { position: relative; z-index: 2; }

/* Colour boundaries dissolve through empty space, leaving text on solid colour.
   Static gradients provide the softness without another backdrop-filter layer. */
.protocol-section {
  border: 0;
  background: linear-gradient(var(--paper), #e3e3e8 100px, #e3e3e8 calc(100% - 100px), var(--paper));
}
.protocol-section > .section { padding-block: 100px; }
.paper :is(a, button, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--blue); outline-offset: 4px;
}
.results-controls { gap: 24px; }
.results-controls label { gap: 10px; min-width: 228px; }
.results-controls select { font-size: .875rem; }
@media (max-width: 1050px) {
  .hero h1 { font-size: 3.45rem; }
  .hero-content { gap: 25px; }
  .hero-copy::before { inset: -110px -24px -100px; }
}
@media (max-width: 760px) {
  html { scrollbar-width: thin; scrollbar-color: #a092d9 transparent; }
  .table-scroll { scrollbar-width: thin; scrollbar-color: #aaa5bd transparent; }
  .manifest { max-height: none; }
  .brand-sprout { width: 50px; height: 50px; }
  .hero { padding: 42px 0 32px; }
  .hero h1 { font-size: clamp(1.5rem, 8.3vw, 3.45rem); }
  .hero-content { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .hero-copy::before { inset: -75px -20px -65px; }
  .hero-content { padding-bottom: clamp(220px, 35svh, 350px); }
  .masthead.wrap { z-index: 3; width: calc(100% - 32px); margin-inline: 16px; min-height: 100px; gap: 16px; padding-block: 20px 8px; }
  .menu-toggle {
    position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center;
    align-items: center; gap: 5px; width: 48px; height: 48px; margin-left: auto;
    padding: 0; border: 0; border-radius: 0; color: var(--paper); background: transparent; cursor: pointer;
  }
  .menu-toggle:hover { color: #c8bdff; }
  .menu-toggle:focus-visible { outline: none; }
  .menu-toggle:focus-visible::after { content: ''; position: absolute; bottom: 5px; width: 24px; height: 2px; background: currentColor; }
  .menu-toggle span { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .masthead #main-navigation {
    display: none; position: absolute; top: calc(100% + 8px); right: 0;
    width: min(300px, 100%); flex-direction: column; align-items: stretch; gap: 6px;
    padding: 12px; border-radius: 8px; font-size: 1rem;
    background: linear-gradient(135deg, #3913f5f5, #3010e8f5);
    box-shadow: inset 0 1px 0 #ffffff12, 0 12px 32px #17008730;
  }
  .masthead .menu-toggle[aria-expanded="true"] + #main-navigation { display: flex; }
  .masthead nav a { justify-content: flex-start; padding-inline: 18px; min-height: 48px; }
  .masthead nav .nav-recordings { justify-content: center; }
  .results-controls label { min-width: 0; }


}
@media (prefers-contrast: more) {
  .hero-copy::before { background: #2500edec; }
}

.masthead nav a { position:relative; }
.masthead nav a:not(.nav-recordings)::before,.masthead nav a:not(.nav-recordings)::after {
  content:''; position:absolute; top:16px; bottom:16px; width:5px;
  border-block:1px solid currentColor; opacity:0; transition:opacity 180ms ease,transform 180ms ease;
}
.brand > span:last-child:not(.brand-sprout) {
  font-family:'Geist Pixel Circle'; font-size:14px; font-weight:400;
  line-height:1.2; letter-spacing:2px;
}
@media(max-width:760px) {
  .brand > span:last-child:not(.brand-sprout) { font-size:12px; letter-spacing:1px; }
}
.masthead nav a:not(.nav-recordings)::before { left:7px; border-left:1px solid currentColor; transform:translateX(3px); }
.masthead nav a:not(.nav-recordings)::after { right:7px; border-right:1px solid currentColor; transform:translateX(-3px); }
.masthead nav a:not(.nav-recordings):is(:hover,:focus-visible) { background:#ffffff08; }
.masthead nav a:not(.nav-recordings):is(:hover,:focus-visible)::before,.masthead nav a:not(.nav-recordings):is(:hover,:focus-visible)::after { opacity:.8; transform:translateX(0); }
@media(prefers-reduced-motion:reduce) { .masthead nav a::before,.masthead nav a::after { transition:none!important; } }
