/*
Theme Name: Elemental Fracture
Theme URI: https://elefrac.com
Author: Elemental Fracture community
Author URI: https://elefrac.com
Description: The official Elemental Fracture marketing theme - a single-page download funnel styled to match the Elemental Fracture launcher: deep-purple surfaces with corner glows, gold-gradient actions, rounded bordered cards, Friz Quadrata display / Montserrat body.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elemental-fracture
*/

/* ============================================================================
   Design tokens - mirrored from the launcher's App.css so the site and the
   launcher speak one language (purple surfaces, gold accent, rounded radii).
   ========================================================================== */
:root {
  /* Surfaces (EF purple) */
  --background: #0d0716;
  --foreground: #ece6f6;
  --card: #1b1030;
  --popover: #221540;
  --muted: #150c24;        /* sunken surface */
  --muted-foreground: #9c90b8;
  --border: #2e1f52;

  /* Gold */
  --primary: #d9b45b;
  --primary-bright: #f0d48a;
  --primary-foreground: #16102a;

  --destructive: #e05c6e;
  --success: #4cd97b;
  --cream: #fbe9dc;
  --discord: #5865f2;

  /* Translucent ramps (follow the palette rather than pinning a hue) */
  --primary-tint: color-mix(in srgb, var(--primary) 10%, transparent);
  --primary-edge: color-mix(in srgb, var(--primary) 40%, transparent);
  --primary-glow: color-mix(in srgb, var(--primary) 22%, transparent);
  --surface: color-mix(in srgb, var(--foreground) 5%, transparent);
  --separator: color-mix(in srgb, var(--foreground) 7%, transparent);

  /* Type */
  --font-display: "Friz Quadrata", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-ui: "Segoe UI", "Inter", system-ui, sans-serif;

  /* Radii - the four the launcher draws on */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-pill: 9999px;

  /* Layout */
  --ef-column: min(1200px, 90vw);
  --ef-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================================
   Fonts (Friz Quadrata bundled; Inter + Montserrat enqueued from Google)
   ========================================================================== */
@font-face {
  font-family: "Friz Quadrata";
  src: url("assets/fonts/FrizQuadrata-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ============================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* The launcher's signature ambient backdrop: two soft corner glows over the
   deep-purple ground, fixed behind everything. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 500px at 85% -10%, #2b1a52cc 0%, transparent 60%),
    radial-gradient(800px 600px at -10% 110%, #23103fbb 0%, transparent 55%);
}
img { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-bright); }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

.ef-column { width: var(--ef-column); margin: 0 auto; }
code { font-family: ui-monospace, "Cascadia Code", "Consolas", monospace; background: var(--surface); padding: 2px 7px; border-radius: var(--radius-sm); font-size: 0.88em; color: var(--primary-bright); }

/* Display + text roles */
.ef-eyebrow {
  font-family: var(--font-ui); font-size: 12px; line-height: 1;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--primary);
  opacity: 0.85; font-weight: 500;
}
.ef-eyebrow--sm { font-size: 11px; letter-spacing: 0.2em; color: var(--muted-foreground); }
.ef-h2 {
  font-family: var(--font-display); color: var(--primary-bright);
  letter-spacing: 0.02em; font-size: clamp(32px, 4vw, 52px); line-height: 1.12;
  text-wrap: balance;
}
.ef-body {
  font-family: var(--font-body); font-size: 16px; line-height: 1.8;
  color: var(--muted-foreground); text-wrap: pretty;
}

/* Reveal + parallax (assets/js/main.js) */
[data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.8s var(--ef-ease), transform 0.8s var(--ef-ease);
}
[data-reveal].is-shown { opacity: 1; transform: none; }
[data-parallax] { will-change: transform; }

/* ============================================================================
   Buttons - the launcher's gold-gradient primary, plus quiet variants.
   ========================================================================== */
.ef-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-ui); font-weight: 600; font-size: 14px; line-height: 1;
  padding: 12px 22px; border-radius: var(--radius-lg); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: filter 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ef-btn--primary {
  background: linear-gradient(135deg, var(--primary-bright), var(--primary));
  border-color: var(--primary); color: var(--primary-foreground);
  box-shadow: 0 6px 22px var(--primary-glow);
}
.ef-btn--primary:hover { filter: brightness(1.08); box-shadow: 0 10px 34px var(--primary-glow); color: var(--primary-foreground); transform: translateY(-1px); }
.ef-btn--lg { font-size: 15px; padding: 15px 30px; border-radius: var(--radius-xl); letter-spacing: 0.02em; }
.ef-btn--discord { background: var(--discord); color: #fff; }
.ef-btn--discord:hover { filter: brightness(1.12); color: #fff; }
.ef-btn--ghost {
  background: color-mix(in srgb, var(--foreground) 4%, transparent);
  border-color: var(--border); color: var(--foreground);
}
.ef-btn--ghost:hover { border-color: var(--primary-edge); color: var(--foreground); }
.ef-btn svg { flex: none; }

.text-link {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-ui);
  font-size: 14px; line-height: 1; color: var(--primary); text-decoration: none;
  border-bottom: 1px solid var(--primary-edge); padding-bottom: 4px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.text-link svg { width: 16px; height: 10px; }
.text-link:hover { border-color: var(--primary-bright); color: var(--primary-bright); }

/* ============================================================================
   Header
   ========================================================================== */
.site-header {
  position: absolute; left: 0; right: 0; top: 0; z-index: 40;
  width: var(--ef-column); margin: 0 auto; height: 104px;
  display: flex; align-items: center; justify-content: space-between;
}
.site-header__logo img { width: 118px; height: auto; object-fit: contain; display: block; }
.site-header__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav { display: flex; align-items: center; gap: 2px; margin-right: 6px; }
.site-nav__link {
  display: inline-flex; align-items: center; padding: 8px 10px; border-radius: var(--radius-lg);
  font-family: var(--font-ui); font-size: 13px; font-weight: 500; color: var(--muted-foreground);
  text-decoration: none; transition: color 0.18s ease, background 0.18s ease;
}
.site-nav__link .nv-rule, .site-nav__link .nv-mark { display: none; }
.site-nav__link:hover { color: var(--primary-bright); background: var(--primary-tint); }
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 14px; border-radius: var(--radius-lg); text-decoration: none;
  font-family: var(--font-ui); font-size: 14px; font-weight: 600; transition: filter 0.18s ease, box-shadow 0.2s ease;
}
.btn-pill svg { flex: none; }
.btn-pill--discord { background: var(--discord); color: #fff; }
.btn-pill--discord:hover { filter: brightness(1.12); color: #fff; }
.btn-pill--patreon {
  background: linear-gradient(135deg, var(--primary-bright), var(--primary));
  color: var(--primary-foreground); box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-pill--patreon:hover { filter: brightness(1.08); color: var(--primary-foreground); }
.btn-pill--patreon svg path { fill: var(--primary-foreground); }
.btn-pill--account {
  background: color-mix(in srgb, var(--foreground) 4%, transparent);
  border: 1px solid var(--border); color: var(--foreground); max-width: 200px;
  display: inline-flex; align-items: center; gap: 8px; padding: 0 14px;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.btn-pill--account > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-pill--account .ef-avatar { width: 24px; height: 24px; border-width: 1px; margin-left: -3px; }
.btn-pill--account:hover { border-color: var(--primary-edge); color: var(--primary-bright); filter: none; }

/* --- Language toggle (far right of the header) ---
   A <details>, so the panel opens with no JavaScript. The summary is styled as a
   pill and its default disclosure triangle is suppressed (two rules: the standard
   `list-style` and the WebKit pseudo-element Safari still needs). */
.ef-lang { position: relative; }
.ef-lang > summary { list-style: none; }
.ef-lang > summary::-webkit-details-marker { display: none; }
.ef-lang > summary::marker { content: ""; }
.ef-lang__btn {
  background: color-mix(in srgb, var(--foreground) 4%, transparent);
  border: 1px solid var(--border); color: var(--foreground);
  padding: 0 9px; gap: 5px; cursor: pointer; font: inherit;
  font-family: var(--font-ui); font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.ef-lang__btn:hover { border-color: var(--primary-edge); color: var(--primary-bright); }
.ef-lang__btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Flag + caret only. The header already carries four controls, and the wordier
   languages (Russian, German) overflow it onto a second row if the toggle also
   spends width on a text code. The flag identifies the language; the panel spells
   it out. Shown from 1180px up, where there is room to spare. */
.ef-lang__code { display: none; line-height: 1; }
@media (min-width: 1180px) { .ef-lang__code { display: inline; } }
.ef-lang__flag { display: block; flex: none; border-radius: 2px; }
.ef-lang__caret { opacity: 0.7; transition: transform 0.15s ease; }
.ef-lang[open] .ef-lang__caret { transform: rotate(180deg); }

.ef-lang__panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  display: none; min-width: 238px; padding: 6px;
  background: var(--popover); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5);
}
.ef-lang[open] .ef-lang__panel { display: block; }
.ef-lang__item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-md); text-decoration: none;
  font-family: var(--font-ui); font-size: 13.5px; color: var(--foreground);
  transition: background 0.15s ease, color 0.15s ease;
}
.ef-lang__item:hover { background: var(--primary-tint); color: var(--primary-bright); }
.ef-lang__name { flex: 1; white-space: nowrap; }
.ef-lang__tick { flex: none; opacity: 0; color: var(--primary); }
.ef-lang__item.is-current { color: var(--primary-bright); font-weight: 600; }
.ef-lang__item.is-current .ef-lang__tick { opacity: 1; }

/* ============================================================================
   Hero - art fading into the purple ground, launcher-style gradient shade.
   ========================================================================== */
/* min-height, not height: a long translation (the CJK headline runs to three
   lines) grows the hero instead of crowding the scroll cue. */
.hero {
  position: relative; width: 100%; min-height: clamp(620px, 86vh, 820px); overflow: hidden;
  display: flex; flex-direction: column;
}
.hero__art-wrap { position: absolute; left: 0; top: -6%; width: 100%; height: 112%; }
/* Rotating promo art, matching the launcher's HeroArt: two layers crossfade
   (the purple grade is baked into the images), framed a little above centre. */
.hero__slide {
  position: absolute; inset: 0;
  background: center 32% / cover no-repeat;
  opacity: 0; transition: opacity 2.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity; transform: translateZ(0);
}
.hero__slide.is-visible { opacity: 1; }
/* Vertical melt into the page ground + a horizontal lift so the copy stays legible. */
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13,7,22,.72) 0%, rgba(13,7,22,.30) 34%, rgba(13,7,22,.55) 66%, var(--background) 100%),
    radial-gradient(1200px 520px at 50% 118%, rgba(43,26,82,.5), transparent 70%);
}
.hero__center {
  /* 1 0 auto, so a tall translation grows the hero rather than being squeezed. */
  position: relative; z-index: 20; flex: 1 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(24px, 3vw, 34px); text-align: center;
  /* The top padding clears the absolutely-positioned header (104px, 84px on
     phones) and keeps a margin below it, so the headline is never tucked under
     the nav on a short laptop screen. */
  padding: clamp(132px, 14vh, 160px) 5vw clamp(24px, 3vh, 40px);
}
.hero__title {
  max-width: 900px; font-family: var(--font-display); letter-spacing: 0.02em;
  font-size: clamp(42px, 5.6vw, 76px); line-height: 1.04; color: var(--primary-bright);
  text-shadow: 0 2px 30px rgba(13,7,22,.9), 0 0 70px rgba(13,7,22,.6); text-wrap: balance;
}
.hero__body { max-width: 620px; font-family: var(--font-body); font-size: 17px; line-height: 1.7; color: var(--foreground); opacity: 0.86; text-wrap: pretty; }
.hero__cta-stack { display: flex; flex-direction: column; align-items: center; gap: clamp(20px, 2.4vh, 28px); }
.hero__meta {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  /* Wider than the old flat 12px: the labels are uppercase and letter-spaced, so
     they need more air around the separators to read as three distinct facts.
     Column and row gaps differ so a wrapped line stays tight. */
  column-gap: clamp(16px, 1.6vw, 24px); row-gap: 12px;
  font-family: var(--font-ui); font-size: 12px; line-height: 1; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted-foreground);
}
.hero__meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--primary); opacity: 0.6; display: inline-block; }
.hero__scroll {
  position: relative; z-index: 20; flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  /* Own padding rather than a margin, so the cue keeps a guaranteed gap from the
     call to action above and from the section below at every viewport height. */
  padding: clamp(28px, 4vh, 48px) 5vw clamp(26px, 3.6vh, 40px); text-decoration: none;
}
.hero__scroll span { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-foreground); }
.hero__scroll svg { width: 22px; height: 13px; animation: ef-bob 2.4s ease-in-out infinite; }
.hero__scroll svg path { fill: var(--primary); }

@keyframes ef-bob { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(6px); opacity: 1; } }

/* ============================================================================
   Shared card primitive (from the launcher: purple card, 1px border, 12px
   radius, lifts + gold-edge on hover for interactive ones).
   ========================================================================== */
.ef-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.ef-card--hover:hover { border-color: var(--primary-edge); transform: translateY(-2px); }

/* The content panels all wear the launcher card surface. */
.about__stat, .game-card, .step, .community-panel, .faq__list {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
}
.trailer__plate { border: 1px solid var(--border); border-radius: var(--radius-xl); }
.game-card { transition: border-color 0.18s ease, transform 0.18s ease; }
.game-card:hover { border-color: var(--primary-edge); transform: translateY(-2px); }
.community-panel { transition: border-color 0.18s ease; }
.community-panel:hover { border-color: var(--primary-edge); }

/* ============================================================================
   About
   ========================================================================== */
.about { padding: clamp(80px,9vw,130px) 0 clamp(60px,6vw,90px); }
.about__inner { display: flex; flex-direction: column; align-items: center; gap: clamp(40px,5vw,60px); }
.about__letter { max-width: 780px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.about__letter .ef-rule { align-self: center; }
.about__letter p { font-family: var(--font-body); font-size: 16px; line-height: 1.85; color: var(--muted-foreground); max-width: 720px; text-wrap: pretty; }
.about__sig { font-family: var(--font-display); font-size: 20px; line-height: 1.4; color: var(--primary-bright); letter-spacing: 0.02em; margin-top: 8px; }
.about__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; width: 100%; }
.about__stat { padding: 24px 26px; display: flex; flex-direction: column; gap: 7px; }
.about__stat b { font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1; color: var(--primary-bright); letter-spacing: 0.02em; }
.about__stat span { font-family: var(--font-body); font-size: 13.5px; line-height: 1.6; color: var(--muted-foreground); }
.ef-rule { width: 54px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--primary), transparent); }

/* ============================================================================
   Game
   ========================================================================== */
.game { padding: clamp(60px,6vw,100px) 0 clamp(70px,8vw,110px); }
.game__inner { display: flex; flex-direction: column; gap: clamp(40px,5vw,60px); }
.game__intro { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.game__intro .ef-h2 { max-width: 820px; }
.game__intro p { max-width: 620px; font-size: 16px; line-height: 1.8; color: var(--muted-foreground); }
.game__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.game-card { display: flex; flex-direction: column; overflow: hidden; }
.game-card__media { position: relative; width: 100%; aspect-ratio: 16 / 10; background: var(--muted); }
.game-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-card__media--empty::after {
  content: attr(data-label); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px; font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.04em; color: var(--muted-foreground);
}
.game-card__body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 26px; }
.game-card__body h3 { font-family: var(--font-display); font-size: 24px; line-height: 1.2; color: var(--primary-bright); letter-spacing: 0.02em; }
.game-card__body p { font-family: var(--font-body); font-size: 14px; line-height: 1.75; color: var(--muted-foreground); }

.classes { display: flex; flex-direction: column; gap: 20px; padding: 30px 0 0; border-top: 1px solid var(--border); }
.classes__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 30px; }
@media (max-width: 760px) { .classes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .classes__grid { grid-template-columns: 1fr; } }
.class-item { display: flex; align-items: flex-start; gap: 13px; }
.class-item__icon { width: 40px; height: 40px; flex: none; object-fit: contain; margin-top: 1px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45)); }
.class-item__text { display: flex; flex-direction: column; gap: 3px; }
.class-item b { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.15; color: var(--primary-bright); }
.class-item span { font-family: var(--font-body); font-size: 12.5px; line-height: 1.55; color: var(--muted-foreground); }

.trailer__plate { position: relative; width: 100%; aspect-ratio: 1240 / 620; background: var(--muted); overflow: hidden; }
.trailer__plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trailer__plate::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(13,7,22,.55) 100%); z-index: 1; }
.trailer__overlay { position: absolute; inset: 0; z-index: 2; pointer-events: none; display: flex; align-items: flex-end; justify-content: flex-start; padding: 28px; }
.trailer__play {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 24px 0 20px;
  border-radius: var(--radius-pill); border: 1px solid var(--border); background: color-mix(in srgb, var(--background) 72%, transparent);
  backdrop-filter: blur(8px); text-decoration: none; transition: background 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
  --pl: var(--primary-bright);
}
.trailer__play svg path { fill: var(--pl); transition: fill 0.2s ease; }
.trailer__play span { font-family: var(--font-ui); font-size: 12px; line-height: 1; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pl); font-weight: 600; transition: color 0.2s ease; }
.trailer__play:hover { background: linear-gradient(135deg, var(--primary-bright), var(--primary)); border-color: var(--primary); --pl: var(--primary-foreground); }

/* ============================================================================
   Download
   ========================================================================== */
.download { position: relative; padding: clamp(70px,8vw,120px) 0; background: var(--muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.download__wash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(1000px 420px at 50% 0%, var(--primary-glow) 0%, transparent 70%); }
.download__inner { position: relative; display: flex; flex-direction: column; gap: clamp(38px,4.5vw,56px); }
.download__top { display: flex; flex-wrap: wrap; gap: clamp(36px,4vw,60px); align-items: center; justify-content: space-between; }
.download__copy { flex: 1 1 500px; max-width: 640px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.download__copy .ef-h2 { font-size: clamp(34px,4.4vw,58px); }
.download__copy p { max-width: 560px; }
.download__aside { flex: 0 1 340px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.download__meta { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-body); font-size: 13px; line-height: 1.6; color: var(--muted-foreground); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { display: flex; flex-direction: column; gap: 10px; padding: 26px 26px 30px; background: var(--card); }
.step__ord { font-family: var(--font-display); font-size: 22px; line-height: 1; color: var(--primary); }
.step h3 { font-family: var(--font-display); font-size: 22px; line-height: 1.2; color: var(--primary-bright); letter-spacing: 0.02em; }
.step p { font-family: var(--font-body); font-size: 14px; line-height: 1.7; color: var(--muted-foreground); }
.step em { color: var(--primary-bright); font-style: italic; }

/* ============================================================================
   Community
   ========================================================================== */
.community { padding: clamp(80px,9vw,130px) 0; }
.community__inner { display: flex; flex-wrap: wrap; gap: clamp(20px,2.5vw,28px); align-items: stretch; }
.community-panel { flex: 1 1 440px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: clamp(30px,3.2vw,44px); }
.community-panel .ef-h2 { font-size: clamp(30px,3.4vw,44px); }
.community-panel p { font-size: 15.5px; line-height: 1.8; color: var(--muted-foreground); }
.community-panel__cta { margin-top: auto; padding-top: 6px; }

/* ============================================================================
   FAQ
   ========================================================================== */
/* ---- Press / read about it ---- */
.press { padding: 0 0 clamp(60px,6vw,100px); }
.press__head { max-width: 720px; margin-bottom: clamp(24px,3vw,36px); }
.press__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 700px) { .press__cards { grid-template-columns: 1fr; } }
/* Press cards are game cards (same surface, media ratio and type) with a source eyebrow and a button. */
.press-card .game-card__media { display: block; }
.press-card .game-card__body { flex: 1; }
.press-card .game-card__body .ef-eyebrow { margin: 0 0 -2px; }
.press-card .game-card__body h3 { font-size: 22px; }
.press-card .game-card__body .ef-btn { align-self: flex-start; margin-top: auto; }

.faq { padding: clamp(60px,6vw,100px) 0 clamp(80px,9vw,130px); }
.faq__inner { display: flex; flex-wrap: wrap; gap: clamp(36px,5vw,72px); align-items: flex-start; }
.faq__left { flex: 0 1 340px; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.faq__left .ef-h2 { font-size: clamp(30px,3.6vw,46px); }
.faq__left p { font-size: 15px; line-height: 1.75; color: var(--muted-foreground); }
.faq__list { flex: 1 1 520px; overflow: hidden; padding: 6px 26px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-item__header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%;
  padding: 22px 0; cursor: pointer; background: none; border: 0; text-align: left; --fqc: var(--primary-bright);
}
.faq-item__header h3 { font-family: var(--font-display); font-size: clamp(19px,1.9vw,23px); line-height: 1.3; color: var(--fqc); letter-spacing: 0.01em; transition: color 0.18s ease; }
.faq-item__header:hover { --fqc: var(--cream); }
.faq-item__chev { width: 17px; height: 10px; flex: none; transition: transform 0.3s var(--ef-ease); }
.faq-item__chev path { fill: var(--primary); }
.faq-item.is-open .faq-item__chev { transform: rotate(180deg); }
.faq-item__panel { overflow: hidden; max-height: 0; transition: max-height 0.35s var(--ef-ease); }
.faq-item.is-open .faq-item__panel { max-height: 420px; }
.faq-item__panel p { max-width: 640px; padding: 0 0 24px; font-family: var(--font-body); font-size: 15px; line-height: 1.8; color: var(--muted-foreground); }
.faq-item__panel a { color: var(--primary); border-bottom: 1px solid var(--primary-edge); }

/* ============================================================================
   Final CTA
   ========================================================================== */
.final-cta { position: relative; padding: clamp(90px,9vw,140px) 0; overflow: hidden; }
.final-cta__art-wrap { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; }
.final-cta__art { position: absolute; inset: 0; background: url("assets/img/hero.jpg") center 60% / cover no-repeat; opacity: 0.42; }
.final-cta__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, var(--background) 0%, rgba(13,7,22,.72) 50%, var(--background) 100%); }
.final-cta__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.final-cta__inner .ef-h2 { max-width: 780px; font-size: clamp(34px,4.4vw,58px); }
.final-cta__inner p { max-width: 520px; font-size: 16px; line-height: 1.8; color: var(--foreground); opacity: 0.82; }

/* ============================================================================
   Footer
   ========================================================================== */
.site-footer { width: 100%; background: color-mix(in srgb, var(--background) 60%, #05030c); border-top: 1px solid var(--border); padding: 64px 0 40px; }
.site-footer__inner { display: flex; flex-direction: column; gap: 48px; }
.site-footer__top { display: flex; flex-wrap: wrap; gap: 56px; justify-content: space-between; align-items: flex-start; }
.site-footer__brand { flex: 1 1 320px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.site-footer__brand img { width: 118px; height: auto; object-fit: contain; }
.site-footer__tag { font-family: var(--font-display); font-size: 24px; line-height: 1.3; color: var(--primary-bright); letter-spacing: 0.02em; max-width: 320px; }
.site-footer__social { display: flex; align-items: center; gap: 22px; }
.site-footer__social a { display: flex; align-items: center; opacity: 0.68; transition: opacity 0.2s ease; }
.site-footer__social a:hover { opacity: 1; }
.ef-status {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none; width: fit-content;
  font-family: var(--font-ui); font-size: 12.5px; color: var(--muted-foreground);
  padding: 7px 13px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--foreground) 3%, transparent);
  transition: border-color 0.18s ease, color 0.18s ease;
}
.ef-status:hover { border-color: var(--primary-edge); color: var(--foreground); }
.ef-status__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted-foreground); }
.ef-status[data-state="operational"] .ef-status__dot { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); }
.ef-status[data-state="partial_outage"] .ef-status__dot { background: #e6a416; box-shadow: 0 0 0 3px color-mix(in srgb, #e6a416 22%, transparent); }
.ef-status[data-state="major_outage"] .ef-status__dot { background: var(--destructive); box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 22%, transparent); }
.site-footer__col { flex: 0 1 190px; display: flex; flex-direction: column; gap: 14px; }
.site-footer__col a { font-family: var(--font-body); font-size: 14px; color: var(--muted-foreground); text-decoration: none; transition: color 0.18s ease; }
.site-footer__col a:hover { color: var(--primary-bright); }
.site-footer__divider { width: 100%; height: 1px; background: var(--border); }
.site-footer__legal { display: flex; flex-direction: column; gap: 14px; max-width: 1000px; }
.site-footer__legal p { font-family: var(--font-body); font-size: 11.5px; line-height: 1.85; color: color-mix(in srgb, var(--muted-foreground) 78%, transparent); }
.site-footer__legal strong { color: var(--muted-foreground); font-weight: 500; }
.site-footer__legal a { color: var(--primary); border-bottom: 1px solid var(--primary-edge); }
.site-footer__meta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; font-family: var(--font-ui); font-size: 11px; line-height: 1; letter-spacing: 0.12em; text-transform: uppercase; color: color-mix(in srgb, var(--muted-foreground) 60%, transparent); }

/* ============================================================================
   Sticky download bar
   ========================================================================== */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; justify-content: center;
  padding: 0 4vw 18px; pointer-events: none; opacity: 0; transform: translateY(20px); visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s var(--ef-ease);
}
.sticky-bar.is-visible { opacity: 1; transform: none; visibility: visible; }
.sticky-bar__card {
  pointer-events: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  padding: 12px 14px 12px 24px; background: color-mix(in srgb, var(--popover) 92%, transparent);
  border: 1px solid var(--border); border-radius: var(--radius-2xl); backdrop-filter: blur(12px);
  box-shadow: 0 18px 46px #000a;
}
.sticky-bar__text { display: flex; flex-direction: column; gap: 4px; }
.sticky-bar__text b { font-family: var(--font-display); font-weight: 400; font-size: 18px; line-height: 1; color: var(--primary-bright); letter-spacing: 0.02em; }
.sticky-bar__text span { font-family: var(--font-ui); font-size: 10.5px; line-height: 1; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-foreground); }

/* ============================================================================
   Interior pages: prose (legal, docs, posts), docs layout, blog
   ========================================================================== */
.page-wrap { padding: clamp(120px,14vh,170px) 0 clamp(70px,8vw,110px); }
.page-wrap .page-inner { width: min(820px, 90vw); margin: 0 auto; }

/* --- Shared prose typography --- */
.prose { font-family: var(--font-body); color: var(--foreground); }
.prose h1 { font-family: var(--font-display); font-size: clamp(32px,4vw,50px); color: var(--primary-bright); letter-spacing: 0.02em; line-height: 1.12; margin: 0 0 24px; }
.prose h2 { font-family: var(--font-display); font-size: clamp(23px,2.5vw,30px); color: var(--primary-bright); letter-spacing: 0.01em; margin: 40px 0 14px; }
.prose h3 { font-family: var(--font-display); font-size: 21px; color: var(--primary-bright); margin: 28px 0 10px; }
.prose h4 { font-family: var(--font-ui); font-size: 15px; font-weight: 600; color: var(--foreground); margin: 22px 0 8px; }
.prose p, .prose li { font-size: 15.5px; line-height: 1.85; color: color-mix(in srgb, var(--foreground) 90%, transparent); }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--primary); }
.prose a { color: var(--primary); border-bottom: 1px solid var(--primary-edge); transition: color 0.15s ease, border-color 0.15s ease; }
.prose a:hover { color: var(--primary-bright); border-color: var(--primary-bright); }
.prose strong { color: var(--foreground); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.prose img { max-width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.prose blockquote { margin: 18px 0; padding: 4px 18px; border-left: 3px solid var(--primary-edge); color: var(--muted-foreground); }
.prose :not(pre) > code { font-family: ui-monospace, "Cascadia Code", "Consolas", monospace; background: var(--surface); padding: 2px 7px; border-radius: var(--radius-sm); font-size: 0.86em; color: var(--primary-bright); }
.prose pre { background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; overflow-x: auto; margin: 0 0 18px; }
.prose pre code { font-family: ui-monospace, "Cascadia Code", "Consolas", monospace; font-size: 13px; color: var(--foreground); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.prose th { background: var(--surface); color: var(--primary-bright); font-family: var(--font-ui); font-weight: 600; }
.prose .dc-cta { display: flex; justify-content: center; margin: 22px 0; }
/* Buttons inside prose must NOT inherit the gold prose-link color (that made the
   gold button text near-invisible). Match the launcher: dark text, no underline. */
.prose a.ef-btn { border-bottom: 0; }
.prose a.ef-btn--primary, .prose a.ef-btn--primary:hover { color: var(--primary-foreground); }

/* --- Admonitions (:::tip / :::warning / ...) --- */
.prose .admonition { border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius-lg); padding: 14px 18px; margin: 0 0 18px; background: color-mix(in srgb, var(--foreground) 3%, transparent); }
.prose .admonition p:last-child { margin-bottom: 0; }
.prose .admonition-title { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 6px; color: var(--primary); }
.prose .admonition-tip, .prose .admonition-note { border-left-color: var(--primary); }
.prose .admonition-tip .admonition-title, .prose .admonition-note .admonition-title { color: var(--primary); }
.prose .admonition-warning, .prose .admonition-caution { border-left-color: #e6a416; }
.prose .admonition-warning .admonition-title, .prose .admonition-caution .admonition-title { color: #e6a416; }
.prose .admonition-danger { border-left-color: var(--destructive); }
.prose .admonition-danger .admonition-title { color: var(--destructive); }
.prose .admonition-info { border-left-color: var(--muted-foreground); }
.prose .doc-index { list-style: none; padding: 0; }
.prose .doc-index li { margin: 6px 0; }

/* --- Docs layout (sidebar + content) --- */
.doc-wrap { padding-top: clamp(110px,13vh,150px); }
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px,4vw,56px); align-items: start; }
.doc-rail { position: sticky; top: 96px; align-self: start; }
.doc-sidebar { font-family: var(--font-ui); font-size: 14px; }
.doc-sidebar__home { display: block; font-family: var(--font-display); font-size: 17px; color: var(--primary-bright); letter-spacing: 0.02em; padding: 0 0 12px; margin-bottom: 8px; border-bottom: 1px solid var(--border); text-decoration: none; }
.doc-tree { list-style: none; margin: 0; padding: 0; }
.doc-tree .doc-tree { margin: 4px 0 8px 12px; padding-left: 10px; border-left: 1px solid var(--border); }
.doc-tree__item > a { display: block; padding: 6px 10px; border-radius: var(--radius-md); color: var(--muted-foreground); text-decoration: none; transition: color 0.15s ease, background 0.15s ease; }
.doc-tree__item > a:hover { color: var(--primary-bright); background: var(--primary-tint); }
.doc-tree__item.has-kids > a { color: var(--foreground); font-weight: 500; }
.doc-tree__item.is-current > a { color: var(--primary-bright); background: var(--primary-tint); font-weight: 600; }
.doc-content { min-width: 0; }
.doc-content > h1:first-child { margin-top: 0; }

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; gap: 20px; }
  .doc-rail { position: static; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
}

/* --- Blog / patch notes --- */
.blog-heading { font-family: var(--font-display); font-size: clamp(32px,4vw,48px); color: var(--primary-bright); letter-spacing: 0.02em; margin: 8px 0 8px; }
.blog-sub { font-family: var(--font-body); font-size: 15px; color: var(--muted-foreground); margin: 0 0 34px; }
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); transition: border-color 0.18s ease, transform 0.18s ease; }
.post-card:hover { border-color: var(--primary-edge); transform: translateY(-2px); }
.post-card__link { display: block; padding: 24px 26px; text-decoration: none; }
.post-card__date { font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-foreground); }
.post-card__title { font-family: var(--font-display); font-size: clamp(20px,2.2vw,26px); color: var(--primary-bright); letter-spacing: 0.02em; margin: 8px 0 10px; }
.post-card__excerpt { font-family: var(--font-body); font-size: 14.5px; line-height: 1.7; color: var(--muted-foreground); }
.post-card__more { display: inline-block; margin-top: 14px; font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--primary); }
.post-card:hover .post-card__more { color: var(--primary-bright); }

.single-post__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; font-family: var(--font-ui); font-size: 13px; }
.single-post__back { color: var(--muted-foreground); border: 0; text-decoration: none; }
.single-post__back:hover { color: var(--primary-bright); }
.single-post__date { color: var(--muted-foreground); letter-spacing: 0.05em; text-transform: uppercase; font-size: 12px; }
.single-post__title { margin-bottom: 26px; }
.single-post__foot { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }

.blog-nav { margin-top: 32px; }
.blog-nav .page-numbers { display: inline-flex; padding: 6px 12px; margin: 0 3px; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--muted-foreground); text-decoration: none; font-family: var(--font-ui); font-size: 13px; }
.blog-nav .page-numbers.current { background: var(--primary-tint); color: var(--primary-bright); border-color: var(--primary-edge); }
.blog-nav .page-numbers:hover { border-color: var(--primary-edge); color: var(--primary-bright); }

/* ============================================================================
   Responsive + reduced motion
   ========================================================================== */
/* Long-language safety. The header holds a six-item nav plus four controls, and
   translated labels run much longer than the English (Russian is ~20% wider than
   any other). Since --ef-column caps at 1200px, extra viewport width buys nothing,
   so below 1240px the two social pills drop to their icons - which are the
   recognisable part anyway - rather than letting the row wrap and strand the
   language toggle on a line of its own. */
@media (max-width: 1240px) {
  .btn-pill--discord span, .btn-pill--patreon span { display: none; }
  .btn-pill--discord, .btn-pill--patreon { padding: 0 12px; }
}
@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-header { height: 84px; }
  .site-header__logo img { width: 100px; }
  .ef-lang__btn { padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: none !important; }
  .hero__scroll svg { animation: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  [data-parallax] { transform: none !important; }
  html { scroll-behavior: auto; }
}
