/* Guia do Eternal Realms: o mesmo mundo visual do teaser das Chamas Gêmeas.
   Layout: a nave de um templo à noite; cada seção é uma laje de pedra; cada página tem o seu acento (--accent). */
:root {
  color-scheme: dark;
  --night: #0d0b13;
  --vault: #15121d;
  --stone: #201c2a;
  --stone-2: #2a2536;
  --line: rgb(255 238 214 / 0.09);
  --line-strong: rgb(255 238 214 / 0.18);
  --ink: #f1e8d8;
  --muted: #b6acbf;
  --dim: #8a8197;
  --gold: #f2b53c;
  --gold-ink: #241606;
  --accent: var(--gold);
  --aldoria: #7fc46a;
  --norvhal: #7cc8f2;
  --cinzarra: #ff7a3d;
  --sab: #4fa6ff;
  --cac: #4fcf73;
  --frj: #ff7630;
  --mist: #8f88ad;
  --display: 'Jersey 10', 'Courier New', ui-monospace, monospace;
  --body: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
  --r: 6px;
  --gut-l: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 120px; }
body { margin: 0; background: var(--night); color: var(--ink); font-family: var(--body); font-size: 1.125rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1; text-wrap: balance; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; text-wrap: pretty; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
.wrap { max-width: 1080px; margin-inline: auto; padding-left: var(--gut-l); padding-right: var(--gut-r); }
.eyebrow { font-family: var(--body); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }
.prose { max-width: 62ch; display: grid; gap: 1rem; }

/* ---------- Topo ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgb(13 11 19 / 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--night); }
.top .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.5rem; }
.top .brand img { height: 38px; width: auto; display: block; }
.lang { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; }
.lang a { font-weight: 700; font-size: 0.85rem; text-decoration: none; color: var(--muted); padding: 0.3rem 0.7rem; border-radius: 999px; }
.lang a[aria-current="page"] { background: var(--gold); color: var(--gold-ink); }
.nav { display: flex; gap: 0.3rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 0.5rem; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; font-family: var(--display); font-size: 1.25rem; text-decoration: none; color: var(--muted); padding: 0.2rem 0.8rem; border-radius: var(--r); border: 1px solid transparent; }
.nav a:hover { color: var(--ink); border-color: var(--line-strong); }
.nav a[aria-current="page"] { color: var(--gold-ink); background: var(--accent); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(2.5rem, 6vw, 4.5rem) 3rem; overflow: hidden; background: radial-gradient(70% 60% at 70% 30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), linear-gradient(var(--vault), var(--night)); }
.hero.has-art { background: linear-gradient(90deg, rgb(13 11 19 / 0.96) 0%, rgb(13 11 19 / 0.82) 45%, rgb(13 11 19 / 0.35) 100%), var(--art) center / cover no-repeat; }
.hero .inner { display: grid; gap: 1.1rem; max-width: 640px; }
.hero h1 { font-size: clamp(3rem, 9vw, 5.6rem); color: var(--ink); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: clamp(1.15rem, 2.2vw, 1.35rem); }
.stats { display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem; margin-top: 0.6rem; }
.stats div { display: grid; }
.stats b { font-family: var(--display); font-weight: 400; font-size: 2.4rem; line-height: 1; color: var(--accent); }
.stats span { font-size: 0.95rem; color: var(--muted); }
.btn { display: inline-block; font-weight: 700; font-size: 1.05rem; text-decoration: none; padding: 0.7rem 1.2rem; border-radius: var(--r); border: 2px solid var(--gold); color: var(--ink); background: none; cursor: pointer; font-family: var(--body); }
.btn.solid { background: var(--gold); color: var(--gold-ink); box-shadow: 0 4px 0 #9c6c14; }
.ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.4rem; }

/* ---------- Seções ---------- */
section.slab { padding-block: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line); }
section.slab:nth-of-type(even) { background: var(--vault); }
section[id] { scroll-margin-top: 110px; }
.slab h2 { font-size: clamp(2.4rem, 5.5vw, 3.4rem); margin-bottom: 1rem; }
.slab .intro { color: var(--muted); max-width: 62ch; }
.slab .intro + .intro { margin-top: 0.8rem; }
.grid { display: grid; gap: 1rem; margin-top: 2rem; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.card { background: var(--stone); border-radius: var(--r); padding: 1.3rem; min-width: 0; display: grid; gap: 0.5rem; align-content: start; border: 2px solid transparent; }
.card.edge { border-color: color-mix(in srgb, var(--c, var(--accent)) 40%, transparent); }
.card h3 { font-size: 1.6rem; color: var(--c, var(--accent)); }
.card p, .card li { color: var(--muted); font-size: 1rem; }
.card ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.2rem; }
.card .big { font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--c, var(--accent)); }
.card img.icon { width: 72px; height: 72px; object-fit: contain; }
.card .meta { font-size: 0.92rem; color: var(--dim); }
a.card { text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
a.card:hover { border-color: var(--c, var(--accent)); transform: translateY(-2px); }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; }
.figure { margin: 0; border-radius: var(--r); overflow: hidden; border: 2px solid var(--line-strong); }
.figure img { display: block; width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { font-size: 0.9rem; padding: 0.15rem 0.6rem; border-radius: 999px; background: rgb(0 0 0 / 0.25); color: var(--muted); border: 1px solid var(--line); }
.note { padding: 1rem 1.2rem; border-left: 3px solid var(--accent); background: rgb(0 0 0 / 0.18); color: var(--muted); font-size: 1rem; border-radius: 0 var(--r) var(--r) 0; }
.note b { color: var(--ink); }

/* Tabelas */
.table-wrap { overflow-x: auto; margin-top: 1.5rem; border-radius: var(--r); border: 1px solid var(--line-strong); }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { padding: 0.6rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--display); font-weight: 400; font-size: 1.2rem; color: var(--accent); background: rgb(0 0 0 / 0.2); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }

/* Linha do tempo (uma sequência real) */
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 1rem; counter-reset: s; }
.steps li { counter-increment: s; padding: 1.2rem; background: var(--stone); border-radius: var(--r); border-top: 4px solid var(--c, var(--accent)); min-width: 0; display: grid; gap: 0.35rem; align-content: start; }
.steps li::before { content: counter(s); font-family: var(--display); color: var(--c, var(--accent)); font-size: 2rem; line-height: 1; }
.steps h3 { font-size: 1.5rem; }
.steps .when { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.steps .local { font-size: 0.92rem; color: var(--dim); }
.steps p { font-size: 1rem; color: var(--muted); }

/* Abas */
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.tabs button { font-family: var(--display); font-size: 1.4rem; padding: 0.35rem 1rem; border-radius: var(--r); border: 2px solid var(--line-strong); background: var(--stone); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--gold-ink); background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); }
.panel { margin-top: 1rem; }

/* Sprites */
.sprite { image-rendering: auto; filter: drop-shadow(0 6px 0 rgb(0 0 0 / 0.35)); object-fit: contain; }
.bosses { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
.boss { display: grid; justify-items: center; text-align: center; gap: 0.3rem; padding: 0.8rem; background: rgb(0 0 0 / 0.22); border-radius: var(--r); border: 1px solid var(--line); min-width: 0; }
.boss img { width: 110px; height: 96px; }
.boss b { font-weight: 700; line-height: 1.2; }
.boss small { color: var(--dim); }
.boss.guardian { border-color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 10%, rgb(0 0 0 / 0.22)); }

/* Escada de níveis */
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ladder li { display: grid; grid-template-columns: 3.2rem 1fr; gap: 0.8rem; align-items: center; padding: 0.35rem 0.6rem; background: rgb(0 0 0 / 0.2); border-radius: 3px; border-left: 3px solid color-mix(in srgb, var(--c, var(--accent)) calc(var(--t, 0.3) * 100%), transparent); }
.ladder b { font-family: var(--display); font-weight: 400; font-size: 1.3rem; color: var(--c, var(--accent)); text-align: right; }

/* Controles e widgets */
.widget { margin-top: 2rem; background: var(--stone); border: 2px solid var(--line-strong); border-radius: var(--r); padding: clamp(1rem, 3vw, 1.8rem); display: grid; gap: 1.2rem; }
.widget .head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.widget .head h3 { font-size: 1.8rem; }
.widget .hint { font-size: 0.92rem; color: var(--dim); }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; }
.kv div { background: rgb(0 0 0 / 0.22); border-radius: var(--r); padding: 0.7rem 0.9rem; display: grid; }
.kv b { font-family: var(--display); font-weight: 400; font-size: 2.2rem; line-height: 1; color: var(--accent); }
.kv span { font-size: 0.92rem; color: var(--muted); }
.pick { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pick button { font-family: var(--body); font-weight: 700; font-size: 0.98rem; padding: 0.45rem 0.85rem; border-radius: var(--r); border: 2px solid var(--line-strong); background: rgb(0 0 0 / 0.2); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; }
.pick button[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 14%, rgb(0 0 0 / 0.2)); }
.pick img { width: 26px; height: 26px; object-fit: contain; }

/* FAQ e rodapé */
.faq { margin-top: 1.5rem; display: grid; gap: 0.6rem; max-width: 760px; }
.faq details { background: var(--stone); border-radius: var(--r); padding: 0.9rem 1.2rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin-top: 0.6rem; color: var(--muted); }
.next { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
footer.end { padding-block: 3rem; text-align: center; color: var(--dim); border-top: 1px solid var(--line); }
footer.end .wrap { display: grid; gap: 1rem; justify-items: center; }
footer.end img { height: 64px; width: auto; }
footer.end nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; justify-content: center; }
footer.end a { color: var(--muted); }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 1.05rem; }
  .grid, .steps { grid-template-columns: 1fr; }
  .top .brand img { height: 32px; }
  .nav a { font-size: 1.1rem; padding: 0.15rem 0.6rem; }
  .stats b { font-size: 2rem; }
  th, td { padding: 0.5rem 0.6rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
