@font-face {
  font-family: "Fusion Pixel";
  src: url("/assets/fonts/fusion-pixel-12px/fusion-pixel-12px-proportional-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

:root {
  color-scheme: dark;

  --font-primary: "Fusion Pixel";

  --color-ink: #f5f0e5;
  --color-ink-muted: #cfc7b8;
  --color-ink-soft: #9f988c;

  /* Shared night-blue surfaces: all pages and new sections use these tokens. */
  --color-bg: #101b33;
  --color-bg-deep: #070c18;
  --color-bg-deep-rgb: 7, 12, 24;
  --color-bg-night: #0d172b;
  --color-bg-raised: #14223c;
  --color-bg-card: #162238;
  --color-bg-card-rgb: 22, 34, 56;
  --color-bg-field: #0a1122;
  --color-on-accent: #081b31;
  --color-silhouette-head: #314767;
  --color-silhouette-body: #263b58;

  --color-warm: #f0b35a;
  --color-warm-bright: #ffc66f;
  --color-warm-dark: #6a3b1e;
  --color-cold: #8ba6c7;
  --color-status-online: #3ba55c;

  --color-line: rgba(245, 240, 229, 0.14);
  --color-line-strong: rgba(245, 240, 229, 0.28);

  --shadow-soft: 0 24px 64px rgba(0, 0, 0, 0.34);
  --shadow-button: 0 5px 0 var(--color-warm-dark), 0 14px 28px rgba(0, 0, 0, 0.25);

  --container: 1180px;
  --container-copy: 860px;
  --gutter: clamp(18px, 4vw, 48px);
  --section-space: clamp(76px, 9vw, 128px);
  --header-height: 96px;

  /* Exact 12px-grid sizes. Never interpolate pixel-font sizes with vw/clamp. */
  --step--1: 24px;
  --step-0: 24px;
  --step-1: 24px;
  --step-2: 48px;
  --step-3: 48px;
  --step-4: 48px;
  --section-fade: 128px;
}

@media (min-width: 1000px) {
  :root {
    --step-4: 96px;
  }
}

@media (max-width: 760px) {
  :root {
    --section-fade: 96px;
  }
}

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

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

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-primary);
  font-size: var(--step-0);
  line-height: 1.5;
  font-synthesis: none;
  background: var(--color-bg);
  text-rendering: auto;
  -webkit-font-smoothing: auto;
}

body.no-scroll {
  overflow: hidden;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

h1,
h2,
h3 {
  color: var(--color-ink);
  line-height: 1.3333333333;
  letter-spacing: 0;
  font-weight: 400;
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--step-4);
}

b,
strong {
  font-weight: 400;
}

em,
i {
  font-style: normal;
}

h2 {
  font-size: var(--step-3);
}

h3 {
  font-size: var(--step-1);
}

p {
  color: var(--color-ink-muted);
}

:focus-visible {
  outline: 3px solid var(--color-warm-bright);
  outline-offset: 4px;
}

::selection {
  color: var(--color-bg-deep);
  background: var(--color-warm-bright);
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 200;
  transform: translateY(-160%);
  padding: 10px 14px;
  color: var(--color-bg-deep);
  background: var(--color-warm-bright);
  font-weight: 400;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

.site-wrap {
  min-height: 100vh;
  overflow: clip;
}

.container {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
}

/* Each section owns its incoming, middle and outgoing blue. Matching edge
   colours make adjacent sections continuous without borders or overlay fades. */
:where(.section, .art-section) {
  --section-start: var(--color-bg);
  --section-surface: var(--color-bg-night);
  --section-end: var(--color-bg);
  background: linear-gradient(180deg,
    var(--section-start) 0,
    var(--section-surface) min(var(--section-fade), 50%),
    var(--section-surface) max(calc(100% - var(--section-fade)), 50%),
    var(--section-end) 100%);
}

main > :where(.section, .art-section):last-child {
  --section-end: var(--color-bg-deep);
}

.section {
  position: relative;
  padding-block: var(--section-space);
  scroll-margin-top: 24px;
  border-top: 0;
}

.section-copy {
  display: flex;
  width: min(100%, var(--container-copy));
  margin-inline: auto;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 2vw, 24px);
  text-align: center;
}

.section-copy--wide {
  width: min(100% - var(--gutter) * 2, 940px);
}

.section-copy h2 {
  max-width: 20ch;
}

.section-copy p {
  max-width: 68ch;
  font-size: var(--step-1);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, 1rem);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.site-footer {
  padding-block: 38px 48px;
  border-top: 0;
  background: var(--color-bg-deep);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
}

.site-footer p {
  margin-top: 6px;
  font-size: var(--step--1);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 36px;
  justify-content: flex-end;
}

.placeholder-page {
  min-height: 100vh;
  padding-top: var(--header-height);
  display: flex;
  flex-direction: column;
}

.placeholder-page > .section {
  flex: 1;
}

.placeholder-page > .section:first-child {
  border-top: 0;
}

.section-panel {
  width: min(100%, 780px);
  margin-inline: auto;
  padding: clamp(28px, 5vw, 60px);
  text-align: center;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-soft);
}

.section-panel h1 {
  font-size: var(--step-3);
}

.section-panel .cluster {
  justify-content: center;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  min-height: var(--header-height);
  border: 0;
  background: rgba(0, 0, 0, 0);
  transform: translateY(0);
  transition: none;
  will-change: transform, background-color;
}

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

.brand {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}

.brand__logo {
  display: block;
  width: clamp(104px, 10vw, 128px);
  height: auto;
  max-height: calc(var(--header-height) - 14px);
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.45));
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.flag-icon {
  display: block;
  width: 26px;
  height: 18px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.flag-icon--inline {
  display: inline-block;
  width: 20px;
  height: 14px;
  margin-right: 7px;
  vertical-align: -2px;
}

.language-switcher {
  position: relative;
}

.language-switcher--desktop {
  display: flex;
  align-items: center;
}

.language-switcher--mobile {
  display: none;
}

.language-switcher__trigger {
  display: none;
}

.language-switcher__options {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: rgba(var(--color-bg-deep-rgb), 0.58);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.language-switcher a,
.language-switcher__trigger {
  min-width: 42px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: var(--color-ink-muted);
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.language-switcher a {
  display: inline-flex;
}

.language-switcher a:hover,
.language-switcher a[aria-current="true"] {
  background: rgba(255, 255, 255, 0.12);
}

.button {
  --button-edge: var(--color-warm-dark);
  --button-inset: rgba(85, 44, 16, 0.22);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  color: var(--color-on-accent);
  font-weight: 400;
  line-height: 1.3333333333;
  text-align: center;
  text-decoration: none;
  background: var(--color-warm-bright);
  border: 1px solid rgba(255, 238, 202, 0.78);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  box-shadow: 0 5px 0 var(--button-edge), 0 14px 28px rgba(0, 0, 0, 0.25);
  transform: translateY(0);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  cursor: pointer;
}

.button::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: -1;
  border: 1px solid var(--button-inset);
  clip-path: inherit;
  transition: border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  --button-edge: #294d70;
  --button-inset: rgba(21, 61, 99, 0.35);
  color: #081b31;
  background: #a6d4ff;
  border-color: #d0e9ff;
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--button-edge), 0 18px 34px rgba(0, 0, 0, 0.3);
}

.button:focus-visible {
  outline-color: currentColor;
  outline-offset: -5px;
}

.button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--button-edge), 0 9px 20px rgba(0, 0, 0, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .button::before { transition: none; }

  .button:is(:hover, :focus-visible, :active) { transform: none; }
}

.button--small {
  min-height: 42px;
  padding: 10px 17px;
  font-size: var(--step--1);
}

.button--plain {
  --button-edge: rgba(0, 0, 0, 0.38);
  color: var(--color-ink);
  background: transparent;
  border-color: var(--color-line-strong);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.38);
}

.portrait-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 6vw, 70px);
}

.portrait-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 24px 20px 26px;
  text-align: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.portrait-flag {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 2;
  display: grid;
  width: 40px;
  height: 31px;
  place-items: center;
  background: rgba(var(--color-bg-deep-rgb), 0.7);
  border: 1px solid var(--color-line);
}

.portrait-flag .flag-icon {
  width: 25px;
  height: 17px;
}

.portrait-silhouette {
  position: relative;
  width: min(140px, 68%);
  aspect-ratio: 1 / 1.03;
  margin: 8px auto 22px;
}

.portrait-silhouette::before {
  content: "";
  position: absolute;
  top: 8%;
  left: 50%;
  width: 38%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--color-silhouette-head);
  border: 1px solid rgba(245, 240, 229, 0.08);
}

.portrait-silhouette::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 58%;
  border-radius: 48% 48% 6px 6px;
  background: var(--color-silhouette-body);
  border: 1px solid rgba(245, 240, 229, 0.08);
}

.portrait-card h3 {
  position: relative;
  font-size: var(--step-1);
}

.portrait-card h3 a {
  color: var(--color-warm);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.portrait-card h3 a:hover,
.portrait-card h3 a:focus-visible {
  color: var(--color-warm-bright);
}

.portrait-card p {
  overflow-wrap: anywhere;
  position: relative;
  margin-top: 7px;
  color: var(--color-ink-soft);
  font-size: var(--step--1);
  font-weight: 400;
  letter-spacing: 0;
}

.signup-card {
  width: min(100%, 780px);
  margin: clamp(36px, 5vw, 58px) auto 0;
  padding: clamp(24px, 4vw, 40px);
  text-align: left;
  background: var(--color-bg-card);
  border: 1px solid var(--color-line-strong);
  box-shadow: var(--shadow-soft);
}


/* A standalone CTA, without the old signup card's frame or surface. */
.signup-actions {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

.signup-card--embed {
  padding: clamp(18px, 3vw, 30px);
  overflow: hidden;
}

.signup-card--embed iframe {
  display: block;
  width: 100%;
  min-height: 120px;
  border: 0;
  background: transparent;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.signup-card label {
  display: grid;
  gap: 8px;
  color: var(--color-ink);
  font-size: var(--step--1);
  font-weight: 400;
}

.signup-card input[type="text"],
.signup-card input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  color: var(--color-ink);
  background: var(--color-bg-field);
  border: 1px solid var(--color-line-strong);
  border-radius: 0;
}

.signup-card input::placeholder {
  color: rgba(245, 240, 229, 0.4);
}

.checkbox-row {
  display: flex !important;
  align-items: flex-start;
  gap: 11px !important;
  margin: 18px 0 22px;
  color: var(--color-ink-muted) !important;
  font-weight: 400 !important;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--color-warm);
}

.form-note {
  margin-top: 16px;
  font-size: var(--step--1);
  text-align: center;
}

.footer-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--color-ink-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-ink);
}

.footer-link-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.footer-links .flag-icon--inline {
  flex-shrink: 0;
  margin-right: 0;
}

.hero-banner {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: max(clamp(650px, 88vh, 940px), 56.5vw);
  overflow: hidden;
  background: var(--color-bg);
}

.hero-banner__image {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-banner__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(7, 12, 24, 0.68) 0%, rgba(7, 12, 24, 0.18) 26%, rgba(7, 12, 24, 0.12) 52%, rgba(8, 14, 29, 0.62) 79%, var(--color-bg) 98%),
    linear-gradient(90deg, rgba(7, 12, 24, 0.18), transparent 30%, transparent 70%, rgba(7, 12, 24, 0.18));
}

.hero-banner__content {
  display: flex;
  min-height: inherit;
  padding-top: calc(var(--header-height) + clamp(36px, 5vh, 64px));
  padding-bottom: clamp(60px, 8vh, 94px);
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.game-title {
  max-width: 100%;
  margin-inline: auto;
  color: #fff;
  font-size: var(--step-4);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3333333333;
  animation: hero-title-enter 800ms cubic-bezier(0.16, 1, 0.3, 1) 500ms both;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.68), 0 1px 0 rgba(0, 0, 0, 0.72);
}

.hero-banner__message {
  display: flex;
  width: min(100%, 880px);
  margin-top: clamp(100px, 25vh, 280px);
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.82);
}

.hero-tagline {
  max-width: 20ch;
  color: #fff;
  font-size: var(--step-3);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--step-1);
  font-weight: 400;
}

.hero-banner__message .button {
  margin-top: 8px;
  text-shadow: none;
}

/* Hero -> game -> team -> signup -> footer. Every seam shares one token. */
.world-section {
  --section-surface: var(--color-bg);
}

.discord-widget {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 24px;
  width: min(100%, 540px);
  padding: 32px 24px;
  scroll-margin-top: 24px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-soft);
}

.discord-widget__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  color: var(--color-ink);
}

.discord-widget__status[data-presence]::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: var(--color-ink-soft);
}

.discord-widget__status[data-presence="online"]::before {
  background: var(--color-status-online);
}

.discord-widget .button {
  max-width: 100%;
}

.discord-widget__avatars {
  display: flex;
  min-height: 48px;
  width: max-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.discord-widget__avatars img {
  flex: 0 1 48px;
  min-width: 0;
  width: 48px;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--color-line-strong);
  border-radius: 50%;
}

.team-section {
  --section-end: var(--color-bg-night);
}

.email-section {
  --section-start: var(--color-bg-night);
  --section-surface: var(--color-bg-raised);
  --section-end: var(--color-bg-deep);
  padding-bottom: calc(var(--section-space) + var(--section-fade) / 2);
}

@media (min-width: 901px) {
  main > :is(.world-section, .team-section, .email-section) {
    --section-space: clamp(48px, 6.5vw, 88px);
  }

  .email-section {
    padding-bottom: calc(var(--section-space) + var(--section-fade) / 4);
  }
}

.updates-content {
  text-align: center;
}

/* One continuous SVG path, not two separate arms. Only the chevron pulses. */
.hero-scroll-indicator {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: min(calc(100% - 76px - env(safe-area-inset-bottom, 0px)), calc(100svh - 76px - env(safe-area-inset-bottom, 0px)));
  display: grid;
  width: 128px;
  height: 56px;
  padding: 0;
  place-items: center;
  transform: translateX(-50%);
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 6px;
  text-decoration: none;
  animation: hero-arrow-enter 800ms cubic-bezier(0.16, 1, 0.3, 1) 1s both;
}

.hero-scroll-indicator__chevron {
  position: relative;
  display: block;
  width: 112px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.58;
  animation: hero-chevron-pulse 2.8s ease-in-out 1.8s infinite;
}

.hero-scroll-indicator:hover .hero-scroll-indicator__chevron,
.hero-scroll-indicator:focus-visible .hero-scroll-indicator__chevron {
  animation: none;
  opacity: 0.85;
}

/* Keep the link centred; entrance and idle pulse use separate elements. */
@keyframes hero-title-enter {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}

@keyframes hero-arrow-enter {
  from { opacity: 0; transform: translate(-50%, 24px); }
  to { opacity: 1; transform: translateX(-50%); }
}

@keyframes hero-chevron-pulse {
  0%, 100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  50% {
    opacity: 0.72;
    transform: translateY(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-title,
  .hero-scroll-indicator,
  .hero-scroll-indicator__chevron {
    animation: none;
  }
}

@media (max-width: 1080px) {
  .portrait-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 761px) {
  .language-switcher--desktop {
    display: flex !important;
  }

  .language-switcher--mobile {
    display: none !important;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 82px;
    --section-space: clamp(66px, 11vw, 96px);
  }

  .hero-banner {
    min-height: clamp(620px, 86svh, 860px);
  }

  .hero-banner__content {
    padding-bottom: clamp(48px, 7vh, 76px);
  }

  .hero-banner__message {
    margin-top: clamp(80px, 20vh, 190px);
  }

  .site-footer__inner {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  /* Keep game and playtest content aligned with 24px side gutters on mobile. */
  .world-section > .section-copy--wide,
  .email-section > .updates-content {
    width: calc(100% - 48px);
  }

  .site-header__inner {
    gap: 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand__logo {
    width: 104px;
    max-height: calc(var(--header-height) - 12px);
  }

  .header-actions {
    gap: 7px;
    flex-shrink: 0;
  }

  .header-cta {
    min-height: 40px;
    padding-inline: 14px;
  }

  .language-switcher--desktop {
    display: none !important;
  }

  .language-switcher--mobile {
    position: relative;
    display: block !important;
  }

  .language-switcher--mobile .language-switcher__trigger {
    display: inline-flex !important;
    min-width: 44px;
    min-height: 44px;
    color: var(--color-ink-muted);
    background: rgba(var(--color-bg-deep-rgb), 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .language-switcher--mobile .language-switcher__options {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: 90;
    display: grid !important;
    min-width: 62px;
    padding: 5px;
    background: rgba(var(--color-bg-deep-rgb), 0.98);
    border: 1px solid var(--color-line-strong);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-7px);
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  }

  .language-switcher--mobile.is-open .language-switcher__options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .language-switcher--mobile a {
    min-width: 48px;
    min-height: 44px;
  }

  .game-title {
    max-width: 100%;
    font-size: 48px;
    letter-spacing: 0;
  }

  .hero-tagline {
    max-width: 17ch;
    font-size: 48px;
  }

  .hero-lead {
    max-width: 36ch;
    font-size: 24px;
  }

  .portrait-grid {
    gap: 12px;
  }

  .portrait-card {
    padding: 20px 14px 22px;
  }

  .portrait-silhouette {
    width: min(118px, 72%);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 16px;
  }

  .hero-banner {
    min-height: 720px;
  }

  .hero-banner__content {
    padding-top: calc(var(--header-height) + 44px);
    padding-bottom: 54px;
  }

  .hero-banner__message {
    margin-top: 110px;
  }

  .portrait-grid {
    grid-template-columns: 1fr;
  }

  .portrait-flag {
    top: 9px;
    right: 9px;
    width: 35px;
    height: 28px;
  }

  .portrait-flag .flag-icon {
    width: 22px;
    height: 15px;
  }

  .portrait-card h3 {
    font-size: 24px;
  }

  .portrait-card p {
    font-size: 24px;
  }

  .signup-card {
    padding: 22px 18px;
  }

  .signup-card .button {
    width: 100%;
  }

  .footer-links {
    flex-direction: column;
    gap: 20px;
  }

  .site-footer__inner,
  .footer-links {
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-switcher--mobile .language-switcher__options { transition: none; }
}

@media (max-width: 400px) {
  .brand__logo {
    width: 92px;
  }

  .header-cta {
    min-height: 38px;
    padding: 9px 12px;
  }

  .language-switcher a,
  .language-switcher__trigger {
    padding: 7px;
  }

  .flag-icon {
    width: 23px;
    height: 16px;
  }


}

/* Mobile only: the person's centre is 23% across the 2048 x 1157 artwork.
   A plain 23% object-position does NOT put that point in the viewport centre.
   The viewport correction does; min() clamps at the image edge on wider phones
   to avoid empty margins. Preserve the full image height and desktop framing. */
@media (max-width: 760px), (max-width: 960px) and (hover: none) and (pointer: coarse) {
  .hero-banner__image {
    object-position: min(0px, calc(23% + 27vw)) top;
  }
}

@media (max-width: 560px) {
  .portrait-grid {
    grid-template-columns: 1fr;
  }

  .portrait-card {
    display: grid;
    grid-template-columns: 84px 1fr;
    column-gap: 16px;
    align-items: center;
    text-align: left;
  }

  .portrait-silhouette {
    grid-row: 1 / span 2;
    width: 84px;
    margin: 0;
  }

  .portrait-card h3,
  .portrait-card p {
    grid-column: 2;
  }
}

/* Homepage hero: preserve heading semantics, arrow, shade and hero height. */
[data-hero-parallax] { --parallax-css-ready: 3; }
[data-hero-parallax] > .hero-banner__image {
  image-rendering: pixelated;
  transform: scale(1.025);
  transform-origin: center center;
}
.hero-parallax {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
  contain: layout paint;
}
.hero-parallax__layer {
  position: absolute;
  max-width: none;
  /* Source pixels are enlarged with nearest sampling in a resize-only cache.
     Smooth only its fractional SCREEN-pixel translation, not the source art. */
  image-rendering: auto;
}
.hero-parallax.is-active .hero-parallax__layer { will-change: transform; }
.hero-motion-toggle {
  position: absolute;
  right: max(16px, env(safe-area-inset-right, 0px));
  top: min(calc(100% - 68px - env(safe-area-inset-bottom, 0px)), calc(100svh - 68px - env(safe-area-inset-bottom, 0px)));
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
}
.hero-motion-toggle[hidden], .hero-parallax[hidden], .hero-parallax__layer[hidden] { display: none; }
.hero-motion-toggle:hover, .hero-motion-toggle:focus-visible {
  color: #fff;
  background: rgba(7, 12, 24, 0.45);
}
.hero-motion-toggle svg { width: 20px; height: 20px; fill: currentColor; }
/* Keep the pause/resume control on desktop only. Mobile motion is unchanged. */
@media (max-width: 760px), (hover: none), (pointer: coarse) {
  .hero-motion-toggle { display: none; }
}
.hero-motion-toggle__play { display: none; }
.hero-motion-toggle[aria-pressed='true'] .hero-motion-toggle__play { display: block; }
.hero-motion-toggle[aria-pressed='true'] .hero-motion-toggle__pause { display: none; }
/* Styling is independent of H1 semantics. Limit the size change to homepages. */
.hero-banner .game-title { font-size: 24px; }
@media (min-width: 1000px) {
  .hero-banner .game-title { font-size: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-parallax, .hero-motion-toggle { display: none; }
  [data-hero-parallax] > .hero-banner__image { visibility: visible !important; }
}

.hero-banner--logo-preview .hero-logo-preview,
[data-outersloth-hero-preview] .hero-banner .game-title {
  width: min(46vw, 484px);
  line-height: 0;
}

.hero-banner--logo-preview .hero-logo-preview {
  position: absolute;
  top: min(50%, 50svh);
  left: 50%;
  isolation: isolate;
  margin: 0;
  /* Center the visual weight of the wider, heavier bottom line. */
  translate: -50.5% -56%;
  animation: hero-logo-preview-enter 1.1s cubic-bezier(0.16, 1, 0.3, 1) 500ms both;
}

.hero-logo-preview::before {
  position: absolute;
  z-index: -1;
  inset: -30% -16%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--color-warm) 32%, transparent), transparent 66%);
  content: "";
  opacity: 0;
  pointer-events: none;
  animation: hero-logo-preview-light 1.5s ease-out 600ms both;
}

.hero-logo-preview__image {
  display: block;
  width: 100%;
  max-height: 48vh;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 rgba(var(--color-bg-deep-rgb), 0.66))
    drop-shadow(0 5px 18px rgba(var(--color-bg-deep-rgb), 0.78));
}

@media (max-width: 760px) {
  .hero-banner--logo-preview .hero-logo-preview,
  [data-outersloth-hero-preview] .hero-banner .game-title {
    width: min(72vw, 340px);
  }
}

@keyframes hero-logo-preview-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hero-logo-preview-light {
  0% { opacity: 0; transform: scale(0.88); }
  35% { opacity: 0.85; }
  100% { opacity: 0; transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-banner--logo-preview .hero-logo-preview,
  .hero-logo-preview::before {
    animation: none;
  }
}
