/* Chronicles of Aetheria - website styles: sepia ink on old parchment, burnished gold, the black sun of the eclipse. */
:root {
  --ink: #07060a;
  --ink-2: #110d12;
  --ink-3: #1b1419;
  --parchment: #ead7b0;
  --parchment-dim: #c7ad80;
  --gold: #e8c77e;
  --gold-bright: #ffe3a3;
  --gold-deep: #a07a3c;
  --ember: #d9663a;
  --red: #e0453a;
  --blue: #4f86ff;
  --text: #f1e8d6;
  --text-dim: #b7a88f;
  --line: rgba(232, 199, 126, 0.22);
  --radius: 14px;
  --display: "Cinzel", "Times New Roman", serif;
  --body: "Noto Sans Thai", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(7, 6, 10, 0.92), rgba(7, 6, 10, 0));
  transition: background 0.3s;
}
.nav.solid { background: rgba(7, 6, 10, 0.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.nav .brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.nav .brand img { height: 34px; width: auto; }
.nav .links { display: flex; gap: 22px; margin-left: auto; }
.nav .links a { color: var(--text-dim); font-size: 15px; }
.nav .links a:hover { color: var(--gold-bright); }
.nav .actions { display: flex; gap: 10px; }
@media (max-width: 860px) { .nav .links { display: none; } .nav .actions { margin-left: auto; } }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 1px solid var(--gold-deep);
  font-family: var(--body); font-weight: 600; font-size: 15px; cursor: pointer;
  color: var(--ink); background: linear-gradient(180deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 0 0 1px rgba(255, 227, 163, 0.25) inset, 0 6px 24px rgba(232, 199, 126, 0.18);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.btn:hover { transform: translateY(-1px); color: var(--ink); filter: brightness(1.06); box-shadow: 0 0 0 1px rgba(255, 227, 163, 0.35) inset, 0 10px 30px rgba(232, 199, 126, 0.3); }
.btn.ghost { background: rgba(7, 6, 10, 0.4); color: var(--gold); box-shadow: none; }
.btn.ghost:hover { color: var(--gold-bright); background: rgba(232, 199, 126, 0.08); }
.btn.discord { background: #5865f2; border-color: #4752c4; color: #fff; box-shadow: 0 6px 24px rgba(88, 101, 242, 0.3); }
.btn.discord:hover { color: #fff; }
.btn.small { padding: 7px 16px; font-size: 14px; }
.btn[disabled] { opacity: 0.55; cursor: default; transform: none; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: hidden; text-align: center; }
.hero video, .hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: sepia(0.25) contrast(1.05) brightness(0.62); }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(7, 6, 10, 0.15) 0%, rgba(7, 6, 10, 0.75) 70%), linear-gradient(to bottom, rgba(7, 6, 10, 0) 60%, var(--ink));
}
.hero .content { position: relative; z-index: 2; padding: 120px 16px 80px; max-width: 920px; }
.hero .logo { width: min(560px, 86vw); margin: 0 auto -14px; filter: drop-shadow(0 0 30px rgba(232, 199, 126, 0.35)); animation: glow 5s ease-in-out infinite; }
.hero h1 { font-family: var(--display); font-size: clamp(34px, 6vw, 72px); line-height: 1.05; margin: 0; color: var(--gold-bright); text-shadow: 0 0 30px rgba(232, 199, 126, 0.4), 0 4px 0 rgba(0, 0, 0, 0.5); letter-spacing: 2px; }
.hero h1 small { display: block; font-size: 0.42em; letter-spacing: 10px; color: var(--parchment); margin-top: 12px; }
.hero p.tagline { color: var(--parchment); font-size: clamp(16px, 2vw, 20px); margin: 22px auto 30px; max-width: 640px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.badge { display: inline-block; padding: 4px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--gold); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 18px; background: rgba(7, 6, 10, 0.5); }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; color: var(--text-dim); font-size: 13px; letter-spacing: 3px; animation: bob 2.2s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 46px rgba(255, 210, 140, 0.55)); } }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------------------------------------------------------------- sections */
section { padding: clamp(64px, 9vw, 120px) clamp(16px, 5vw, 64px); position: relative; }
.wrap { max-width: 1180px; margin: 0 auto; }
.eyebrow { font-family: var(--display); color: var(--gold-deep); letter-spacing: 6px; font-size: 13px; text-transform: uppercase; text-align: center; }
h2 { font-family: var(--display); font-size: clamp(28px, 4vw, 46px); text-align: center; margin: 8px 0 14px; color: var(--gold); }
.lead { text-align: center; color: var(--text-dim); max-width: 720px; margin: 0 auto 48px; }
.divider { width: 160px; height: 14px; margin: 0 auto 28px; background: radial-gradient(circle, var(--gold) 0 3px, transparent 4px) center/14px 14px no-repeat, linear-gradient(90deg, transparent, var(--gold-deep), transparent) center/100% 1px no-repeat; }
.parchment-bg { background: linear-gradient(rgba(7, 6, 10, 0.86), rgba(7, 6, 10, 0.92)), url("parchment.webp") center/cover; }

/* the story: four scenes */
.story { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) { .story { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .story { grid-template-columns: 1fr; } }
.scene { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.25s, border-color 0.25s; }
.scene:hover { transform: translateY(-4px); border-color: rgba(232, 199, 126, 0.5); }
.scene img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.scene .text { padding: 16px 18px 20px; }
.scene .num { font-family: var(--display); color: var(--gold-deep); font-size: 13px; letter-spacing: 3px; }
.scene h3 { font-family: var(--display); margin: 2px 0 6px; color: var(--parchment); font-size: 19px; }
.scene p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* the heroes */
.heroes { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: center; }
@media (max-width: 900px) { .heroes { grid-template-columns: 1fr; } }
.roster { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 900px) { .roster { flex-direction: row; overflow-x: auto; padding-bottom: 6px; } }
.roster button {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-width: 200px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); cursor: pointer; text-align: left; font-family: var(--body);
  transition: border-color 0.2s, background 0.2s;
}
.roster button img { width: 44px; height: 44px; object-fit: contain; filter: grayscale(0.8) brightness(0.8); transition: filter 0.2s; }
.roster button b { display: block; font-family: var(--display); font-size: 17px; }
.roster button span { font-size: 13px; color: var(--text-dim); }
.roster button:hover { border-color: rgba(232, 199, 126, 0.45); }
.roster button.on { border-color: var(--gold); background: linear-gradient(90deg, rgba(232, 199, 126, 0.14), var(--ink-2)); }
.roster button.on img { filter: none; }
.showcase { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; min-height: 560px; }
@media (max-width: 700px) { .showcase { grid-template-columns: 1fr; } }
.showcase .art { position: relative; display: grid; place-items: center; }
.showcase .art::before { content: ""; position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(232, 199, 126, 0.28), transparent 65%); }
.showcase .art img { position: relative; max-height: 560px; width: auto; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6)); animation: rise 0.5s ease-out; }
.showcase .info h3 { font-family: var(--display); font-size: clamp(32px, 4vw, 48px); margin: 0; color: var(--gold-bright); }
.showcase .info .title { color: var(--ember); letter-spacing: 3px; text-transform: uppercase; font-size: 14px; margin-bottom: 14px; }
.showcase .info p { color: var(--parchment); white-space: pre-line; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips span { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--gold); background: rgba(232, 199, 126, 0.05); }
.chips span::before { content: "✦ "; color: var(--gold-deep); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* game modes */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .modes { grid-template-columns: 1fr; } }
.mode { padding: 28px 26px; border-radius: var(--radius); background: linear-gradient(160deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); position: relative; overflow: hidden; }
.mode .icon { font-size: 30px; margin-bottom: 10px; }
.mode h3 { font-family: var(--display); color: var(--gold); margin: 0 0 8px; font-size: 21px; }
.mode p { color: var(--text-dim); margin: 0; font-size: 15px; }
.mode.arena { background: linear-gradient(120deg, rgba(224, 69, 58, 0.16), var(--ink-2) 45%, var(--ink-2) 55%, rgba(79, 134, 255, 0.16)); }
.mode.arena .vs { font-family: var(--display); font-weight: 700; letter-spacing: 2px; margin-top: 12px; }
.mode.arena .vs .r { color: var(--red); } .mode.arena .vs .b { color: var(--blue); }

/* how to join */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 22px 20px; border-radius: var(--radius); border: 1px dashed rgba(232, 199, 126, 0.35); background: rgba(7, 6, 10, 0.55); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--ink); font-family: var(--display); font-weight: 700; margin-bottom: 10px; }
.step h4 { margin: 0 0 4px; color: var(--parchment); font-size: 17px; }
.step p { margin: 0; color: var(--text-dim); font-size: 14px; }
.step code { color: var(--gold-bright); background: rgba(232, 199, 126, 0.1); padding: 1px 6px; border-radius: 6px; }
.join-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

/* news */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .news { grid-template-columns: 1fr; } }
.post { border-radius: var(--radius); overflow: hidden; background: var(--ink-2); border: 1px solid var(--line); display: flex; flex-direction: column; }
.post img { aspect-ratio: 16 / 9; object-fit: cover; }
.post .text { padding: 18px 20px 22px; }
.post time { color: var(--gold-deep); font-size: 13px; letter-spacing: 1px; }
.post h3 { margin: 4px 0 6px; color: var(--parchment); font-size: 18px; }
.post p { margin: 0; color: var(--text-dim); font-size: 14px; }
.tag { display: inline-block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: rgba(217, 102, 58, 0.18); color: var(--ember); margin-right: 6px; }

/* footer */
footer { padding: 40px 16px 50px; text-align: center; color: var(--text-dim); font-size: 14px; border-top: 1px solid var(--line); }
footer img { height: 54px; width: auto; margin: 0 auto 12px; opacity: 0.85; }

/* ---------------------------------------------------------------- account page */
.page-account { min-height: 100vh; display: grid; place-items: center; padding: 100px 16px 40px; background: radial-gradient(ellipse at top, rgba(27, 20, 25, 0.7), var(--ink) 70%), url("story-2.webp") center/cover fixed; }
.card { width: 100%; max-width: 440px; background: rgba(12, 9, 13, 0.94); border: 1px solid var(--line); border-radius: 18px; padding: 30px 30px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(232, 199, 126, 0.04); }
.card .logo { width: 220px; margin: -6px auto 4px; }
.card h1 { font-family: var(--display); text-align: center; color: var(--gold); margin: 0 0 4px; font-size: 26px; }
.card .sub { text-align: center; color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { padding: 9px; border: 0; border-radius: 9px; background: transparent; color: var(--text-dim); font-family: var(--body); font-weight: 600; cursor: pointer; }
.tabs button.on { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); color: var(--ink); }
label { display: block; font-size: 14px; color: var(--parchment-dim); margin: 12px 0 6px; }
input { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid rgba(232, 199, 126, 0.25); background: var(--ink); color: var(--text); font-family: var(--body); font-size: 15px; }
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 199, 126, 0.15); }
.card .btn { width: 100%; margin-top: 18px; }
.hint { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.msg { margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 14px; display: none; }
.msg.err { display: block; background: rgba(224, 69, 58, 0.12); border: 1px solid rgba(224, 69, 58, 0.35); color: #ffb3a8; }
.msg.ok { display: block; background: rgba(110, 210, 150, 0.1); border: 1px solid rgba(110, 210, 150, 0.35); color: #a8f0c6; }
.linking { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(88, 101, 242, 0.14); border: 1px solid rgba(88, 101, 242, 0.45); color: #c8ceff; font-size: 14px; margin-bottom: 6px; }
.profile { text-align: center; }
.profile .name { font-family: var(--display); font-size: 28px; color: var(--gold-bright); margin: 6px 0; }
.profile dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); font-size: 14px; }
.profile dt { color: var(--text-dim); }
.profile dd { margin: 0; color: var(--text); }
.back { display: block; text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-dim); }
.hidden { display: none !important; }
