/* Inuverse Games. One stylesheet for every page. */

@font-face {
  font-family: "Darumadrop";
  src: url("/assets/fonts/darumadrop-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Zen Maru";
  src: url("/assets/fonts/zenmaru-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Zen Maru";
  src: url("/assets/fonts/zenmaru-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --night: #17153b;      /* the sky the dogs live in */
  --night-deep: #0f0d2b;
  --night-soft: #24215a;
  --star: #fff4e0;       /* text and stars */
  --star-dim: #c9c3e6;   /* secondary text on night */
  --shiba: #f39a3b;      /* Shiba fur: actions */
  --shiba-hot: #ffb35c;
  --sakura: #ff8db5;
  --seal: #d62b3f;
  --matcha: #014038;     /* the ShibaRun art's own green */

  --display: "Darumadrop", "Zen Maru", ui-rounded, system-ui, sans-serif;
  --body: "Zen Maru", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--star);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--shiba-hot); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--sakura); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.005em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; max-width: 38em; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--star); color: var(--night); padding: 0.6rem 1rem; border-radius: 0.5rem;
}
.skip:focus { top: 1rem; }

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

/* Header */

.site-header { position: relative; z-index: 2; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 1.25rem; padding-bottom: 1.25rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  color: var(--star); text-decoration: none;
  font-family: var(--display); font-size: 1.45rem; line-height: 1;
}
.brand { align-items: flex-end; gap: 0.45rem; }
.brand img { height: 2.6rem; width: auto; max-width: 100%; }
.site-nav ul { display: flex; gap: clamp(0.9rem, 3vw, 2rem); list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--star); text-decoration: none; font-weight: 700; font-size: 0.98rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--shiba-hot); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

@media (max-width: 34rem) {
  .brand img { height: 2rem; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav ul { gap: 1.1rem; }
}

/* Buttons */

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.7rem 1.4rem;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--body); font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
}
.btn-go { background: var(--shiba); color: var(--night-deep); }
.btn-go:hover { background: var(--shiba-hot); }
.btn-line { border-color: currentColor; color: var(--star); }
.btn-line:hover { background: rgba(255, 244, 224, 0.1); }
.btn[aria-disabled="true"] { opacity: 0.65; cursor: default; }

/* Home hero: the Inuverse */

.sky { position: relative; isolation: isolate; }
.sky::before {
  /* faint background stars, drawn once in CSS so they cost nothing to load */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 68%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 14%, var(--star) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 63% 84%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 9%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 47%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 81%, var(--star) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 37% 40%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 56%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 72%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 19% 5%, var(--star) 50%, transparent 51%),
    radial-gradient(ellipse 70% 60% at 75% 40%, var(--night-soft), transparent 70%);
  opacity: 0.85;
}

.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem;
  padding-top: clamp(1.5rem, 5vw, 4rem); padding-bottom: clamp(3rem, 8vw, 6rem);
  align-items: center;
}
@media (min-width: 52rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}
.hero h1 { font-size: clamp(3.1rem, 10.5vw, 7.4rem); }
.hero .lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--star-dim); margin-top: 1.5rem; max-width: 26em; }


/* Home hero movie */

.movie { background: var(--night-deep); }
.movie-frame {
  position: relative; max-width: 120rem; margin: 0 auto;
  aspect-ratio: 16 / 9; overflow: hidden;
}
.movie-video, .movie-end { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.movie-over {
  position: absolute; left: 50%; top: 5%; transform: translateX(-50%);
  width: min(34%, 30rem); display: flex; flex-direction: column; align-items: center; gap: clamp(0.4rem, 1.6vw, 1.4rem);
}
.movie-logo { width: 100%; filter: drop-shadow(0 0.4rem 1rem rgba(15, 13, 43, 0.45)); }
.movie-soon {
  display: flex; align-items: center; gap: 0.6em; margin: 0;
  padding: 0.45em 1em 0.45em 0.8em; border-radius: 999px;
  background: rgba(15, 13, 43, 0.72); border: 1.5px solid rgba(255, 244, 224, 0.35);
  color: var(--star); font: 700 clamp(0.85rem, 1.75vw, 1.3rem)/1.2 var(--body);
  white-space: nowrap; box-shadow: 0 0.4rem 1.2rem rgba(15, 13, 43, 0.4);
  /* size to the text, not to the logo column it sits in (half the screen on a phone) */
  width: max-content; max-width: calc(100vw - 2rem); flex-shrink: 0;
}
.movie-soon-icons { display: inline-flex; gap: 0.45em; flex-shrink: 0; }
.movie-soon svg { width: 1.4em; height: 1.4em; flex-shrink: 0; fill: currentColor; }
.movie-over .btn { font-size: clamp(0.85rem, 1.4vw, 1.1rem); min-height: clamp(2.4rem, 3.6vw, 3.2rem); box-shadow: 0 0.4rem 1.2rem rgba(15, 13, 43, 0.4); }
.movie-control {
  position: absolute; right: clamp(0.6rem, 2vw, 1.5rem); bottom: clamp(0.6rem, 2vw, 1.5rem);
  background: rgba(15, 13, 43, 0.7); color: var(--star); border: 1.5px solid rgba(255, 244, 224, 0.6);
  border-radius: 999px; padding: 0.4rem 0.9rem; font: 700 0.85rem/1.2 var(--body); cursor: pointer;
}
.movie-control:hover { background: rgba(15, 13, 43, 0.9); }

/* With the script: hide the end frame and the logo until the movie finishes */
.movie.is-scripted .movie-end { opacity: 0; }
.movie.is-scripted .movie-over { opacity: 0; visibility: hidden; }
.movie.is-done .movie-end { opacity: 1; transition: opacity 0.8s ease-in-out; }
.movie.is-done .movie-over { opacity: 1; visibility: visible; transition: opacity 0.6s 0.7s; }

@media (prefers-reduced-motion: reduce) {
  .movie-video { display: none; }
  .movie .movie-end { opacity: 1; }
  .movie .movie-over { opacity: 1; visibility: visible; }
}

@media (max-width: 40rem) {
  /* on a phone, a taller crop keeps the racers big */
  .movie-frame { aspect-ratio: 4 / 3; }
  .movie-over { width: 46%; top: 4%; }
}

/* Full-screen hero: the movie fills the first screen and the header sits on it */
.has-hero .site-header {
  position: absolute; top: 0; left: 0; right: 0;
  background: linear-gradient(to bottom, rgba(15, 13, 43, 0.82) 0%, rgba(15, 13, 43, 0.45) 55%, rgba(15, 13, 43, 0) 100%);
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}
.has-hero .site-header a { text-shadow: 0 1px 6px rgba(15, 13, 43, 0.6); }
.has-hero .movie-frame { max-width: none; aspect-ratio: auto; height: 100vh; height: 100svh; min-height: 30rem; }
.has-hero .movie-over { top: clamp(5.5rem, 13vh, 9rem); }
@media (max-aspect-ratio: 3/4) {
  /* tall phone screens: a taller crop keeps the racers in view under the menu */
  .has-hero .movie-frame { height: min(100svh, 165vw); min-height: 0; }
  .has-hero .movie-over { top: 9.75rem; width: 50%; }
}

/* Studio intro under the movie */

.intro { padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem); }
.intro h1 { font-size: clamp(2.8rem, 8.5vw, 6.4rem); max-width: 12em; }
.intro .lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--star-dim); margin-top: 1.5rem; max-width: 32em; }

/* Constellations */

.constellation { width: 100%; overflow: visible; }
.constellation .line { stroke: var(--star); stroke-width: 1.6; stroke-linecap: round; opacity: 0.55; fill: none; }
.constellation .star { fill: var(--star); }
.constellation .bright { fill: var(--shiba-hot); }
.constellation .halo { fill: var(--shiba); opacity: 0.18; }
.constellation .name {
  font-family: var(--body); font-weight: 700; font-size: 15px; fill: var(--star-dim); letter-spacing: 0.04em;
}

.constellation.faint .line { stroke-dasharray: 2 9; opacity: 0.35; }
.constellation.faint .star { opacity: 0.55; }

@media (prefers-reduced-motion: no-preference) {
  .constellation.draw .line {
    stroke-dasharray: 1 1;
    stroke-dashoffset: 1;
    animation: draw 0.4s ease-out forwards;
    animation-delay: calc(0.3s + var(--i) * 0.05s);
  }
  .constellation.draw .star, .constellation.draw .halo {
    opacity: 0; animation: appear 0.5s ease-out forwards; animation-delay: calc(0.1s + var(--i) * 0.04s);
  }
  .constellation.draw .halo { animation-name: appear-halo; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@keyframes appear-halo { to { opacity: 0.18; } }

/* ShibaRun feature */

.feature-shibarun {
  /* full-width night scene with the copy over its dark left half */
  position: relative; isolation: isolate; overflow: hidden; background: var(--night-deep);
  min-height: min(92vh, 52rem); display: flex; align-items: center;
  padding: clamp(5rem, 10vw, 8rem) 0;
}
.feature-bg { position: absolute; inset: 0; z-index: -1; }
.feature-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 85% 50%; transform: scale(1.08); }
.feature-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(15, 13, 43, 0.95) 0%, rgba(15, 13, 43, 0.88) 40%, rgba(15, 13, 43, 0.35) 62%, rgba(15, 13, 43, 0) 85%),
    linear-gradient(to bottom, var(--night) 0%, rgba(15, 13, 43, 0) 18%, rgba(15, 13, 43, 0) 82%, var(--night-deep) 100%);
}
.feature-shibarun .copy { max-width: 34rem; }
.feature-shibarun .logo { width: min(19rem, 70%); margin: 0 0 1.25rem -0.4rem; }
.feature-shibarun h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.feature-shibarun p { color: var(--star-dim); }
@media (max-width: 48rem) {
  /* phones: the night scene is a band across the top with both racers in view, the copy below */
  .feature-shibarun { display: block; min-height: 0; padding: 0 0 clamp(3rem, 10vw, 4rem); }
  .feature-bg { position: relative; inset: auto; height: 62vw; min-height: 15rem; margin-bottom: -2.5rem; }
  .feature-bg img { object-position: 80% 60%; }
  .feature-bg::after { background: linear-gradient(to bottom, var(--night) 0%, rgba(15, 13, 43, 0) 18%, rgba(15, 13, 43, 0) 65%, var(--night-deep) 100%); }
}

.facts { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.45rem; }
.facts li { padding-left: 1.6rem; position: relative; }
.facts li::before {
  /* a paw print, not a generic bullet */
  content: ""; position: absolute; left: 0; top: 0.42em; width: 0.95rem; height: 0.95rem;
  background: var(--shiba);
  -webkit-mask: url("/assets/img/paw.svg") center / contain no-repeat;
          mask: url("/assets/img/paw.svg") center / contain no-repeat;
}

/* Courses: the six places you race */

.courses { background: var(--night-deep); padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 8vw, 6rem); }
.courses h3 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 1.5rem; }
.course-list {
  list-style: none; margin: 0; padding: 0.5rem 0 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem;
}
@media (min-width: 40rem) { .course-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .course-list { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.course figure { margin: 0; }
.course img {
  /* the slanted, white-edged frames come from ShibaRun's own art */
  aspect-ratio: 1; width: 100%; object-fit: cover;
  border: 4px solid #fff; border-radius: 1rem;
  transform: skewX(-6deg);
}
.course figcaption { margin-top: 0.6rem; font-weight: 700; }
.course figcaption small { display: block; font-weight: 400; color: var(--star-dim); font-size: 0.88rem; }

/* Course cards: a clip plays in the card on hover; click opens the pop-up player */
.course-btn {
  all: unset; display: block; width: 100%; cursor: pointer; color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.course-btn:focus-visible .course-media { outline: 3px solid var(--sakura); outline-offset: 4px; }
.course-media {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden;
  border: 4px solid #fff; border-radius: 1rem; transform: skewX(-6deg);
  background: var(--night-deep);
}
.course-media img, .course-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border: 0; border-radius: 0; transform: skewX(6deg) scale(1.12);
}
.course-media video { opacity: 0; transition: opacity 0.25s ease; }
.course-btn.is-playing .course-media video { opacity: 1; }
.course-play {
  position: absolute; right: 0.6rem; bottom: 0.6rem; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: rgba(15, 13, 43, 0.72); border: 2px solid rgba(255, 244, 224, 0.85);
  transform: skewX(6deg); transition: transform 0.25s ease, background 0.25s ease;
}
.course-play::after {
  content: ""; position: absolute; left: 52%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 0.45rem 0 0.45rem 0.75rem; border-color: transparent transparent transparent #fff4e0;
}
.course-btn:hover .course-play, .course-btn:focus-visible .course-play { background: var(--shiba); transform: skewX(6deg) scale(1.1); }
.course-cap { display: block; margin-top: 0.6rem; font-weight: 700; }
.course-cap small { display: block; font-weight: 400; color: var(--star-dim); font-size: 0.88rem; }

.clip-dialog {
  padding: 0; border: 0; background: transparent; color: var(--star);
  width: min(64rem, calc(100vw - 2rem)); max-width: none; max-height: calc(100vh - 2rem);
}
.clip-dialog::backdrop { background: rgba(8, 7, 24, 0.82); backdrop-filter: blur(4px); }
.clip-box { background: var(--night-deep); border: 1px solid rgba(255, 244, 224, 0.16); border-radius: 1rem; padding: 1rem; }
.clip-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 0.75rem; }
.clip-title { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.clip-close {
  all: unset; cursor: pointer; width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  border-radius: 50%; font-size: 1.8rem; line-height: 1; border: 1.5px solid rgba(255, 244, 224, 0.5);
}
.clip-close:hover { background: rgba(255, 244, 224, 0.12); }
.clip-close:focus-visible { outline: 3px solid var(--sakura); outline-offset: 2px; }
.clip-video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 0.6rem; }
.clip-note { margin: 0.6rem 0 0; color: var(--star-dim); font-size: 0.9rem; }


/* Next game */

.next { padding: clamp(4rem, 9vw, 7rem) 0; }
.next .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
@media (min-width: 52rem) { .next .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.next h2 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin-bottom: 0.25rem; }
.status {
  display: inline-block; margin: 0.4rem 0 1.25rem; padding: 0.2rem 0.75rem;
  border: 1.5px dashed var(--star-dim); border-radius: 999px; color: var(--star-dim); font-size: 0.92rem;
}

/* About strip */

.about-strip { background: var(--night-deep); padding: clamp(3.5rem, 8vw, 6rem) 0; }
.about-strip .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 3rem; }
@media (min-width: 52rem) { .about-strip .wrap { grid-template-columns: auto minmax(0, 1fr); align-items: start; } }
.about-strip .kanji {
  font-family: var(--display); font-size: clamp(5rem, 14vw, 9rem); line-height: 0.9; color: var(--seal);
}
.about-strip .kanji img { width: clamp(6rem, 14vw, 9rem); transform: rotate(-4deg); }
.about-strip h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 1rem; }

/* Inner pages */

.page-head { padding-top: clamp(2rem, 6vw, 4.5rem); padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
/* keep the footer at the bottom on short pages */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }
.page-head h1 { font-size: clamp(2.8rem, 8vw, 5.2rem); }
.page-head .lede { font-size: 1.2rem; color: var(--star-dim); margin-top: 1rem; }
.prose { padding-bottom: clamp(3rem, 8vw, 6rem); }
.prose h2 { font-size: clamp(1.7rem, 3.5vw, 2.2rem); margin: 2.5rem 0 0.75rem; }
.prose ul { padding-left: 1.2rem; max-width: 38em; }
.prose li { margin-bottom: 0.4rem; }

/* About: the two dates the story hangs on, joined by a dotted run. */
.story { list-style: none; padding: 0; margin: 0 0 1rem; max-width: 44rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(1.5rem, 5vw, 3.5rem); position: relative; }
.story::before { content: ""; position: absolute; left: 0; right: 0; top: 2.1rem;
  border-top: 3px dotted rgba(201, 195, 230, 0.3); }
.prose .story li { margin: 0; position: relative; }
.story-year { display: inline-block; font-family: var(--display); font-size: clamp(2.6rem, 7vw, 3.6rem);
  line-height: 1.2; color: var(--star-dim); background: var(--night); padding-right: 0.6rem; position: relative; }
.story li:last-child .story-year { color: var(--shiba); }
.story-text { display: block; margin-top: 0.4rem; color: var(--star-dim); max-width: 18em; }
/* About: Blaze, a pile of prints on the table, the same way the café screens land. */
.blaze { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); max-width: 54rem;
  margin: 2.5rem 0 5rem; }
.blaze-photo { margin: 0; position: relative; transform: rotate(var(--rest, 0deg)); }
.blaze-photo img { display: block; width: 100%; height: auto; border: 3px solid var(--star);
  border-radius: 1rem; box-shadow: 0 1.2rem 2.5rem rgba(0, 0, 0, 0.45); }
.blaze-grin { grid-column: 1 / 9; grid-row: 1 / 3; align-self: center; --rest: -1.5deg; z-index: 1; }
.blaze-tag { grid-column: 8 / 13; grid-row: 1; margin-top: 0.5rem; --rest: 2.5deg; z-index: 2; }
.blaze-sprawl { grid-column: 8 / 13; grid-row: 2; margin: -1rem 0 0 1.5rem; --rest: -2deg; z-index: 3; }
.blaze-crouch { grid-column: 1 / 4; grid-row: 2; align-self: end; max-width: 11rem;
  margin: 0 0 -3rem -0.75rem; --rest: -4deg; z-index: 4; }
.blaze-crouch img { border-radius: 0.7rem; }
@media (max-width: 48rem) {
  .blaze { margin-bottom: 3rem; }
  .blaze-grin { grid-column: 1 / -1; grid-row: 1; }
  .blaze-tag { grid-column: 1 / 7; grid-row: 2; margin-top: 1.25rem; }
  .blaze-sprawl { grid-column: 7 / 13; grid-row: 2; margin: 2.25rem 0 0 0.25rem; }
  .blaze-crouch { grid-column: 8 / 13; grid-row: 1; justify-self: end; max-width: 8rem;
    margin: 0 -0.25rem -1.75rem 0; --rest: 4deg; }
  .blaze-photo img { border-radius: 0.8rem; }
}
@media (max-width: 30rem) {
  .story { grid-template-columns: 1fr; gap: 1.25rem; }
  .story::before { display: none; }
}

/* Game page */

.game-hero { position: relative; isolation: isolate; min-height: min(78vh, 46rem); display: flex; align-items: flex-end; overflow: hidden; }
.game-hero-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.game-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, var(--night) 0%, rgba(23, 21, 59, 0.75) 35%, rgba(23, 21, 59, 0) 70%); }
.game-hero-copy { padding-top: 6rem; padding-bottom: clamp(2rem, 5vw, 3.5rem); display: grid; justify-items: start; gap: 1rem; }
.game-logo { width: min(22rem, 70%); filter: drop-shadow(0 0.4rem 1rem rgba(15, 13, 43, 0.5)); }
.game-hero h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); max-width: 14em; text-shadow: 0 2px 12px rgba(15, 13, 43, 0.6); }
.soon-pill { font-size: clamp(0.85rem, 1.6vw, 1.05rem); }
.game-body { padding-top: clamp(2rem, 5vw, 3rem); }
.game-body .lede { font-size: clamp(1.15rem, 2.2vw, 1.35rem); max-width: 34em; }
.game-body .course-list { margin-top: 1.25rem; max-width: 52rem; }
@media (min-width: 40rem) { .game-body .course-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
.contact-mail { font-size: clamp(1.15rem, 3vw, 1.5rem); font-weight: 700; overflow-wrap: anywhere; }

/* Footer */

.site-footer { background: var(--night-deep); border-top: 1px solid rgba(255, 244, 224, 0.12); padding: 2.5rem 0 3rem; font-size: 0.95rem; color: var(--star-dim); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; align-items: flex-start; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer a { color: var(--star); }
.site-footer p { margin: 0; }
.footer-legal { display: grid; gap: 0.3rem; max-width: 34rem; font-size: 0.85rem; line-height: 1.5; }
.footer-logo { height: 3rem; width: auto; max-width: 100%; margin: 0.5rem 0 1.4rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Scroll motion. Only with the script (html.motion), never with reduced motion. */
.motion .sky::before { transform: translateY(var(--sy, 0px)); will-change: transform; }
.motion [data-reveal] {
  opacity: 0; transform: translateY(2.2rem);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.16, 0.84, 0.24, 1);
}
.motion [data-reveal].in { opacity: 1; transform: none; }
.motion [data-d="1"] { transition-delay: 0.08s; }
.motion [data-d="2"] { transition-delay: 0.16s; }
.motion [data-d="3"] { transition-delay: 0.45s; }
.motion [data-d="4"] { transition-delay: 0.6s; }

/* Headline words race in from the left, one after another */
.motion [data-reveal="words"] { opacity: 1; transform: none; }
.motion [data-reveal="words"] .w {
  display: inline-block; opacity: 0; transform: translateX(-1.2em) skewX(-14deg);
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.16, 0.84, 0.24, 1);
}
.motion [data-reveal="words"].in .w { opacity: 1; transform: none; }
.motion .w[data-i="1"] { transition-delay: 0.07s; } .motion .w[data-i="2"] { transition-delay: 0.14s; }
.motion .w[data-i="3"] { transition-delay: 0.21s; } .motion .w[data-i="4"] { transition-delay: 0.28s; }
.motion .w[data-i="5"] { transition-delay: 0.35s; } .motion .w[data-i="6"] { transition-delay: 0.42s; }
.motion .w[data-i="7"] { transition-delay: 0.49s; }

/* ShibaRun art sweeps in from the left, then drifts as you scroll */
.motion [data-reveal="left"] { transform: translateX(-6%) skewX(3deg); clip-path: inset(0 100% 0 0); transition: opacity 0.6s ease, transform 1s cubic-bezier(0.16, 0.84, 0.24, 1), clip-path 1s cubic-bezier(0.16, 0.84, 0.24, 1); }
.motion [data-reveal="left"].in { clip-path: inset(0 0 0 0); }
.motion .feature-bg img { transform: translateY(var(--py, 0px)) scale(1.12); will-change: transform; }

/* Logo lands with a bounce */
.motion [data-reveal="pop"] { transform: scale(0.6) rotate(-6deg); transition: opacity 0.4s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Facts tick in one by one */
.motion [data-reveal="list"] { opacity: 1; transform: none; }
.motion [data-reveal="list"] li { opacity: 0; transform: translateX(-1.5rem); transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.16, 0.84, 0.24, 1); }
.motion [data-reveal="list"].in li { opacity: 1; transform: none; }
.motion [data-reveal="list"] li:nth-child(1) { transition-delay: 0.3s; } .motion [data-reveal="list"] li:nth-child(2) { transition-delay: 0.42s; }
.motion [data-reveal="list"] li:nth-child(3) { transition-delay: 0.54s; } .motion [data-reveal="list"] li:nth-child(4) { transition-delay: 0.66s; }

/* Course cards are dealt onto the table, left to right */
.motion [data-reveal="cards"] { opacity: 1; transform: none; }
.motion [data-reveal="cards"] .course { opacity: 0; transform: translateY(3rem) rotate(-4deg) scale(0.92); transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.34, 1.4, 0.64, 1); }
.motion [data-reveal="cards"].in .course { opacity: 1; transform: none; }
.motion [data-reveal="cards"] .course:nth-child(2) { transition-delay: 0.08s; } .motion [data-reveal="cards"] .course:nth-child(3) { transition-delay: 0.16s; }
.motion [data-reveal="cards"] .course:nth-child(4) { transition-delay: 0.24s; } .motion [data-reveal="cards"] .course:nth-child(5) { transition-delay: 0.32s; }
.motion [data-reveal="cards"] .course:nth-child(6) { transition-delay: 0.4s; }

/* Courses lift and zoom under the pointer (only where there is a pointer that hovers) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .course figure { overflow: visible; }
  .course-media { transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease; }
  .course-btn:hover .course-media { transform: skewX(-6deg) translateY(-0.5rem) scale(1.05); box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.45), 0 0 0 4px var(--shiba); }
}

/* Meet the café: the game's own café and Customise screens, as two tilted
   screens. The clips play only while on screen. */
.cafe-show {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--night-deep); padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem);
}
.cafe-show::before {          /* the café's lantern light */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 55% 60% at 60% 62%, rgba(243, 154, 59, 0.28), transparent 70%);
}
.cafe-copy { grid-column: 9 / 13; grid-row: 1; align-self: center; padding-left: clamp(1rem, 3vw, 2.5rem); }
.cafe-copy h2, .cafe-copy h3 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin: 0 0 0.6rem; }
.cafe-copy p { color: var(--star-dim); margin: 0; }
.cafe-stage { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; margin-bottom: 1.5rem; }
.screen { position: relative; margin: 0; }
.screen video {
  display: block; width: 100%; height: auto; background: var(--night);
  border-radius: 1.1rem; border: 3px solid var(--star);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.45);
}
.screen video { border-radius: 1.4rem; }   /* landscape phone screens */
.screen-cafe { grid-column: 1 / 9; grid-row: 1; transform: rotate(-1.5deg); }
.screen-customise { grid-column: 5 / 13; grid-row: 2; margin-top: -1.5%; transform: rotate(2deg); z-index: 2; }
.sticker {
  position: absolute; top: -0.9rem; left: 1rem; z-index: 1;
  background: var(--shiba); color: var(--night-deep); font: 700 0.95rem/1 var(--body);
  padding: 0.5rem 0.85rem; border-radius: 999px; transform: rotate(-4deg);
  box-shadow: 0 0.3rem 0 rgba(0, 0, 0, 0.3);
}
.screen-customise .sticker { background: var(--sakura); transform: rotate(5deg); }
.screen-cafe .clip-toggle { right: auto; left: 0.75rem; }
.clip-toggle {
  position: absolute; right: 0.75rem; bottom: 0.75rem;
  background: rgba(15, 13, 43, 0.7); color: var(--star); border: 1.5px solid rgba(255, 244, 224, 0.6);
  border-radius: 999px; padding: 0.35rem 0.8rem; font: 700 0.8rem/1.2 var(--body); cursor: pointer;
}
.clip-toggle:hover { background: var(--night-deep); }
.clip-toggle:focus-visible { outline: 3px solid var(--sakura); outline-offset: 2px; }
@media (max-width: 48rem) {
  .cafe-stage { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .cafe-copy { grid-column: 1 / -1; padding: 0; margin-bottom: 1.5rem; }
  .screen-cafe { grid-column: 1 / 8; grid-row: 2; }
  .screen-customise { grid-column: 2 / 9; grid-row: 3; margin-top: 1.4rem; }
  .clip-toggle { font-size: 0.7rem; padding: 0.2rem 0.55rem; right: 0.45rem; bottom: 0.45rem; }
  .screen-cafe .clip-toggle { left: 0.45rem; }
  .sticker { font-size: 0.8rem; padding: 0.4rem 0.7rem; top: -0.75rem; }
  .screen video { border-radius: 0.9rem; }
  .cafe-stage { margin-bottom: 0; }
}

/* The screens land on the table, one after the other. */
/* About: the two years stamp down one after the other while the dotted line runs between them,
   then Blaze's prints are dropped onto the table, the way the café screens land. */
.motion [data-reveal="story"] { opacity: 1; transform: none; }
.motion [data-reveal="story"]::before { transform: scaleX(0); transform-origin: left; transition: transform 1.1s cubic-bezier(0.16, 0.84, 0.24, 1) 0.25s; }
.motion [data-reveal="story"].in::before { transform: none; }
.motion [data-reveal="story"] .story-year { display: inline-block; opacity: 0; transform: scale(0.6) rotate(-6deg); transition: opacity 0.4s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.motion [data-reveal="story"] .story-text { opacity: 0; transform: translateY(0.8rem); transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.16, 0.84, 0.24, 1); }
.motion [data-reveal="story"].in .story-year, .motion [data-reveal="story"].in .story-text { opacity: 1; transform: none; }
.motion [data-reveal="story"] li:nth-child(1) .story-text { transition-delay: 0.15s; }
.motion [data-reveal="story"] li:nth-child(2) .story-year { transition-delay: 0.9s; }
.motion [data-reveal="story"] li:nth-child(2) .story-text { transition-delay: 1.05s; }
.motion [data-reveal="prints"] { opacity: 1; transform: none; }
.motion [data-reveal="prints"] .blaze-photo { opacity: 0; transform: translateY(3rem) rotate(calc(var(--rest) * 4)) scale(0.92);
  transition: opacity 0.5s ease, transform 0.9s cubic-bezier(0.34, 1.3, 0.64, 1); }
.motion [data-reveal="prints"].in .blaze-photo { opacity: 1; transform: rotate(var(--rest)); }
.motion [data-reveal="prints"] .blaze-tag { transition-delay: 0.18s; }
.motion [data-reveal="prints"] .blaze-sprawl { transition-delay: 0.36s; }
.motion [data-reveal="prints"] .blaze-crouch { transition-delay: 0.6s; }
.motion [data-reveal="stage"] { opacity: 1; transform: none; }
.motion [data-reveal="stage"] .screen { opacity: 0; transition: opacity 0.6s ease, transform 0.9s cubic-bezier(0.34, 1.3, 0.64, 1); }
.motion [data-reveal="stage"] .screen-cafe { transform: translateY(3rem) rotate(-6deg) scale(0.94); }
.motion [data-reveal="stage"] .screen-customise { transform: translateX(3rem) rotate(10deg) scale(0.9); transition-delay: 0.25s; }
.motion [data-reveal="stage"].in .screen-cafe { opacity: 1; transform: rotate(-1.5deg); }
.motion [data-reveal="stage"].in .screen-customise { opacity: 1; transform: rotate(2deg); }

/* The Inuverse sky, on every page: a faint star field behind everything, and a few
   planets from assets/img/space.svg (shaped like the logo) in the open space beside the
   text. sky.js drifts them on scroll; without it, or with reduced motion, they sit still. */

body { isolation: isolate; }
/* Three layers of stars, far to near (tools/make-stars.mjs). sky.js slides each one up at its own
   speed as you scroll, the near ones fastest. Each layer is one tile taller than the screen, so it
   can move by up to a tile and loop. */
.stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.stars i {
  position: absolute; top: 0; left: 0; right: 0; height: calc(100% + var(--tile));
  background: var(--img) 0 0 / var(--tile) var(--tile) repeat;
  transform: translate3d(0, var(--sy, 0px), 0); will-change: transform;
}
.stars i:nth-child(1) { --tile: 560px; --img: url("/assets/img/stars-far.svg"); }
.stars i:nth-child(2) { --tile: 720px; --img: url("/assets/img/stars-mid.svg"); }
.stars i:nth-child(3) { --tile: 900px; --img: url("/assets/img/stars-near.svg"); }
:where(section):has(> .space), :where(.wrap):has(> .space) { position: relative; isolation: isolate; }
.space { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: clip; overflow-clip-margin: 6rem; }
.space-obj {
  /* Sizes and places come from the generated sky.css; without it a planet has no size, so it
     can never cover the text. */
  position: absolute; left: var(--x, 0); top: var(--y, 0); width: var(--w, 0px); opacity: var(--o, 1);
  transform: translate3d(0, var(--py, 0px), 0) rotate(var(--spin, 0deg));
  will-change: transform;
}
.space-obj svg { display: block; width: 100%; height: auto; overflow: visible; }
.space-shiba svg, .space-sakura svg { aspect-ratio: 1012 / 660; }
.space-paw-moon svg, .space-lilac-moon svg, .space-twinkle svg { aspect-ratio: 1; }
/* The moving 3D objects, drawn by space3d.js into a canvas; each box's shape is set in sky.css. */
.space-gl { display: block; }
.space-gl canvas { display: block; width: 100%; height: 100%; }
.planet-cream { --coat: #E9BE80; --mask: #FFF8EC; --ear: #FFF8EC; --brow: #FFF8EC; }
.planet-black { --coat: #3D3463; --mask: #FFE3C2; --ear: #E9A45C; --brow: #E9A45C; }
@media (max-width: 48rem) {
  .space-obj { left: var(--x-sm, var(--x, 0)); top: var(--y-sm, var(--y, 0)); width: var(--w-sm, var(--w, 0px)); }
  .space-wide { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .sky-motion .space-obj > * { opacity: 0; transform: scale(0.6); transition: opacity 1.2s ease-out, transform 1.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .sky-motion .space-obj.in > * { opacity: 1; transform: none; }
  .sky-motion .space-twinkle.in svg { animation: twinkle 4.5s ease-in-out infinite; animation-delay: var(--tw, 0s); }
}
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.65); } }
