/* ==========================================================================
   FNF Reiya — foundations
   Traced from the 1280x832 design frames.
   nav 72px + 2px rule · nav gutter 24px · content gutter 64px
   Small type = Fusion Pixel (10px grid) at 18px (1 cell = 1.8px, gapped like the frames)
   ========================================================================== */

@font-face {
  font-family: "Pixel";
  src: url("../fonts/fusion-10px.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- surface ---- */
  --bg: #000000;
  --card-gallery: #1b1b1f;
  --card-gallery-line: #33333b;
  --card-crew: #3c3c3c;
  --card-sponsor: #111113;
  --rule: #1b1b1b;

  /* ---- ink ---- */
  --ink: #ffffff;
  --ink-soft: #d9d9d9;

  /* ---- accent ---- */
  --magenta: #fe13b0;
  --indigo: #332dc4;

  /* ---- geometry ---- */
  --nav-h: 72px;
  --nav-pad: 24px;
  --gutter: 64px;
  --r-gallery: 19.5px;
  --r-crew: 18.6px;

  /* ---- type ---- */
  --font-sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-pixel: "Pixel", ui-monospace, "SFMono-Regular", monospace;

  --px-nav: 18px;
  --px-label: 18px;
  --px-chip: 22px;
  --px-meta: 15px;
  --px-ver: 21px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

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

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
figure,
figcaption {
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--magenta);
  color: #000;
}

:where(a, button):focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #000;
}
::-webkit-scrollbar-thumb {
  background: #2b2b31;
  border-radius: 99px;
  border: 3px solid #000;
}
::-webkit-scrollbar-thumb:hover {
  background: #43434c;
}

/* ---------------- layout ---------------- */
.shell {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* one design frame = one screen of content under the fixed nav */
.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen__head {
  padding-top: calc(var(--nav-h) + 2px + 66px);
  text-align: center;
}

/* big headings: the heavy grotesque of the frames (not pixel type)
   栏目 titles ink 61px @ ~65px · 下载 / 赞助 ink 67-68px @ ~72px */
.screen__title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-size: 65px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.006em;
  white-space: nowrap;
}

/* suffix ink 15px, baseline-aligned, 1px gap after the big word */
.screen__title small {
  font-family: var(--font-pixel);
  font-weight: 400;
  font-synthesis: none;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
  -webkit-font-smoothing: none;
  margin-left: 4px;
}

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

/* ---------------- reveal ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------- responsive ---------------- */
@media (max-width: 1280px) {
  :root {
    --gutter: clamp(20px, 5vw, 64px);
  }
  .screen__head {
    padding-top: calc(var(--nav-h) + 2px + clamp(34px, 6vw, 66px));
  }
  .screen__title {
    font-size: clamp(34px, 5.1vw, 65px);
  }
  .screen__title small {
    font-size: clamp(12px, 1.6vw, 20px);
  }
}
