/* css/seo.css — CINEMATIC design for the SEO entity cluster (/classes, /factions, /maps).
   Generated pages link landing.css (nav, seal, buttons, type, --lg-fil tokens) + this.
   Each entity page leads with its real art (class sprite / faction titlecard / map banner /
   Conquest key-art) over a faction-tinted atmospheric backdrop — on-brand with the landing. */

.seo-page { background: var(--bg-deep, #0b0a10); color: var(--text, #e8e4dc); position: relative; overflow-x: hidden; }

/* ── full-page atmospheric backdrop ── faction-tinted glows + a faint relevant painting ── */
.seo-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.seo-bg::before { /* the faint painting */
  content: ''; position: absolute; inset: 0;
  background: var(--seo-bg-img, none) center top / cover no-repeat;
  opacity: 0.20; filter: saturate(0.92) contrast(1.02);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.35) 48%, transparent 76%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.35) 48%, transparent 76%);
}
.seo-bg::after { /* tint glows + vignette over the painting */
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% -6%, color-mix(in srgb, var(--fc, #e8c572) 18%, transparent), transparent 60%),
    radial-gradient(ellipse 70% 50% at 82% 22%, rgba(106,42,168,0.12), transparent 62%),
    radial-gradient(ellipse 130% 80% at 50% 28%, transparent 42%, rgba(8,7,12,0.74) 100%);
}

.seo-main { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: clamp(5.5rem, 12vh, 8rem) 1.5rem 2rem; }

/* ════════ HERO — two-column: art | meta ════════ */
.seo-hero {
  display: grid; grid-template-columns: minmax(0, 0.9fr) 1.1fr; gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: center; min-height: 56vh;
  padding-bottom: clamp(2rem, 5vw, 3.4rem); margin-bottom: clamp(2.2rem, 5vw, 3.4rem);
  border-bottom: 1px solid color-mix(in srgb, var(--fc, #e8c572) 24%, transparent);
  position: relative;
}
.seo-hero-art { position: relative; display: flex; justify-content: center; align-items: center; }
.seo-hero-art::before { /* faction-color radial halo behind the art */
  content: ''; position: absolute; inset: -8% -4%; z-index: 0;
  background: radial-gradient(ellipse 58% 60% at 50% 46%, color-mix(in srgb, var(--fc, #e8c572) 34%, transparent), transparent 70%);
  filter: blur(10px);
}
/* class sprite — the figure is the hero */
.seo-sprite {
  position: relative; z-index: 1; width: auto; height: clamp(300px, 46vh, 480px); max-width: 100%;
  image-rendering: auto;
  filter: drop-shadow(0 20px 44px rgba(0,0,0,0.72)) drop-shadow(0 0 34px color-mix(in srgb, var(--fc, #e8c572) 42%, transparent));
  animation: seoFloat 6s ease-in-out infinite;
}
@keyframes seoFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
/* framed painted art — map banner / faction titlecard / Conquest key-art */
.seo-banner, .seo-faction-card, .seo-keyart {
  position: relative; z-index: 1; width: 100%; max-width: 480px; height: clamp(300px, 50vh, 540px);
  object-fit: cover; border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--fc, #e8c572) 38%, rgba(232,197,114,0.22));
  box-shadow: 0 26px 64px rgba(0,0,0,0.66), 0 0 44px color-mix(in srgb, var(--fc, #e8c572) 22%, transparent), inset 0 1px 0 rgba(245,217,138,0.16);
}
.seo-keyart { max-width: 560px; height: clamp(240px, 36vh, 360px); }
/* gilt filigree corners on the framed art (from landing.css --lg-fil tokens) */
.seo-hero-art.framed::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; border-radius: 14px;
  background: var(--lg-fil) left 10px top 10px / 26px 26px no-repeat, var(--lg-fil-br) right 10px bottom 10px / 26px 26px no-repeat;
  opacity: 0.62; filter: drop-shadow(0 0 3px rgba(232,197,114,0.4));
}

.seo-hero-meta { text-align: left; }
.seo-eyebrow {
  font-family: var(--font-display, 'Cinzel', serif); font-size: 0.74rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: color-mix(in srgb, var(--fc, #e8c572) 78%, #e8e4dc 22%); margin-bottom: 0.7rem;
  text-shadow: 0 0 14px color-mix(in srgb, var(--fc, #e8c572) 30%, transparent);
}
.seo-title {
  font-family: var(--font-display, 'Cinzel', serif); font-weight: 700;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem); letter-spacing: 0.04em; line-height: 1.02; margin: 0 0 0.55rem;
  background: linear-gradient(165deg, #f8e6ad 0%, #f5d98a 30%, #e8c572 58%, #c9922a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(0,0,0,0.6)) drop-shadow(0 0 26px color-mix(in srgb, var(--fc, #e8c572) 24%, transparent));
}
.seo-flourish {
  width: clamp(160px, 22vw, 240px); height: 14px; margin: 0.2rem 0 1.1rem;
  background:
    radial-gradient(circle 4.5px at 50% 50%, var(--gold-hi, #f5d98a) 0%, var(--gold, #e8c572) 45%, transparent 62%),
    linear-gradient(90deg, transparent 2%, var(--gold, #e8c572) 46%, transparent 50%),
    linear-gradient(270deg, transparent 2%, var(--gold, #e8c572) 46%, transparent 50%);
  background-size: 14px 14px, 100% 1.6px, 100% 1.6px; background-position: left center; background-repeat: no-repeat;
  filter: drop-shadow(0 0 7px rgba(232,197,114,0.5));
}
.seo-tagline { font-style: italic; color: rgba(232,228,220,0.92); font-size: clamp(1.05rem, 1.9vw, 1.3rem); max-width: 46ch; margin: 0 0 1.3rem; line-height: 1.5; }
/* passive chip (class pages) */
.seo-passive {
  display: inline-block; margin: 0 0 1.4rem; padding: 0.6rem 1rem 0.65rem; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--fc, #e8c572) 34%, rgba(232,197,114,0.2));
  background: radial-gradient(120% 100% at 0 0, color-mix(in srgb, var(--fc, #e8c572) 12%, transparent), transparent 60%), linear-gradient(160deg, rgba(26,21,30,0.9), rgba(12,10,16,0.92));
  box-shadow: inset 0 1px 0 rgba(245,217,138,0.12), 0 8px 22px rgba(0,0,0,0.4); max-width: 100%;
}
.seo-passive-tag { display: inline-block; font-family: var(--font-display, 'Cinzel', serif); font-size: 0.6rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold, #e8c572); opacity: 0.85; margin-right: 0.5rem; }
.seo-passive strong { color: var(--gold-hi, #f5d98a); font-family: var(--font-display, 'Cinzel', serif); letter-spacing: 0.04em; }
.seo-passive span.d { color: rgba(232,228,220,0.85); font-size: 0.92rem; }

.seo-hero .lp-btn-primary { display: inline-flex; }

/* hero variants — framed painted art reads better at ~1:1 columns */
.seo-hero-map, .seo-hero-faction, .seo-hero-conquest { grid-template-columns: 1fr 1fr; }
.seo-hero-conquest { grid-template-columns: 1.15fr 1fr; }

/* ════════ BODY ════════ */
.seo-body { font-size: 1.04rem; line-height: 1.82; color: rgba(232,228,220,0.86); max-width: 72ch; }
.seo-body p { margin-bottom: 1.15rem; }
.seo-body strong { color: var(--gold, #e8c572); font-weight: 600; }
.seo-body h2 {
  font-family: var(--font-display, 'Cinzel', serif); font-size: clamp(1.2rem, 2.2vw, 1.5rem); letter-spacing: 0.08em;
  color: var(--gold, #e8c572); margin: 2.4rem 0 0.5rem; position: relative; padding-bottom: 0.5rem;
}
.seo-body h2::after { content: ''; position: absolute; bottom: 0; left: 0; width: 64px; height: 2px; background: linear-gradient(90deg, var(--gold, #e8c572), transparent); }

/* codex card — gold-glow panel + the --lg-fil corner pair */
.seo-card {
  position: relative; border-radius: 12px; padding: 1.5rem 1.6rem; margin: 1.8rem 0;
  border: 1px solid color-mix(in srgb, var(--fc, #e8c572) 30%, rgba(232,197,114,0.16));
  background: radial-gradient(130% 90% at 0 0, color-mix(in srgb, var(--fc, #e8c572) 10%, transparent), transparent 56%), linear-gradient(160deg, rgba(28,22,32,0.93), rgba(12,10,16,0.95));
  box-shadow: inset 0 1px 0 rgba(245,217,138,0.12), 0 16px 38px rgba(0,0,0,0.5);
}
.seo-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 2;
  background: var(--lg-fil) left 8px top 8px / 22px 22px no-repeat, var(--lg-fil-br) right 8px bottom 8px / 22px 22px no-repeat;
  opacity: 0.55; filter: drop-shadow(0 0 3px rgba(232,197,114,0.38));
}
.seo-card h2 { margin: 0 0 0.5rem; font-size: 1.1rem; padding: 0; }
.seo-card h2::after { display: none; }

.seo-related { margin-top: 2.6rem; padding-top: 1.8rem; border-top: 1px solid color-mix(in srgb, var(--fc, #e8c572) 18%, transparent); }
.seo-related h2 { font-family: var(--font-display, 'Cinzel', serif); font-size: 1.1rem; letter-spacing: 0.1em; color: var(--gold, #e8c572); margin-bottom: 0.9rem; }
.seo-related ul { list-style: none; padding: 0; display: grid; gap: 0.55rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.seo-related li { margin: 0; }
.seo-related a {
  display: block; padding: 0.7rem 0.95rem; border-radius: 9px; text-decoration: none;
  color: rgba(232,228,220,0.9); font-size: 0.92rem;
  border: 1px solid rgba(232,197,114,0.16); background: linear-gradient(160deg, rgba(24,19,28,0.7), rgba(12,10,16,0.7));
  transition: transform 0.22s var(--ease-out, ease), border-color 0.22s, color 0.22s, box-shadow 0.22s;
}
.seo-related a:hover { transform: translateY(-2px); color: var(--gold-hi, #f5d98a); border-color: color-mix(in srgb, var(--fc, #e8c572) 55%, transparent); box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 22px color-mix(in srgb, var(--fc, #e8c572) 18%, transparent); }
.seo-foot-links a { color: var(--gold, #e8c572); text-decoration: none; transition: color 0.2s; }
.seo-foot-links a:hover { color: var(--gold-hi, #f5d98a); text-decoration: underline; }

/* ════════ HUB GRIDS ════════ */
.seo-hub-hero { text-align: center; min-height: 0; grid-template-columns: 1fr; padding-bottom: clamp(1.6rem, 4vw, 2.6rem); margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.seo-hub-hero .seo-hero-meta { text-align: center; }
.seo-hub-hero .seo-flourish { margin-left: auto; margin-right: auto; background-position: center; }
.seo-seal { width: clamp(96px, 12vw, 132px); height: auto; margin: 0 auto 1rem; display: block;
  filter: drop-shadow(0 8px 26px rgba(0,0,0,0.6)) drop-shadow(0 0 26px rgba(232,197,114,0.4)); }

.seo-group { margin-bottom: 2rem; }
.seo-group h2 { display: flex; align-items: baseline; gap: 0.7rem; color: var(--fc, #e8c572); font-family: var(--font-display, 'Cinzel', serif); letter-spacing: 0.06em; }
.seo-group h2::after { display: none; }
.seo-group h2 a { color: inherit; text-decoration: none; }
.seo-group h2 span { font-size: 0.72rem; letter-spacing: 0.24em; opacity: 0.72; font-weight: 400; }
.seo-group ul { list-style: none; padding: 0; display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.seo-group a { display: block; padding: 0.7rem 0.95rem; border-radius: 9px; text-decoration: none; color: rgba(232,228,220,0.88);
  border: 1px solid rgba(232,197,114,0.14); background: linear-gradient(160deg, rgba(24,19,28,0.66), rgba(12,10,16,0.7)); transition: transform 0.22s, border-color 0.22s, color 0.22s; }
.seo-group a:hover { transform: translateY(-2px); color: var(--gold-hi, #f5d98a); border-color: color-mix(in srgb, var(--fc, #e8c572) 50%, transparent); }

.seo-fgrid, .seo-mgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; }
.seo-fcard, .seo-mcard {
  position: relative; display: block; text-decoration: none; color: inherit; border-radius: 12px; padding: 1.4rem; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--fc, #e8c572) 28%, rgba(232,197,114,0.14));
  background: radial-gradient(130% 90% at 0 0, color-mix(in srgb, var(--fc, #e8c572) 11%, transparent), transparent 56%), linear-gradient(160deg, rgba(26,21,30,0.92), rgba(12,10,16,0.94));
  box-shadow: inset 0 1px 0 rgba(245,217,138,0.1), 0 14px 34px rgba(0,0,0,0.5);
  transition: transform 0.26s var(--ease-out, ease), border-color 0.26s, box-shadow 0.26s;
}
.seo-fcard::after, .seo-mcard::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 2;
  background: var(--lg-fil) left 8px top 8px / 22px 22px no-repeat, var(--lg-fil-br) right 8px bottom 8px / 22px 22px no-repeat;
  opacity: 0.5; filter: drop-shadow(0 0 3px rgba(232,197,114,0.38)); transition: opacity 0.26s;
}
.seo-fcard:hover, .seo-mcard:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--fc, #e8c572) 62%, transparent);
  box-shadow: inset 0 1px 0 rgba(245,217,138,0.2), 0 22px 50px rgba(0,0,0,0.6), 0 0 30px color-mix(in srgb, var(--fc, #e8c572) 24%, transparent); }
.seo-fcard:hover::after, .seo-mcard:hover::after { opacity: 0.9; }
.seo-fcard h2, .seo-mcard h2 { font-family: var(--font-display, 'Cinzel', serif); color: var(--gold, #e8c572); font-size: 1.25rem; letter-spacing: 0.06em; margin: 0 0 0.3rem; }
.seo-fcard h2::after, .seo-mcard h2::after { display: none; }
.seo-fmotto { display: block; font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: color-mix(in srgb, var(--fc, #e8c572) 72%, #e8e4dc); margin-bottom: 0.6rem; }
.seo-fcard p, .seo-mcard p { color: rgba(232,228,220,0.8); font-size: 0.92rem; line-height: 1.6; margin: 0; position: relative; z-index: 1; }

/* ════════ FOOTER ════════ */
.seo-footer { position: relative; z-index: 1; text-align: center; padding: 3.4rem 1.5rem 4rem; border-top: 1px solid rgba(232,197,114,0.16); margin-top: 3.4rem; }
.seo-footer .lp-btn-primary { display: inline-flex; }
.seo-foot-links { margin: 1.4rem 0 1rem; font-size: 0.9rem; color: var(--text-dim, #9a8f85); }
.seo-footer .lp-footer-indithar { font-size: 0.78rem; font-style: italic; color: rgba(154,143,133,0.75); }

@media (max-width: 760px) {
  .seo-hero, .seo-hero-map, .seo-hero-faction, .seo-hero-conquest { grid-template-columns: 1fr; text-align: center; min-height: 0; gap: 1.6rem; }
  .seo-hero-meta { text-align: center; }
  .seo-hero-art { order: -1; }
  .seo-flourish { margin-left: auto; margin-right: auto; background-position: center; }
  .seo-passive { text-align: left; }
  .seo-main { padding-top: 5.5rem; }
}
@media (prefers-reduced-motion: reduce) { .seo-sprite { animation: none; } }

/* ════════ ATMOSPHERE — drifting gold embers (CSS-only, like the landing) ════════ */
.seo-embers { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.seo-ember {
  position: absolute; bottom: -16px; width: 3px; height: 3px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold-hi, #f5d98a) 0%, rgba(232,197,114,0.5) 50%, transparent 72%);
  filter: drop-shadow(0 0 4px rgba(232,197,114,0.6)); opacity: 0;
  animation: seoEmberRise linear infinite;
}
@keyframes seoEmberRise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: 0.85; }
  88% { opacity: 0.5; }
  100% { transform: translateY(-104vh) translateX(24px); opacity: 0; }
}

/* ════════ scroll reveal (set by the tiny inline script; pre-JS state is visible) ════════ */
.seo-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-out, ease), transform 0.7s var(--ease-out, ease); }
.seo-reveal.in { opacity: 1; transform: none; }

/* ════════ visual champion cards (class/faction related content) ════════ */
.seo-champ-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.1rem 0 1.3rem; }
.seo-champ {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 0.95rem; align-items: center;
  text-decoration: none; color: inherit; padding: 0.85rem 1.05rem; border-radius: 12px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--fc, #e8c572) 28%, rgba(232,197,114,0.14));
  background: radial-gradient(120% 100% at 0 0, color-mix(in srgb, var(--fc, #e8c572) 12%, transparent), transparent 60%), linear-gradient(160deg, rgba(26,21,30,0.92), rgba(12,10,16,0.94));
  box-shadow: inset 0 1px 0 rgba(245,217,138,0.1), 0 12px 30px rgba(0,0,0,0.45);
  transition: transform 0.26s var(--ease-out, ease), border-color 0.26s, box-shadow 0.26s;
}
.seo-champ:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--fc, #e8c572) 62%, transparent);
  box-shadow: inset 0 1px 0 rgba(245,217,138,0.2), 0 18px 42px rgba(0,0,0,0.55), 0 0 26px color-mix(in srgb, var(--fc, #e8c572) 24%, transparent); }
.seo-champ-art { width: 58px; height: 76px; display: grid; place-items: center; flex: none; }
.seo-champ-art img { width: auto; height: 76px; image-rendering: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6)) drop-shadow(0 0 11px color-mix(in srgb, var(--fc, #e8c572) 42%, transparent)); transition: transform 0.26s var(--ease-out, ease); }
.seo-champ:hover .seo-champ-art img { transform: translateY(-3px) scale(1.05); }
.seo-champ-meta { display: flex; flex-direction: column; gap: 0.16rem; min-width: 0; }
.seo-champ-meta strong { font-family: var(--font-display, 'Cinzel', serif); color: var(--gold-hi, #f5d98a); font-size: 1.04rem; letter-spacing: 0.04em; }
.seo-champ-role { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: color-mix(in srgb, var(--fc, #e8c572) 78%, #e8e4dc); }
.seo-champ-pass { font-size: 0.76rem; color: rgba(232,228,220,0.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ════════ visual map thumbnail cards ════════ */
.seo-mapthumb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.1rem 0; }
.seo-mapthumb {
  position: relative; display: block; text-decoration: none; color: inherit; border-radius: 12px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--fc, #e8c572) 24%, rgba(232,197,114,0.16)); background: rgba(12,10,16,0.6);
  box-shadow: 0 12px 30px rgba(0,0,0,0.45); transition: transform 0.26s var(--ease-out, ease), border-color 0.26s, box-shadow 0.26s;
}
.seo-mapthumb:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--fc, #e8c572) 58%, transparent); box-shadow: 0 18px 42px rgba(0,0,0,0.6), 0 0 24px color-mix(in srgb, var(--fc, #e8c572) 20%, transparent); }
.seo-mapthumb-art { display: block; aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.seo-mapthumb-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(11,10,16,0.55) 100%); }
.seo-mapthumb-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.45s var(--ease-out, ease); }
.seo-mapthumb:hover .seo-mapthumb-art img { transform: scale(1.06); }
.seo-mapthumb-meta { padding: 0.7rem 0.95rem 0.85rem; }
.seo-mapthumb-meta strong { display: block; font-family: var(--font-display, 'Cinzel', serif); color: var(--gold, #e8c572); font-size: 1rem; letter-spacing: 0.03em; }
.seo-mapthumb-meta span { font-size: 0.78rem; color: rgba(232,228,220,0.74); }

.seo-related-links { margin-top: 1.2rem; font-size: 0.92rem; color: var(--text-dim, #9a8f85); }
.seo-related-links a { color: var(--gold, #e8c572); text-decoration: none; }
.seo-related-links a:hover { color: var(--gold-hi, #f5d98a); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .seo-ember { display: none; }
  .seo-reveal { opacity: 1; transform: none; transition: none; }
}

/* ════════ guide pages — readable long-form + gilt bullet lists ════════ */
.seo-guide { max-width: 76ch; margin-left: auto; margin-right: auto; }
.seo-guide > ul { margin: 0 0 1.3rem; padding-left: 0.2rem; list-style: none; }
.seo-guide > ul > li { position: relative; padding-left: 1.6rem; margin-bottom: 0.65rem; line-height: 1.7; color: rgba(232,228,220,0.86); }
.seo-guide > ul > li::before { content: '◆'; position: absolute; left: 0.25rem; top: 0.12em; color: var(--gold, #e8c572); font-size: 0.66em; filter: drop-shadow(0 0 6px rgba(232,197,114,0.4)); }
.seo-guide em { color: rgba(232,228,220,0.95); }
