/* Archaic Realms TCG - shared styles for How to Play and Rules. Tokens match the rest of the site. */
:root {
  --cyan: #00E5FF; --amber: #F5A85A; --amber-bright: #FFB96A; --purple: #9B59E8;
  --ink: #0D0D0F; --deep: #131318; --surface: #1A1A22; --surface-2: #22222C;
  --warm-grey: #8A8078; --light-grey: #C8C4BC; --off-white: #F0EDE8; --gold: #C9A84C;
  --font-display: 'Cinzel Decorative', serif; --font-heading: 'Cinzel', serif; --font-body: 'Crimson Pro', serif;
  --col: 1040px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--ink); color: var(--off-white); font-family: var(--font-body); font-size: 19px; line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }
strong { color: #fff; font-weight: 600; }
code { font-family: var(--font-body); font-style: italic; color: var(--amber-bright); }

/* nav: as on the rest of the site */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; background: linear-gradient(to bottom, rgba(13,13,15,0.95) 0%, transparent 100%); backdrop-filter: blur(2px); }
.nav-logo img { height: 52px; filter: drop-shadow(0 0 12px rgba(0,229,255,0.3)); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--light-grey); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--cyan); }
.nav-links a.active { color: var(--amber); }
.nav-cta { font-family: var(--font-heading); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink) !important; background: var(--amber); padding: 10px 22px; border-radius: 2px; text-decoration: none; white-space: nowrap; transition: background 0.2s; }
.nav-cta:hover { background: var(--amber-bright); }
@media (max-width: 900px) { .nav-links { display: none; } nav { padding: 12px 20px; } .nav-logo img { height: 40px; } .nav-cta { font-size: 10px; padding: 9px 14px; letter-spacing: 0.08em; } }

/* opening band */
.lead { position: relative; min-height: 460px; display: flex; align-items: flex-end; background-size: cover; background-position: center 35%; }
.lead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(13,13,15,0.35) 0%, rgba(13,13,15,0.1) 40%, var(--ink) 100%); }
.lead-inner { position: relative; z-index: 1; width: 100%; max-width: var(--col); margin: 0 auto; padding: 150px 32px 36px; }
.lead h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 7vw, 76px); line-height: 1.05; text-shadow: 0 2px 24px rgba(0,0,0,0.7); }
.lead p { max-width: 34em; font-size: 22px; line-height: 1.45; color: var(--off-white); margin-top: 14px; text-shadow: 0 1px 12px rgba(0,0,0,0.8); }
.lead .stamp { font-size: 16px; color: var(--light-grey); margin-top: 12px; }
.lead.plain { min-height: 0; background: var(--deep); }
.lead.plain::after { display: none; }

.wrap { max-width: var(--col); margin: 0 auto; padding: 0 32px; }
.jump { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 18px 0 6px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.jump a { font-family: var(--font-heading); font-size: 14px; letter-spacing: 0.06em; color: var(--light-grey); text-decoration: none; padding: 6px 0; display: inline-block; }
.jump a:hover { color: var(--amber); }

/* blocks */
.block { padding: 64px 0 8px; }
.block > h2 { font-family: var(--font-heading); font-weight: 600; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.2; color: var(--off-white); }
.block > .sub { color: var(--light-grey); max-width: 38em; margin-top: 6px; }
.fine { color: var(--light-grey); font-size: 17px; margin-top: 22px; max-width: 44em; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 26px; }
.quad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 26px; }
.duo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 26px; }
.tile { background: var(--surface); border-top: 2px solid var(--gold); padding: 22px 24px 24px; border-radius: 0 0 4px 4px; }
.tile h3 { font-family: var(--font-heading); font-weight: 600; font-size: 21px; line-height: 1.25; color: var(--off-white); }
.tile p, .tile li { color: var(--light-grey); font-size: 18px; line-height: 1.5; }
.tile p { margin-top: 8px; }
.tile ul { list-style: none; margin-top: 10px; }
.tile li { padding: 5px 0 5px 18px; position: relative; }
.tile li::before { content: ""; position: absolute; left: 0; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.big { font-family: var(--font-body); font-weight: 600; font-size: 62px; line-height: 0.9; color: var(--amber); display: block; margin-bottom: 12px; }
.fig { font-family: var(--font-body); font-weight: 600; font-size: 1.12em; letter-spacing: 0; }

/* a real sequence: numbered */
.steps { list-style: none; counter-reset: step; margin-top: 24px; }
.steps > li { counter-increment: step; position: relative; padding: 6px 0 16px 62px; min-height: 52px; font-size: 20px; line-height: 1.45; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 42px; height: 42px; border-radius: 50%; background: var(--amber); color: var(--ink); font-family: var(--font-body); font-weight: 600; font-size: 24px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.trio.numbered, .quad.numbered { counter-reset: step; }
.numbered .tile { counter-increment: step; }
.numbered .tile h3::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-right: 12px; border-radius: 50%; background: var(--amber); color: var(--ink); font-family: var(--font-body); font-size: 23px; font-weight: 600; line-height: 1; vertical-align: 2px; }

/* set up: steps beside the table */
.setup { display: grid; grid-template-columns: 5fr 6fr; gap: 36px; align-items: start; }
.map { background: var(--deep); border: 1px solid rgba(201,168,76,0.3); border-radius: 6px; padding: 20px; margin-top: 24px; }
.map-title { font-family: var(--font-heading); font-size: 16px; color: var(--gold); text-align: center; margin-bottom: 14px; }
.map-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; }
.zone { border: 1px solid rgba(240,237,232,0.28); border-radius: 5px; background: rgba(255,255,255,0.03); min-height: 92px; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-family: var(--font-heading); font-size: 14px; line-height: 1.25; color: var(--off-white); }
.zone small { font-family: var(--font-body); font-size: 14px; color: var(--light-grey); margin-top: 3px; }
.zone.hot { border-color: var(--amber); background: rgba(245,168,90,0.14); }
.z-obj { grid-column: span 4; } .z-line { grid-column: span 2; } .z-act { grid-column: span 2; } .z-realm { grid-column: span 4; }
.z-energy { grid-column: span 8; } .z-deck { grid-column: span 2; } .z-disc { grid-column: span 2; }
.z-quest { grid-column: span 4; min-height: 64px; } .z-mid { grid-column: span 8; min-height: 64px; border-style: dashed; }

/* reading a card */
.reads { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 28px; }
.read { display: grid; grid-template-columns: 236px 1fr; gap: 30px; align-items: start; }
.cardshot { position: relative; }
.cardshot img { border-radius: 4.5% / 3.3%; box-shadow: 0 14px 40px rgba(0,0,0,0.6); }
.pin { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--cyan); color: var(--ink); border: 2px solid #fff; font-family: var(--font-body); font-weight: 600; font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.keyed { list-style: none; }
.keyed li { position: relative; padding: 4px 0 14px 46px; font-size: 19px; line-height: 1.45; color: var(--light-grey); }
.keyed li > span { position: absolute; left: 0; top: 3px; width: 30px; height: 30px; border-radius: 50%; background: var(--cyan); color: var(--ink); font-family: var(--font-body); font-weight: 600; font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.read h3 { font-family: var(--font-heading); font-weight: 600; font-size: 21px; margin-bottom: 12px; }

/* keywords */
.kw { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 44px; margin-top: 22px; }
.kw div { display: grid; grid-template-columns: 8.2em 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.kw dt { font-family: var(--font-heading); font-weight: 600; font-size: 17px; color: var(--amber); }
.kw dd { color: var(--light-grey); font-size: 18px; line-height: 1.45; }

/* a painting between blocks */
.band { margin: 72px 0 0; }
.band img { width: 100%; height: clamp(220px, 34vw, 520px); object-fit: cover; }
.band figcaption { max-width: var(--col); margin: 0 auto; padding: 10px 32px 0; font-size: 16px; font-style: italic; color: var(--warm-grey); }

/* onward */
.more { margin-top: 72px; background: var(--surface); border-left: 3px solid var(--cyan); padding: 28px 30px; border-radius: 0 4px 4px 0; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.more h2 { font-family: var(--font-heading); font-weight: 600; font-size: 26px; }
.more p { color: var(--light-grey); margin-top: 4px; max-width: 34em; }
.btn { font-family: var(--font-heading); font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; padding: 15px 30px; border-radius: 2px; display: inline-block; transition: background 0.2s, border-color 0.2s; }
.btn-gold { color: var(--ink); background: linear-gradient(135deg, #FFB96A, #F5A85A); box-shadow: 0 4px 20px rgba(245,168,90,0.3); }
.btn-gold:hover { background: var(--amber-bright); }
.btn-line { color: var(--cyan); border: 1px solid rgba(0,229,255,0.35); }
.btn-line:hover { background: rgba(0,229,255,0.08); border-color: rgba(0,229,255,0.7); }

.cta { margin-top: 96px; background: var(--deep); border-top: 1px solid rgba(201,168,76,0.25); padding: 72px 32px 84px; text-align: center; }
.cta h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 4vw, 36px); line-height: 1.2; }
.cta p { color: var(--light-grey); max-width: 30em; margin: 12px auto 28px; }
.cta .row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.foot { text-align: center; color: var(--warm-grey); font-size: 15px; padding: 26px 20px 40px; background: var(--deep); }
.foot a { color: var(--light-grey); }

/* rules reference */
.ref { display: grid; grid-template-columns: 250px minmax(0, 760px); gap: 56px; max-width: 1130px; margin: 0 auto; padding: 36px 32px 0; align-items: start; }
.toc { position: sticky; top: 100px; }
.toc h2 { font-family: var(--font-heading); font-size: 15px; font-weight: 600; color: var(--gold); margin-bottom: 10px; }
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 5px 0; color: var(--light-grey); text-decoration: none; font-size: 17px; line-height: 1.3; }
.toc a::before { content: counter(toc); color: var(--warm-grey); display: inline-block; width: 1.6em; }
.toc a:hover { color: var(--amber); }
.rules section { padding: 8px 0 34px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 34px; }
.rules section:last-of-type { border-bottom: 0; }
.rules h2 { font-family: var(--font-heading); font-weight: 600; font-size: 29px; line-height: 1.2; margin-bottom: 14px; }
.rules h2 .n { color: var(--amber); margin-right: 12px; font-family: var(--font-body); font-weight: 600; font-size: 1.12em; }
.rules p { margin: 12px 0; color: var(--off-white); }
.rules ul, .rules ol { margin: 10px 0 10px 1.25em; }
.rules li { padding: 5px 0; color: var(--off-white); }
.rules li::marker { color: var(--gold); }
.rules table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.rules th { text-align: left; font-family: var(--font-heading); font-weight: 600; font-size: 15px; color: var(--gold); padding: 8px 14px 8px 0; border-bottom: 1px solid rgba(201,168,76,0.4); }
.rules td { vertical-align: top; padding: 11px 14px 11px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.rules td:first-child { white-space: nowrap; }
.rules td:first-child strong { color: var(--amber); font-family: var(--font-heading); font-size: 17px; }

@media (max-width: 980px) {
  .ref { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; background: var(--surface); padding: 18px 20px; border-radius: 4px; }
  .toc ol { columns: 2; column-gap: 24px; }
  .quad { grid-template-columns: repeat(2, 1fr); }
  .reads { grid-template-columns: 1fr; gap: 40px; }
  .read { grid-template-columns: 260px 1fr; }
  .setup { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  body { font-size: 18px; }
  .wrap, .lead-inner, .band figcaption { padding-left: 20px; padding-right: 20px; }
  .ref { padding-left: 20px; padding-right: 20px; }
  .trio, .duo, .quad, .kw { grid-template-columns: 1fr; }
  .read { grid-template-columns: 1fr; gap: 20px; }
  .cardshot { max-width: 260px; margin-left: 10px; }
  .kw div { grid-template-columns: 8.6em 1fr; gap: 10px; }
  .jump { gap: 2px 18px; }
  .more { padding: 24px 22px; }
  .cta { padding: 56px 20px 64px; margin-top: 72px; }
  .rules td:first-child { white-space: normal; }
  .map { padding: 14px; } .map-grid { gap: 8px; }
  .zone { font-size: 14px; min-height: 68px; padding: 8px; } .zone small { font-size: 14px; }
  .z-obj, .z-realm, .z-line, .z-act, .z-deck, .z-disc { grid-column: span 6; }
  .z-energy, .z-quest, .z-mid { grid-column: span 12; }
  .z-realm { order: 1; } .z-obj { order: 2; } .z-line { order: 3; } .z-act { order: 4; } .z-energy { order: 5; } .z-deck { order: 6; } .z-disc { order: 7; } .z-quest { order: 8; } .z-mid { order: 9; }
  .toc ol { columns: 1; }
  .lead { min-height: 380px; } .lead p { font-size: 20px; }
}

/* ---------- Factions, and Cards and Art ---------- */
.accent-shadow { --acc: #9B59E8; } .accent-divine { --acc: #3CCCE4; }
.accent-shadow .tile, .accent-divine .tile { border-top-color: var(--acc); }
.accent-shadow .numbered .tile h3::before, .accent-divine .numbered .tile h3::before { background: var(--acc); }
.lead.tall { min-height: 520px; background-position: center 40%; }
.faction { padding-top: 26px; }
.faction .kicker { color: var(--acc); font-family: var(--font-heading); font-size: 17px; letter-spacing: 0.04em; margin-top: 44px; }
.faction h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 6vw, 60px); line-height: 1.05; }
.faction .sub { font-size: 23px; line-height: 1.4; color: var(--off-white); max-width: 30em; margin-top: 10px; }
.faction h3.part { font-family: var(--font-heading); font-weight: 600; font-size: 24px; margin-top: 46px; }
.heroes { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 20px; }
.hero { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: start; }
.hero img, .kcard img, .gallery img { border-radius: 4.5% / 3.3%; box-shadow: 0 10px 30px rgba(0,0,0,0.55); }
.hero h4, .kcard h4 { font-family: var(--font-heading); font-weight: 600; font-size: 20px; line-height: 1.25; }
.hero .stat { color: var(--acc); font-size: 17px; margin-top: 4px; }
.hero p, .kcard p { color: var(--light-grey); font-size: 18px; line-height: 1.5; margin-top: 8px; }
.know { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 20px; }
.kcard { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; }
.credit { font-size: 15px; font-style: italic; color: var(--warm-grey); margin-top: 6px; }
.story { max-width: 40em; }
.story p { margin-top: 14px; color: var(--light-grey); }
.quote { border-left: 3px solid var(--gold); padding: 6px 0 6px 22px; margin-top: 26px; font-family: var(--font-heading); font-size: 22px; line-height: 1.4; color: var(--gold); max-width: 26em; }
.others .tile { padding: 0 0 18px; border-top: 0; border-radius: 4px; overflow: hidden; }
.others .art { width: 100%; aspect-ratio: 1; object-fit: cover; }
.others .label { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 16px 18px 0; }
.others .label img { width: 44px; height: 44px; }
.others p { margin-top: 2px; }
.painting { margin-top: 38px; }
.painting img { width: 100%; border-radius: 4px; }
.painting figcaption { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; }
.painting b { font-family: var(--font-heading); font-weight: 600; font-size: 20px; color: var(--off-white); }
.painting span { color: var(--light-grey); font-size: 17px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 30px 22px; margin-top: 26px; }
.gallery figcaption { margin-top: 12px; }
.gallery b { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 16px; line-height: 1.25; color: var(--off-white); }
.gallery span { display: block; font-size: 16px; color: var(--light-grey); margin-top: 2px; }
.names { columns: 3; column-gap: 40px; list-style: none; margin-top: 20px; max-width: 760px; }
.names li { padding: 6px 0; font-size: 19px; break-inside: avoid; }
.names small { display: block; font-size: 15px; color: var(--warm-grey); }
.rowlinks { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (max-width: 980px) {
  .heroes { grid-template-columns: 1fr; }
  .know { grid-template-columns: 1fr; gap: 22px; }
  .kcard { grid-template-columns: 110px 1fr; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 124px 1fr; gap: 16px; }
  .faction .sub { font-size: 21px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
  .names { columns: 2; column-gap: 20px; }
  .lead.tall { min-height: 420px; }
  .quad.others { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .others .label { grid-template-columns: 36px 1fr; gap: 10px; padding: 12px 12px 0; } .others .label img { width: 36px; height: 36px; }
  .others .tile h3 { font-size: 18px; } .others .tile p { font-size: 16px; }
}
