/* ==========================================================================
   The Wrong Way Round — shared styles (landing + wiki)
   ========================================================================== */

@font-face {
  font-family: 'Kaph';
  src: url('../fonts/Kaph-Regular.woff2') format('woff2'),
       url('../fonts/Kaph-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Barlow (SIL Open Font License, see ../fonts/Barlow-OFL.txt), self-hosted */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Barlow-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Barlow-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/Barlow-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/Barlow-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/Barlow-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/Barlow-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Fira Sans (SIL Open Font License, see ../fonts/FiraSans-OFL.txt), self-hosted.
   Barlow has no Cyrillic, so the Ukrainian pages (/ua/) use Fira Sans for body text. */
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/FiraSans-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/FiraSans-400-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/FiraSans-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/FiraSans-600-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/FiraSans-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/FiraSans-700-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --ink: #0e1311;
  --ink-2: #131a17;
  --panel: #19211e;
  --panel-2: #212b27;
  --line: rgb(246 241 228 / .10);
  --line-strong: rgb(246 241 228 / .18);
  --cream: #f6f1e4;
  --muted: #b8b2a3;
  --faint: #8a8577;
  --gold: #ecb848;
  --gold-hi: #f5cb66;
  --gold-ink: #221a06;
  --purple: #8d6ae3;
  --purple-soft: rgb(141 106 227 / .16);
  --sky: #bfe0e8;
  --danger: #e0664f;

  --font-display: 'Kaph', 'Arial Black', Impact, system-ui, sans-serif;
  --font-body: 'Barlow', 'Fira Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  /* bar height + the phone's status-bar / notch area (0 on desktop) */
  --header-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 20px 50px -20px rgb(0 0 0 / .6);
}
:root:lang(uk) { --font-body: 'Fira Sans', 'Segoe UI', system-ui, -apple-system, sans-serif; }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-top) + 12px);
}

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;   /* clip does not make body a scroll container, so fixed/sticky bars stay put on iOS */
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--gold); color: var(--gold-ink); }

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

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

.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform .2s;
}
.skip-link:focus { transform: none; }

/* Film grain, same texture as the game's moody look */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: .035;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Type ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: .005em;
  text-wrap: balance;
}

.h2 em { font-style: normal; color: var(--gold); }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
  max-width: 60ch;
  text-wrap: pretty;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgb(236 184 72 / .16);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.tag-purple { background: var(--purple-soft); color: #b9a2f2; }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-size: .95rem;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, color .2s;
}

.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn:active { transform: translateY(1px) scale(.99); }

.btn-gold {
  --btn-bg: var(--gold);
  --btn-fg: var(--gold-ink);
  box-shadow: 0 10px 30px -10px rgb(236 184 72 / .55), inset 0 -3px 0 rgb(0 0 0 / .14);
}
.btn-gold:hover {
  --btn-bg: var(--gold-hi);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px rgb(236 184 72 / .7), inset 0 -3px 0 rgb(0 0 0 / .14);
}

.btn-ghost {
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.btn-ghost:hover {
  --btn-bg: rgb(246 241 228 / .08);
  box-shadow: inset 0 0 0 1.5px rgb(246 241 228 / .35);
}

.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .82rem; }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: .98rem; }

.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(246 241 228 / .08);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: var(--cream);
  transition: background-color .2s, transform .2s var(--ease), opacity .2s;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: rgb(246 241 228 / .16); }
.icon-btn:active { transform: scale(.94); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-top);
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
  transition: background-color .3s, box-shadow .3s, backdrop-filter .3s;
}

.site-header.is-solid,
.site-header.always-solid {
  background: rgb(14 19 17 / .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: block; flex: none; }
.brand img { height: 50px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color .2s, background-color .2s;
}
.main-nav a:hover,
.main-nav a[aria-current='page'] { color: var(--cream); background: rgb(246 241 228 / .07); }

.header-cta { flex: none; }

@media (max-width: 880px) {
  .main-nav a.hide-sm { display: none; }
}

@media (max-width: 420px) {
  /* no room for a link to the page you are already on */
  .main-nav a[aria-current='page'] { display: none; }
}

@media (max-width: 520px) {
  /* links the logo already covers (Home) make way for the wishlist button */
  .main-nav a.hide-xs { display: none; }
  :root { --header-h: 60px; --header-top: calc(60px + env(safe-area-inset-top, 0px)); }
  .brand img { height: 45px; }
  .header-inner { gap: 10px; }
  .main-nav a { padding: 8px 10px; font-size: .74rem; }
}

/* short wishlist label until there is room for the long one next to two nav links */
@media (max-width: 600px) {
  .header-cta .label-long { display: none; }
}

@media (min-width: 601px) {
  .header-cta .label-short { display: none; }
}

/* 320–360px phones: keep the 45px logo, tighten the rest so it all fits */
@media (max-width: 360px) {
  .header-inner { gap: 6px; }
  .main-nav a { padding: 8px 6px; }
  .header-cta { padding: 8px 12px; }
  .header-cta svg { display: none; }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  color: var(--faint);
  font-size: .92rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { height: 34px; width: auto; opacity: .9; }

.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; }
.footer-links a { text-decoration: none; color: var(--muted); }
.footer-links a:hover { color: var(--cream); }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
