/* ============ Fonts ============ */

/* Noto Serif TC Black, cut down to the characters of the page titles (docs/make-fonts.py). */
@font-face {
  font-family: "Pickora Title";
  src: url("../fonts/noto-serif-tc-900-title.woff?v=28") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Fallback with the title font's vertical metrics, so swapping fonts does not move the layout. */
@font-face {
  font-family: "Pickora Title Fallback";
  src: local("Noto Sans TC"), local("Microsoft JhengHei"), local("PingFang TC");
  font-weight: 900;
  ascent-override: 115.1%;
  descent-override: 28.6%;
  line-gap-override: 0%;
  size-adjust: 100%;
}

/* ============ Tokens ============ */

:root {
  --bg: #141516;
  --bg-deep: #0b0b0c;
  --text: #ece8e1;
  --text-2: #b3ada3;
  --line: rgba(236, 232, 225, 0.16);
  --accent: #f2b544;
  --accent-ink: #141516;
  --link: #f3c467;

  /* The five beam colours: gold, red, violet, cyan, green. */
  --c1: #f2b544;
  --c2: #e25d5a;
  --c3: #8b6cf0;
  --c4: #4fc6e6;
  --c5: #7ad08f;
  --beam: linear-gradient(90deg, var(--c1) 0%, var(--c2) 35%, var(--c3) 68%, var(--c4) 100%);

  --font: "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
  --font-title: "Pickora Title", "Noto Serif TC", "Pickora Title Fallback", serif;
  --fs-sm: 0.875rem;
  --fs-lead: clamp(1.25rem, 0.875rem + 1vw, 1.625rem);
  --fs-display: clamp(2.25rem, 1.4rem + 3.6vw, 5.5rem);
  --fs-big: clamp(1.875rem, 1rem + 3.6vw, 4.25rem);

  --gutter: clamp(24px, 5vw, 72px);
  --container: 1200px;
  --measure: 800px;
  --section-y: clamp(96px, 14vw, 200px);
  --header-h: 60px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

@media (min-width: 768px) {
  :root {
    --header-h: 64px;
  }
}

/* ============ Base ============ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg-deep);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.85;
  letter-spacing: 0.02em;
  line-break: strict;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* Titles and display lines keep words whole and break only at <wbr>; body text wraps normally to the full width. */
h1,
h2,
h3,
.stage__word,
.manifesto__text,
.statement__text,
.date__value,
.topic__name {
  word-break: keep-all;
}

/* Body text avoids a one- or two-character last line. */
p,
dd,
.topic__text {
  text-wrap: pretty;
}

/* Short lead lines split evenly instead of leaving a two- or three-character tail. */
.stage__lead,
.topics__lead,
.stance__text p,
.legal p {
  text-wrap: balance;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  font-feature-settings: "palt" 1;
}

p {
  margin: 0;
}

p + p {
  margin-top: 1em;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.skip-link:focus {
  top: 8px;
  color: var(--accent-ink);
}

#main {
  flex: 1 0 auto;
}

#main:focus {
  outline: none;
}

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

.tag {
  display: inline-block;
  margin-left: 0.6em;
  padding: 2px 8px;
  border: 1px solid currentColor;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.1em;
  vertical-align: 0.6em;
}

.nowrap {
  white-space: nowrap;
}

.arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

/* ============ Header ============ */

.site-header {
  position: relative;
  z-index: 30;
  background: var(--bg-deep);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.wordmark {
  display: block;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
}

.wordmark__svg {
  width: auto;
  max-width: none;
  height: 28px;
}

.site-footer .wordmark__svg {
  height: 24px;
}

@media (min-width: 768px) {
  .site-header .wordmark__svg {
    height: 32px;
  }
}

.wordmark:hover {
  color: var(--text);
}

.site-nav ul {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 8px;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background-size: 100% 1px;
}

.menu-toggle {
  display: none;
}

@media (max-width: 767px) {
  .js .menu-toggle {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }

  .menu-toggle__bars,
  .menu-toggle__bars::before,
  .menu-toggle__bars::after {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform 0.3s var(--ease), opacity 0.2s;
  }

  .menu-toggle__bars {
    position: relative;
  }

  .menu-toggle__bars::before,
  .menu-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .menu-toggle__bars::before {
    top: -7px;
  }

  .menu-toggle__bars::after {
    top: 7px;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__bars {
    background: transparent;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::before {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::after {
    transform: translateY(-7px) rotate(-45deg);
  }

  .js .site-header .wordmark {
    position: relative;
    z-index: 2;
  }

  .js .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    padding: var(--header-h) var(--gutter) 48px;
    background: var(--bg-deep);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
  }

  .js .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s var(--ease);
  }

  .js .site-nav ul {
    flex-direction: column;
    gap: 8px;
  }

  .js .site-nav a {
    font-size: 1.75rem;
    letter-spacing: 0.08em;
  }

  .js.menu-open {
    overflow: hidden;
  }

  .js.menu-open .site-header {
    position: sticky;
    top: 0;
  }
}

/* ============ Stage ============ */

/* Every page opens on a stage: one HDR canvas (fx-light.js) where beams keep striking a shape made of light points, or the key art (fx-image.js).
   Pages differ in the shape, the glow colours (--glow-a, --glow-b, also the canvas fog) and how the text sits. */
.stage {
  --glow-a: rgba(242, 181, 68, 0.14);
  --glow-b: rgba(139, 108, 240, 0.12);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--header-h));
  padding-block: clamp(20px, 3vw, 40px) clamp(28px, 4vw, 56px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(55% 45% at 50% 42%, var(--glow-a), transparent 70%),
    radial-gradient(40% 60% at 12% 90%, var(--glow-b), transparent 70%),
    var(--bg-deep);
  touch-action: pan-y;
}

.stage__gl {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

/* On the key art the canvas is black where there is no light, so it is screened over the picture. */
.stage--art .stage__gl {
  mix-blend-mode: screen;
}

.stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(11, 11, 12, 0.8) 80%);
  pointer-events: none;
}

/* The shape box: it holds the still shape and gives the light points their layout. */
.stage__mark {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  width: min(94vw, 1500px);
  margin-inline: auto;
  padding-block: 16px;
  color: var(--text);
}

.stage__defs {
  position: absolute;
  width: 0;
  height: 0;
}

svg.stage__shape {
  display: block;
  width: 100%;
  height: auto;
  fill: currentColor;
}

.stage.is-gl .stage__shape {
  visibility: hidden;
}

/* A glyph shape: one line of the title font, set large. */
.stage__word {
  margin: 0;
  font-family: var(--font-title);
  font-size: var(--word, 60vw);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.stage__body {
  display: grid;
  gap: 12px;
  width: 100%;
}

.stage__title {
  font-family: var(--font-title);
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
}

.line {
  display: inline-block;
}

.stage__lead {
  color: var(--text-2);
  font-size: var(--fs-lead);
  font-weight: 500;
  letter-spacing: 0.06em;
}

@media (min-width: 900px) {
  .stage__body {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 32px;
  }

  .stage__lead {
    max-width: 26em;
    padding-bottom: 0.5em;
    text-align: right;
  }

  /* The game title keeps its 暫名 tag on the same line. */
  .stage--art .stage__title {
    white-space: nowrap;
  }
}

/* Home: the Pickora wordmark. Phones break it into two lines (Pick / ora) so it fills the screen width. */
.stage__shape.mark--pick,
.stage__shape.mark--ora {
  display: none;
}

@media (max-width: 767px) {
  .stage--home .stage__mark {
    width: calc(100% - 16px);
    gap: 4px;
  }

  .stage__shape.mark--one {
    display: none;
  }

  .stage__shape.mark--pick {
    display: block;
  }

  .stage__shape.mark--ora {
    display: block;
    width: 74.6%;
    margin-left: auto;
  }
}

/* Glyph pages: the glyph's size and the glow colours. */
.stage--about {
  --word: min(76vw, 58svh);
  --glow-a: rgba(226, 93, 90, 0.16);
  --glow-b: rgba(242, 181, 68, 0.12);
}

.stage--contact {
  --word: min(78vw, 54svh);
  --glow-a: rgba(139, 108, 240, 0.18);
  --glow-b: rgba(79, 198, 230, 0.14);
}

.stage--privacy {
  --word: min(44vw, 34svh);
  --glow-a: rgba(79, 198, 230, 0.12);
  --glow-b: rgba(122, 208, 143, 0.1);
  min-height: min(calc(100svh - var(--header-h)), 760px);
}

.stage--lost {
  --word: min(48vw, 46svh);
  --glow-a: rgba(226, 93, 90, 0.14);
  --glow-b: rgba(139, 108, 240, 0.14);
}

/* Game page: the key art fills the stage; beams aim at its impact point (data-hit on .art, see fx-light.js).
   Upright screens use the 5:4 crop with the heroes, focused left of the impact point so they stay in view. */
.art {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--bg-deep);
}

.art img,
.fx-image__gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.art img {
  object-fit: cover;
  object-position: 82% 43%;
}

@media (max-aspect-ratio: 1 / 1) {
  .art img {
    object-position: 40% 45%;
  }
}

.stage--art {
  justify-content: flex-end;
}

.stage--art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(11, 11, 12, 0.72), transparent 46%);
  pointer-events: none;
}

.stage--art::after {
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(11, 11, 12, 0.92) 85%);
}

.stage--art .stage__title {
  font-size: clamp(3.25rem, 1.6rem + 7vw, 8.5rem);
  letter-spacing: 0.04em;
}

@media (max-aspect-ratio: 1 / 1) {
  .stage--art::before {
    display: none;
  }
}

/* ============ Home ============ */

/* Manifesto: narrow, pushed right, with one vertical beam line; the words are lit by a sweep of the beam colours as they scroll past. */
.manifesto {
  padding-block: var(--section-y);
}

.manifesto .container {
  display: grid;
}

.manifesto__text {
  position: relative;
  justify-self: end;
  max-width: 15em;
  padding-left: clamp(20px, 3vw, 40px);
  font-family: var(--font-title);
  font-size: var(--fs-big);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

/* Below 360px the longest phrase (ten characters, kept whole) would push past the screen edge. */
@media (max-width: 359px) {
  .manifesto__text {
    font-size: 7.4vw;
  }
}

.manifesto__text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  bottom: 0.3em;
  width: 3px;
  background: linear-gradient(180deg, var(--c1), var(--c2) 40%, var(--c3) 75%, var(--c4));
}

.work {
  padding-block: 0 var(--section-y);
}

.work__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: clamp(20px, 3vw, 32px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.work__head h2 {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.2em;
}

.work__count {
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2em;
}

.work-card {
  position: relative;
  display: block;
  color: var(--text);
  text-decoration: none;
}

.work-card:hover {
  color: var(--text);
}

.work-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: #1b1c1e;
}

.work-card__media img,
.work-card__media .fx-image__gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.9s var(--ease);
}

.work-card__media img {
  object-fit: cover;
}

.work-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(11, 11, 12, 0.88));
}

.work-card__body {
  position: absolute;
  left: clamp(20px, 4vw, 56px);
  right: 72px;
  bottom: clamp(20px, 4vw, 52px);
}

.work-card__title {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 1.2rem + 5vw, 6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.work-card__line {
  margin-top: 12px;
  font-size: var(--fs-lead);
  font-weight: 500;
}

.work-card__meta {
  margin-top: 6px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
}

.work-card__go {
  position: absolute;
  right: clamp(20px, 4vw, 52px);
  bottom: clamp(20px, 4vw, 52px);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(236, 232, 225, 0.5);
  border-radius: 50%;
  font-size: 1.25rem;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.work-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 3px;
  background: var(--beam);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.6s var(--ease);
}

.work-card:hover::before,
.work-card:focus-visible::before {
  transform: scaleX(1);
}

.work-card:hover .work-card__media img,
.work-card:focus-visible .work-card__media img,
.work-card:hover .fx-image__gl,
.work-card:focus-visible .fx-image__gl {
  transform: scale(1.04);
}

.work-card:hover .work-card__go,
.work-card:focus-visible .work-card__go {
  background: var(--text);
  color: var(--bg-deep);
  transform: translateX(4px);
}

@media (max-width: 767px) {
  .work-card__media::after {
    display: none;
  }

  .work-card__body {
    position: static;
    margin-top: 20px;
    padding-right: 64px;
  }

  .work-card__go {
    bottom: 0;
    right: 0;
  }
}

@media (min-width: 768px) {
  .work-card__media {
    aspect-ratio: 16 / 9;
  }
}

/* Mail block: centred, under a slow violet and cyan glow, so it reads apart from the gold stage and the manifesto. */
.mail-block {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-y);
  text-align: center;
  isolation: isolate;
}

.mail-block::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  z-index: -1;
  background:
    radial-gradient(38% 46% at 32% 62%, rgba(139, 108, 240, 0.32), transparent 70%),
    radial-gradient(34% 40% at 70% 40%, rgba(79, 198, 230, 0.22), transparent 70%);
  filter: blur(20px);
  -webkit-mask-image: linear-gradient(180deg, transparent 12%, #000 38%, #000 62%, transparent 88%);
  mask-image: linear-gradient(180deg, transparent 12%, #000 38%, #000 62%, transparent 88%);
}

.mail-block .container,
.mail-hero {
  container-type: inline-size;
}

.mail-block__title {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 5.5rem);
  font-weight: 900;
  line-height: 1.1;
}

.mail-link {
  display: inline-block;
  color: var(--text);
  font-size: clamp(1rem, 100cqi / 13.8, 4.5rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: var(--beam) 0 100% / 0 4px no-repeat;
  transition: background-size 0.5s var(--ease);
}

.mail-block .mail-link {
  margin-top: clamp(16px, 2.5vw, 32px);
}

.mail-link:hover,
.mail-link:focus-visible {
  color: var(--text);
  background-size: 100% 4px;
}

/* Text over the light: a soft dark halo keeps it readable when a hit flashes behind it. */
.stage__title {
  text-shadow: 0 2px 40px rgba(5, 5, 6, 0.7);
}

.stage .stage__lead {
  text-shadow: 0 1px 24px rgba(5, 5, 6, 0.9);
}

.stage--home .stage__lead {
  color: #e2dbcf;
  font-size: clamp(1.3125rem, 0.95rem + 1vw, 1.75rem);
  font-weight: 600;
}

/* Tier 0 has no post-processing, so the vignette comes from CSS (the game page has its own gradient). */
.stage:not(.stage--art)[data-tier="0"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

/* Phones: the wordmark and the title sit together at the bottom of the first screen, so nothing is left empty under
   the title; the space above is where the light comes in. */
@media (max-width: 767px) {
  .stage--home {
    justify-content: flex-end;
    gap: 20px;
    padding-bottom: clamp(32px, 6svh, 56px);
  }

  .stage--home .stage__mark {
    flex: 0 0 auto;
    padding-block: 0;
  }
}

.work__head h2 {
  font-family: var(--font-title);
  font-size: clamp(1.375rem, 1rem + 1vw, 1.875rem);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.work-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 14px;
  padding: 0;
  color: #ddd6cb;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  list-style: none;
}

.work-card__meta li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.work-card__meta li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c3);
  box-shadow: 0 0 8px var(--c3);
}

.work-card__meta li:nth-child(2)::before {
  background: var(--c4);
  box-shadow: 0 0 8px var(--c4);
}

.work-card__meta .is-live {
  color: var(--c1);
}

.work-card__meta .is-live::before {
  background: var(--c1);
  box-shadow: 0 0 10px var(--c1), 0 0 2px #fff;
}

/* ============ Game page ============ */

/* Statement: one big line cut by a beam that fires across the page as it scrolls in. */
.statement {
  padding-block: var(--section-y) 0;
}

.statement__label {
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.2em;
}

.statement__text {
  margin-top: 20px;
  font-family: var(--font-title);
  /* Capped on narrow screens so a line never ends up holding only the closing punctuation. */
  font-size: min(var(--fs-big), 8.5vw);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.statement__text > span {
  display: block;
}

.statement__beam {
  position: relative;
  height: 3px;
  margin-block: 0.45em;
}

.statement__beam::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--beam);
  transform-origin: 0 50%;
}

.statement__beam::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fffaf0;
  box-shadow: 0 0 18px 6px rgba(79, 198, 230, 0.7), 0 0 48px 16px rgba(139, 108, 240, 0.35);
  transform: translate(-50%, -50%);
}

.statement__notes {
  display: grid;
  gap: 8px 48px;
  max-width: var(--measure);
  margin-top: clamp(32px, 5vw, 56px);
  margin-left: auto;
  color: var(--text-2);
  font-size: 1.0625rem;
}

.statement__notes p + p {
  margin-top: 0;
}

/* The about page story: its headline is capped at 7.5vw so it sits on two rows on phones, its text reads at the same size as the stance text below it, and on phones a side rule sets that text apart from the block below. */
.statement--story .statement__text {
  font-size: min(var(--fs-big), 7.5vw);
}

.statement--story .statement__notes {
  font-size: clamp(1.0625rem, 0.9rem + 0.4vw, 1.3125rem);
}

@media (max-width: 767px) {
  .statement--story .statement__notes {
    padding-left: 20px;
    border-left: 2px solid var(--line);
  }
}

/* Facts: a ledger of three short entries, each keyed to one beam colour. */
.facts {
  padding-block: var(--section-y);
}

.facts__list {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}

.facts__item {
  display: grid;
  grid-template-columns: 6em 1fr;
  gap: 4px 16px;
  align-items: baseline;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}

.facts__item dt {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.16em;
}

.facts__item dt::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, var(--c1));
  box-shadow: 0 0 10px var(--dot, var(--c1));
}

.facts__item:nth-child(2) {
  --dot: var(--c2);
}

.facts__item:nth-child(3) {
  --dot: var(--c3);
}

.facts__item:nth-child(4) {
  --dot: var(--c4);
}

.facts__item:nth-child(5) {
  --dot: var(--c5);
}

.facts__item dd {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.4;
}

.facts__value {
  font-family: var(--font-title);
  font-weight: 900;
}

.facts__item small {
  display: block;
  margin-top: 4px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 500;
}

@media (min-width: 1024px) {
  .facts__list {
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--line);
  }

  .facts__item {
    grid-template-columns: none;
    align-content: start;
    padding: 24px 24px 28px 0;
    border-bottom: 0;
  }

  .facts__item + .facts__item {
    padding-left: 24px;
    border-left: 1px solid var(--line);
  }
}

/* Ask: one sentence on what to send, then the address itself, styled like the other mail links. */
.ask {
  position: relative;
  overflow: hidden;
  padding-block: 0 var(--section-y);
}

.ask .container {
  container-type: inline-size;
}

.ask__label {
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.2em;
}

.ask__note {
  max-width: var(--measure);
  margin-top: 16px;
  color: var(--text-2);
  font-size: 1.0625rem;
}

.ask__text {
  margin-top: clamp(12px, 2vw, 24px);
}

/* ============ About ============ */

/* Three stances, each built differently: a split heading, a date row that never settles, and a beam that forks to two stores. */
.stance {
  padding-block: var(--section-y) 0;
}

.stance__title {
  margin-top: 8px;
  font-family: var(--font-title);
  font-size: clamp(2.25rem, 1.2rem + 4.4vw, 5.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.stance__text {
  max-width: 34em;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 0.9rem + 0.4vw, 1.3125rem);
}

.stance--burst .container {
  display: grid;
  gap: 24px 64px;
}

@media (min-width: 900px) {
  .stance--burst .container {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: end;
  }
}

.stance__bar {
  height: 3px;
  margin-top: 20px;
  background: var(--beam);
  transform-origin: 0 50%;
}

/* The date row: a track from today to a release date that is not set; a light runs along it and fades before it gets there. */
.date {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  margin-block: clamp(28px, 4vw, 48px);
  padding-block: 20px;
  border-block: 1px solid var(--line);
}

.date__label {
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.16em;
}

.date__track {
  position: relative;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}

/* The light is drawn at the left end of a box as wide as the track, so it can run with transform alone. */
.date__track::after {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  width: 100%;
  height: 40px;
  background:
    radial-gradient(circle at 20px 50%, #fffaf0 0 5px, rgba(242, 181, 68, 0.7) 7px, rgba(242, 181, 68, 0) 20px) no-repeat;
  transform: translateY(-50%);
  pointer-events: none;
}

.date__value {
  font-family: var(--font-title);
  font-size: clamp(2rem, 1rem + 4vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
}

/* The fork: one beam splits towards Google Play and App Store. */
.fork {
  position: relative;
  margin-block: clamp(28px, 4vw, 48px);
}

.fork__svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.fork__path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}

.fork__stores {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.fork__stores li {
  font-size: clamp(1.25rem, 0.8rem + 2vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
}

.fork__stores li:last-child {
  text-align: right;
}

/* Next: the first work as one large link row. */
.next {
  padding-block: var(--section-y);
}

.next__link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px 24px;
  padding-block: 28px;
  border-block: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(90deg, rgba(242, 181, 68, 0.12), rgba(139, 108, 240, 0.08)) 0 0 / 0 100% no-repeat;
  transition: background-size 0.7s var(--ease);
}

.next__link:hover,
.next__link:focus-visible {
  color: var(--text);
  background-size: 100% 100%;
}

.next__label {
  grid-column: 1 / -1;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.2em;
}

.next__title {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 1.2rem + 5vw, 6rem);
  font-weight: 900;
  line-height: 1.05;
}

.next__link .arrow {
  font-size: clamp(1.5rem, 1rem + 2vw, 3rem);
}

.next__link:hover .arrow,
.next__link:focus-visible .arrow {
  transform: translateX(10px);
}

/* ============ Contact ============ */

.stage--contact .stage__body {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.mail-hero {
  margin-top: 4px;
}

.topics {
  padding-block: var(--section-y);
}

.topics__lead {
  max-width: 26em;
  font-size: var(--fs-lead);
  font-weight: 500;
}

.topics__list {
  margin: clamp(32px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.topic {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 24px;
  padding-block: clamp(24px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  isolation: isolate;
}

.topic::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--tint, rgba(242, 181, 68, 0.14)), transparent 80%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.6s var(--ease);
}

.topic:hover,
.topic:focus-visible {
  color: var(--text);
}

.topic:hover::before,
.topic:focus-visible::before {
  transform: scaleX(1);
}

.topics__list li:nth-child(2) .topic {
  --tint: rgba(226, 93, 90, 0.14);
}

.topics__list li:nth-child(3) .topic {
  --tint: rgba(79, 198, 230, 0.14);
}

.topic__name {
  font-family: var(--font-title);
  font-size: clamp(2rem, 1.2rem + 3vw, 3.75rem);
  font-weight: 900;
  line-height: 1.1;
}

.topic__text {
  grid-column: 1;
  max-width: 30em;
  color: var(--text-2);
}

.topic__subject {
  grid-column: 1;
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.topic .arrow {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.topic:hover .arrow,
.topic:focus-visible .arrow {
  transform: translateX(8px);
}

@media (min-width: 900px) {
  .topic {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) auto;
    align-items: center;
  }

  .topic__name {
    grid-row: 1 / span 2;
  }

  .topic__text,
  .topic__subject {
    grid-column: 2;
  }

  .topic .arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

/* ============ Privacy ============ */

.legal-wrap {
  padding-block: clamp(56px, 8vw, 112px) var(--section-y);
}

.legal-wrap .container {
  display: grid;
  gap: 32px 72px;
}

.toc {
  align-self: start;
}

.toc__label {
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.2em;
}

.toc ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: flex;
  gap: 12px;
  padding-block: 6px;
  color: var(--text);
  text-decoration: none;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.toc a:hover {
  color: var(--link);
}

.legal {
  max-width: var(--measure);
  color: var(--text-2);
  font-size: 1.0625rem;
}

.legal h2 {
  position: relative;
  margin: 56px 0 14px;
  padding-top: 18px;
  color: var(--text);
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  scroll-margin-top: 24px;
}

.legal h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 3px;
  background: var(--beam);
}

.legal h2:first-child {
  margin-top: 0;
}

@media (min-width: 900px) {
  .legal-wrap .container {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .toc {
    position: sticky;
    top: 32px;
  }
}

/* ============ 404 ============ */

.lost {
  display: grid;
  gap: 8px;
}

.lost-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .lost-links {
    justify-content: flex-end;
  }
}

.lost-links a {
  color: var(--text);
  font-size: var(--fs-lead);
  font-weight: 700;
  text-decoration: none;
  background: var(--beam) 0 100% / 0 3px no-repeat;
  transition: background-size 0.5s var(--ease);
}

.lost-links a:hover,
.lost-links a:focus-visible {
  color: var(--text);
  background-size: 100% 3px;
}

.lost-links a:hover .arrow,
.lost-links a:focus-visible .arrow {
  transform: translateX(6px);
}

/* ============ Footer ============ */

.site-footer {
  padding-block: 48px;
  background: var(--bg-deep);
  font-size: var(--fs-sm);
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer ul a {
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.08em;
}

.site-footer ul a:hover {
  text-decoration: underline;
}

.site-footer__copy {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.8125rem;
}

/* ============ Motion ============ */

@view-transition {
  navigation: auto;
}

::view-transition-group(*) {
  animation-duration: 0.45s;
  animation-timing-function: var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* The title lands with the first hit on the stage (about 1.5s in). */
  .stage .line {
    animation: slam 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) 1.45s both;
  }

  .stage .line:nth-child(2) {
    animation-delay: 1.57s;
  }

  .stage__lead,
  .stage .tag,
  .mail-hero,
  .lost-links {
    animation: rise 0.9s var(--ease) 1.85s both;
  }

  /* The key art waits in the dark until the first beam opens it; if WebGL never starts it fades in on its own. */
  .js .art[data-reveal] img {
    animation: art-late 0.8s var(--ease) 2.6s both;
  }

  .art.is-gl img {
    visibility: hidden;
  }

  .mail-block::before {
    animation: drift 14s ease-in-out infinite alternate;
  }

  .date__track::after {
    animation: almost 3.2s cubic-bezier(0.3, 0.6, 0.2, 1) infinite;
  }

  /* Looping light pauses while its section is off screen (site.js toggles .is-live). */
  .js .mail-block:not(.is-live)::before,
  .js .date:not(.is-live) .date__track::after {
    animation-play-state: paused;
  }

  @supports (animation-timeline: view()) {
    .stage {
      view-timeline: --stage;
    }

    .stage__body {
      animation: leave linear both;
      animation-timeline: --stage;
      animation-range: exit 0% exit 90%;
    }

    .manifesto__text::before {
      animation: grow-y linear both;
      animation-timeline: view();
      animation-range: entry 30% cover 55%;
      transform-origin: 50% 0;
    }

    .stance__bar {
      animation: fire linear both;
      animation-timeline: view();
      animation-range: entry 20% cover 45%;
    }

    .statement__beam {
      view-timeline: --beam;
    }

    .statement__beam::before,
    .statement__beam::after {
      animation: fire linear both;
      animation-timeline: --beam;
      animation-range: entry 20% cover 45%;
    }

    .statement__beam::after {
      animation-name: run;
    }

    .facts__item,
    .topic,
    .toc li {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 10% entry 80%;
    }

    .fork__path {
      stroke-dasharray: 1;
      stroke-dashoffset: 1;
      animation: draw linear both;
      animation-timeline: view();
      animation-range: entry 25% cover 50%;
    }

    .fork__stores li {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 40% cover 55%;
    }
  }

  @supports (animation-timeline: view()) and ((background-clip: text) or (-webkit-background-clip: text)) {
    .manifesto__text {
      background: linear-gradient(100deg, var(--text) 0 38%, var(--c1) 44%, var(--c2) 48%, var(--c3) 52%, #3b3934 58% 100%) 100% 0 / 280% 100% no-repeat;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      animation: sweep linear both;
      animation-timeline: view();
      animation-range: entry 35% cover 60%;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.4em);
  }
}

@keyframes slam {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: scale(1.35) translateY(-0.1em);
  }

  60% {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes leave {
  to {
    opacity: 0.15;
    transform: translateY(-14vh);
  }
}

@keyframes sweep {
  to {
    background-position: 0 0;
  }
}

@keyframes grow-y {
  from {
    transform: scaleY(0);
  }
}

@keyframes fire {
  from {
    transform: scaleX(0);
  }
}

@keyframes run {
  from {
    left: 0;
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drift {
  to {
    transform: translate(6%, -8%) rotate(8deg);
  }
}

@keyframes art-late {
  from {
    opacity: 0;
  }
}

@keyframes almost {
  0% {
    opacity: 0;
    transform: translate(0, -50%);
  }

  10% {
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(82%, -50%);
  }
}
