/* ==========================================================================
   Smutstone — Gothic grimoire light theme
   Card battle RPG promo site. Light scheme: parchment + amethyst + gold.
   All layout/component/utility classes used by the 30 generated pages.
   ========================================================================== */

/* ---------- reset & tokens ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --parchment: #faf6ee;
  --parchment-deep: #f2e9d8;
  --ivory: #fffdf7;
  --ink: #2c2146;
  --ink-soft: #544a6b;
  --amethyst: #7446a0;
  --amethyst-deep: #5b3484;
  --amethyst-pale: #efe6f7;
  --gold: #b98a2f;
  --gold-pale: #f3e6c4;
  --crimson: #a63c4e;
  --card-blue: #3d6ea8;
  --card-red: #b0433f;
  --card-green: #3e7d55;
  --card-dark: #4a4158;
  --card-light: #c9a227;
  --line: #e2d5bc;
  --serif: Georgia, "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 10px 30px rgba(44, 33, 70, 0.10);
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--parchment);
  line-height: 1.65;
  font-size: 17px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--amethyst); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.22; color: var(--ink); }

/* ---------- header ---------- */
.site-header {
  background: var(--ivory);
  border-bottom: 3px double var(--gold);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
}

.brand-mark {
  color: var(--gold);
  font-size: 1.35rem;
  line-height: 1;
  transform: rotate(45deg);
  display: inline-block;
}

.brand-name { font-size: 1.45rem; font-weight: 700; letter-spacing: 0.02em; }
.brand-sub { display: block; font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-soft); }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--amethyst);
  color: var(--amethyst);
  font-size: 1.3rem;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
}

.site-nav { display: block; }

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  display: block;
  padding: 9px 13px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-link:hover { color: var(--amethyst); background: var(--amethyst-pale); text-decoration: none; }
.nav-link-active { color: var(--amethyst-deep); background: var(--amethyst-pale); }

.btn-play {
  display: inline-block;
  margin-left: 10px;
  padding: 11px 22px;
  border-radius: 8px;
  background: linear-gradient(160deg, var(--amethyst), var(--amethyst-deep));
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 14px rgba(116, 70, 160, 0.35);
}

.btn-play:hover { background: var(--amethyst-deep); text-decoration: none; transform: translateY(-1px); }

/* ---------- generic buttons ---------- */
.btn-primary, .btn-ghost, .btn-banner {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(160deg, var(--amethyst), var(--amethyst-deep));
  color: #fff;
  border: 2px solid var(--gold);
  box-shadow: 0 6px 18px rgba(116, 70, 160, 0.35);
}

.btn-primary:hover { background: var(--amethyst-deep); text-decoration: none; }

.btn-ghost {
  color: var(--amethyst-deep);
  border: 2px solid var(--amethyst);
  background: transparent;
}

.btn-ghost:hover { background: var(--amethyst-pale); text-decoration: none; }

.btn-banner {
  background: var(--gold);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 0 6px 18px rgba(185, 138, 47, 0.4);
}

.btn-banner:hover { background: var(--gold-pale); text-decoration: none; }

/* ---------- hero (index) ---------- */
.hero {
  background:
    radial-gradient(circle at 88% 12%, rgba(185, 138, 47, 0.16), transparent 34%),
    radial-gradient(circle at 6% 90%, rgba(116, 70, 160, 0.14), transparent 40%),
    linear-gradient(180deg, var(--ivory), var(--parchment));
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 56px 22px 46px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.hero-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-content { display: flex; flex-direction: column; align-items: flex-start; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }

.hero-title {
  font-size: 3.05rem;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 1.18rem;
  color: var(--ink-soft);
  margin-bottom: 26px;
  max-width: 34em;
}

.hero-media figure, .hero-media { margin: 0; }

.hero-media img {
  border-radius: var(--radius);
  border: 8px solid var(--ivory);
  outline: 2px solid var(--gold);
  outline-offset: -8px;
  box-shadow: var(--shadow);
}

/* ---------- facts strip ---------- */
.facts-strip { border-bottom: 1px solid var(--line); background: var(--ivory); }

.facts-grid {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.fact-item {
  text-align: center;
  padding: 10px 6px;
  border-left: 2px solid var(--gold-pale);
}

.fact-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.fact-value { display: block; font-family: var(--serif); font-weight: 700; color: var(--ink); }

/* ---------- sections ---------- */
.section { padding: 58px 22px; }
.section-tinted { background: var(--parchment-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-inner { max-width: 960px; margin: 0 auto; }

.section-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.section-title {
  font-size: 2.05rem;
  text-align: center;
  margin-bottom: 14px;
}

.section-intro {
  text-align: center;
  color: var(--ink-soft);
  max-width: 46em;
  margin: 0 auto 34px;
}

.section-divider { border: 0; border-top: 2px dotted var(--gold); max-width: 420px; margin: 40px auto; }

/* ---------- prose / article ---------- */
.prose p { margin-bottom: 1.05em; }
.prose h2 { font-size: 1.5rem; margin: 1.6em 0 0.5em; }
.prose h3 { font-size: 1.18rem; margin: 1.4em 0 0.4em; color: var(--amethyst-deep); }
.prose ul, .prose ol { margin: 0.6em 0 1.2em 1.4em; }
.prose li { margin-bottom: 0.45em; }
.prose strong { color: var(--amethyst-deep); }

.article-lead { font-size: 1.13rem; color: var(--ink-soft); margin-bottom: 1.4em; }

.page-end { text-align: center; margin-top: 42px; }

/* ---------- sub-page hero ---------- */
.hero-subpage {
  background:
    radial-gradient(circle at 90% 0%, rgba(185, 138, 47, 0.14), transparent 30%),
    linear-gradient(180deg, var(--ivory), var(--parchment));
  border-bottom: 3px double var(--gold);
}

.hero-subpage-inner { max-width: 960px; margin: 0 auto; padding: 42px 22px 34px; }

.page-crumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 14px; }
.page-crumb a { color: var(--amethyst); }

.page-title { font-size: 2.6rem; margin-bottom: 12px; }

.page-lead { font-size: 1.13rem; color: var(--ink-soft); max-width: 40em; }

/* ---------- feature cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 26px;
}

.feature-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-top: 5px solid var(--amethyst);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
}

.feature-sym {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.feature-title { font-size: 1.22rem; margin-bottom: 8px; }
.feature-text { font-size: 0.95rem; color: var(--ink-soft); }

.feature-card-blue { border-top-color: var(--card-blue); }
.feature-card-red { border-top-color: var(--card-red); }
.feature-card-green { border-top-color: var(--card-green); }
.feature-card-dark { border-top-color: var(--card-dark); }
.feature-card-light { border-top-color: var(--card-light); }

/* ---------- gallery + lightbox ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item { margin: 0; cursor: zoom-in; }

.gallery-item img {
  border-radius: 10px;
  border: 5px solid var(--ivory);
  outline: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.gallery-item img:hover { transform: scale(1.02); }

.gallery-item figcaption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 8px;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 22, 48, 0.92);
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  border: 6px solid var(--ivory);
  outline: 2px solid var(--gold);
  border-radius: 8px;
}

.lb-caption { color: var(--gold-pale); text-align: center; margin-top: 12px; font-size: 0.95rem; position: absolute; bottom: 18px; left: 0; right: 0; }

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255, 253, 247, 0.14);
  color: var(--ivory);
  border: 2px solid var(--gold);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.lb-close { top: 22px; right: 26px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(116, 70, 160, 0.7); }

/* ---------- quotes ---------- */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.player-quote {
  background: var(--ivory);
  border-left: 5px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 20px;
  box-shadow: var(--shadow);
}

.quote-text { font-family: var(--serif); font-style: italic; color: var(--ink); margin-bottom: 12px; }

.quote-author { display: block; font-style: normal; font-size: 0.85rem; color: var(--ink-soft); font-weight: 700; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--amethyst-deep), var(--amethyst) 55%, var(--amethyst-deep));
  color: var(--ivory);
  text-align: center;
  padding: 52px 22px;
  border-top: 4px solid var(--gold);
  border-bottom: 4px solid var(--gold);
}

.cta-banner-inner { max-width: 720px; margin: 0 auto; }

.cta-banner-title { color: var(--ivory); font-size: 1.9rem; margin-bottom: 10px; }
.cta-banner-text { color: var(--amethyst-pale); margin-bottom: 22px; }

/* ---------- data tables ---------- */
.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ivory);
  border: 1px solid var(--line);
  font-size: 0.93rem;
}

.data-table caption { caption-side: top; text-align: left; font-family: var(--serif); font-weight: 700; padding: 8px 10px; color: var(--amethyst-deep); }

.data-table th, .data-table td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }

.data-table th { background: var(--amethyst-pale); color: var(--amethyst-deep); font-weight: 700; }

.data-table tr:nth-child(even) td { background: var(--parchment); }

.rarity-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

.chip-common { background: #8a8f98; }
.chip-rare { background: #3d6ea8; }
.chip-epic { background: #7446a0; }
.chip-legendary { background: #b98a2f; }
.chip-mythic { background: #a63c4e; }

.color-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 6px;
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.dot-blue { background: var(--card-blue); }
.dot-red { background: var(--card-red); }
.dot-green { background: var(--card-green); }
.dot-dark { background: var(--card-dark); }
.dot-light { background: var(--card-light); }

/* ---------- card roster ---------- */
.card-roster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 1.2em 0 1.6em; }

.roster-item {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.roster-icon {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--amethyst);
}

.roster-icon-blue { background: var(--card-blue); }
.roster-icon-red { background: var(--card-red); }
.roster-icon-green { background: var(--card-green); }
.roster-icon-dark { background: var(--card-dark); }
.roster-icon-light { background: var(--card-light); }

.roster-name { font-family: var(--serif); font-weight: 700; font-size: 0.98rem; line-height: 1.2; }
.roster-meta { font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq-list { margin: 1.2em 0 1.4em; }

.faq-item {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-q {
  padding: 16px 18px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: "+"; font-family: var(--sans); color: var(--gold); font-size: 1.3rem; font-weight: 700; }
.faq-item[open] .faq-q::after { content: "−"; }

.faq-a { padding: 0 18px 16px; color: var(--ink-soft); }
.faq-a p { margin-bottom: 0.7em; }
.faq-a p:last-child { margin-bottom: 0; }

.faq-sysreq { margin-top: 0; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: #cfc6e0;
  padding: 34px 22px;
  border-top: 4px solid var(--gold);
}

.footer-inner { max-width: 960px; margin: 0 auto; text-align: center; }

.footer-copy { font-size: 0.85rem; margin-bottom: 16px; }

.lang-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

.lang-link {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(207, 198, 224, 0.4);
  border-radius: 20px;
  color: #cfc6e0;
  font-size: 0.84rem;
}

.lang-link:hover { border-color: var(--gold); color: var(--gold-pale); text-decoration: none; }
.lang-link-active { border-color: var(--gold); background: rgba(185, 138, 47, 0.18); color: var(--gold-pale); font-weight: 700; }

/* ---------- img frame + captions ---------- */
.img-frame {
  margin: 1.6em 0;
  border-radius: 10px;
  border: 6px solid var(--ivory);
  outline: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.img-caption { font-size: 0.82rem; color: var(--ink-soft); text-align: center; margin: 8px 0 1.4em; }

/* ---------- two-column split ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }

/* ---------- responsive ---------- */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; padding-top: 10px; }
  .nav-link { text-align: center; }
  .btn-play { margin: 8px 0 0; text-align: center; }
  .hero-inner { grid-template-columns: 1fr; padding: 40px 20px 34px; gap: 26px; }
  .hero-title { font-size: 2.35rem; }
  .facts-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .quotes-grid { grid-template-columns: 1fr; gap: 16px; }
  .card-roster { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 20px; }
  .page-title { font-size: 2.1rem; }
  .section { padding: 44px 18px; }
}

@media (max-width: 480px) {
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .card-roster { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.95rem; }
  .section-title { font-size: 1.6rem; }
  .btn-play, .btn-primary, .btn-ghost, .btn-banner { width: 100%; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}
