/* Elderdawn website. No outside fonts, scripts or trackers: everything loads from elderdawn.com. */
:root {
  --night: #0d0a16;
  --night-2: #161125;
  --panel: #1d1730;
  --line: rgba(240, 200, 120, 0.22);
  --gold: #f0c46c;
  --gold-2: #ffdf9a;
  --ember: #e8743a;
  --text: #efe8f7;
  --muted: #b9afc9;
  --radius: 16px;
  --display: "Cinzel", "Trajan Pro", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-2); }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; letter-spacing: 0.02em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: var(--gold-2); }
h3 { font-size: 1.25rem; color: var(--gold); }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #000; padding: 8px 12px; }

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 10, 22, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--gold-2); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 12px; font: inherit; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px;
  font: 700 1rem/1 var(--body); text-decoration: none; letter-spacing: 0.02em;
  border: 1px solid transparent; transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(180deg, #ffe6a6, #e7ac48 55%, #b9772a);
  color: #2a1606; box-shadow: 0 6px 24px rgba(240, 180, 80, 0.35), inset 0 1px 0 #fff6d6;
}
.btn-gold:hover { color: #2a1606; box-shadow: 0 8px 32px rgba(240, 180, 80, 0.55); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, 0.04); }
.btn-small { padding: 10px 18px; font-size: 0.9rem; }

/* Hero */
.hero {
  position: relative; min-height: min(92vh, 900px);
  display: grid; align-items: center;
  background: var(--night) url("img/hero.webp") right center / cover no-repeat;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 10, 22, 0.9) 0%, rgba(13, 10, 22, 0.55) 45%, rgba(13, 10, 22, 0) 75%),
    linear-gradient(0deg, var(--night) 0%, rgba(13, 10, 22, 0) 30%);
}
.hero .wrap { position: relative; padding: 80px 0; }
.hero-logo { width: min(560px, 90%); filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.6)); }
.tagline { font-family: var(--display); font-size: clamp(1.3rem, 2.6vw, 1.9rem); color: var(--gold-2); margin: 18px 0 10px; max-width: 30ch; }
.lede { color: var(--muted); max-width: 46ch; font-size: 1.08rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.platforms { margin-top: 22px; color: var(--muted); font-size: 0.92rem; }

/* Sections */
.section { padding: 96px 0; position: relative; }
.section-alt { background: var(--night-2); border-block: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.8rem; color: var(--ember); font-weight: 700; margin-bottom: 8px; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.framed { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }

/* Story */
.story-text p { color: var(--text); }
.quote { font-family: var(--display); font-size: 1.25rem; color: var(--gold-2); border-left: 3px solid var(--gold); padding-left: 18px; margin: 24px 0; }
.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.cast figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cast img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.cast figcaption { padding: 16px 18px 20px; }
.cast figcaption strong { font-family: var(--display); color: var(--gold); font-size: 1.1rem; display: block; }
.cast figcaption span { color: var(--muted); font-size: 0.95rem; }

/* Dragons */
.dragons { background: var(--night) url("img/moon.webp") center / cover no-repeat; }
.dragons::before { content: ""; position: absolute; inset: 0; background: rgba(13, 10, 22, 0.78); }
.dragons > .wrap { position: relative; }
.dragon-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.dragon-card {
  background: linear-gradient(180deg, rgba(40, 30, 64, 0.9), rgba(22, 17, 37, 0.95));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center;
}
.dragon-card img { width: 220px; margin: 0 auto 12px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5)); }
.dragon-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.hatch-strip { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.hatch-strip img { width: 92px; height: 92px; border-radius: 50%; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); padding: 6px; }

/* Modes */
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.mode { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mode img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.mode div { padding: 18px 20px 22px; }
.mode p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* Final call */
.final { text-align: center; padding: 110px 0; background: radial-gradient(ellipse at center, rgba(232, 116, 58, 0.18), transparent 60%), var(--night); }
.final img { width: 280px; margin: 0 auto 10px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 44px 0 56px; color: var(--muted); font-size: 0.92rem; background: #09070f; }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-foot img { height: 40px; width: auto; margin-bottom: 12px; }
.site-foot h4 { font-family: var(--display); color: var(--gold); margin: 0 0 10px; font-size: 1rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 6px 0; }
.site-foot a { color: var(--text); text-decoration: none; }
.site-foot a:hover { color: var(--gold-2); }

/* Legal and help pages */
.page-head { padding: 72px 0 32px; background: linear-gradient(180deg, var(--night-2), var(--night)); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); color: var(--gold-2); }
.page-head p { color: var(--muted); margin: 0; }
.doc { width: min(820px, 100% - 32px); margin: 0 auto; padding: 48px 0 96px; }
.doc h2 { font-size: 1.5rem; margin-top: 2.2em; }
.doc h3 { margin-top: 1.6em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 0.35em 0; }
.summary { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 32px; }
.summary h2 { margin-top: 0; font-size: 1.2rem; }
.doc table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--gold); font-weight: 700; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .modes { grid-template-columns: repeat(2, 1fr); }
  .cast, .dragon-row { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .site-foot .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--night); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; }
  .hero { background-image: url("img/hero-tall.webp"); align-items: end; min-height: 88vh; }
  .hero::before { background: linear-gradient(0deg, var(--night) 8%, rgba(13, 10, 22, 0.7) 50%, rgba(13, 10, 22, 0.1) 100%); }
  .hero .wrap { padding: 40px 0 48px; }
  .section { padding: 64px 0; }
  .modes { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
.nav a.btn-gold { color: #2a1606; }
@media (max-width: 760px) {
  .cast img { aspect-ratio: 4 / 3; object-position: top; }
}

/* Closed beta sign-up */
.soon { color: var(--gold-2); font-weight: 700; }
.beta-form {
  max-width: 620px; margin: 32px auto 0; text-align: left;
  background: linear-gradient(180deg, rgba(40, 30, 64, 0.92), rgba(22, 17, 37, 0.96));
  border: 1px solid var(--line); border-radius: 20px; padding: 30px 32px 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 223, 154, 0.08);
}
.beta-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.beta-form .field { margin: 0 0 20px; border: 0; padding: 0; min-width: 0; }
.beta-form label, .beta-form legend { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 8px; color: var(--text); padding: 0; }
.beta-form .opt { color: var(--muted); font-weight: 400; }
.beta-form input[type="email"], .beta-form input[type="text"] {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid rgba(240, 200, 120, 0.28);
  background: rgba(9, 7, 15, 0.7); color: var(--text); font: inherit; font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.beta-form input::placeholder { color: rgba(185, 175, 201, 0.55); }
.beta-form input[type="email"]:focus, .beta-form input[type="text"]:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240, 196, 108, 0.2);
}
.beta-form .chips { display: flex; flex-wrap: wrap; gap: 10px; }
.beta-form .chip { position: relative; margin: 0; font-weight: 600; cursor: pointer; }
.beta-form .chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.beta-form .chip span {
  display: inline-block; padding: 9px 18px; border-radius: 999px; border: 1px solid rgba(240, 200, 120, 0.28);
  background: rgba(9, 7, 15, 0.55); color: var(--muted); transition: all 0.15s;
}
.beta-form .chip:hover span { border-color: var(--gold); color: var(--text); }
.beta-form .chip input:checked + span { background: rgba(240, 196, 108, 0.16); border-color: var(--gold); color: var(--gold-2); }
.beta-form .chip input:checked + span::before { content: "\2713  "; }
.beta-form .chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.beta-form .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 0.95rem; margin: 4px 0 22px; color: var(--muted); cursor: pointer; }
.beta-form .check input { margin: 0.2em 0 0; accent-color: var(--gold); width: 18px; height: 18px; flex: none; }
.beta-form button { width: 100%; border: 0; cursor: pointer; font-size: 1.05rem; padding: 16px 28px; }
.beta-form button[disabled] { opacity: 0.6; cursor: wait; }
@media (max-width: 600px) {
  .beta-form { padding: 22px 18px 18px; }
  .beta-form .field-row { grid-template-columns: 1fr; gap: 0; }
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: 14px 0 0; min-height: 1.4em; font-weight: 700; text-align: center; }
.form-note.ok { color: #9be39b; }
.form-note.err { color: #ff9c8a; }
.fine { color: var(--muted); font-size: 0.85rem; margin: 10px 0 0; text-align: center; }
section[id] { scroll-margin-top: 72px; }

/* Leaderboards page (account.js) */
.acct { display: grid; gap: 22px; padding: 40px 0 96px; max-width: 920px; }
#me:not([hidden]) { display: grid; gap: 22px; }
.acct-card {
  background: linear-gradient(180deg, rgba(40, 30, 64, 0.92), rgba(22, 17, 37, 0.96));
  border: 1px solid var(--line); border-radius: 20px; padding: 28px 30px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}
.acct-card h2 { font-size: 1.5rem; margin-bottom: 0.3em; }
.acct .muted { color: var(--muted); }
.acct-note { color: var(--muted); }
.signin { max-width: 560px; width: 100%; margin: 0 auto; }
.signin label { display: block; font-weight: 600; font-size: 0.92rem; margin: 18px 0 8px; }
.acct-row { display: flex; gap: 10px; }
.acct-row input {
  flex: 1; min-width: 0; padding: 13px 15px; border-radius: 12px; border: 1px solid rgba(240, 200, 120, 0.28);
  background: rgba(9, 7, 15, 0.7); color: var(--text); font: inherit; font-size: 1rem;
}
.acct-row input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240, 196, 108, 0.2); }
#si-code { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }
.acct-row .btn { border: 0; cursor: pointer; flex: none; }
.acct-row .btn[disabled] { opacity: 0.6; cursor: wait; }
.link-btn { background: none; border: 0; color: var(--gold-2); font: inherit; font-size: 0.9rem; padding: 10px 0 0; cursor: pointer; text-decoration: underline; }
.signin .fine { text-align: left; }
.acct-me { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.acct-me .eyebrow { margin-bottom: 2px; }
.acct-me h2 { margin: 0 0 4px; font-size: 1.8rem; }
.acct-me p { margin: 0; }
.acct-me .btn { cursor: pointer; }
.board-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.board-tabs button {
  background: none; border: 1px solid transparent; color: var(--muted); font: 600 0.95rem var(--body);
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
}
.board-tabs button:hover { color: var(--text); }
.board-tabs button[aria-selected="true"] { background: rgba(240, 196, 108, 0.16); border-color: var(--gold); color: var(--gold-2); }
.board-filters { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 16px 0 6px; }
.board-filters label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.board-filters label[hidden], .seg[hidden] { display: none; }
.board-filters select {
  background: rgba(9, 7, 15, 0.7); color: var(--text); border: 1px solid rgba(240, 200, 120, 0.28);
  border-radius: 10px; padding: 8px 10px; font: inherit;
}
.seg { display: inline-flex; border: 1px solid rgba(240, 200, 120, 0.28); border-radius: 999px; padding: 3px; background: rgba(9, 7, 15, 0.55); }
.seg button { background: none; border: 0; color: var(--muted); font: 600 0.88rem var(--body); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: rgba(240, 196, 108, 0.18); color: var(--gold-2); }
.board-title { font-family: var(--display); color: var(--gold); font-size: 1.15rem; margin: 18px 0 10px; }
.my-place {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px;
  border-radius: 14px; background: rgba(240, 196, 108, 0.08); border: 1px solid rgba(240, 196, 108, 0.25);
}
.tier { font: 700 0.8rem var(--body); letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; border: 1px solid; }
.t-dragonlord { color: #ffb08a; border-color: #ff8a5c; background: rgba(255, 120, 70, 0.15); }
.t-diamond { color: #b6f0ff; border-color: #7ad8f0; background: rgba(120, 216, 240, 0.12); }
.t-platinum { color: #d9e4f2; border-color: #a9b9cc; background: rgba(200, 215, 235, 0.1); }
.t-gold { color: var(--gold-2); border-color: var(--gold); background: rgba(240, 196, 108, 0.12); }
.t-silver { color: #dcdce6; border-color: #9c9cab; background: rgba(200, 200, 215, 0.08); }
.t-bronze { color: #e8b48a; border-color: #b97a4a; background: rgba(185, 122, 74, 0.12); }
.board-wrap { overflow-x: auto; }
.board { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.board th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.board td { padding: 11px 10px; border-bottom: 1px solid rgba(240, 200, 120, 0.1); }
.board .rank { width: 52px; font-weight: 700; color: var(--muted); }
.board .val, .board th:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.board tr.mine td { background: rgba(240, 196, 108, 0.1); }
.medal { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #2a1606; font-size: 0.85rem; }
.m1 { background: linear-gradient(180deg, #ffe6a6, #e7ac48); }
.m2 { background: linear-gradient(180deg, #f1f1f6, #a9a9b8); }
.m3 { background: linear-gradient(180deg, #f2c49a, #b97a4a); }
.board-foot { font-size: 0.85rem; margin: 12px 0 0; }
.titles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.title-chip { display: inline-flex; gap: 10px; align-items: baseline; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(9, 7, 15, 0.5); }
.title-chip span { color: var(--muted); font-size: 0.85rem; }
.r-legendary { border-color: #ff8a5c; } .r-legendary b { color: #ffb08a; }
.r-epic { border-color: #b48cff; } .r-epic b { color: #d4bcff; }
.r-rare { border-color: #6fb6ff; } .r-rare b { color: #b3d6ff; }
@media (max-width: 600px) {
  .acct-card { padding: 22px 18px; }
  .acct-row { flex-direction: column; }
  .acct-row .btn { width: 100%; }
  .board td, .board th { padding: 9px 6px; }
}
