/* 13 Kingdoms TCG — site styles */
:root {
  --night: #0a0910;
  --night-2: #12101c;
  --panel: #171425;
  --line: rgba(212, 166, 74, 0.22);
  --gold: #d9ad55;
  --gold-hi: #f6dc9a;
  --gold-lo: #9a7130;
  --ember: #c2412d;
  --text: #ece6d8;
  --muted: #a49c8c;
  --radius: 14px;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(217, 173, 85, 0.13), transparent 70%),
    radial-gradient(900px 500px at 100% 110%, rgba(194, 65, 45, 0.10), transparent 70%),
    var(--night);
  color: var(--text);
  font: 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--gold-hi); }
a:hover { color: #fff; }

.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }

/* ── Header ───────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 9, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; letter-spacing: 0.12em;
  color: var(--gold-hi); text-decoration: none; font-size: 18px; white-space: nowrap;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--gold); color: var(--gold-hi);
  font-size: 13px; letter-spacing: 0;
  background: radial-gradient(circle at 50% 35%, rgba(246, 220, 154, 0.25), transparent 70%);
}
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; letter-spacing: 0.02em;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-hi); background: rgba(217, 173, 85, 0.08); }
.cart-link { display: inline-flex; align-items: center; gap: 8px; }
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--gold); color: #1a1408; font-size: 12px; font-weight: 700;
  display: inline-grid; place-items: center;
}
.cart-count[data-zero] { background: rgba(217, 173, 85, 0.2); color: var(--gold-hi); }
.menu-btn { display: none; }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  --b: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--body); letter-spacing: 0.04em;
  padding: 15px 26px; border-radius: 999px; cursor: pointer;
  text-decoration: none; border: 1px solid var(--b); transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-gold {
  color: #1d1505;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: 0 6px 30px rgba(217, 173, 85, 0.25), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-gold:hover { color: #1d1505; transform: translateY(-1px); box-shadow: 0 10px 40px rgba(217, 173, 85, 0.38); }
.btn-ghost { color: var(--gold-hi); background: transparent; }
.btn-ghost:hover { background: rgba(217, 173, 85, 0.1); color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ── Type ─────────────────────────────────────────── */
.eyebrow {
  font: 600 12px/1 var(--body); letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 14px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0 0 16px; letter-spacing: 0.02em; }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: 20px; }
.gold-text {
  background: linear-gradient(180deg, #fff6d8 0%, var(--gold-hi) 35%, var(--gold) 65%, var(--gold-lo) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 18px; color: var(--muted); max-width: 640px; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

section { padding: 96px 0; }
.divider {
  height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ── Hero ─────────────────────────────────────────── */
.hero { padding: 72px 0 88px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(52px, 8.5vw, 112px); letter-spacing: 0.06em; line-height: 0.95; margin-bottom: 18px; }
.hero h1 small { display: block; font-size: 0.32em; letter-spacing: 0.5em; color: var(--gold); margin-bottom: 14px; }
.tagline { font-family: var(--display); font-size: clamp(20px, 2.4vw, 28px); color: var(--text); margin: 0 0 14px; }
.hero .lede { margin: 0 0 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 14px; }
.hero-meta span::before { content: "✦ "; color: var(--gold); }

.stars {
  position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff, transparent 60%),
    radial-gradient(1px 1px at 28% 78%, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 44% 12%, #f6dc9a, transparent 60%),
    radial-gradient(1px 1px at 63% 64%, #fff, transparent 60%),
    radial-gradient(1px 1px at 77% 30%, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 82%, #f6dc9a, transparent 60%),
    radial-gradient(1px 1px at 95% 14%, #fff, transparent 60%),
    radial-gradient(1px 1px at 6% 60%, #fff, transparent 60%);
}

/* Pack art (falls back to a drawn pack when no image is supplied) */
.pack {
  position: relative; aspect-ratio: 3 / 4.75; width: min(340px, 100%); margin-inline: auto;
  border-radius: 10px; overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255,255,255,.18), transparent 30%, transparent 70%, rgba(255,255,255,.08)),
    radial-gradient(120% 70% at 50% 30%, #3a2a5a, #140f22 70%);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px var(--gold-lo), 0 0 60px rgba(217,173,85,.18);
  transform: rotate(-4deg);
}
.pack::before, .pack::after { /* crimp zones */
  content: ""; position: absolute; left: 0; right: 0; height: 18px; z-index: 2;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.35) 0 3px, rgba(255,255,255,.12) 3px 6px);
}
.pack::before { top: 0; } .pack::after { bottom: 0; }
.pack > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.pack-fallback {
  position: absolute; inset: 18px 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; gap: 10px;
}
.pack-fallback .num { font-family: var(--display); font-size: 92px; line-height: 1; }
.pack-fallback .name { font-family: var(--display); letter-spacing: .3em; font-size: 20px; color: var(--gold-hi); }
.pack-fallback .ribbon {
  margin-top: 18px; background: var(--ember); color: #fff; font: 700 12px/1 var(--body); letter-spacing: .18em;
  padding: 10px 16px; transform: rotate(-2deg); box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.pack-fallback .small { font-size: 11px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; margin-top: 16px; }
.pack-wrap { position: relative; }
.pack-wrap::before {
  content: ""; position: absolute; inset: -10% -5%; z-index: -1;
  background: radial-gradient(closest-side, rgba(217,173,85,.25), transparent);
}

/* ── Feature grid ─────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
}
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--display); font-size: 20px; color: var(--gold-hi);
  border: 1px solid var(--gold-lo); margin-bottom: 18px;
  background: radial-gradient(circle at 50% 30%, rgba(217,173,85,.2), transparent 70%);
}
.card p { color: var(--muted); margin: 0; }

/* ── Fundraiser feature ───────────────────────────── */
.feature { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before {
  content: "✦"; color: var(--gold); flex: none; width: 22px; text-align: center; line-height: 1.65;
}
.note {
  font-size: 14px; color: var(--muted); border-left: 2px solid var(--gold-lo);
  padding: 4px 0 4px 14px; margin: 0 0 28px;
}

/* ── Kingdoms ─────────────────────────────────────── */
.kingdom-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 44px; }
.kingdom-grid .crest { flex: 0 1 calc((100% - 6 * 14px) / 7); min-width: 140px; }
.crest {
  --c1: #5a4520; --c2: #1a1408;
  position: relative; border-radius: var(--radius); padding: 20px 16px 18px; text-decoration: none; color: var(--text);
  background: linear-gradient(170deg, var(--c1), var(--c2) 75%);
  border: 1px solid rgba(255,255,255,.08); overflow: hidden; min-height: 150px;
  display: flex; flex-direction: column; justify-content: flex-end; transition: transform .2s, border-color .2s;
}
.crest:hover { transform: translateY(-3px); border-color: var(--gold); color: var(--text); }
.crest .numeral {
  position: absolute; top: 10px; right: 14px; font-family: var(--display); font-size: 44px; line-height: 1;
  color: rgba(255,255,255,.14);
}
.crest .k-name { font-family: var(--display); font-size: 17px; font-weight: 700; color: #fff; }
.crest .k-key { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.65); margin-top: 4px; }

.kingdom-list { display: grid; gap: 22px; margin-top: 48px; }
.kingdom {
  --c1: #5a4520; --c2: #1a1408;
  display: grid; grid-template-columns: 220px 1fr; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--panel); scroll-margin-top: 90px;
}
.kingdom-art {
  position: relative; background: linear-gradient(170deg, var(--c1), var(--c2) 80%); min-height: 220px;
  display: grid; place-items: center;
}
.kingdom-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kingdom-art .numeral { font-family: var(--display); font-size: 88px; color: rgba(255,255,255,.22); }
.kingdom-body { padding: 28px 32px; }
.kingdom-body h3 { font-size: 26px; margin-bottom: 4px; }
.kingdom-body .theme { color: var(--muted); margin: 0 0 18px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; font-size: 15px; }
.kv dt { color: var(--gold); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; }
.kv dd b { color: #fff; }

/* Tribe colors */
.t1  { --c1: #8a2316; --c2: #1d0805; }  /* Hell Cats */
.t2  { --c1: #5b5f66; --c2: #160d12; }  /* Restless */
.t3  { --c1: #7b5a2c; --c2: #1b130a; }  /* Faithless */
.t4  { --c1: #8f2a2a; --c2: #2a1a08; }  /* Devout */
.t5  { --c1: #2f6b2f; --c2: #0c1a0c; }  /* Wildwood */
.t6  { --c1: #8a4b1f; --c2: #171313; }  /* Babel Clans */
.t7  { --c1: #a1552a; --c2: #18202c; }  /* Holler Kin */
.t8  { --c1: #1d5f7a; --c2: #06121c; }  /* Aquanauts */
.t9  { --c1: #1f7a4a; --c2: #050a08; }  /* Backdoor */
.t10 { --c1: #7d1c1c; --c2: #1a1c22; }  /* Horde */
.t11 { --c1: #4f86b5; --c2: #14202c; }  /* Skyborn */
.t12 { --c1: #4b3a7d; --c2: #0d0c22; }  /* Changelings */
.t13 { --c1: #2c3550; --c2: #0c0d12; }  /* Guild */

/* ── Shop ─────────────────────────────────────────── */
.page-head { padding: 64px 0 24px; }
.shop-layout { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; padding-bottom: 96px; }
.products { display: grid; gap: 18px; }
.product {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 22px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.product .thumb {
  aspect-ratio: 3/4.75; border-radius: 6px; overflow: hidden; position: relative;
  background: radial-gradient(120% 70% at 50% 30%, #3a2a5a, #140f22 70%);
  box-shadow: 0 0 0 1px var(--gold-lo); display: grid; place-items: center;
  font-family: var(--display); color: var(--gold-hi); font-size: 34px;
}
.product .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product h3 { margin: 0 0 2px; font-size: 19px; }
.product .sub { color: var(--gold); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.product p { color: var(--muted); margin: 8px 0 0; font-size: 15px; }
.product .buy { text-align: right; display: grid; gap: 10px; justify-items: end; }
.price { font-family: var(--display); font-size: 24px; color: #fff; }
.product .btn { padding: 12px 20px; font-size: 14px; }

.cart {
  position: sticky; top: 88px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.cart h2 { font-size: 24px; display: flex; justify-content: space-between; align-items: baseline; }
.cart h2 small { font-family: var(--body); font-size: 13px; color: var(--muted); letter-spacing: 0; font-weight: 400; }
.cart-empty { color: var(--muted); padding: 18px 0; }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line .n { font-weight: 600; font-size: 15px; }
.cart-line .lp { text-align: right; font-weight: 600; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button {
  width: 30px; height: 30px; border: 0; background: none; color: var(--gold-hi); font-size: 18px; cursor: pointer; border-radius: 50%;
}
.qty button:hover { background: rgba(217,173,85,.12); }
.qty span { min-width: 26px; text-align: center; font-size: 14px; }
.remove { background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; padding: 0; justify-self: end; }
.totals { margin: 16px 0 20px; display: grid; gap: 6px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; color: var(--muted); }
.totals .grand { color: #fff; font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }

.form { display: grid; gap: 12px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .row-3 { display: grid; grid-template-columns: 1.4fr .7fr .9fr; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.form input, .form select {
  font: 15px var(--body); color: var(--text); background: var(--night-2);
  border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 11px 12px; width: 100%;
}
.form input:focus, .form select:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }
.form legend { font-family: var(--display); color: var(--gold-hi); font-size: 15px; padding: 0; margin: 10px 0 2px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.agree { display: flex !important; gap: 10px; align-items: flex-start; text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; line-height: 1.5; }
.agree input { width: auto; margin-top: 3px; }
.form-error { color: #ff9b8a; font-size: 14px; min-height: 1em; margin: 0; }
.secure { font-size: 12px; color: var(--muted); text-align: center; margin: 10px 0 0; }

.banner {
  border: 1px solid var(--gold-lo); background: rgba(217,173,85,.08); border-radius: 12px;
  padding: 14px 18px; color: var(--gold-hi); font-size: 15px; margin-bottom: 18px;
}

/* ── Simple message pages ─────────────────────────── */
.message { padding: 120px 0; text-align: center; }
.message .lede { margin: 0 auto 32px; }
.seal {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 28px; display: grid; place-items: center;
  font-size: 38px; color: #1d1505; background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo));
  box-shadow: 0 0 60px rgba(217,173,85,.35);
}

/* ── Footer ───────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold-hi); }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 960px) {
  .hero .wrap, .feature { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding-top: 48px; }
  .hero .pack-wrap { display: none; }
  .pack { width: 240px; }
  .grid-3 { grid-template-columns: 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .cart { position: static; }
  .kingdom { grid-template-columns: 1fr; }
  .kingdom-art { min-height: 140px; }
}
@media (max-width: 720px) {
  section { padding: 72px 0; }
  .menu-btn {
    display: inline-grid; place-items: center; margin-left: auto; width: 42px; height: 42px;
    background: none; border: 1px solid var(--line); border-radius: 10px; color: var(--gold-hi); font-size: 20px; cursor: pointer;
  }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--night); border-bottom: 1px solid var(--line); padding: 10px 16px 18px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .product { grid-template-columns: 84px 1fr; }
  .product .buy { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .form .row, .form .row-3 { grid-template-columns: 1fr; }
}

/* ── Logo + art-slot additions ────────────────────── */
body {
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(190, 210, 255, 0.10), transparent 70%),   /* heaven */
    radial-gradient(900px 520px at 92% -6%, rgba(194, 45, 30, 0.16), transparent 70%),     /* hell */
    radial-gradient(1200px 600px at 50% -10%, rgba(217, 173, 85, 0.10), transparent 70%),
    var(--night);
}
.brand-logo { height: 52px; width: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); }
.site-header .wrap { height: 74px; }
.ed-badge { margin-left: -8px; }

.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center 30%;
  opacity: .38; mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
}
.hero .wrap { position: relative; }
.hero-logo { margin: 0 0 6px -2%; line-height: 0; }
.hero-logo img { width: min(560px, 100%); height: auto; filter: drop-shadow(0 10px 40px rgba(0,0,0,.7)) drop-shadow(0 0 40px rgba(217,173,85,.18)); }

.pack-logo { width: 88%; height: auto; filter: drop-shadow(0 6px 20px rgba(0,0,0,.6)); }

.crest-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: transform .4s, opacity .3s; }
.crest::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.85)); }
.crest .numeral, .crest .k-name, .crest .k-key { position: relative; z-index: 1; }
.crest .numeral { position: absolute; }
.crest:hover .crest-art { transform: scale(1.06); opacity: 1; }
.kingdom-grid .crest { min-height: 190px; }

.kingdom-art img.asc { opacity: 0; transition: opacity .35s; }
.kingdom:hover .kingdom-art img.asc { opacity: 1; }
.kingdom-art { min-height: 260px; }
.kingdom { grid-template-columns: 280px 1fr; }

.product .thumb .thumb-logo { width: 86%; height: auto; }

@media (max-width: 960px) {
  .hero-logo { margin-left: 0; }
  .kingdom { grid-template-columns: 1fr; }
  .kingdom-art { min-height: 300px; }
}
@media (max-width: 720px) {
  .brand-logo { height: 44px; }
}

/* Kingdoms page shows full Leader cards */
.kingdom { grid-template-columns: 300px 1fr; }
.kingdom-art { min-height: 0; padding: 22px; background: radial-gradient(120% 90% at 50% 20%, var(--c1), var(--c2) 85%); }
.kingdom-art .card-frame { position: relative; width: 100%; aspect-ratio: 550 / 770; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.6); }
.kingdom-art .card-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kingdom-art .card-frame .numeral { position: absolute; inset: 0; display: grid; place-items: center; }
.kingdom-art .hover-hint { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.kingdom-body { align-self: center; }
@media (max-width: 960px) { .kingdom { grid-template-columns: 1fr; } .kingdom-art .card-frame { width: min(300px, 80%); margin: 0 auto; } }
.kingdom.show-asc .kingdom-art img.asc { opacity: 1; }
.kingdom .card-frame { cursor: pointer; }
.hero-bg { opacity: .55; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,9,16,.92) 0%, rgba(10,9,16,.7) 45%, rgba(10,9,16,.15) 75%, transparent); }
@media (max-width: 960px) { .hero-bg::after { background: rgba(10,9,16,.7); } }

/* Signup + announcement */
.notify { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 520px; margin: 28px auto 0; }
.notify input[type=email] { flex: 1 1 240px; font: 15px var(--body); color: var(--text); background: var(--night-2); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 14px 20px; }
.notify input[type=email]:focus { outline: 2px solid var(--gold); border-color: transparent; }
.notify .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.notify-msg { flex-basis: 100%; margin: 4px 0 0; font-size: 14px; color: var(--gold-hi); min-height: 1.2em; }
.notify-msg.bad { color: #ff9b8a; }
.banner .notify { margin: 14px 0 0; justify-content: flex-start; }
.announce { background: linear-gradient(90deg, #7d1c1c, #3a1d5c); color: #fff; text-align: center; font-size: 14px; font-weight: 500; padding: 9px 16px; }

/* ── Living logo: wings sway in the wind ───────────────────── */
.living-logo { position: relative; display: block; width: min(560px, 100%); aspect-ratio: 2 / 1;
  filter: drop-shadow(0 10px 40px rgba(0,0,0,.7)) drop-shadow(0 0 40px rgba(217,173,85,.18)); }
.living-logo img { position: absolute; inset: 0; width: 100%; height: 100%; filter: none; }
.ll-l { transform-origin: 37% 45%; animation: ll-left 7s ease-in-out infinite; }
.ll-r { transform-origin: 63% 45%; animation: ll-right 7s ease-in-out infinite; animation-delay: -.6s; }
.ll-crest { animation: ll-breathe 7s ease-in-out infinite; }
@keyframes ll-left {
  0%, 100% { transform: rotate(0deg) skewY(0deg); }
  30% { transform: rotate(2.4deg) skewY(-.8deg); }
  55% { transform: rotate(-.6deg) skewY(.3deg); }
  75% { transform: rotate(1.4deg) skewY(-.4deg); }
}
@keyframes ll-right {
  0%, 100% { transform: rotate(0deg) skewY(0deg); }
  30% { transform: rotate(-2.4deg) skewY(.8deg); }
  55% { transform: rotate(.6deg) skewY(-.3deg); }
  75% { transform: rotate(-1.4deg) skewY(.4deg); }
}
@keyframes ll-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .living-logo img { animation: none !important; } }

/* ── Fill the Wings meter ─────────────────────────────────── */
.wings-meter { position: relative; overflow: hidden; }
.wings-meter::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 55%, rgba(217,173,85,.16), transparent 70%); }
.wm-stage { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  max-width: 820px; margin: 28px auto 18px; }
.wm-wing { position: relative; }
.wm-wing img { display: block; width: 100%; height: auto; }
.wm-l img { transform-origin: 100% 50%; }
.wm-r img { transform-origin: 0% 50%; }
.wm-empty { filter: grayscale(1) brightness(.28) contrast(1.1); opacity: .9; }
@property --wm-p { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
.wings-meter { transition: --wm-p 2.4s cubic-bezier(.2,.8,.2,1); }
.wm-full { position: absolute; inset: 0; filter: drop-shadow(0 0 18px rgba(255,214,130,.35));
  -webkit-mask-image: linear-gradient(to top, #000 calc(var(--wm-p) - 4%), transparent calc(var(--wm-p) + 4%));
          mask-image: linear-gradient(to top, #000 calc(var(--wm-p) - 4%), transparent calc(var(--wm-p) + 4%)); }
.wm-wing.go .wm-full { animation: wm-flutter 6s ease-in-out infinite; }
.wm-l.go img { animation: wm-sway-l 6s ease-in-out infinite; }
.wm-r.go img { animation: wm-sway-r 6s ease-in-out infinite; }
@keyframes wm-sway-l { 0%,100% { transform: rotate(0) } 40% { transform: rotate(-2.5deg) } }
@keyframes wm-sway-r { 0%,100% { transform: rotate(0) } 40% { transform: rotate(2.5deg) } }
.wm-core { min-width: 190px; padding: 0 6px; }
.wm-pct { font-family: var(--font-display, serif); font-size: clamp(44px, 7vw, 76px); line-height: 1;
  background: linear-gradient(180deg, #fff3c9, #d9ad55 55%, #8a5a17); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(217,173,85,.35)); }
.wm-raised { margin-top: 8px; font-size: 17px; opacity: .9; }
.wm-raised b { color: #f3d58a; font-size: 20px; }
.wm-packs { margin-top: 4px; font-size: 14px; opacity: .65; letter-spacing: .04em; }
.wm-bar { max-width: 520px; height: 8px; margin: 0 auto; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(217,173,85,.25); }
.wm-bar span { display: block; height: 100%; width: var(--wm-w, 0%); transition: width 2.4s cubic-bezier(.2,.8,.2,1);
  background: linear-gradient(90deg, #f5f0ff, #d9ad55 50%, #c0392b); box-shadow: 0 0 14px rgba(217,173,85,.6); }
.wm-feathers { position: absolute; inset: -40px 0; width: 100%; height: calc(100% + 80px); pointer-events: none; }
@media (max-width: 640px) {
  .wm-stage { grid-template-columns: 1fr 1fr; }
  .wm-core { grid-column: 1 / -1; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .wings-meter, .wm-bar span { transition: none; }
  .wm-wing.go img { animation: none !important; }
}

/* ── Kingdoms: continuous scrolling showcase ──────────────── */
.realms-intro { padding: 120px 0 70px; position: relative; }
.scroll-cue { width: 26px; height: 42px; margin: 34px auto 0; border: 2px solid rgba(217,173,85,.6); border-radius: 14px; position: relative; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #d9ad55; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0) } 40% { opacity: 1 } 100% { opacity: 0; transform: translateY(14px) } }
.realms { position: relative; }
.realm { position: relative; min-height: clamp(560px, 52vw, 92vh); display: flex; align-items: center; overflow-x: clip; isolation: isolate;
  margin-top: -7vh; /* scenes overlap and melt into each other */ }
.realm:first-child { margin-top: 0; }
.realm-bg { position: absolute; inset: -3% 0; z-index: -3; will-change: transform;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 11%, #000 88%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 11%, #000 88%, transparent 100%); }
.realm:first-child .realm-bg { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 3%, #000 88%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 3%, #000 88%, transparent 100%); }
.realm-shade { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 10%, #000 90%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 10%, #000 90%, transparent 100%); }
.realm-paint { position: absolute; inset: 0; transform: scale(1.04); transition: transform 1.6s ease, filter 1.6s ease; filter: saturate(.85) brightness(.8); }
.realm.in .realm-paint { transform: scale(1); filter: saturate(1.05) brightness(1); }
.realm-paint > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.realm-paint img { object-fit: cover; object-position: var(--px, 50%) var(--py, 22%); }
.realm-paint .realm-vid { object-fit: cover; object-position: var(--px, 50%) var(--py, 22%); opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.realm-paint .realm-vid.on { opacity: 1; }
.realm[data-hero="right"] { --px: 70%; }
.realm[data-hero="left"] { --px: 30%; }
.realm-gl { opacity: 0; transition: opacity .6s; }
.realm-gl.on { opacity: 1; }
.realm-fx { pointer-events: none; }
.realm-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.realm[data-hero="right"] .realm-shade { background: linear-gradient(90deg, rgba(8,7,12,.88) 0%, rgba(8,7,12,.55) 32%, rgba(8,7,12,0) 58%); }
.realm[data-hero="left"] .realm-shade { background: linear-gradient(270deg, rgba(8,7,12,.88) 0%, rgba(8,7,12,.55) 32%, rgba(8,7,12,0) 58%); }
.realm-text { position: relative; width: min(1200px, 92vw); margin: 0 auto; padding: 12vh 0; }
.realm-text > * { max-width: 470px; }
.realm[data-hero="left"] .realm-text > * { margin-left: auto; }
.realm-text > * { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.realm.in .realm-text > * { opacity: 1; transform: none; }
.realm.in .realm-text > :nth-child(2) { transition-delay: .1s } .realm.in .realm-text > :nth-child(3) { transition-delay: .2s } .realm.in .realm-text > :nth-child(4) { transition-delay: .3s }
.realm-num { font: 600 13px/1 var(--body, Inter, sans-serif); letter-spacing: .32em; text-transform: uppercase; color: #d9ad55; margin: 0 0 10px; }
.realm-name { font-size: clamp(42px, 6.4vw, 86px); line-height: .95; margin: 0 0 16px;
  background: linear-gradient(180deg, #fff6d6 0%, #e9c46a 45%, #9b6516 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,.85)); }
.realm-theme { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: rgba(255,255,255,.88); text-shadow: 0 2px 14px rgba(0,0,0,.9); margin: 0 0 24px; }
.realm-leader { display: flex; gap: 18px; align-items: center; padding: 14px; border-radius: 14px;
  background: rgba(10,9,16,.62); border: 1px solid rgba(217,173,85,.28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.realm-card { position: relative; flex: 0 0 92px; aspect-ratio: 550/770; border-radius: 7px; cursor: zoom-in; z-index: 2; perspective: 900px;
  transform-origin: 0% 50%; transition: transform .38s cubic-bezier(.2,.9,.25,1.1), filter .38s; filter: drop-shadow(0 10px 22px rgba(0,0,0,.6)); }
.card-3d { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,.7,.2,1); }
.card-3d img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 7px; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #111; }
.card-3d .card-back { transform: rotateY(180deg); }
.realm.show-asc .card-3d, .card-modal.show-asc .card-3d { transform: rotateY(180deg); }
.card-flip { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); opacity: 0; pointer-events: none; white-space: nowrap;
  font: 700 4.2px/1 var(--body, Inter, sans-serif); letter-spacing: .06em; padding: 2.2px 4.5px; border-radius: 99px; border: .5px solid #d9ad55;
  background: rgba(14,12,20,.92); color: #f3d58a; cursor: pointer; transition: opacity .2s .15s; }
@media (hover: hover) {
  .realm-card:hover, .realm-card:focus-visible { transform: scale(3.2) translateY(-6%); z-index: 40; filter: drop-shadow(0 6px 10px rgba(0,0,0,.7)); }
  .realm[data-hero="left"] .realm-card:hover, .realm[data-hero="left"] .realm-card:focus-visible { transform-origin: 0% 50%; }
  .realm-card:hover .card-flip, .realm-card:focus-visible .card-flip { opacity: 1; pointer-events: auto; }
  .realm-card:hover .card-3d img { border-radius: 2.5px; }
}
.realm-leader { position: relative; z-index: 3; }
/* Phones: a tap opens the card big, with Flip and Close */
.card-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; gap: 18px; padding: 24px; background: rgba(5,4,9,.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card-modal[hidden] { display: none; }
.card-modal .cm-card { position: relative; width: min(78vw, 360px); aspect-ratio: 550/770; perspective: 1200px; }
.card-modal .card-3d img { border-radius: 14px; }
.card-modal .cm-actions { display: flex; gap: 10px; }
.realm-leader dl { margin: 0; display: grid; gap: 3px; font-size: 14px; }
.realm-leader dt { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #d9ad55; margin-top: 6px; }
.realm-leader dt:first-child { margin-top: 0; }
.realm-leader dd { margin: 0; color: rgba(255,255,255,.9); }
.realm-dots { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 6px;
  opacity: 0; pointer-events: none; transition: opacity .4s; }
.realm-dots.on { opacity: 1; pointer-events: auto; }
.realm-dots a { display: grid; place-items: center; width: 30px; height: 22px; border-radius: 6px; font: 600 10px/1 var(--display, serif);
  color: rgba(255,255,255,.55); text-decoration: none; background: rgba(10,9,16,.55); border: 1px solid rgba(217,173,85,.18); transition: all .25s; }
.realm-dots a:hover { color: #fff; border-color: rgba(217,173,85,.6); }
.realm-dots a.cur { color: #1a1206; background: #d9ad55; border-color: #d9ad55; }
.realms-outro { padding: 60px 0 90px; }
@media (max-width: 760px) {
  .realm { min-height: 92vh; align-items: flex-end; margin-top: -6vh; }
  .realm[data-hero] { --px: var(--fx, 50%); }
  .realm[data-hero] .realm-shade { background: linear-gradient(0deg, rgba(8,7,12,.95) 0%, rgba(8,7,12,.7) 38%, rgba(8,7,12,0) 64%); }
  .realm-text { padding: 0 0 9vh; }
  .realm[data-hero="left"] .realm-text > * { margin-left: 0; }
  .realm-dots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .realm-text > *, .realm-paint { transition: none; opacity: 1; transform: none; }
}
.realm-paint > canvas { pointer-events: none; }
.realm { z-index: 1; }
.realm:has(.realm-card:hover), .realm:has(.realm-card:focus-visible) { z-index: 5; }
