@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Libre+Franklin:wght@400;500;600;700&display=swap');

:root {
  --bg: #0f0d0b;
  --bg-raised: #17130f;
  --bg-inset: #1c1712;
  --border: #33291d;
  --ash: #a79d8d;
  --ash-dim: #756b5d;
  --text: #ece5d8;
  --ember: #c4551c;
  --ember-bright: #e37c34;
  --frost: #7fa3ac;
  --frost-dim: #4c626a;
  --danger: #b23a3a;
  --success: #6f9a5a;

  --font-display: 'Cinzel', serif;
  --font-body: 'Libre Franklin', sans-serif;

  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(196, 85, 28, 0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(127, 163, 172, 0.07), transparent 60%);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.05; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { color: var(--ash); max-width: 62ch; }

a { color: var(--frost); text-decoration: none; }
a:hover { color: var(--frost-dim); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 13, 11, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text);
}

.brand .brand-mark { color: var(--ember-bright); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ash);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--ember);
}

.nav-actions { display: flex; gap: 12px; align-items: center; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 1.1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-ember {
  background: linear-gradient(180deg, var(--ember-bright), var(--ember));
  color: #180c05;
}
.btn-ember:hover { background: var(--ember-bright); color: #180c05; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--ash-dim); color: var(--text); }

.btn-frost {
  background: transparent;
  border-color: var(--frost-dim);
  color: var(--frost);
}
.btn-frost:hover { border-color: var(--frost); color: var(--frost); }

.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--border);
}

#ash-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: end;
}

.hero-eyebrow {
  color: var(--ember-bright);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.hero h1 { max-width: 11ch; }

.hero-lede {
  margin-top: 18px;
  font-size: 1.1rem;
  max-width: 46ch;
}

.hero-cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

.hero-panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 26px;
}

.hero-panel h3 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ash-dim);
  margin-bottom: 18px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}
.stat-row:first-of-type { border-top: none; }
.stat-row .label { color: var(--ash); }
.stat-row .value { color: var(--text); font-weight: 600; }
.stat-row .value.frost { color: var(--frost); }
.stat-row .value.ember { color: var(--ember-bright); }

/* ---------- Sections ---------- */
.section { padding: 76px 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: none; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.section-head p { margin: 0; }

.rune-index {
  font-family: var(--font-display);
  color: var(--ash-dim);
  font-size: 0.85rem;
}

/* Rates */
.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.rate-cell {
  background: var(--bg-raised);
  padding: 26px 20px;
}

.rate-cell .num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--ember-bright);
}

.rate-cell .num small { font-size: 1rem; color: var(--ash-dim); }

.rate-cell .label {
  margin-top: 6px;
  color: var(--ash);
  font-size: 0.85rem;
}

/* Feature list (three-column, asymmetric text not cards) */
.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.feature-list h3 { color: var(--frost); }

/* ---------- Forms ---------- */
.auth-shell {
  max-width: 420px;
  margin: 64px auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: 4px;
}

.field { margin-bottom: 20px; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.85rem;
  color: var(--ash);
}

.field input {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.field input:focus {
  outline: none;
  border-color: var(--frost);
}

.field-hint { font-size: 0.78rem; color: var(--ash-dim); margin-top: 6px; }

.form-msg {
  padding: 11px 14px;
  border-radius: 3px;
  font-size: 0.88rem;
  margin-bottom: 18px;
  display: none;
}
.form-msg.error { display: block; background: rgba(178, 58, 58, 0.15); color: #e0938f; border: 1px solid rgba(178,58,58,0.4); }
.form-msg.success { display: block; background: rgba(111, 154, 90, 0.15); color: #a8caa0; border: 1px solid rgba(111,154,90,0.4); }

.auth-switch { margin-top: 22px; font-size: 0.9rem; color: var(--ash); text-align: center; }

/* ---------- Shop ---------- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.shop-item {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-item .tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--frost);
}

.shop-item .price {
  font-family: var(--font-display);
  color: var(--ember-bright);
  font-size: 1.4rem;
  margin-top: auto;
}

.balance-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  padding: 18px 24px;
  margin-bottom: 36px;
  border-radius: 4px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Steps (download page) ---------- */
.steps { display: flex; flex-direction: column; gap: 0; }

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.step:first-child { border-top: none; padding-top: 0; }

.step .idx {
  font-family: var(--font-display);
  color: var(--ash-dim);
  font-size: 1.1rem;
}

.realmlist-box {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  padding: 22px 26px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.realmlist-box code {
  font-family: 'Courier New', monospace;
  color: var(--ember-bright);
  font-size: 1.05rem;
}

/* ---------- Community ---------- */
.community-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
}

.discord-card {
  background: linear-gradient(160deg, var(--bg-raised), var(--bg-inset));
  border: 1px solid var(--border);
  padding: 34px;
  border-radius: 4px;
}

.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li {
  padding: 14px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
}
.link-list li:first-child { border-top: none; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--ash-dim);
  font-size: 0.85rem;
}

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

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--ash-dim); }
.footer-links a:hover { color: var(--ash); }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.dim { color: var(--ash-dim); }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}
