:root {
  --bg: #0a0a0b;
  --ink: #f2f2f4;
  --muted: #8b8b93;
  --line: #24242a;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overscroll-behavior: none;
}
body { overflow: hidden; }

.stage {
  position: fixed; inset: 0; overflow: hidden; background: var(--bg);
  cursor: grab; touch-action: none;
}
.stage.dragging { cursor: grabbing; }
.lqip {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: blur(24px); transform: scale(1.08); opacity: .55;
  transition: opacity .6s ease;
}
.photo {
  position: absolute; top: 0; left: 0; transform-origin: 0 0;
  max-width: none; user-select: none; -webkit-user-drag: none;
  opacity: 0; transition: opacity .7s ease;
  image-rendering: -webkit-optimize-contrast;
}
.photo.ready { opacity: 1; }

.overlay {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: radial-gradient(ellipse at center, rgba(10,10,11,.72) 0%, rgba(10,10,11,.88) 70%);
  backdrop-filter: blur(2px);
  transition: opacity .8s ease, visibility .8s;
  z-index: 10;
  pointer-events: none;
}
.overlay.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.brand { text-align: center; padding: 2rem; }
.logo {
  width: min(280px, 46vw); height: auto; display: block; margin: 0 auto;
  filter: drop-shadow(0 0 24px rgba(255,255,255,.18));
  animation: breathe 2.6s ease-in-out infinite;
}
.overlay.loaded .logo { animation: none; filter: drop-shadow(0 0 14px rgba(255,255,255,.12)); }
@keyframes breathe {
  0%, 100% { opacity: .55; transform: scale(.985); }
  50%      { opacity: 1;   transform: scale(1); }
}
.tagline {
  margin: 1.1rem 0 0; letter-spacing: .38em; text-transform: uppercase;
  font-size: clamp(11px, 1.4vw, 14px); color: var(--muted);
}
.bar {
  width: min(280px, 46vw); height: 2px; margin: 1.6rem auto 0;
  background: var(--line); border-radius: 2px; overflow: hidden;
  transition: opacity .5s ease;
}
.barfill {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #7a7a86, var(--ink));
  transition: width .35s ease;
}
.overlay.loaded .bar { opacity: 0; }
.status {
  margin: .9rem 0 0; font-size: 14.4px; color: var(--muted);
  letter-spacing: .12em; text-transform: uppercase; min-height: 1em;
}
.overlay.loaded .status { color: var(--ink); }

.ui { position: fixed; inset: auto 0 0 0; z-index: 5; animation: fadein .8s ease both; }
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
.hint {
  position: fixed; left: 1.25rem; bottom: 1.15rem; margin: 0;
  font-size: 12px; color: var(--muted); letter-spacing: .06em;
  text-shadow: 0 1px 8px rgba(0,0,0,.8); pointer-events: none;
}
.controls {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 1.1rem; display: flex; gap: .4rem;
}
.controls button {
  min-width: 42px; height: 34px; padding: 0 .7rem;
  background: rgba(20,20,23,.72); color: var(--ink);
  border: 1px solid rgba(255,255,255,.55); border-radius: 8px;
  font: inherit; font-size: 13px; cursor: pointer;
  box-shadow: 0 1px 10px rgba(0,0,0,.55);
  backdrop-filter: blur(6px); transition: background .18s, border-color .18s;
}
.controls button:hover { background: rgba(38,38,44,.9); border-color: #fff; }
.controls button:active { transform: translateY(1px); }

@media (max-width: 640px) {
  .hint { display: none; }
  .controls { bottom: max(.75rem, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .logo { animation: none; }
  * { transition-duration: .01ms !important; }
}

.help {
  position: fixed; top: 1.1rem; right: 1.1rem; z-index: 30;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(20,20,23,.72); color: var(--ink);
  border: 1px solid rgba(255,255,255,.55); font: inherit; font-size: 17px; line-height: 1;
  cursor: pointer; backdrop-filter: blur(6px);
  box-shadow: 0 1px 10px rgba(0,0,0,.55);
  transition: background .18s, border-color .18s, transform .18s;
}
.help:hover { background: rgba(40,40,48,.92); border-color: #fff; transform: scale(1.06); }
.help:focus-visible { outline: 2px solid #7a7a86; outline-offset: 3px; }

.about {
  width: min(760px, 100vw); max-width: 100vw;
  max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: 16px;
  background: rgba(14,14,17,.78); color: var(--ink);
  -webkit-backdrop-filter: blur(26px) saturate(1.15);
  backdrop-filter: blur(26px) saturate(1.15);
  box-shadow: 0 30px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.07);
  overflow: hidden;
}

.about::backdrop { background: transparent; }
.about[open] { animation: dialogin .32s cubic-bezier(.16,1,.3,1) both; }
@keyframes dialogin { from { opacity: 0; transform: translateY(14px) scale(.985); } }

.close {
  position: absolute; top: .65rem; right: .95rem; z-index: 3;
  width: 34px; height: 34px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.55);
  background: rgba(10,10,13,.65); color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer; backdrop-filter: blur(4px);
}
.close:hover { color: var(--ink); border-color: #fff; }

.about-body {
  max-height: min(86vh, 900px); overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2.4rem clamp(1.25rem, 4vw, 2.75rem) 2.75rem;
  scrollbar-width: thin; scrollbar-color: #3a3a44 transparent;
}
.about-body::-webkit-scrollbar { width: 9px; }
.about-body::-webkit-scrollbar-thumb { background: #3a3a44; border-radius: 9px; }
.about-body::-webkit-scrollbar-track { margin: 14px 0; }

.about-body header { text-align: center; padding-bottom: .5rem; }
.about-logo { width: 120px; height: auto; opacity: .95; }
.about-body h1 {
  margin: 1rem 0 .4rem; font-size: clamp(20px, 3.4vw, 27px); font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
}
.lede {
  margin: 0 auto; max-width: 46ch; color: var(--muted);
  font-size: clamp(14px, 1.8vw, 16px);
}
.about-body h2 {
  margin: 2.4rem 0 .7rem; font-size: clamp(15px, 2vw, 17px); font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  padding-bottom: .5rem; border-bottom: 1px solid var(--line);
}
.about-body p { margin: 0 0 1rem; color: #c8c8d0; font-size: clamp(14px, 1.8vw, 15.5px); }
.about-body strong { color: var(--ink); }
.about-body em { color: var(--muted); font-style: italic; }

.about-body figure { margin: 1.9rem 0; }
.about-body figure img {
  width: 100%; height: auto; display: block; border-radius: 10px;
  border: 1px solid var(--line); background: #08080a;
}
.about-body figcaption {
  margin-top: .55rem; font-size: 12px; color: var(--muted);
  letter-spacing: .06em; text-align: center;
}
.signoff {
  margin-top: 2rem !important; padding-top: 1.4rem; border-top: 1px solid var(--line);
  text-align: center; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink) !important; font-size: 13px !important;
}

@media (max-width: 640px) {
  .about {
    width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh;
    border-radius: 0;
  }
  .close {
    top: max(.65rem, env(safe-area-inset-top));
    right: max(.95rem, env(safe-area-inset-right));
    width: 40px; height: 40px; font-size: 22px;
  }
  .about-body { max-height: 100dvh; padding: 2rem 1.15rem 3rem; }
  .help { top: .75rem; right: .75rem; width: 38px; height: 38px; }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .logo { width: min(240px, 42vw); }
  .bar  { width: min(240px, 42vw); }
  .controls { right: 1rem; bottom: 1rem; gap: .45rem; }
  .controls button { height: 40px; min-width: 48px; font-size: 14px; }
  .hint { font-size: 11px; left: 1rem; bottom: 1rem; }
  .about { width: min(680px, 94vw); }
}

@media (max-width: 640px) {

  .controls {
    right: max(.75rem, env(safe-area-inset-right));
    bottom: max(.75rem, env(safe-area-inset-bottom));
    gap: .35rem;
  }
  .controls button { height: 44px; min-width: 52px; font-size: 14px; }
  .help {
    top: max(.75rem, env(safe-area-inset-top));
    right: max(.75rem, env(safe-area-inset-right));
    width: 44px; height: 44px; font-size: 18px;
  }
  .play { left: max(.75rem, env(safe-area-inset-left)); right: auto; }
  .logo { width: min(220px, 62vw); }
  .bar  { width: min(220px, 62vw); }
  .tagline { letter-spacing: .3em; }
}

@media (max-height: 430px) {
  .logo { width: min(160px, 30vw); }
  .bar { margin-top: 1rem; width: min(160px, 30vw); }
  .tagline { margin-top: .7rem; }
  .status { margin-top: .6rem; }
}

.film {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: var(--bg);
  opacity: 0; transition: opacity .4s ease;
}
.film.on { opacity: 1; }

.stage.filming .photo, .stage.filming .lqip { visibility: hidden; }

.play { left: 1.1rem; right: auto; display: inline-flex; align-items: center; justify-content: center; }
.play svg { fill: currentColor; display: block; }

.play .i-still, .play[aria-pressed="true"] .i-film { display: none; }
.play[aria-pressed="true"] .i-still { display: block; }
.play[aria-pressed="true"] { background: var(--ink); color: #0a0a0c; border-color: var(--ink); }
.play svg { width: 17px; height: 17px; }

.ui.idle .controls,
.ui.idle .hint { opacity: 0; visibility: hidden; pointer-events: none; }

.ui.filming .controls,
.ui.filming .hint { opacity: 0; visibility: hidden; pointer-events: none; }
.ui .controls,
.ui .hint { transition: opacity .35s ease, visibility .35s; }

.filmmark {
  position: absolute; inset: 0; display: grid; place-content: center;
  text-align: center; pointer-events: none; z-index: 4;
  opacity: 0; visibility: hidden; transition: opacity .5s ease .15s, visibility .5s;
}
.stage.filming .filmmark { opacity: 1; visibility: visible; }
.filmlogo {
  width: min(280px, 46vw); height: auto; display: block; margin: 0 auto;
  filter: drop-shadow(0 2px 22px rgba(0,0,0,.85));
}
.filmmark .tagline {
  color: var(--ink);
  text-shadow: 0 1px 12px rgba(0,0,0,.9);
}

.overlay.quiet {
  background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.overlay.quiet .tagline,
.overlay.quiet .status { display: none; }
.overlay.quiet .logo { width: min(200px, 34vw); filter: drop-shadow(0 2px 20px rgba(0,0,0,.9)); }
.overlay.quiet .bar { box-shadow: 0 1px 12px rgba(0,0,0,.8); }

.social {
  position: fixed; left: 0; right: 0; bottom: 1.1rem; z-index: 30;
  display: flex; justify-content: space-between;
  padding: 0 1.1rem;
  pointer-events: none;
}
.social-btn { pointer-events: auto; }
.social-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(20,20,23,.72); color: var(--ink);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 1px 10px rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  transition: background .18s, border-color .18s, transform .18s;
}
.social-btn svg { fill: currentColor; display: block; }
.social-btn:hover { background: rgba(40,40,48,.92); border-color: #fff; transform: scale(1.06); }
.social-btn:active { transform: translateY(1px); }
.social-btn[aria-disabled="true"] { opacity: .45; cursor: default; }

.hint { left: calc(1.1rem + 52px); }

@media (max-width: 640px) {
  .social {
    bottom: max(.75rem, env(safe-area-inset-bottom));
    padding: 0 max(.75rem, env(safe-area-inset-left));
  }
  .social-btn { width: 44px; height: 44px; }
}

.intro {
  max-width: 44ch; margin: 1.4rem auto 0;
  font-size: clamp(12.5px, 1.5vw, 14px); line-height: 1.6;
  color: var(--muted); letter-spacing: .01em;
  opacity: 0; transition: opacity .7s ease .35s;
}
.overlay.loaded .intro { opacity: 1; }
.overlay.quiet .intro { display: none; }
@media (max-height: 560px) { .intro { display: none; } }

.topright {
  position: fixed; top: 1.1rem; right: 1.1rem; z-index: 30;
  display: flex; gap: .5rem;
}
.topright .help {
  position: static;
  width: auto; height: 40px; padding: 0 .95rem; border-radius: 20px;
  font-size: 12px; letter-spacing: .1em; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center;
}
.faq .about-body h3:first-of-type { margin-top: 1.8rem; }
.about-body h3 {
  margin: 1.9rem 0 .55rem; font-size: clamp(14px, 1.9vw, 16px); font-weight: 600;
  color: var(--ink); letter-spacing: .01em;
}
.about-body a { color: var(--ink); text-underline-offset: 3px; }
.about-body a:hover { text-decoration-color: var(--muted); }

@media (max-width: 640px) {
  .topright {
    top: max(.75rem, env(safe-area-inset-top));
    right: max(.75rem, env(safe-area-inset-right));
  }
  .topright .help { width: auto; height: 44px; border-radius: 22px; font-size: 12px; }
}
