:root {
  --purple: #461d7c;
  --purple-deep: #25103f;
  --purple-soft: #f4effa;
  --gold: #fdd023;
  --ink: #333333;
  --muted: #6d6873;
  --white: #ffffff;
  --border: #ded6e7;
  --shadow: 0 18px 50px rgba(37, 16, 63, 0.14);
  --radius: 24px;
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--purple-deep);
  font-weight: 800;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.18rem; font-weight: 900; letter-spacing: 0.08em; }

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  aspect-ratio: 1;
  border-radius: 12px 12px 12px 4px;
  background: var(--gold);
  color: var(--purple-deep);
  font-family: Georgia, serif;
  font-size: 1.45rem;
}

nav { display: flex; align-items: center; gap: 28px; }
nav a { text-decoration: none; font-size: 0.94rem; font-weight: 700; transition: color 180ms ease, background 180ms ease; }
nav a:hover { color: var(--gold); }
.nav-cta { padding: 11px 18px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; }
.nav-cta:hover { background: var(--white); color: var(--purple) !important; }

.hero { position: relative; min-height: 580px; display: grid; align-items: center; color: var(--white); isolation: isolate; }
.hero-image, .hero-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { object-fit: cover; z-index: -3; }
.hero-overlay { z-index: -2; background: linear-gradient(90deg, rgba(18, 6, 31, .96) 0%, rgba(37, 16, 63, .87) 45%, rgba(37, 16, 63, .18) 78%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 180px; z-index: -1; background: linear-gradient(transparent, rgba(18,6,31,.38)); }
.hero-content { padding-top: 112px; }
.hero-content > * { max-width: 720px; }
.eyebrow { margin: 0 0 18px; color: var(--gold); font-size: .78rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.08; }
h1 { margin-bottom: 24px; font-size: clamp(3rem, 6vw, 5.8rem); letter-spacing: -.045em; }
.hero-lead { margin-bottom: 30px; color: rgba(255,255,255,.84); font-size: clamp(1.05rem, 2vw, 1.28rem); max-width: 620px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 850; transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--gold); color: var(--purple-deep); box-shadow: 0 10px 30px rgba(253, 208, 35, .22); }
.button-ghost { border: 1px solid rgba(255,255,255,.42); color: var(--white); }
.button-ghost:hover { background: rgba(255,255,255,.12); }
.button-dark { margin-top: 10px; background: var(--purple); color: var(--white); }
.trust-list { display: flex; gap: 26px; flex-wrap: wrap; margin: 34px 0 0; padding: 0; color: rgba(255,255,255,.74); list-style: none; font-size: .9rem; }
.trust-list li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--gold); }

.reading-bar { background: var(--gold); color: var(--purple-deep); }
.reading-bar-inner { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: .83rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }

.chapter { padding: 112px 0; }
.chapter-tint { background: var(--purple-soft); }
.chapter-grid { display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: clamp(46px, 7vw, 94px); }
.chapter-grid.reverse .chapter-copy { order: 2; }
.chapter-grid.reverse .chapter-media { order: 1; }
.chapter-number { margin: 0 0 16px; color: var(--purple); font-size: .78rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.chapter h2, .final-note h2 { margin-bottom: 24px; color: var(--purple-deep); font-size: clamp(2.2rem, 4vw, 3.8rem); letter-spacing: -.035em; }
.chapter-copy > p { color: #555058; }
.answer-first { font-size: 1.08rem; font-weight: 700; color: var(--ink) !important; }
.chapter-media { margin: 0; }
.chapter-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.chapter-media figcaption { margin-top: 14px; color: var(--muted); font-size: .82rem; }
.step-list { display: grid; gap: 10px; padding-left: 22px; }
.step-list li { padding-left: 6px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 26px 0; }
.check-grid div { padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.72); }
.check-grid strong, .check-grid span { display: block; }
.check-grid span { margin-top: 5px; color: var(--muted); font-size: .85rem; }
blockquote { margin: 26px 0; padding: 24px 26px; border-left: 5px solid var(--gold); border-radius: 0 16px 16px 0; background: var(--purple-soft); color: var(--purple-deep); font-family: Georgia, serif; font-size: 1.25rem; }

.chapter-dark { background: var(--purple-deep); color: var(--white); }
.chapter-dark .chapter-number { color: var(--gold); }
.chapter-dark h2, .chapter-dark h3 { color: var(--white); }
.section-heading { display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; gap: 70px; margin-bottom: 46px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p { margin: 0; color: rgba(255,255,255,.68); }
.game-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 22px; }
.game-layout > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.game-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.game-cards article { padding: 26px; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: rgba(255,255,255,.065); }
.game-cards article > span { color: var(--gold); font-size: .76rem; font-weight: 900; }
.game-cards h3 { margin: 14px 0 10px; font-size: 1.36rem; }
.game-cards p { margin: 0; color: rgba(255,255,255,.67); font-size: .92rem; }
.callout { margin-top: 26px; padding: 22px 24px; border-radius: 16px; background: var(--gold); color: var(--purple-deep); }
.callout strong { font-family: Georgia, serif; font-size: 1.22rem; }
.callout p { margin: 8px 0 0; }
.safety-list { display: grid; gap: 10px; padding-left: 22px; }

.final-note { padding: 72px 0; background: var(--gold); color: var(--purple-deep); }
.final-note .eyebrow { color: var(--purple); }
.final-note-inner { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 70px; }
.final-note h2 { margin-bottom: 0; }
.final-note-inner > p { margin: 0; font-weight: 700; }

.site-footer { padding: 76px 0 26px; background: #17121c; color: rgba(255,255,255,.72); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; }
.logo-footer { color: var(--white); }
.footer-grid > div:first-child p { max-width: 470px; }
.footer-grid h2 { margin: 0 0 18px; color: var(--white); font-family: inherit; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; }
.footer-grid > div:not(:first-child) a { display: block; width: fit-content; margin: 10px 0; text-decoration: none; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; margin-top: 58px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

/* GSRMS Legacy & Transition Styles */
.gsrms-legacy .chapter-grid {
  align-items: stretch;
}

.engineering-panel {
  padding: 36px;
  background: var(--purple-soft);
  border-top: 6px solid var(--purple);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.engineering-panel h3 {
  color: var(--purple-deep);
  font-family: Georgia, serif;
  font-size: 1.45rem;
  margin-bottom: 24px;
}

.equipment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
}

.equipment-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.equipment-list li strong {
  color: var(--purple-deep);
  font-size: 0.98rem;
}

.equipment-list li span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.transition-heading {
  max-width: 780px;
  margin-bottom: 48px;
}

.transition-heading p {
  color: var(--muted);
  font-size: 1.05rem;
}

.symposium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.sympo-card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(37, 16, 63, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 220ms cubic-bezier(0.25, 1, 0.5, 1), box-shadow 220ms ease, border-color 220ms ease;
}

.sympo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(70, 29, 124, 0.25);
}

.card-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--purple-soft);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 18px;
}

.card-badge.badge-primary {
  background: var(--gold);
  color: var(--purple-deep);
}

.sympo-card h3 {
  font-size: 1.28rem;
  color: var(--purple-deep);
  margin-bottom: 12px;
  font-family: Georgia, serif;
}

.sympo-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px;
  flex-grow: 1;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: auto;
}

.card-links a {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--purple);
  text-decoration: none;
  transition: color 180ms ease;
}

.card-links a:hover {
  color: var(--gold);
}

@media (max-width: 900px) {
  nav a:not(.nav-cta) { display: none; }
  .hero { min-height: 500px; }
  .chapter-grid, .section-heading, .game-layout, .symposium-grid, .final-note-inner { grid-template-columns: 1fr; }
  .chapter-grid.reverse .chapter-copy, .chapter-grid.reverse .chapter-media { order: initial; }
  .chapter-media { order: -1 !important; }
  .section-heading { gap: 20px; }
  .game-layout > img { min-height: auto; aspect-ratio: 16 / 9; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .header-inner { min-height: 70px; }
  .nav-cta { padding: 9px 13px; font-size: .8rem; }
  .hero { min-height: 520px; }
  .hero-content { padding-top: 100px; }
  h1 { font-size: 3.1rem; }
  .hero-overlay { background: linear-gradient(90deg, rgba(18,6,31,.96), rgba(37,16,63,.74)); }
  .reading-bar-inner { justify-content: center; min-height: 56px; }
  .reading-bar-inner span:not(:first-child) { display: none; }
  .chapter { padding: 76px 0; }
  .chapter-grid { gap: 34px; }
  .check-grid, .game-cards, .footer-grid { grid-template-columns: 1fr; }
  .chapter h2, .final-note h2 { font-size: 2.35rem; }
  .game-cards article { padding: 22px; }
  .final-note-inner { gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 4px; }
  .trust-list { gap: 10px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
