/* === Saturnus, the Sword — Alchemical Dark Theme === */

:root {
  --black: #0a0a0a;
  --black-soft: #111111;
  --black-card: #161616;
  --gold: #c5973e;
  --gold-bright: #d4a84b;
  --gold-dim: #8b6914;
  --copper: #b87333;
  --copper-light: #d4956a;
  --parchment: #d4c5a0;
  --text: #c8bfa0;
  --text-dim: #8a8070;
  --text-bright: #e8dcc8;
  --accent-red: #8b2500;
  --accent-violet: #6a3d7d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
}

/* === HERO === */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  background: linear-gradient(
    180deg,
    #0a0a0a 0%,
    #1a1208 30%,
    #1a1208 70%,
    #0a0a0a 100%
  );
  overflow: hidden;
  border-bottom: 1px solid var(--gold-dim);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(197, 151, 62, 0.08) 0%, transparent 70%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="1" height="1" fill="rgba(197,151,62,0.03)"/></svg>');
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 3rem 2rem 2rem;
}

.title {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  letter-spacing: 0.12em;
  background: linear-gradient(
    180deg,
    #e8c46a 0%,
    #c5973e 30%,
    #b87333 60%,
    #8b6914 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 8px rgba(197, 151, 62, 0.3));
  margin-bottom: 0.5rem;
}

.subtitle {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.byline {
  font-family: 'EB Garamond', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}

.author-name {
  color: var(--gold);
  font-style: normal;
  font-weight: 500;
}

.hero-tagline {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--copper-light);
  margin-bottom: 2rem;
}

/* === HERO CTA === */

.hero-cta {
  margin-top: 0.5rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold), var(--copper));
  color: var(--black);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(197, 151, 62, 0.4);
}

.cta-button:hover::before {
  opacity: 1;
}

.play-icon {
  flex-shrink: 0;
}

/* === SCREENSHOTS MARQUEE === */

.screenshots-strip {
  background: var(--black-soft);
  border-bottom: 1px solid rgba(197, 151, 62, 0.15);
  overflow: hidden;
  padding: 0.6rem 0;
}

.marquee-track {
  display: flex;
  gap: 0.5rem;
  width: max-content;
  animation: marquee-scroll 60s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.screenshot-item {
  flex: 0 0 auto;
}

.screenshot-item img {
  height: 140px;
  width: auto;
  display: block;
  border: 1px solid rgba(197, 151, 62, 0.15);
  opacity: 0.85;
  transition: opacity 0.3s, border-color 0.3s;
}

.screenshot-item img:hover {
  opacity: 1;
  border-color: var(--gold);
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* === MAIN LAYOUT === */

.main-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

/* === TOC SIDEBAR === */

.toc-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(197, 151, 62, 0.15);
  background: var(--black-soft);
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}

.toc-sidebar::-webkit-scrollbar {
  width: 4px;
}

.toc-sidebar::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 2px;
}

.toc-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.toc-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.toc-author {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--copper-light);
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.toc-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
  margin: 1.2rem 0;
}

.toc-section {
  margin-bottom: 1.2rem;
}

.toc-act {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  text-align: right;
}

.toc-chapters {
  list-style: none;
  text-align: right;
}

.toc-chapters li {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  color: var(--copper-light);
  padding: 0.12rem 0;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

/* === COLLAPSIBLE TOC (I, II, III) === */

.toc-collapsible {
  margin-bottom: 1.2rem;
}

.toc-collapsible > summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 1rem;
}

.toc-collapsible > summary::-webkit-details-marker {
  display: none;
}

.toc-collapsible > summary::after {
  content: '+';
  position: absolute;
  left: 0;
  top: 0;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  color: var(--gold-dim);
  transition: transform 0.2s;
}

.toc-collapsible[open] > summary::after {
  content: '\2212';
}

.toc-collapsible .toc-chapters {
  margin-top: 0.3rem;
  animation: toc-fade-in 0.2s ease;
}

@keyframes toc-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.toc-act-sub {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--copper-light);
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
  text-align: center;
}

.ch-num {
  color: var(--gold-dim);
  margin-right: 0.2em;
  font-weight: 600;
}

/* === MAIN CONTENT === */

.content {
  padding: 2.5rem 3rem;
  max-width: 780px;
}

/* === GALLERY === */

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border: 1px solid rgba(197, 151, 62, 0.2);
  filter: sepia(0.15) contrast(1.05);
  transition: filter 0.3s;
}

.gallery-item img:hover {
  filter: sepia(0) contrast(1.1);
}

/* === INTRO BLOCK === */

.intro-block {
  margin-bottom: 2rem;
}

.intro-text {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 0.8rem;
}

.intro-text.accent {
  color: var(--parchment);
  font-style: italic;
}

/* === SECTION DIVIDER === */

.section-divider {
  text-align: center;
  margin: 2.5rem 0;
}

.divider-symbol {
  color: var(--gold-dim);
  font-size: 1.2rem;
  letter-spacing: 1em;
}

.divider-symbol::before,
.divider-symbol::after {
  content: '';
  display: inline-block;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
  vertical-align: middle;
  margin: 0 1rem;
}

.divider-symbol::after {
  background: linear-gradient(90deg, var(--gold-dim), transparent);
}

/* === CHAPTER PREVIEW === */

.chapter-preview {
  margin-bottom: 2rem;
}

.chapter-header {
  margin-bottom: 2rem;
}

.chapter-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.chapter-image {
  margin: 2rem 0;
}

.chapter-image img {
  width: 100%;
  max-width: 600px;
  display: block;
  margin: 0 auto;
  border: 1px solid rgba(197, 151, 62, 0.15);
}

.chapter-text {
  margin-bottom: 1.5rem;
}

.chapter-text p {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 1.2rem;
  text-indent: 1.5em;
  text-align: justify;
}

.chapter-text p:first-child {
  text-indent: 0;
}

.chapter-text p:first-child::first-letter {
  font-family: 'Cinzel Decorative', serif;
  font-size: 3.2em;
  float: left;
  line-height: 0.8;
  margin-right: 0.08em;
  margin-top: 0.05em;
  color: var(--gold);
}

/* === DIALOGUE === */

.chapter-text p.dialogue {
  text-indent: 0;
  color: var(--text-bright);
  padding-left: 1.5em;
}

.chapter-text p.dialogue::first-letter {
  font-family: inherit;
  font-size: inherit;
  float: none;
  line-height: inherit;
  margin: 0;
  color: inherit;
}

.chapter-text p.internal {
  text-indent: 0;
  color: var(--copper-light);
  padding-left: 1.5em;
}

.chapter-text p.internal::first-letter {
  font-family: inherit;
  font-size: inherit;
  float: none;
  line-height: inherit;
  margin: 0;
  color: inherit;
}

.dialogue-inline {
  color: var(--text-bright);
}

/* === SIDEBAR EXCERPT === */

.sidebar-excerpt {
  border-left: 2px solid var(--gold-dim);
  padding-left: 1.5rem;
  margin: 2rem 0;
}

.sidebar-excerpt .chapter-text p:first-child::first-letter {
  font-family: inherit;
  font-size: inherit;
  float: none;
  line-height: inherit;
  margin: 0;
  color: inherit;
}

.read-more-fade {
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--black));
  margin-top: -120px;
  position: relative;
  pointer-events: none;
}

/* === ALCHEMICAL EXCERPTS === */

.alchemical-excerpt {
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(180deg, rgba(26, 18, 8, 0.6), rgba(10, 10, 10, 0.8));
  border: 1px solid rgba(197, 151, 62, 0.12);
}

.excerpt-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.excerpt-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 0.4rem;
}

.excerpt-title-sm {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-bright);
  letter-spacing: 0.12em;
}

.excerpt-attribution {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--copper-light);
  letter-spacing: 0.05em;
  font-style: italic;
  line-height: 1.6;
}

.excerpt-text p {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: var(--parchment);
  margin-bottom: 1.2rem;
  text-align: justify;
  text-indent: 1.5em;
  line-height: 1.8;
  opacity: 0.9;
}

.excerpt-text p:first-child {
  text-indent: 0;
}

.excerpt-final {
  text-indent: 0 !important;
  text-align: center !important;
  font-style: italic;
  color: var(--gold) !important;
  margin-top: 1.5rem;
  font-size: 1.1rem !important;
  opacity: 1 !important;
}

/* === FOOTER === */

.site-footer {
  padding: 3rem 0 2rem;
  text-align: center;
  border-top: 1px solid rgba(197, 151, 62, 0.1);
  margin-top: 2rem;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.footer-text.tagline {
  font-style: italic;
  color: var(--gold-dim);
}

/* === RESPONSIVE === */

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .toc-sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(197, 151, 62, 0.15);
    padding: 1.5rem;
  }

  .toc-chapters,
  .toc-act {
    text-align: center;
  }

  .content {
    padding: 2rem 1.5rem;
  }

}

@media (max-width: 600px) {
  .hero {
    min-height: auto;
    padding: 0;
  }

  .hero-content {
    padding: 2rem 1.2rem 1.5rem;
  }

  .screenshot-item img {
    height: 90px;
  }

  .screenshots-strip {
    padding: 0.4rem 0;
  }

  .marquee-track {
    gap: 0.3rem;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: 200px;
  }

  .content {
    padding: 1.5rem 1rem;
  }

  .chapter-text p {
    text-align: left;
  }
}
