@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2-variations');
  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;
}

/* In-game card-name face. Basic Latin only: never set Turkish copy in it. */
@font-face {
  font-family: 'Josefin Slab';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/josefin-slab-bold-latin.woff) format('woff');
}

/* Tokens: color names and values follow hakantopcu.dev (src/styles/global.css). */
:root {
  --c-bg: #0f1b2d;
  --c-surface: #16263d;
  --c-line: #2a4060;
  --c-text: #e8eef6;
  --c-muted: #9db0c8;
  --c-accent: #e3b341;
  --c-on-accent: #0f1b2d;
  --c-glow: rgba(227, 179, 65, 0.16);
  --c-card-shadow: rgba(0, 0, 0, 0.45);

  /* Faction colors from the game's Teams assets. */
  --f-abyss: #e75907;
  --f-fire: #d2290c;
  --f-forest: #0c894b;
  --f-light: #f7c108;
  --f-necro: #168379;
  --f-neutral: #8c8c8c;
  --f-shadow: #393463;
  --f-sky: #26b3ba;
  --f-water: #0c5d89;

  --font-sans: 'Bricolage Grotesque Variable', system-ui, sans-serif;
  --font-card: 'Josefin Slab', Georgia, serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  --radius-card: 14px;
  --radius-panel: 20px;
  --radius-pill: 9999px;

  --measure: 62ch;
  --page: 72rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --c-bg: #eef2f7;
    --c-surface: #ffffff;
    --c-line: #c9d4e3;
    --c-text: #0f1b2d;
    --c-muted: #4a5d78;
    --c-accent: #8a5f00;
    --c-on-accent: #ffffff;
    --c-glow: rgba(138, 95, 0, 0.12);
    --c-card-shadow: rgba(15, 27, 45, 0.25);
    color-scheme: light;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  background:
    radial-gradient(60rem 36rem at 50% -8rem, var(--c-glow), transparent 70%),
    var(--c-bg);
}

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

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

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

.skip-link {
  position: absolute;
  left: 50%;
  top: -4rem;
  transform: translateX(-50%);
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--c-accent);
  color: var(--c-on-accent);
  font-weight: 650;
  text-decoration: none;
  /* one line: at left 50% the box may only use half the width, and a wrapped label ("Zum Inhalt springen" at 360 px)
     grew taller than the -4rem it hides behind */
  white-space: nowrap;
}

.skip-link:focus {
  top: var(--space-4);
}

.wrap {
  width: min(100% - 2 * var(--space-6), var(--page));
  margin-inline: auto;
}

/* Header: the logo and the language switch stack on the page axis, so the header stays symmetric. */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-6) 0;
}

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

.wordmark img {
  width: auto;
  height: 36px;
}

/* TR | EN | DE: a segmented control of three equal 48 x 44 px cells, the same 4 px gap and hairline between each pair and
   around the row, so it mirrors on the page axis. The page's own language (aria-current) is the filled cell. */
.lang-switch {
  display: inline-grid;
  grid-template-columns: 3rem 1px 3rem 1px 3rem;
  column-gap: 4px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.14em;
}

.lang-switch a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  /* the tracking adds space after the last letter; the same on the left keeps the code centred */
  padding-left: 0.14em;
  border-radius: var(--radius-pill);
  color: var(--c-muted);
  text-decoration: none;
  transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.lang-switch a:hover {
  color: var(--c-text);
  background: var(--c-glow);
}

.lang-switch a[aria-current] {
  color: var(--c-on-accent);
  background: var(--c-accent);
}

/* inside the cell, so the ring neither touches the hairlines nor vanishes on the filled (accent) cell */
.lang-switch a:focus-visible {
  outline-color: var(--c-text);
  outline-offset: -2px;
}

.lang-sep {
  height: 1rem;
  background: var(--c-line);
}

/* Hero */
.hero {
  text-align: center;
  padding-block: var(--space-8) var(--space-12);
}

.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--c-accent);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

.hero-title {
  font-size: clamp(3.25rem, 13vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.lead {
  max-width: 40rem;
  margin: var(--space-6) auto 0;
  color: var(--c-muted);
  font-size: clamp(1.125rem, 2.6vw, 1.3125rem);
  text-wrap: pretty;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-6) 0 0;
  padding: var(--space-1) var(--space-4);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
  color: var(--c-muted);
  font-size: 0.9375rem;
  text-align: left;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
  flex: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 13.5rem;
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--c-accent);
  border-radius: var(--radius-pill);
  font-weight: 650;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn-primary {
  background: var(--c-accent);
  color: var(--c-on-accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--c-text);
}

.btn-secondary {
  border-color: var(--c-line);
  color: var(--c-text);
}

.btn-secondary:hover {
  border-color: var(--c-accent);
}

/* Card fan: mirrored rotation around the center card. */
.fan {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin: var(--space-12) auto 0;
  padding-bottom: var(--space-4);
}

.fan-card {
  width: clamp(6.5rem, 26vw, 15rem);
  margin: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 18px 40px -12px var(--c-card-shadow);
  outline: 1px solid color-mix(in srgb, var(--c-text) 14%, transparent);
  outline-offset: -1px;
}

.fan-card img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
}

.fan-card--left {
  transform: translate(18%, 6%) rotate(-9deg);
  transform-origin: bottom right;
}

.fan-card--right {
  transform: translate(-18%, 6%) rotate(9deg);
  transform-origin: bottom left;
}

.fan-card--center {
  position: relative;
  z-index: 1;
  width: clamp(7.5rem, 30vw, 17rem);
}

@media (prefers-reduced-motion: no-preference) {
  .fan-card--left {
    animation: fan-open-left 700ms var(--ease-out) 120ms both;
  }

  .fan-card--right {
    animation: fan-open-right 700ms var(--ease-out) 120ms both;
  }
}

@keyframes fan-open-left {
  from {
    transform: translate(45%, 4%) rotate(0deg);
  }
}

@keyframes fan-open-right {
  from {
    transform: translate(-45%, 4%) rotate(0deg);
  }
}

/* Numbers strip */
.numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  border-block: 1px solid var(--c-line);
  list-style: none;
}

.numbers li {
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

.numbers li + li {
  border-left: 1px solid var(--c-line);
}

.numbers strong {
  display: block;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.numbers span {
  color: var(--c-muted);
  font-size: 0.9375rem;
}

/* Sections */
.section {
  padding-block: var(--space-24) 0;
}

.section-head {
  max-width: 40rem;
  margin: 0 auto var(--space-12);
  text-align: center;
}

.section-title {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-head p {
  margin: var(--space-4) 0 0;
  color: var(--c-muted);
  text-wrap: pretty;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: var(--space-8) var(--space-6);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-panel);
  background: var(--c-surface);
  text-align: center;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto var(--space-4);
  border: 1px solid var(--c-accent);
  border-radius: 50%;
  color: var(--c-accent);
  font-weight: 700;
}

.step h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.step p {
  margin: var(--space-3) 0 0;
  color: var(--c-muted);
  text-wrap: pretty;
}

.step a {
  color: var(--c-text);
  text-decoration-color: var(--c-accent);
  text-underline-offset: 3px;
}

.step a:hover {
  color: var(--c-accent);
}

/* Factions: 3 x 3 grid */
.factions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 56rem;
  margin-inline: auto;
}

.faction {
  --f: var(--c-line);
  margin: 0;
  text-align: center;
}

.faction-art {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 14px 30px -14px var(--c-card-shadow);
}

.faction-art::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px var(--f);
  pointer-events: none;
}

.faction-art img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
}

.faction figcaption {
  display: grid;
  gap: 2px;
  margin-top: var(--space-3);
}

.faction-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-weight: 700;
}

.faction-name::before,
.faction-name::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--f);
  transform: rotate(45deg);
  flex: none;
}

.card-name {
  color: var(--c-muted);
  font-family: var(--font-card);
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
}

.f-abyss { --f: var(--f-abyss); }
.f-fire { --f: var(--f-fire); }
.f-forest { --f: var(--f-forest); }
.f-light { --f: var(--f-light); }
.f-necro { --f: var(--f-necro); }
.f-neutral { --f: var(--f-neutral); }
.f-shadow { --f: var(--f-shadow); }
.f-sky { --f: var(--f-sky); }
.f-water { --f: var(--f-water); }

/* Card types + rarity: two equal panels */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.panel {
  padding: var(--space-8) var(--space-6);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-panel);
  background: var(--c-surface);
  text-align: center;
}

.panel h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.panel > p {
  margin: var(--space-2) 0 var(--space-6);
  color: var(--c-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: var(--space-1) var(--space-4);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
}

.rarity {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rarity li {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
}

.rarity-gem {
  display: flex;
  gap: 3px;
  height: 12px;
}

.rarity-gem i {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--c-accent);
  transform: rotate(45deg);
}

.rarity-gem i.on {
  background: var(--c-accent);
}

.rarity span {
  font-family: var(--font-card);
  font-size: 1.0625rem;
}

/* Status */
.closing {
  max-width: 44rem;
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-panel);
  background: var(--c-surface);
  text-align: center;
}

.closing p {
  margin: var(--space-4) auto 0;
  max-width: var(--measure);
  color: var(--c-muted);
  text-wrap: pretty;
}

/* Footer */
.site-footer {
  margin-top: var(--space-24);
  padding-block: var(--space-8);
  border-top: 1px solid var(--c-line);
  color: var(--c-muted);
  font-size: 0.9375rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 var(--space-6);
  margin: 0 0 var(--space-2);
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--c-text);
  text-decoration-color: var(--c-accent);
  text-underline-offset: 4px;
}

.site-footer a:hover {
  color: var(--c-accent);
}

/* Legal pages: one reading column on the page axis; the title block is centred, the text inside reads from the left. */
.legal {
  max-width: var(--measure);
  margin-inline: auto;
  padding-block: var(--space-12) 0;
}

.legal-head {
  margin-bottom: var(--space-12);
  text-align: center;
}

.legal-meta {
  margin: var(--space-4) 0 0;
  color: var(--c-muted);
  font-size: 0.9375rem;
}

.legal-toc {
  margin: 0 0 var(--space-12);
  padding: var(--space-6);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-panel);
  background: var(--c-surface);
}

.legal .legal-toc h2 {
  margin: 0 0 var(--space-3);
  font-size: 1rem;
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.5rem;
}

.legal h2 {
  margin: var(--space-12) 0 var(--space-3);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  scroll-margin-top: var(--space-6);
}

.legal h3 {
  margin: var(--space-6) 0 var(--space-2);
  font-size: 1.0625rem;
  font-weight: 700;
}

.legal p,
.legal li {
  text-wrap: pretty;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li + li {
  margin-top: var(--space-2);
}

.legal a {
  color: var(--c-text);
  text-decoration-color: var(--c-accent);
  text-underline-offset: 3px;
}

.legal a:hover {
  color: var(--c-accent);
}

/* Responsive */
@media (max-width: 52rem) {
  .steps {
    grid-template-columns: 1fr;
    max-width: 30rem;
    margin-inline: auto;
  }

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

@media (max-width: 40rem) {
  .numbers {
    grid-template-columns: repeat(2, 1fr);
  }

  .numbers li {
    padding-block: var(--space-6);
  }

  .numbers li:nth-child(3) {
    border-left: 0;
  }

  .numbers li:nth-child(n + 3) {
    border-top: 1px solid var(--c-line);
  }

  .factions {
    gap: var(--space-4) var(--space-3);
  }

  .faction-name {
    font-size: 0.875rem;
  }

  .card-name {
    font-size: 0.875rem;
  }

  .faction-name::before,
  .faction-name::after {
    display: none;
  }

  .section {
    padding-top: var(--space-16);
  }

  .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 22.5rem) {
  .rarity {
    grid-template-columns: repeat(2, 1fr);
    row-gap: var(--space-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
