/* The Everhearth: a warm hearth at night. Stone, ember, Alliance blue and gold. */

:root {
  --bg: #120d0a;
  --bg-2: #1b1410;
  --stone: #2a2320;
  --stone-2: #3a312c;
  --line: rgba(232, 196, 120, .16);
  --text: #f1e6d2;
  --muted: #b8a88e;
  --gold: #f2c45a;
  --gold-2: #c9962e;
  --ember: #ff8a2b;
  --ember-2: #d9531a;
  --blue: #1f3d7a;
  --blue-2: #2c5bb8;
  --discord: #5865f2;
  --radius: 14px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
  --wrap: 1120px;
  --head: "Cinzel", Georgia, serif;
  --body: "Alegreya Sans", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(255, 138, 43, .14), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 400 1.125rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffd982; }
code { font-family: ui-monospace, monospace; font-size: .9em; background: rgba(255, 255, 255, .08); padding: .1em .4em; border-radius: 6px; color: var(--gold); }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--gold); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .95rem; }
.eyebrow { font-family: var(--head); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ember); margin-bottom: .6em; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .8em 1.35em; border-radius: 999px;
  font: 700 1rem/1 var(--body); letter-spacing: .02em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn svg { width: 1.25em; height: 1.25em; }
.btn:hover { transform: translateY(-1px); }
.btn--small { padding: .55em 1em; font-size: .92rem; }
.btn--discord { background: var(--discord); color: #fff; box-shadow: 0 8px 24px -10px var(--discord); }
.btn--discord:hover { color: #fff; background: #6c77f5; }
.btn--ember { background: linear-gradient(180deg, var(--ember), var(--ember-2)); color: #1a0d05; box-shadow: 0 8px 24px -10px var(--ember); }
.btn--ember:hover { color: #1a0d05; }
.btn--ghost { border-color: rgba(242, 196, 90, .45); color: var(--gold); background: rgba(242, 196, 90, .06); }
.btn--ghost:hover { background: rgba(242, 196, 90, .14); color: #ffd982; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 1.4em; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 13, 10, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 800 1.1rem var(--head); }
.brand img { filter: drop-shadow(0 0 8px rgba(255, 138, 43, .35)); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; padding: .45em .8em; border-radius: 8px; font-weight: 500; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--gold); background: rgba(242, 196, 90, .08); }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    content: ""; display: block; width: 20px; height: 2px; background: var(--text); position: relative; transition: transform .2s;
  }
  .nav-toggle__bar::before { position: absolute; top: -6px; }
  .nav-toggle__bar::after { position: absolute; top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }
  .nav {
    position: absolute; inset: 64px 0 auto; flex-direction: column; align-items: stretch;
    padding: 12px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: .8em; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 9vw, 110px) 0 clamp(56px, 9vw, 100px); }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 120px;
  background: linear-gradient(transparent, var(--bg)); pointer-events: none;
}
.hero__embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero__logo {
  width: 100%;
  filter: drop-shadow(0 0 60px rgba(255, 138, 43, .35)) drop-shadow(0 20px 40px rgba(0, 0, 0, .6));
  animation: glow 5s ease-in-out infinite alternate;
}
@keyframes glow { to { filter: drop-shadow(0 0 85px rgba(255, 138, 43, .5)) drop-shadow(0 20px 40px rgba(0, 0, 0, .6)); } }
@media (prefers-reduced-motion: reduce) { .hero__logo { animation: none; } }
.hero h1 { background: linear-gradient(180deg, #ffe7a8, var(--gold) 55%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(1.15rem, 2vw, 1.35rem); color: #e9dcc4; max-width: 38em; }
.hero__stat { margin-top: 1.6em; color: var(--muted); }
.hero__stat a { color: var(--muted); text-decoration: none; }
.hero__stat a:hover { color: var(--gold); }
.hero__stat strong { color: var(--gold); font-size: 1.2em; }

@media (max-width: 760px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__logo { max-width: 240px; margin-inline: auto; }
  .hero .actions { justify-content: center; }
  .lede { margin-inline: auto; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; position: relative; }
.section--tight { padding-top: 24px; }
.section--stone {
  background:
    linear-gradient(180deg, rgba(31, 61, 122, .22), rgba(31, 61, 122, .08)),
    var(--bg-2);
  border-block: 1px solid var(--line);
}
.section--warm { background: radial-gradient(900px 400px at 50% 100%, rgba(255, 138, 43, .12), transparent 70%); }
.section__head { max-width: 720px; margin-bottom: 36px; }
.section__head p:last-child { color: #e2d4ba; font-size: 1.2rem; }

.cards { display: grid; gap: 20px; }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: linear-gradient(180deg, var(--stone), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card p { color: #d9cbb0; margin: 0; }
.card__icon { font-size: 1.8rem; display: block; margin-bottom: 10px; }

/* ---------- Addon ---------- */
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; color: #e2d4ba; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: .5em; width: 12px; height: 12px;
  background: var(--ember); transform: rotate(45deg); border-radius: 2px;
  box-shadow: 0 0 10px var(--ember);
}
.checklist strong { color: var(--text); }
.split__art { margin: 0; }
.split__art figcaption { text-align: center; color: var(--muted); font-size: .95rem; margin-top: 12px; }

.addon-mock {
  background: linear-gradient(180deg, #2d241c, #1d1712);
  border: 2px solid #6b5636; border-radius: 12px; padding: 18px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6), 0 30px 60px -20px rgba(0, 0, 0, .9), 0 0 50px -10px rgba(255, 138, 43, .25);
  font-size: .98rem;
}
.addon-mock__title { font: 800 1.15rem var(--head); color: var(--gold); text-align: center; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid #6b5636; }
.addon-mock__row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 4px; border-bottom: 1px dashed rgba(232, 196, 120, .15); }
.addon-mock__row span { color: var(--muted); }
.addon-mock__row em { font-style: normal; color: var(--text); text-align: right; }
.addon-mock__bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); margin: 16px 4px; overflow: hidden; }
.addon-mock__bar i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--blue-2), var(--gold)); }
.addon-mock__tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.addon-mock__tabs b { font-weight: 500; font-size: .85rem; text-align: center; padding: 7px 2px; border-radius: 6px; background: rgba(31, 61, 122, .5); border: 1px solid rgba(44, 91, 184, .5); }

/* ---------- Roster teaser ---------- */
.roster-teaser { display: grid; gap: 24px; justify-items: start; }
.roster-teaser p { color: #e2d4ba; }
.classbar { display: flex; width: 100%; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; background: rgba(255, 255, 255, .05); }
.classbar span { background: var(--c); min-width: 4px; }

/* ---------- Join ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 56px; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.steps li {
  counter-increment: step; position: relative;
  background: linear-gradient(180deg, var(--stone), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 24px;
}
.steps li::before {
  content: counter(step); position: absolute; top: -18px; left: 22px;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font: 800 1.1rem var(--head); color: #1a0d05;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  box-shadow: 0 0 0 4px var(--bg), 0 0 20px rgba(242, 196, 90, .4);
}
.steps p { color: #d9cbb0; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.4rem; color: var(--gold); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: #d9cbb0; padding-bottom: 8px; }

/* ---------- Page head ---------- */
.page-head { padding: clamp(40px, 7vw, 80px) 0 24px; }
.page-head p { color: #e2d4ba; max-width: 46em; }
.page-head--center { text-align: center; padding-bottom: 80px; }
.page-head--center img, .page-head--center p { margin-inline: auto; }

/* ---------- Roster ---------- */
.statgrid { display: grid; grid-template-columns: 160px 160px 1fr; gap: 16px; margin-bottom: 28px; }
@media (max-width: 760px) { .statgrid { grid-template-columns: 1fr 1fr; } .stat--wide { grid-column: 1 / -1; } }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat__n { font: 800 2rem/1 var(--head); color: var(--gold); }
.stat__l { color: var(--muted); font-size: .95rem; }
.classlist { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.classlist li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: rgba(255, 255, 255, .04); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); color: var(--c); font-size: .95rem; }
.classlist img { border-radius: 50%; }
.classlist b { color: var(--text); font-weight: 700; }

.roster-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.field input, .field select {
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: .65em .9em; min-height: 44px;
}
.field input { width: min(360px, 100%); }
.field:first-child { flex: 1 1 260px; }
.field:first-child input { width: 100%; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--gold); width: 18px; height: 18px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.roster { width: 100%; border-collapse: collapse; font-size: 1rem; }
.roster th { text-align: left; background: rgba(31, 61, 122, .28); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.roster th button {
  all: unset; cursor: pointer; display: block; padding: 12px 14px; white-space: nowrap;
  font: 600 .8rem var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
}
.roster th button::after { content: " ↕"; opacity: .35; }
.roster th button[aria-sort="ascending"]::after { content: " ↑"; opacity: 1; }
.roster th button[aria-sort="descending"]::after { content: " ↓"; opacity: 1; }
.roster td { padding: 8px 14px; border-bottom: 1px solid rgba(232, 196, 120, .07); vertical-align: middle; white-space: nowrap; }
.roster tbody tr:hover { background: rgba(242, 196, 90, .05); }
.roster tbody tr:last-child td { border-bottom: 0; }
.roster .num { font-variant-numeric: lining-nums tabular-nums; }
.who { display: inline-flex; align-items: center; gap: 10px; }
.who__race { width: 32px; height: 32px; flex: none; border-radius: 50%; object-fit: cover; border: 1px solid rgba(0, 0, 0, .6); box-shadow: 0 0 0 1px var(--line); background: var(--stone); }
.who__race--none { display: grid; place-items: center; font: 700 .9rem var(--head); color: var(--muted); }
.who__text { display: flex; flex-direction: column; line-height: 1.2; }
.who__surname { color: var(--muted); font-size: .85rem; }
.who__name { color: var(--c); font-weight: 700; text-decoration: none; text-shadow: 0 1px 2px #000; }
a.who__name:hover { text-decoration: underline; color: var(--c); }
.who__armory { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 8px; color: var(--muted); border: 1px solid transparent; transition: color .15s, border-color .15s, background .15s; }
.who__armory:hover, .who__armory:focus-visible { color: var(--gold); border-color: var(--line); background: rgba(242, 196, 90, .08); }
.tag { display: inline-flex; align-items: center; gap: 7px; }
.tag img { border-radius: 5px; border: 1px solid rgba(0, 0, 0, .6); }
.empty { padding: 28px; text-align: center; color: var(--muted); margin: 0; }
.empty-state { text-align: center; display: grid; justify-items: center; gap: 16px; color: #e2d4ba; padding-bottom: 60px; }
@media (max-width: 640px) { .hide-sm { display: none; } .roster td, .roster th button { padding-inline: 10px; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: #0d0907; padding: 40px 0 32px; margin-top: 40px; }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.footer__brand { display: flex; gap: 14px; align-items: center; }
.footer__brand img { filter: drop-shadow(0 0 10px rgba(255, 138, 43, .25)); }
.footer__brand strong { display: block; font-family: var(--head); }
.footer__brand span { color: var(--muted); font-size: .95rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer__links a { color: var(--text); text-decoration: none; }
.footer__links a:hover { color: var(--gold); }
.footer__legal { grid-column: 1 / -1; color: #85786a; font-size: .85rem; margin: 8px 0 0; }
@media (max-width: 640px) { .footer__inner { grid-template-columns: 1fr; } }

/* Downloads */
.download {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px; margin-bottom: 56px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
}
.download h2 { margin: 0 0 4px; }
.download .hint, .download .actions { margin: 0; }
