:root {
  --night: #08191a;
  --deep: #0f2e2c;
  --verdigris: #4fa793;
  --gold: #c9a24a;
  --gold-soft: #e2c885;
  --moon: #e9e4d2;
  --moon-dim: #b8c3ba;
  --plum: #1a1124;
  --plum-line: #4a3560;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: Optima, Candara, "Gill Sans", "Segoe UI", "Trebuchet MS", sans-serif;
  --wrap: 1180px;
  --arch: 50% 50% 4px 4px / 22% 22% 4px 4px;
  --ease-out: cubic-bezier(.16, .84, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--moon);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; }
p { margin: 0 0 1.1rem; max-width: 68ch; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.wrap { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--gold); color: var(--night); padding: .6rem 1rem; text-decoration: none; }
.skip:focus { top: 1rem; }

/* Links that point to institutions and references */
a.ext { color: var(--gold-soft); text-decoration: underline; text-decoration-color: rgba(226, 200, 133, .45); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .15s, color .15s; }
a.ext:hover { text-decoration-color: var(--gold-soft); color: #fff3cf; }

/* Header, progress bar, and navigation */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(8, 25, 26, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(201, 162, 74, .28); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4rem; transition: min-height .2s; }
.site-header.is-scrolled .bar { min-height: 3.2rem; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: linear-gradient(90deg, var(--verdigris), var(--gold)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); will-change: transform; }
.wordmark { display: inline-flex; align-items: center; gap: .7rem; font-family: var(--serif); font-size: 1.4rem; text-decoration: none; letter-spacing: .01em; white-space: nowrap; }
.brand-mark { width: 44px; height: 44px; flex: none; transition: transform .3s var(--ease-out), width .2s, height .2s; }
.wordmark:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }
.site-header.is-scrolled .brand-mark { width: 36px; height: 36px; }
.site-nav { display: flex; gap: 1.3rem; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { text-decoration: none; font-size: .96rem; color: var(--moon-dim); padding: .25rem 0; border-bottom: 1px solid transparent; white-space: nowrap; transition: color .15s, border-color .15s; }
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--moon); border-bottom-color: var(--gold); }
.menu-btn { display: none; font: inherit; color: var(--moon); background: transparent; border: 1px solid rgba(201, 162, 74, .6); border-radius: 999px; padding: .4rem 1.1rem; cursor: pointer; }

/* Sections and type */
.section { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
.band-night { background: var(--night); }
.band-deep { background: var(--deep); }
.band-music { background: var(--deep); padding-top: 0; }
.band-plum { background: var(--plum); padding-top: 0; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); margin-bottom: 1.4rem; letter-spacing: -.005em; }
.sub { font-size: 1.5rem; margin: 2.6rem 0 .6rem; color: var(--gold-soft); }
.lede { font-size: 1.2rem; line-height: 1.6; max-width: 62ch; }
.note { color: var(--moon-dim); }

/* Hero */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); position: relative; overflow: hidden; background: var(--night); }
.hero::before { content: ""; position: absolute; right: -10%; top: -20%; width: 70vw; height: 90%; background: radial-gradient(closest-side, rgba(79, 167, 147, .22), rgba(8, 25, 26, 0)); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.name { font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.7rem); color: var(--moon-dim); margin: 0 0 1.1rem; letter-spacing: .01em; }
h1 { font-size: clamp(2.9rem, 7.4vw, 6.2rem); letter-spacing: -.02em; line-height: .98; margin-bottom: 1.8rem; max-width: 12ch; }
.org { font-family: var(--serif); font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.1; color: var(--gold-soft); margin-bottom: 1.8rem; }
.org a.ext { color: var(--gold-soft); text-decoration-color: rgba(226, 200, 133, .6); text-underline-offset: 6px; }
.hero-note { color: var(--moon-dim); max-width: 54ch; }
.hero-note a.ext { color: var(--moon); }
.hero-links { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.arch { border-radius: var(--arch); }
figcaption { font-size: .92rem; color: var(--moon-dim); margin-top: .7rem; }

/* Buttons and text links */
.btn { display: inline-block; text-decoration: none; font-size: 1rem; line-height: 1; padding: .95rem 1.5rem; border: 1px solid var(--gold); border-radius: 999px; color: var(--moon); transition: background-color .15s, color .15s, transform .15s var(--ease-out), box-shadow .15s; }
.btn:hover { background: rgba(201, 162, 74, .16); transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(201, 162, 74, .7); }
.btn:active { transform: translateY(0); }
.btn-solid { background: var(--gold); color: var(--night); font-weight: 600; }
.btn-solid:hover { background: var(--gold-soft); }
.btn.is-pending { border-style: dashed; border-color: rgba(201, 162, 74, .45); color: var(--moon-dim); cursor: default; background: transparent; font-weight: 400; transform: none; box-shadow: none; }
.btn-row { list-style: none; display: flex; flex-wrap: wrap; gap: .8rem; }
.text-link { color: var(--gold-soft); text-underline-offset: 4px; }
.text-link.is-pending { color: var(--moon-dim); text-decoration: none; cursor: default; }

/* Animated art stages */
.stage { position: relative; }
.stage-viewport { position: relative; overflow: hidden; background: #050f10; isolation: isolate; touch-action: pan-y; contain: layout paint; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .55s ease, visibility 0s linear .55s; overflow: hidden; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .55s ease, visibility 0s; z-index: 1; }
.slide::before { content: ""; position: absolute; inset: 0; background: var(--bg) center / cover no-repeat; z-index: 0; }
.slide img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 50%; backface-visibility: hidden; }

.stage-wide .stage-viewport { height: clamp(320px, 56vh, 520px); margin-top: 2.4rem; border: 1px solid rgba(201, 162, 74, .3); }

.stage-hero { width: min(100%, 400px); justify-self: center; }
.hero-frame { position: relative; }
.hero-frame::before { content: ""; position: absolute; inset: -14px; border: 1px solid var(--gold); border-radius: var(--arch); opacity: .55; pointer-events: none; }
.stage-hero .stage-viewport { aspect-ratio: 5 / 7; border-radius: var(--arch); }
.stage-hero .slide img { object-fit: cover; }
.stage-hero .slide::before { display: none; }

/* Paired matte stage: castle painting and founder's portrait, identical size, side by side */
.stage-pair { container-type: inline-size; --h: clamp(240px, 62vw, 540px); margin-top: 1.6rem; }
.stage-pair .stage-viewport { height: var(--h); border: 1px solid rgba(201, 162, 74, .3); }
.slide-pair .pair { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; justify-content: center; gap: .8rem; }
.slide-pair .pair figure { height: calc(var(--h) - 1.2rem); aspect-ratio: 5 / 7; flex: none; overflow: hidden; border-radius: 2px; background: #050f10; }
.slide-pair .pair img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin-top: 1rem; }
.stage-bar-hero { margin-top: 1.6rem; justify-content: space-between; }
.stage-caption { margin: 0; color: var(--moon-dim); font-size: .95rem; flex: 1 1 14rem; max-width: none; }
.stage-controls { display: flex; gap: .5rem; }
.stage-controls button, .sc-toggle { font: inherit; font-size: .92rem; color: var(--moon); background: transparent; cursor: pointer; border: 1px solid rgba(201, 162, 74, .55); border-radius: 999px; padding: .45rem 1rem; line-height: 1.2; transition: background-color .15s, transform .15s var(--ease-out); }
.stage-controls button:hover, .sc-toggle:hover { background: rgba(201, 162, 74, .16); transform: translateY(-1px); }
.stage-dots { display: flex; flex-wrap: wrap; gap: .3rem; flex: 1 1 100%; }
.stage-dots button { width: 1.75rem; height: 1.75rem; padding: 0; background: transparent; border: 0; cursor: pointer; position: relative; }
.stage-dots button::after { content: ""; position: absolute; left: 50%; top: 50%; width: .6rem; height: .6rem; margin: -.3rem 0 0 -.3rem; border-radius: 50%; background: rgba(233, 228, 210, .35); transition: background-color .15s, transform .15s; }
.stage-dots button:hover::after { background: var(--moon); }
.stage-dots button[aria-current="true"]::after { background: var(--gold); transform: scale(1.35); }
.stage-dots--labels { gap: .5rem; }
.stage-dots--labels button { width: auto; height: auto; padding: .5rem 1.1rem; font: inherit; font-size: .95rem; color: var(--moon); border: 1px solid rgba(201, 162, 74, .55); border-radius: 999px; transition: background-color .15s, color .15s; }
.stage-dots--labels button::after { display: none; }
.stage-dots--labels button:hover { background: rgba(201, 162, 74, .16); }
.stage-dots--labels button[aria-current="true"] { background: var(--gold); color: var(--night); border-color: var(--gold); font-weight: 600; }

/* Motion: fast changes, slow drift while a stage is on screen */
@keyframes drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.08) translate3d(var(--dx, 1.2%), var(--dy, -1%), 0); }
}
@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .stage.is-live .slide.is-active img { animation: drift var(--drift-dur, 4s) linear both; will-change: transform; }
  .slide:nth-child(3n+1) img { --dx: -1.4%; --dy: -1%; }
  .slide:nth-child(3n+2) img { --dx: 1.4%;  --dy: 1%; }
  .slide:nth-child(3n)   img { --dx: 0%;    --dy: -1.6%; }
  .slide-pair .pair figure:nth-child(2) img { --dx: -1.2%; --dy: 1%; }

  .hero-copy > * { animation: rise .6s var(--ease-out) both; }
  .hero-copy > :nth-child(1) { animation-delay: .04s; }
  .hero-copy > :nth-child(2) { animation-delay: .12s; }
  .hero-copy > :nth-child(3) { animation-delay: .2s; }
  .hero-copy > :nth-child(4) { animation-delay: .28s; }
  .hero-copy > :nth-child(5) { animation-delay: .36s; }

  /* Art drifts in slowly the first time it scrolls into view */
  .js [data-reveal] { opacity: 0; will-change: opacity, transform; }
  .js [data-reveal="art"] { transform: translate3d(0, 3.5%, 0) scale(1.06); transition: opacity 1.1s ease-out, transform 2.2s var(--ease-out); }
  .js [data-reveal="left"] { transform: translate3d(-26px, 0, 0); transition: opacity .55s ease-out, transform .7s var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; transform: none; will-change: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .slide, .slide.is-active { transition: none; }
  html { scroll-behavior: auto; }
}

/* Credits */
.credits { margin-top: 4rem; }
.credits dl { margin: 0 0 1.4rem; display: grid; gap: .9rem; max-width: 62ch; }
.credits dl div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding-bottom: .9rem; border-bottom: 1px solid rgba(201, 162, 74, .22); }
.credits dt { font-family: var(--serif); font-size: 1.15rem; }
.credits dd { margin: 0; color: var(--moon-dim); }

/* About and timeline */
.about-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-photo { width: min(100%, 360px); justify-self: center; position: sticky; top: 6rem; }
.timeline { list-style: none; margin-top: 1.6rem; max-width: 900px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 8.6rem; top: .6rem; bottom: .6rem; width: 1px; background: rgba(201, 162, 74, .5); transform-origin: top; transform: scaleY(var(--tl, 1)); }
.timeline li { display: grid; grid-template-columns: 8.6rem 1fr; gap: 0 2.2rem; padding: 0 0 1.5rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(8.6rem - 4px); top: .62rem; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--deep); }
.timeline .when { font-family: var(--serif); font-size: 1.05rem; color: var(--gold-soft); padding-top: .12rem; }
.timeline p { margin: 0; max-width: 62ch; }
.strip { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-end; margin-top: clamp(3.5rem, 7vw, 5.5rem); }
.strip figure { flex: 0 1 auto; }
.strip img { height: 260px; width: auto; max-width: 100%; border-radius: 2px; }

.contact .lede { margin-bottom: 1.8rem; }

/* Writing */
.games { margin: 2rem 0 0; display: grid; gap: 1.2rem; max-width: 70ch; }
.games div { display: grid; grid-template-columns: 13rem 1fr; gap: 1rem; padding-bottom: 1.2rem; border-bottom: 1px solid rgba(201, 162, 74, .22); }
.games dt { font-family: var(--serif); font-size: 1.3rem; color: var(--gold-soft); }
.games dd { margin: 0; color: var(--moon); }

/* Banners with scroll parallax */
.bleed-frame { overflow: hidden; }
.bleed { width: 100%; height: auto; max-height: 440px; object-fit: cover; object-position: center 30%; }
.bleed-desk { max-height: 400px; object-position: center 45%; }
@keyframes bleed-shift { from { transform: translateY(-5%) scale(1.1); } to { transform: translateY(5%) scale(1.1); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .bleed-frame .bleed { animation: bleed-shift linear both; animation-timeline: view(); animation-range: cover; }
  }
}

/* Music and Whispers */
.music-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-top: clamp(3rem, 6vw, 5rem); }
.music-portrait { width: min(100%, 360px); justify-self: center; }
.music-copy .sub:first-of-type { margin-top: 2rem; }
.wh-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-top: clamp(3rem, 6vw, 5rem); }
.wh-art { width: min(100%, 360px); justify-self: center; }
.byline { font-family: var(--serif); font-style: italic; color: var(--gold-soft); font-size: 1.15rem; }
.band-plum .sub { color: var(--gold-soft); }
.band-plum .btn { border-color: #b590d6; }
.band-plum .btn-solid { background: var(--gold); border-color: var(--gold); }
.wh-play { margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1rem; border-top: 1px solid var(--plum-line); }
.steps { margin: 0 0 1.4rem 1.3rem; max-width: 60ch; }
.steps li { margin-bottom: .6rem; padding-left: .3rem; }
.steps li::marker { font-family: var(--serif); color: var(--gold); font-size: 1.15em; }
.wh-made { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 2rem; align-items: center; margin-top: clamp(3rem, 6vw, 4.5rem); }

.site-footer { background: var(--night); padding: 2rem 0 2.6rem; border-top: 1px solid rgba(201, 162, 74, .25); }
.site-footer p { margin: 0; font-size: .92rem; color: var(--moon-dim); max-width: none; }

/* Touch devices */
@media (pointer: coarse) {
  .btn, .stage-controls button, .sc-toggle, .menu-btn { min-height: 44px; }
  .stage-dots:not(.stage-dots--labels) button { width: 2.75rem; height: 2.75rem; }
  .stage-dots--labels button { min-height: 44px; }
  .site-nav a { padding-block: .55rem; }
}

/* Laptops and large tablets */
@media (max-width: 1080px) {
  .site-nav { gap: 1rem; }
  .site-nav a { font-size: .92rem; }
}

/* Tablets */
@media (min-width: 721px) and (max-width: 1100px) {
  .section { padding: clamp(3.2rem, 7vw, 5rem) 0; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2.4rem; }
  h1 { font-size: clamp(2.6rem, 6.4vw, 4.2rem); max-width: 11ch; }
  .org { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
  .stage-hero { width: min(100%, 330px); }
  .about-grid { grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr); gap: 2.2rem; }
  .about-photo { width: min(100%, 260px); top: 5.5rem; }
  .music-grid { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 2.4rem; }
  .music-portrait { width: min(100%, 290px); }
  .wh-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 2.4rem; }
  .wh-art { width: min(100%, 290px); }
  .stage-wide .stage-viewport { height: clamp(300px, 46vh, 460px); }
  .stage-pair { --h: clamp(260px, 50vw, 460px); }
  .timeline::before { left: 7.4rem; }
  .timeline li { grid-template-columns: 7.4rem 1fr; gap: 0 1.8rem; }
  .timeline li::before { left: calc(7.4rem - 4px); }
  .games div { grid-template-columns: 11rem 1fr; }
  .strip img { height: 210px; }
  .bleed { max-height: 340px; }
  .bleed-desk { max-height: 320px; }
}

/* Small tablets in portrait and phones */
@media (max-width: 720px) {
  .hero-grid, .music-grid, .wh-grid, .about-grid { grid-template-columns: 1fr; }
  .stage-hero { order: -1; width: min(100%, 320px); }
  .about-photo { position: static; width: min(100%, 300px); }
  .music-portrait, .wh-art { width: min(100%, 300px); }
  .wh-made { grid-template-columns: 1fr; }
  .wh-made figure { max-width: 240px; }
  h1 { max-width: 14ch; }
}
@media (max-width: 900px) {
  .menu-btn { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: rgba(8, 25, 26, .98); border-bottom: 1px solid rgba(201, 162, 74, .28); padding: .6rem 1.5rem 1rem; justify-content: flex-start; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .8rem 0; border-bottom: 1px solid rgba(201, 162, 74, .14); font-size: 1rem; }
}
@media (max-width: 620px) {
  .wrap { width: min(100% - 2rem, var(--wrap)); }
  .credits dl div, .games div { grid-template-columns: 1fr; gap: .2rem; }
  .strip img { height: auto; width: 100%; }
  .stage-wide .stage-viewport { height: clamp(280px, 54vh, 420px); }
  .stage-pair { --h: clamp(220px, 62vw, 360px); }
  .timeline::before { left: 4px; }
  .timeline li { grid-template-columns: 1fr; padding-left: 1.6rem; gap: .1rem; }
  .timeline li::before { left: 0; top: .5rem; }
  .bleed { max-height: 260px; }
  .bleed-desk { max-height: 240px; }
}

/* Film and animation reel: small square tiles that scroll through */
.films { margin-top: 4rem; }
.reel { position: relative; margin-top: 1.2rem; --tile: 128px; --gap: 12px; }
.reel-viewport { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.reel-track { display: flex; width: max-content; animation: reel 30s linear infinite; animation-play-state: paused; will-change: transform; }
.reel.is-live .reel-track { animation-play-state: running; }
.reel.is-paused .reel-track, .reel:hover .reel-track, .reel:focus-within .reel-track { animation-play-state: paused; }
.reel-list { display: flex; gap: var(--gap); padding: 0 var(--gap) 0 0; list-style: none; margin: 0; }
.reel-list li { position: relative; width: var(--tile); height: var(--tile); flex: none; overflow: hidden; border-radius: 4px; border: 1px solid rgba(201, 162, 74, .3); background: #050f10; }
.reel-list figure { width: 100%; height: 100%; }
.reel-list img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s var(--ease-out); }
.reel-list li:hover img { transform: scale(1.1); }
.reel-list figcaption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 1.4rem .45rem .4rem; font-size: .72rem; line-height: 1.15; color: var(--moon); background: linear-gradient(transparent, rgba(5, 15, 16, .94)); opacity: 0; transition: opacity .2s; }
.reel-list li:hover figcaption { opacity: 1; }
.reel-toggle { margin-top: .9rem; }
.reel-titles { margin: .9rem 0 0; font-size: .9rem; color: var(--moon-dim); max-width: 90ch; }
@keyframes reel { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
  .reel-track { animation: none; width: auto; flex-wrap: wrap; }
  .reel-list { flex-wrap: wrap; padding: 0; }
  .reel-list[aria-hidden="true"] { display: none; }
  .reel-viewport { -webkit-mask-image: none; mask-image: none; }
  .reel-toggle { display: none; }
}
@media (max-width: 620px) { .reel { --tile: 96px; --gap: 10px; } .reel-track { animation-duration: 24s; } }
.footer-mark { width: 72px; height: 72px; margin-bottom: 1rem; opacity: .9; }

/* Very small phones (320px to 380px wide) */
@media (max-width: 380px) {
  h1 { font-size: 2.45rem; }
  .wordmark { font-size: 1.2rem; gap: .5rem; }
  .brand-mark { width: 38px; height: 38px; }
  .btn { padding: .85rem 1.2rem; }
}

/* Newer units, applied only where the browser supports them */
@supports (width: 1cqw) {
  .stage-pair { --h: clamp(240px, 66cqw, 540px); }
  @media (min-width: 721px) and (max-width: 1100px) { .stage-pair { --h: clamp(260px, 52cqw, 460px); } }
  @media (max-width: 620px) { .stage-pair { --h: clamp(220px, 66cqw, 360px); } }
}
@supports (height: 1svh) {
  .stage-wide .stage-viewport { height: clamp(320px, 56svh, 520px); }
  @media (min-width: 721px) and (max-width: 1100px) { .stage-wide .stage-viewport { height: clamp(300px, 46svh, 460px); } }
  @media (max-width: 620px) { .stage-wide .stage-viewport { height: clamp(280px, 54svh, 420px); } }
}

/* 404 page */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 4rem 1rem; }
.notfound h1 { max-width: none; margin-bottom: 1rem; }
.notfound p { margin-inline: auto; }

/* Transformed art that has not drifted in yet can poke past the page edge on tablets. Clip it. */
body { overflow-x: clip; }
@supports not (overflow: clip) { body { overflow-x: hidden; } }

/* Phone menu stays reachable on short landscape screens */
@media (max-width: 900px) {
  .site-nav { max-height: calc(100vh - 4rem); max-height: calc(100dvh - 4rem); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
}

/* Touch targets in the desktop-style nav on large tablets */
@media (pointer: coarse) and (min-width: 901px) {
  .site-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding-block: 0; }
}
