/* ============================================
   TRANCE HISTORY — GLOBAL STYLES
   Cerulean-dominant, orange reserved for
   high-impact narrative moments only.
   Typography: Syne (headings) + JetBrains Mono (labels/accents)
   ============================================ */

:root {
  /* Brand colors — inverted balance from UGT */
  --th-cerulean: #1a8ccc;
  --th-cerulean-light: #5db3e0;
  --th-cerulean-dark: #0f5c85;
  --th-orange: #ff5e14;       /* sparing use only */
  --th-black: #0a0a0a;
  --th-charcoal: #14181c;
  --th-text: #f2f2f2;
  --th-text-muted: rgba(242, 242, 242, 0.7);
  --th-text-faint: rgba(242, 242, 242, 0.5);
  --th-border: rgba(26, 140, 204, 0.25);
}

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

body {
  background: var(--th-black);
  color: var(--th-text);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}

a {
  color: var(--th-cerulean);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--th-cerulean-light);
}

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

.th-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.th-placeholder {
  border: 1px dashed rgba(255, 94, 20, 0.5);
  background: rgba(255, 94, 20, 0.05);
  color: var(--th-orange);
  padding: 1.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
}

/* ============================================
   NAVIGATION
   ============================================ */
.th-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--th-border);
  z-index: 1000;
}

.th-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.th-logo-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-variant: small-caps;
  font-size: 1.4rem;
  letter-spacing: 0.15em;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.th-logo-text .th-logo-trance {
  color: var(--th-text);
}

.th-logo-text .th-logo-history {
  color: var(--th-cerulean);
}

.th-logo-text .th-logo-org {
  color: var(--th-text);
}

.th-logo:hover .th-logo-text {
  filter: drop-shadow(0 0 8px rgba(26, 140, 204, 0.5));
  opacity: 0.85;
}

/* Footer uses a larger version of the same text logo */
.th-footer-logo .th-logo-text {
  font-size: 2rem;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.th-nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.th-nav-links a {
  color: var(--th-text);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.th-nav-links a:hover {
  color: var(--th-cerulean);
  text-shadow: 0 0 10px rgba(26, 140, 204, 0.6);
}

/* ============================================
   HOMEPAGE HERO
   ============================================ */
.th-hero {
  padding: 12rem 2rem 6rem;
  text-align: center;
}

.th-hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--th-cerulean) 0%, var(--th-cerulean-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.th-hero-copy {
  max-width: 700px;
  margin: 0 auto 2.5rem;
  font-size: 1.1rem;
  color: var(--th-text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.th-hero-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: 2px solid var(--th-cerulean);
  color: var(--th-cerulean);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.th-hero-cta:hover {
  background: var(--th-cerulean);
  color: var(--th-black);
}

/* ============================================
   FIVE ERAS INDEX (Homepage)
   ============================================ */
.th-eras-section {
  padding: 4rem 2rem;
}

.th-eras-heading {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 3rem;
  color: var(--th-text);
}

.th-eras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.th-era-card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--th-border);
  transition: all 0.4s ease;
}

.th-era-card:hover {
  border-color: var(--th-cerulean);
  background: rgba(26, 140, 204, 0.06);
  transform: translateY(-5px);
}

.th-era-number {
  font-size: 0.8rem;
  color: var(--th-cerulean);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.th-era-year {
  font-size: 0.8rem;
  color: var(--th-text-faint);
  margin-bottom: 0.75rem;
}

.th-era-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--th-text);
}

.th-era-excerpt {
  font-size: 0.9rem;
  color: var(--th-text-muted);
}

/* ============================================
   ABOUT TEASER (Homepage)
   ============================================ */
.th-about-teaser {
  padding: 4rem 2rem;
  text-align: center;
  border-top: 1px solid var(--th-border);
}

/* ============================================
   PART PAGE — HEADER
   ============================================ */
.th-part-page {
  padding: 10rem 2rem 4rem;
}

.th-part-container {
  max-width: 900px;
  margin: 0 auto;
}

.th-part-label {
  font-size: 0.85rem;
  color: var(--th-cerulean);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: bold;
  margin-bottom: 1rem;
}

.th-part-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--th-cerulean) 0%, var(--th-cerulean-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.th-part-intro {
  font-size: 1.05rem;
  color: var(--th-text-muted);
  margin-bottom: 2.5rem;
}

/* ============================================
   EDITORIAL TABLE OF CONTENTS
   ============================================ */
.th-toc {
  background: rgba(26, 140, 204, 0.05);
  border-left: 3px solid var(--th-cerulean);
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
}

.th-toc-heading {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--th-cerulean);
  margin-bottom: 0.75rem;
}

.th-toc ul {
  list-style: none;
}

.th-toc li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.th-toc a {
  color: var(--th-text-muted);
}

.th-toc a:hover {
  color: var(--th-cerulean);
}

/* ============================================
   CHAPTER CARDS (Modular — not labeled "modules")
   ============================================ */
.th-chapters {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.th-chapter-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--th-border);
  transition: all 0.4s ease;
  overflow: hidden;
}

.th-chapter-card:hover {
  border-color: var(--th-cerulean);
  background: rgba(26, 140, 204, 0.04);
}

.th-chapter-header {
  padding: 1.75rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.th-chapter-number {
  font-size: 0.75rem;
  color: var(--th-cerulean);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: bold;
  margin-bottom: 0.4rem;
}

.th-chapter-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  color: var(--th-text);
  line-height: 1.3;
}

.th-chapter-excerpt {
  font-size: 0.95rem;
  color: var(--th-text-muted);
  margin-top: 0.5rem;
}

.th-chapter-icon {
  color: var(--th-cerulean);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.th-chapter-card.expanded .th-chapter-icon {
  transform: rotate(180deg);
}

.th-chapter-content {
  padding: 0 1.75rem 1.75rem;
  display: none;
}

.th-chapter-card.expanded .th-chapter-content {
  display: block;
}

.th-chapter-text {
  font-size: 1rem;
  color: var(--th-text-muted);
  margin-bottom: 1.25rem;
}

.th-read-more {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border: 1px solid var(--th-cerulean);
  color: var(--th-cerulean);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.th-read-more:hover {
  background: var(--th-cerulean);
  color: var(--th-black);
}

/* ============================================
   HIGH-IMPACT MOMENT (orange accent — sparing use)
   Use for pivotal narrative beats only,
   e.g. the jilted-bride pivot in Part IV
   ============================================ */
.th-pivot-moment {
  border-left: 3px solid var(--th-orange);
  background: rgba(255, 94, 20, 0.05);
  padding: 2rem;
  margin: 2.5rem 0;
  font-style: italic;
}

/* ============================================
   CONTINUE / NEXT PART
   ============================================ */
.th-continue {
  margin-top: 3rem;
  padding: 2rem;
  background: rgba(26, 140, 204, 0.06);
  border: 1px solid var(--th-cerulean);
  text-align: center;
}

.th-continue-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  color: var(--th-cerulean);
  margin-bottom: 0.75rem;
}

.th-continue-text {
  color: var(--th-text-muted);
  margin-bottom: 1.25rem;
}

.th-continue-button {
  display: inline-block;
  padding: 0.9rem 2rem;
  border: 2px solid var(--th-cerulean);
  color: var(--th-cerulean);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.th-continue-button:hover {
  background: var(--th-cerulean);
  color: var(--th-black);
}

/* Final chapter (Part V) — closing statement instead of "continue" */
.th-closing {
  margin-top: 3rem;
  padding: 2.5rem;
  text-align: center;
  border-top: 1px solid var(--th-border);
}

.th-closing-text {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  color: var(--th-cerulean-light);
  font-style: italic;
}

/* ============================================
   GENERIC INNER PAGE (About, Sources, Contact)
   ============================================ */
.th-page {
  padding: 10rem 2rem 4rem;
}

.th-page-container {
  max-width: 800px;
  margin: 0 auto;
}

.th-page-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  text-transform: uppercase;
  margin-bottom: 2rem;
  color: var(--th-cerulean);
}

/* ============================================
   FOOTER
   ============================================ */
.th-footer {
  padding: 4rem 2rem 2rem;
  border-top: 1px solid var(--th-border);
  text-align: center;
}

.th-footer-logo img {
  height: 90px;
  width: auto;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.th-footer-tagline {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  color: var(--th-text-muted);
  font-size: 0.9rem;
}

.th-footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.th-footer-links a {
  color: var(--th-text-faint);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.th-footer-links a:hover {
  color: var(--th-cerulean);
}

.th-footer-copyright {
  color: var(--th-text-faint);
  font-size: 0.8rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .th-nav-links {
    display: none;
  }

  .th-hero {
    padding: 8rem 1.5rem 4rem;
  }

  .th-part-page,
  .th-page {
    padding: 8rem 1.5rem 3rem;
  }

  .th-eras-section {
    padding: 3rem 1.5rem;
  }

  .th-chapter-header {
    padding: 1.25rem;
  }

  .th-chapter-content {
    padding: 0 1.25rem 1.25rem;
  }
}
