/* Thanatos Forge — nocturnal forest studio */

:root {
  --bg: #050706;
  --bg-deep: #030504;
  --bg-elevated: #0b100e;
  --bg-panel: #0f1613;
  --bg-soft: #121c18;
  --border: rgba(110, 231, 183, 0.1);
  --border-strong: rgba(110, 231, 183, 0.22);
  --text: #e8f0ea;
  --text-muted: #93a89a;
  --text-dim: #5f7366;
  --moss: #1f4d3a;
  --fern: #3d8b6e;
  --glow: #6ee7b7;
  --glow-soft: #a7f3d0;
  --glow-dim: rgba(110, 231, 183, 0.14);
  --ember: #c4a574;
  --danger: #8b3a3a;
  --gradient-glow: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 40%, #3d8b6e 100%);
  --gradient-hero: linear-gradient(180deg, rgba(5, 7, 6, 0.35) 0%, rgba(5, 7, 6, 0.72) 45%, var(--bg) 100%);
  --shadow-glow: 0 0 48px rgba(110, 231, 183, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Instrument Sans", "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Cormorant Garamond", "Georgia", serif;
  --container: 1140px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

::selection {
  background: rgba(110, 231, 183, 0.28);
  color: #fff;
}

/* Atmosphere */

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
  mix-blend-mode: overlay;
}

.glow-orb {
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  opacity: 0.28;
}

.glow-orb--a {
  width: 460px;
  height: 460px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(61, 139, 110, 0.55), transparent 70%);
}

.glow-orb--b {
  width: 380px;
  height: 380px;
  bottom: 8%;
  left: -120px;
  background: radial-gradient(circle, rgba(110, 231, 183, 0.18), transparent 70%);
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(5, 7, 6, 0.55);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(5, 7, 6, 0.88);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.logo-mark {
  width: 38px;
  height: 38px;
  color: var(--glow);
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(110, 231, 183, 0.35));
}

.logo-mark svg {
  width: 100%;
  height: 100%;
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo-text .accent {
  color: var(--glow);
}

.logo-tag {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--glow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
  opacity: 0.7;
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
  color: var(--text);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 22, 19, 0.6);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.45rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--gradient-glow);
  color: #04120c;
  box-shadow: 0 10px 32px rgba(110, 231, 183, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 14px 40px rgba(110, 231, 183, 0.32);
}

.btn-ghost {
  background: rgba(15, 22, 19, 0.55);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: rgba(110, 231, 183, 0.4);
  background: rgba(110, 231, 183, 0.08);
}

.btn-hint {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Hero */

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: flex-end;
  padding: 0 0 clamp(3.5rem, 8vw, 5.5rem);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.04);
  animation: hero-drift 28s ease-in-out infinite alternate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  box-shadow: inset 0 -80px 100px rgba(5, 7, 6, 0.85);
}

@keyframes hero-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.2%, -1%, 0); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  max-width: 820px;
  padding-top: 6rem;
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--glow);
}

.hero h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.2rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero h1 .thin {
  font-weight: 400;
  color: var(--glow-soft);
  display: block;
}

.hero-tagline {
  margin: 0.85rem 0 1.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 500;
  font-style: italic;
  color: var(--text);
  letter-spacing: 0.01em;
}

.hero-lead {
  margin: 0 0 2rem;
  max-width: 34rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.75rem;
}

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  max-width: 620px;
}

.hero-stats li {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(11, 16, 14, 0.72);
  backdrop-filter: blur(10px);
}

.hero-stats strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
  color: var(--glow-soft);
}

.hero-stats span {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Sections */

.section {
  padding: clamp(4.25rem, 9vw, 7rem) 0;
  position: relative;
  z-index: 1;
}

.section--tight {
  padding-top: clamp(2rem, 5vw, 3rem);
}

.section--alt {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(61, 139, 110, 0.08), transparent 50%),
    linear-gradient(180deg, transparent, var(--bg-deep) 10%, var(--bg-deep) 90%, transparent);
  border-block: 1px solid var(--border);
}

.section-head {
  margin-bottom: 2.5rem;
  max-width: 36rem;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2,
.studio-copy h2,
.contact-block h2,
.page-hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.section-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Reveal animations */

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

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

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

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

  .hero-media img {
    animation: none;
  }
}

/* About / Studio */

.studio-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}

.studio-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 1;
  background: var(--bg-panel);
  box-shadow: var(--shadow-glow);
}

.studio-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-visual-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--glow-soft);
  background: rgba(5, 7, 6, 0.72);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
}

.studio-copy p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.studio-copy p:last-of-type {
  margin-bottom: 1.5rem;
}

.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-list li {
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: rgba(110, 231, 183, 0.04);
}

/* Portfolio */

.game-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.15rem;
}

.game-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.game-card:hover {
  border-color: rgba(110, 231, 183, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.game-card--featured {
  grid-column: span 8;
}

.game-card--locked:hover {
  border-color: var(--border-strong);
  box-shadow: none;
  transform: none;
}

.game-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-panel);
}

.game-card--featured .game-card-media {
  aspect-ratio: 16 / 9;
}

.game-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.game-card:hover .game-card-media img {
  transform: scale(1.05);
}

.game-card--locked:hover .game-card-media img {
  transform: none;
}

.game-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 7, 6, 0.55) 100%);
  pointer-events: none;
}

.game-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(5, 7, 6, 0.75);
  border: 1px solid var(--border-strong);
  color: var(--glow-soft);
  backdrop-filter: blur(8px);
}

.game-badge--muted {
  color: var(--text-muted);
}

.game-card-body {
  padding: 1.35rem 1.45rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-card-body h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.game-meta {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--fern);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.game-card-body p {
  margin: 0 0 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex: 1;
}

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--glow-soft);
  background: rgba(110, 231, 183, 0.08);
  border: 1px solid rgba(110, 231, 183, 0.18);
}

.text-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--glow);
  transition: color 0.2s var(--ease);
}

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

.muted {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* News */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.news-card {
  padding: 1.4rem 1.45rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.news-card:hover {
  border-color: rgba(110, 231, 183, 0.3);
  transform: translateY(-2px);
}

.news-date {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.news-card h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
}

.news-card p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Contact */

.contact-block {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.contact-note {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 2.75rem;
  position: relative;
  z-index: 1;
  background: var(--bg-deep);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-brand .logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-brand p {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: var(--text-dim);
  max-width: 22rem;
}

.footer-col h4 {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer-col a,
.footer-links a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  transition: color 0.2s var(--ease);
}

.footer-col a:hover,
.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--glow);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Inner pages */

.page-hero {
  padding: clamp(3rem, 7vw, 4.5rem) 0 1.5rem;
  position: relative;
  z-index: 1;
}

.page-hero--media {
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 2.5rem;
  overflow: hidden;
}

.page-hero--media .page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero--media .page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero--media .page-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 7, 6, 0.35), rgba(5, 7, 6, 0.92));
}

.page-hero--media .container {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--glow);
}

/* Game detail */

.game-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.prose {
  color: var(--text-muted);
}

.prose h2 {
  margin: 2rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.side-panel {
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.side-panel h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.fact-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.fact-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.fact-list span:first-child {
  color: var(--text-dim);
}

.fact-list span:last-child {
  color: var(--text);
  text-align: right;
  font-weight: 500;
}

/* Legal pages (kept compatible) */

.legal-page {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(4rem, 8vw, 5.5rem);
  position: relative;
  z-index: 1;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.legal-narrow {
  max-width: 760px;
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-h) + 1.25rem);
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(15, 22, 19, 0.7);
}

.legal-toc-title {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.legal-toc ol {
  margin: 0;
  padding: 0 0 0 1.1rem;
  display: grid;
  gap: 0.4rem;
}

.legal-toc a {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
  transition: color 0.2s var(--ease);
}

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

.legal-content h1,
.legal-narrow > h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 600;
}

.legal-meta {
  margin: 0 0 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.legal-meta a,
.legal-content a,
.support-faq a {
  color: var(--glow);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-meta a:hover,
.legal-content a:hover,
.support-faq a:hover {
  color: var(--text);
}

.legal-callout {
  margin: 0 0 2rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(110, 231, 183, 0.22);
  background: rgba(110, 231, 183, 0.06);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.legal-callout strong {
  color: var(--text);
}

.legal-callout a {
  color: var(--glow);
}

.legal-content section {
  margin-bottom: 2rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.legal-content h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 650;
  color: var(--text);
}

.legal-content h3 {
  margin: 1.15rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.legal-content p,
.support-faq p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.legal-content ul,
.support-faq ul {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.legal-content li,
.support-faq li {
  margin-bottom: 0.4rem;
}

.legal-content li strong,
.support-faq li strong {
  color: var(--text);
}

.contact-list {
  list-style: none;
  padding-left: 0 !important;
}

.legal-disclaimer {
  margin-top: 1.5rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem !important;
  color: var(--text-dim) !important;
}

.legal-intro {
  margin-bottom: 2rem !important;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.support-card {
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.support-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
}

.support-card p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.support-card .btn {
  width: 100%;
}

.support-hint {
  margin-bottom: 0 !important;
  font-size: 0.85rem !important;
  color: var(--text-dim) !important;
}

.support-faq h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
}

.support-faq h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.url-list {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  word-break: break-all;
}

.url-list li {
  margin-bottom: 0.4rem;
}

/* Responsive */

@media (max-width: 980px) {
  .game-card,
  .game-card--featured {
    grid-column: span 6;
  }

  .studio-grid,
  .game-detail-grid,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
  }

  .side-panel {
    position: static;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .hero-stats,
  .news-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .game-card,
  .game-card--featured {
    grid-column: span 12;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(5, 7, 6, 0.96);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.9rem 0.25rem;
    border-bottom: 1px solid var(--border);
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .nav a::after {
    display: none;
  }

  .logo-tag {
    display: none;
  }
}

/* Leaderboard */

.leaderboard-wrap {
  max-width: 860px;
}

.leaderboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.leaderboard-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.leaderboard-table-shell {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.leaderboard-table th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(110, 231, 183, 0.04);
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: none;
}

.leaderboard-table tbody tr:hover td {
  background: rgba(110, 231, 183, 0.04);
}

.leaderboard-table tr.is-top td {
  color: var(--glow-soft);
}

.leaderboard-table .col-rank {
  width: 4rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  font-weight: 600;
}

.leaderboard-table .col-name {
  font-weight: 600;
  letter-spacing: 0.04em;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
}

.leaderboard-table .col-score {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--glow);
}

.leaderboard-table .col-wave,
.leaderboard-table .col-platform {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.leaderboard-empty td {
  text-align: center;
  color: var(--text-dim);
  padding: 2rem 1rem !important;
}

.leaderboard-footnote {
  margin: 1.25rem 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.55;
}

@media (max-width: 600px) {
  .leaderboard-table .col-platform {
    display: none;
  }

  .leaderboard-table th:nth-child(5),
  .leaderboard-table td:nth-child(5) {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
