
@font-face {
  font-family: "DSEG7";
  src: url("../assets/fonts/DSEG7Classic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --bloom: 0 0 2px #fff, 0 0 8px rgba(255, 255, 255, 0.75), 0 0 18px rgba(255, 255, 255, 0.5), 0 0 36px rgba(255, 255, 255, 0.3);
  --bloom-line: 0 0 2px #fff, 0 0 8px rgba(255, 255, 255, 0.75), 0 0 18px rgba(255, 255, 255, 0.45), 0 0 36px rgba(255, 255, 255, 0.25);
  --bloom-box: var(--bloom-line), inset 0 0 2px #fff, inset 0 0 8px rgba(255, 255, 255, 0.5), inset 0 0 18px rgba(255, 255, 255, 0.25);
  --bw: 5px;
  --mono: "DM Mono", ui-monospace, "Consolas", monospace;
  --gutter: 24px;
  --max: 1180px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.05em;
  text-shadow: var(--bloom);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, figure, ul { margin: 0; padding: 0; }
ul { list-style: none; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: var(--bw) solid var(--fg); outline-offset: 3px; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--fg); color: var(--bg); padding: 8px 12px; text-decoration: none; text-shadow: none;
}
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.wish { display: inline-block; line-height: 0; text-decoration: none; }
.wish img { width: 100%; height: auto; }
.wish--hero { width: min(300px, 78vw); }
.wish--big { display: block; width: min(400px, 100%); margin-bottom: 26px; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background-color 0.25s, border-color 0.25s;
  border-bottom: var(--bw) solid transparent;
}
.nav.is-solid { background: #000; border-bottom-color: var(--fg); }
.nav__logo { opacity: 0; transition: opacity 0.25s; }
.nav.is-solid .nav__logo { opacity: 1; }
.nav__logo img { height: 34px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a:not(.wish) {
  position: relative;
  padding: 8px 12px; font-size: 13px; letter-spacing: 0.11em; text-transform: uppercase;
  text-decoration: none; color: var(--fg); transition: color 0.15s, transform 0.15s;
}
.nav__links a:not(.wish)::before { content: "> "; opacity: 0; transition: opacity 0.15s; }
.nav__links a:not(.wish):hover,
.nav__links a.is-active { color: var(--fg); }
.nav__links a:not(.wish):hover::before,
.nav__links a.is-active::before { opacity: 1; }
.nav__cta { width: 132px; margin-left: 14px; }
.nav__toggle {
  display: none;
  width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
}
.nav__toggle span {
  display: block; width: 28px; height: 3px; margin: 6px auto; background: var(--fg);
  box-shadow: var(--bloom-line); transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.hero {
  --art-w: clamp(900px, 100vw, 1700px);
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--nav-h) + 2vh) var(--gutter) calc(var(--art-w) * 0.666 * 0.25);
  overflow: hidden;
}
.hero__art { position: absolute; left: 50%; bottom: 0; width: var(--art-w); transform: translateX(-50%); }
.hero__art img { width: 100%; animation: drift 24s ease-in-out infinite alternate; transform-origin: 50% 90%; }
.hero__art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, #000 0, transparent 12%, transparent 88%, #000 100%),
    linear-gradient(to top, #000 0, transparent 10%);
}
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.045); } }

.hero__content {
  position: relative; z-index: 2; width: 100%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero__title img { width: min(340px, 70vw); height: auto; }
.hero__video {
  width: min(560px, 100%);
  width: min(100%, clamp(340px, (100svh - 400px) * 16 / 9, 560px));
  aspect-ratio: 16 / 9; margin-top: 22px;
  background: #000;
}
.hero__video iframe { display: block; width: 100%; height: 100%; border: 0; }
.hero__cta { margin-top: 22px; }
.section { position: relative; padding: 120px 0; }
.heading {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 48px;
  font-size: clamp(22px, 3vw, 32px); font-weight: 500; letter-spacing: 0.09em;
}
.heading { min-height: 1.4em; }
.window__title { min-height: 1.4em; }
.is-typing::after { content: "_"; }
.heading::after { content: ""; flex: 1; height: var(--bw); background: var(--fg); align-self: center; }

.js .reveal { opacity: 0; transition: opacity 0.8s ease; }
.reveal.is-in { opacity: 1; }

.scene { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; clip-path: inset(0); display: flex; align-items: center; }
.scene__bg { position: absolute; inset: 0; }
.scene__bg img { position: absolute; object-fit: cover; }
.scene__city {
  left: 0; top: 0; width: 72%; height: 78%;
  -webkit-mask-image: linear-gradient(to right, #000 45%, transparent 100%), linear-gradient(to bottom, #000 55%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, #000 45%, transparent 100%), linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-composite: intersect;
}
.scene__theater {
  right: 0; bottom: 0; width: 78%; height: 72%;
  -webkit-mask-image: linear-gradient(to left, #000 45%, transparent 100%), linear-gradient(to top, #000 50%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to left, #000 45%, transparent 100%), linear-gradient(to top, #000 50%, transparent 100%);
  mask-composite: intersect;
}
.scene__john {
  position: fixed; z-index: 1; right: 5%; top: calc(var(--nav-h) + 16px);
  height: calc(100vh - var(--nav-h) - 40px); width: auto; max-width: none; pointer-events: none;
}
.scene__inner { position: relative; z-index: 2; padding-top: calc(var(--nav-h) + 40px); padding-bottom: 80px; }
.window { width: min(480px, 100%); border: var(--bw) solid var(--fg); background: #000; }
.window__body { padding: 30px 28px 6px; }
.window__title { font-size: clamp(20px, 2.4vw, 26px); font-weight: 500; letter-spacing: 0.09em; }
.story__lead { margin-top: 22px; font-size: clamp(18px, 2vw, 22px); line-height: 1.4; }
.story__body { margin-top: 18px; font-size: 14px; }
.story__quote { margin-top: 26px; height: 3.4em; font-size: 13px; letter-spacing: 0.17em; line-height: 1.7; }
.story__quote p { opacity: calc(1 - var(--i) / 14); }

.about { display: flex; flex-direction: column; gap: 56px; }
.about__row { display: grid; grid-template-columns: 600px 1fr; gap: 48px; align-items: center; }
.about__row:nth-child(even) { grid-template-columns: 1fr 600px; }
.about__row:nth-child(even) .about__clip { order: 2; }
.about__clip {
  line-height: 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18%, #000 82%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 18%, #000 82%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
  mask-composite: intersect;
}
.about__clip video { display: block; width: 100%; height: auto; aspect-ratio: 600 / 156; }
.about__text h3 { font-size: 20px; font-weight: 700; letter-spacing: 0.09em; color: #f00; text-shadow: 0 0 2px #f00, 0 0 8px rgba(255, 0, 0, 0.75), 0 0 18px rgba(255, 0, 0, 0.5), 0 0 36px rgba(255, 0, 0, 0.3); }
.about__text p, .about__text li { margin-top: 12px; font-size: 14px; }
.about__text li::before { content: "- "; }
.core__lead { margin-top: 72px; font-size: 13px; letter-spacing: 0.17em; }
.core { margin-top: 14px; font-size: clamp(18px, 2.4vw, 28px); line-height: 1.3; letter-spacing: 0.06em; }
.core p { opacity: calc(1 - var(--i) / 16); }
.js .core p { visibility: hidden; }
.js .core p.is-on { visibility: visible; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery li:first-child { grid-column: 1 / -1; }
.gallery button { display: block; width: 100%; height: 100%; padding: 0; border: var(--bw) solid var(--fg); background: #000; cursor: zoom-in; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery button:hover img { transform: scale(1.03); }

.viewer {
  max-width: none; max-height: none; width: 100vw; height: 100vh; margin: 0; padding: 0;
  border: 0; background: #000; color: var(--fg);
}
.viewer[open] { display: grid; place-items: center; }
.viewer::backdrop { background: #000; }
.viewer img { max-width: 92vw; max-height: 84vh; width: auto; border: var(--bw) solid var(--fg); }
.viewer__btn, .viewer__close {
  position: absolute; background: none; border: var(--bw) solid var(--fg); cursor: pointer;
  width: 52px; height: 52px; font-size: 30px; line-height: 1;
}
.viewer__btn:hover, .viewer__close:hover { background: var(--fg); color: var(--bg); }
.viewer__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.viewer__next { right: 20px; top: 50%; transform: translateY(-50%); }
.viewer__close { top: 20px; right: 20px; }
.viewer__count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 13px; color: var(--fg); }

.community__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 24px; margin-top: 28px; }
.social { display: flex; flex-wrap: wrap; gap: 6px; }
.social a { display: block; line-height: 0; }
.social img { width: 96px; height: 96px; }
.contact { margin-top: 16px; font-size: 13px; letter-spacing: 0.12em; }
.contact a { text-underline-offset: 4px; }

.plush { margin: 0 6% 0 auto; padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; transform-origin: 50% 100%; }
.plush img { width: 130px; height: auto; }
.plush.is-bouncing { animation: plush-bounce 0.6s ease-out; }
@keyframes plush-bounce {
  0% { transform: translateY(0) scale(1, 1); }
  14% { transform: translateY(0) scale(1.2, 0.78); }
  38% { transform: translateY(-30px) scale(0.88, 1.14); }
  58% { transform: translateY(0) scale(1.08, 0.93); }
  76% { transform: translateY(-7px) scale(0.97, 1.03); }
  100% { transform: translateY(0) scale(1, 1); }
}

.minigame { margin-top: 32px; }
.minigame.is-in { animation: minigame-in 0.5s ease; }
@keyframes minigame-in { from { opacity: 0; } to { opacity: 1; } }
.minigame__bar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 12px; letter-spacing: 0.12em; }
.minigame__bar > span:last-child { display: flex; align-items: center; white-space: nowrap; }
.minigame__btn { padding: 4px 8px; border: 0; background: none; cursor: pointer; font-size: 12px; letter-spacing: 0.12em; }
.minigame__btn + .minigame__btn { font-size: 20px; line-height: 1; }
.minigame__canvas {
  display: block; width: 100%; height: clamp(240px, 30vw, 340px);
  border: var(--bw) solid var(--fg); box-shadow: var(--bloom-box); background: #000;
  cursor: none; touch-action: manipulation; user-select: none;
}
.minigame__canvas.is-over { cursor: pointer; }

.footer { border-top: var(--bw) solid var(--fg); padding: 56px 0 120px; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.footer__logos { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; justify-content: center; }
.footer__credit { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0; }
.footer__inval { width: 150px; }
.footer__pg img { width: 160px; }
.footer__legal { font-size: 11px; color: var(--fg); line-height: 1.8; }

.hud {
  position: fixed; right: 22px; bottom: 18px; z-index: 95;
  text-align: right; pointer-events: none;
  opacity: 0; transition: opacity 0.3s;
}
.hud.is-on { opacity: 1; }
.hud__score { position: relative; font-family: "DSEG7", var(--mono); font-size: 26px; line-height: 1; }
.hud__val { color: var(--fg); }
.hud__mult { margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--fg); }
.hud__mult.bump { animation: bump 0.3s ease; }
@keyframes bump { 0% { transform: scale(1.6); } 100% { transform: scale(1); } }

.heading::after { box-shadow: var(--bloom-line); }
.window, .gallery button, .viewer__btn, .viewer__close { box-shadow: var(--bloom-box); }
.viewer img { box-shadow: var(--bloom-line); }
.nav.is-solid { box-shadow: var(--bloom-line), inset 0 -8px 10px -6px rgba(255, 255, 255, 0.6); }
.footer { box-shadow: var(--bloom-line), inset 0 8px 10px -6px rgba(255, 255, 255, 0.6); }
@media (max-width: 820px) {
  .nav__links { box-shadow: 0 6px 10px -4px rgba(255, 255, 255, 0.6); }
  .nav__links a:not(.wish) { box-shadow: 0 6px 8px -6px rgba(255, 255, 255, 0.7); }
}

@media (max-width: 1000px) {
  .about__row, .about__row:nth-child(even) { grid-template-columns: 1fr; gap: 20px; }
  .about__row:nth-child(even) .about__clip { order: 0; }
  .hud { display: none; }
  .scene__john { top: auto; bottom: 0; right: -4%; height: auto; width: min(380px, 76%); }
  .scene__city { width: 100%; height: 55%; }
  .scene__theater { width: 100%; height: 55%; }
}
@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px; background: #000; border-bottom: var(--bw) solid var(--fg);
    display: none;
  }
  .nav.is-open { background: #000; }
  .nav.is-open .nav__links { display: flex; }
  .nav.is-open .nav__logo { opacity: 1; }
  .nav__links a:not(.wish) { padding: 12px 0; border-bottom: var(--bw) solid var(--fg); }
  .nav__cta { width: 200px; margin: 18px auto 0; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --nav-h: 56px; }
  .section { padding: 84px 0; }
  .heading { margin-bottom: 32px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .social img { width: 72px; height: 72px; }
  .plush img { width: 104px; }
  .viewer__prev { left: 6px; } .viewer__next { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; }
}
