/* Karnthrone — static site styles. No build step: plain CSS, self-hosted fonts. */

@font-face {
  font-family: 'Germania One';
  src: url('../fonts/GermaniaOne-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('../fonts/InterTight-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('../fonts/InterTight-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Palette sampled off the logo: near-black stone, cold grey, molten orange. */
  --ink: #0a070d;
  --ink-2: #100c14;
  --surface: #16111c;
  --surface-2: #1d1724;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-hot: rgba(255, 110, 40, 0.42);

  --text: #e7e0d9;
  --muted: #9d919a;
  --dim: #8a7f8c;

  --molten: #ff6a26;
  --molten-hi: #ffa267;
  --molten-deep: #b03a0d;

  --font-display: 'Germania One', 'Trajan Pro', Georgia, serif;
  --font-body: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --shell: 1160px;
  --radius: 10px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

figure { margin: 0; }

a {
  color: var(--molten-hi);
  text-decoration-color: rgba(255, 162, 103, 0.4);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 7, 13, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  line-height: 1;
}

.nav {
  display: flex;
  gap: 26px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav a:hover {
  color: var(--text);
  border-bottom-color: var(--molten);
}

/* Below ~740px the brand plus five nav items no longer fit on one row, so the
   nav becomes a scrollable rail and the wordmark yields the space. */
@media (max-width: 780px) {
  .brand__name { font-size: 18px; }

  .nav {
    gap: 18px;
    font-size: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
    mask-image: linear-gradient(to right, #000 88%, transparent);
  }

  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
}

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px);
  text-align: center;
}

/* Cracked stone from the game's own menu backdrop — the logo art sits on the
   same material, so the seam disappears. */
.hero::before {
  content: '';
  position: absolute;
  inset: -10% -10% 0;
  background: url('../img/texture-stone.webp') center / cover no-repeat;
  opacity: 0.55;
  z-index: -2;
}

/* Ember light welling up under the wordmark. */
.hero::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(1100px, 120vw);
  aspect-ratio: 2 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(255, 106, 38, 0.16), transparent 68%);
  z-index: -1;
  pointer-events: none;
}

/* The art carries a baked alpha falloff (see README), so it dissolves into the
   stone instead of sitting on it as a rectangle. Full-bleed on narrow screens. */
.hero__logo {
  width: min(1160px, 100%);
  height: auto;
  margin-inline: auto;
}

.hero__tagline {
  max-width: 640px;
  margin: clamp(8px, 2vw, 20px) auto 0;
  font-size: clamp(17px, 2.1vw, 21px);
  color: var(--muted);
  text-wrap: balance;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 18px;
  margin-top: 30px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border: 1px solid var(--line-hot);
  border-radius: 999px;
  background: rgba(255, 106, 38, 0.07);
  color: var(--molten-hi);
  letter-spacing: 0.14em;
}

.pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--molten);
  box-shadow: 0 0 10px var(--molten);
  animation: ember 2.6s ease-in-out infinite;
}

@keyframes ember {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* --------------------------------------------------------------- sections */

.section {
  padding: clamp(56px, 8vw, 104px) 0;
  border-top: 1px solid var(--line);
}

.section--tinted { background: var(--ink-2); }

.section__head { max-width: 660px; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--molten);
}

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.12;
  letter-spacing: 0.02em;
  margin: 0 0 16px;
}

h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.03em;
  margin: 0 0 8px;
}

.lede {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--muted);
  margin: 0;
}

.lede + .lede { margin-top: 14px; }

/* ------------------------------------------------------------------ stats */

/* Flex, not grid: three items must never leave a fourth cell standing empty
   when the row wraps. */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin-top: 48px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  flex: 1 1 190px;
  background: var(--surface);
  padding: 26px 22px;
}

.stat__value {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: var(--molten-hi);
}

.stat__label {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ------------------------------------------------------------------ cards */

.grid {
  display: grid;
  gap: 22px;
  margin-top: 48px;
}

.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.card:hover {
  border-color: var(--line-hot);
  background: var(--surface-2);
  transform: translateY(-3px);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

.card__index {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--molten);
  letter-spacing: 0.1em;
}

/* -------------------------------------------------------------- portraits */

.fighter {
  text-align: center;
  padding-top: 34px;
}

.fighter__portrait {
  width: 172px;
  height: 172px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.6));
  transition: transform 0.25s ease;
}

.card:hover .fighter__portrait { transform: scale(1.04); }

.fighter__role {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.kit {
  list-style: none;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.kit li {
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

/* ----------------------------------------------------------------- arenas */

.arenas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 48px;
}

.arena {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.arena img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: saturate(0.82) brightness(0.82) contrast(1.05);
  transition: filter 0.28s ease, transform 0.4s ease;
}

.arena:hover img {
  filter: saturate(1) brightness(0.95) contrast(1.05);
  transform: scale(1.04);
}

.arena figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 34px 16px 13px;
  background: linear-gradient(to top, rgba(10, 7, 13, 0.94), transparent);
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.06em;
}

/* ----------------------------------------------------------------- status */

.status-note {
  margin-top: 40px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--molten-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 15.5px;
}

.status-note strong { color: var(--text); }

.roadmap {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.roadmap li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding: 18px 24px;
  background: var(--surface);
  font-size: 15.5px;
  color: var(--muted);
}

.roadmap b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--text);
  min-width: 190px;
}

/* ----------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--dim);
  font-size: 14px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
