/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== ROOT THEME (default = hub/gold) ===== */
:root {
  --black:      #07070a;
  --deep:       #0b0b0f;
  --surface:    #101015;
  --card:       #13131a;
  --border:     #1e1e28;
  --accent:     #c9a84c;
  --accent-dim: #8a6e2e;
  --accent-pale:#e8d08a;
  --text:       #d8d0c4;
  --text-dim:   #9a8e7e;
  --text-faint: #4a4438;
  --white:      #f0ebe0;
  --link:       #6a9abf;
}

/* ===== THEME OVERRIDES ===== */
[data-theme="protocol"] {
  --accent:     #c9a84c;
  --accent-dim: #8a6e2e;
  --accent-pale:#e8d08a;
  --text:       #d8d0c4;
  --text-dim:   #9a8e7e;
  --text-faint: #4a4438;
  --white:      #f0ebe0;
}

[data-theme="directive"] {
  --black:      #07080a;
  --deep:       #0a0c0f;
  --surface:    #0f1215;
  --card:       #12161a;
  --border:     #1c2228;
  --accent:     #8fb8d4;
  --accent-dim: #4a7a9a;
  --accent-pale:#c0d8e8;
  --text:       #ccd6de;
  --text-dim:   #7a8a94;
  --text-faint: #3a4248;
  --white:      #e8f0f6;
}

[data-theme="sequence"] {
  --black:      #06070a;
  --deep:       #090b0f;
  --surface:    #0d1016;
  --card:       #10141c;
  --border:     #1a2030;
  --accent:     #c4a45a;
  --accent-dim: #7a6030;
  --accent-pale:#e8d090;
  --text:       #c4ccdc;
  --text-dim:   #707a94;
  --text-faint: #303848;
  --white:      #e4ecf8;
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; }
body {
  background-color: var(--black);
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.8;
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
  font-family: 'Cinzel', serif;
  color: var(--white);
  letter-spacing: 2px;
  line-height: 1.2;
}
h1 { font-size: clamp(32px, 5vw, 64px); font-weight: 600; letter-spacing: 5px; }
h2 { font-size: clamp(22px, 3.5vw, 36px); font-weight: 400; letter-spacing: 4px; }
h3 { font-size: clamp(18px, 2.5vw, 26px); font-weight: 400; letter-spacing: 2px; }

a { color: var(--link); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-pale); }

em { font-style: italic; color: var(--white); }
strong { font-weight: 600; color: var(--white); }

/* ===== LABELS & EYEBROWS ===== */
.eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
}

.label {
  font-family: 'Raleway', sans-serif;
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.6;
}

.meta {
  font-family: 'Raleway', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ===== SHARED SECTION STYLES ===== */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-rule {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 20px auto 0;
  opacity: 0.25;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 40px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(201,168,76,0.04) 0%, transparent 70%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 70%);
}

.hero-title {
  margin-bottom: 8px;
  animation: fade-up 1s ease 0.15s both;
}
.hero-title span { color: var(--accent); }

.hero-subtitle {
  font-family: 'Cinzel', serif;
  font-size: clamp(13px, 2vw, 20px);
  font-weight: 400;
  color: var(--accent-dim);
  letter-spacing: 8px;
  text-transform: uppercase;
  margin-bottom: 40px;
  animation: fade-up 1s ease 0.3s both;
}

.hero-rule {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 40px;
  opacity: 0.3;
  animation: expand 1.2s ease 0.5s both;
}

.hero-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(16px, 2.2vw, 21px);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  max-width: 640px;
  margin: 0 auto 20px;
  line-height: 1.7;
  animation: fade-up 1s ease 0.45s both;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fade-up 1s ease 1s both;
}
.hero-scroll span {
  font-family: 'Raleway', sans-serif;
  font-size: 8px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-faint);
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-dim), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

/* ===== CTA BUTTON ===== */
.cta {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(201,168,76,0.35);
  padding: 16px 36px;
  text-decoration: none;
  transition: all 0.3s;
}
.cta:hover {
  background: rgba(201,168,76,0.06);
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== CARDS ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 40px 36px;
  position: relative;
  transition: border-color 0.3s;
}
.card:hover { border-color: rgba(201,168,76,0.2); }

.card-featured {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 64px;
  position: relative;
  overflow: hidden;
}
.card-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--black);
  background: var(--accent);
  padding: 6px 14px;
  margin-bottom: 24px;
}

/* ===== PREMISE GRID ===== */
.premise {
  padding: 100px 0;
  background: var(--deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.premise-grid {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  gap: 0 60px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}
.premise-divider {
  background: linear-gradient(to bottom, transparent, var(--accent-dim), transparent);
  height: 200px;
  opacity: 0.2;
}
.premise-text {
  font-size: 19px;
  font-weight: 300;
  line-height: 1.9;
}

/* ===== PROTAGONIST ===== */
.protagonist {
  padding: 120px 0;
  background: var(--deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.protagonist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}
.prot-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 400;
  color: var(--white);
  letter-spacing: 3px;
  line-height: 1.1;
  margin-bottom: 6px;
}
.prot-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-style: italic;
  color: var(--accent-dim);
  letter-spacing: 1px;
  margin-bottom: 28px;
  opacity: 0.8;
}
.prot-rule {
  width: 30px;
  height: 1px;
  background: var(--accent);
  opacity: 0.25;
  margin-bottom: 28px;
}
.prot-bio {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.9;
  margin-bottom: 36px;
}
.prot-traits { display: flex; flex-direction: column; gap: 14px; }
.prot-trait {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.prot-trait:last-child { border-bottom: none; }
.trait-label {
  font-family: 'Raleway', sans-serif;
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-dim);
  opacity: 0.6;
  min-width: 88px;
  padding-top: 3px;
  flex-shrink: 0;
}
.trait-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  color: var(--text);
  line-height: 1.6;
}

/* ===== NEWSLETTER ===== */
.newsletter {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.newsletter-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 48px;
  text-align: center;
}
.newsletter-title {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 3px;
  margin-bottom: 16px;
}
.newsletter-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: 40px;
  line-height: 1.7;
}
.newsletter-form { display: flex; }
.newsletter-input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-right: none;
  color: var(--white);
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  padding: 16px 20px;
  outline: none;
  transition: border-color 0.3s;
}
.newsletter-input::placeholder { color: var(--text-faint); }
.newsletter-input:focus { border-color: rgba(201,168,76,0.3); }
.newsletter-btn {
  background: var(--accent);
  border: none;
  color: var(--black);
  font-family: 'Raleway', sans-serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  padding: 16px 24px;
  cursor: pointer;
  transition: background 0.3s;
  white-space: nowrap;
}
.newsletter-btn:hover { background: var(--accent-pale); }
.newsletter-note {
  font-family: 'Raleway', sans-serif;
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 16px;
}
.newsletter-msg {
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--accent);
  margin-top: 12px;
  display: none;
}

/* ===== UNIVERSE SERIES ROW ===== */
.universe-series-row {
  display: flex;
  justify-content: center;
  margin: 56px 0;
}
.universe-series-item {
  padding: 28px 40px;
  border: 1px solid var(--border);
  text-align: center;
  flex: 1;
  max-width: 220px;
  transition: border-color 0.3s;
}
.universe-series-item:not(:last-child) { border-right: none; }
.universe-series-item.active {
  border-color: rgba(201,168,76,0.3);
  background: rgba(201,168,76,0.03);
}
.series-item-label {
  font-family: 'Raleway', sans-serif;
  font-size: 7px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.5;
  margin-bottom: 8px;
}
.series-item-name {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  color: var(--white);
  letter-spacing: 2px;
  opacity: 0.5;
}
.universe-series-item.active .series-item-name { color: var(--accent); opacity: 1; }
.universe-series-item.active .series-item-label { color: var(--accent-dim); opacity: 0.7; }

/* ===== BOOK COMPONENTS ===== */
.book-num {
  font-family: 'Raleway', sans-serif;
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 14px;
}
.book-title-large {
  font-family: 'Cinzel', serif;
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 400;
  color: var(--white);
  letter-spacing: 3px;
  line-height: 1.1;
  margin-bottom: 8px;
}
.book-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-style: italic;
  font-weight: 300;
  color: var(--accent-dim);
  letter-spacing: 1px;
  margin-bottom: 28px;
  opacity: 0.8;
}
.book-rule {
  width: 30px;
  height: 1px;
  background: var(--accent);
  opacity: 0.25;
  margin-bottom: 28px;
}
.book-synopsis {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.9;
  max-width: 680px;
  margin-bottom: 36px;
}
.book-meta-row { display: flex; gap: 40px; flex-wrap: wrap; }
.book-meta-item { display: flex; flex-direction: column; gap: 4px; }
.book-meta-label {
  font-family: 'Raleway', sans-serif;
  font-size: 7px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.6;
}
.book-meta-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: var(--text);
}

.books-coming {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.book-card-num {
  font-family: 'Cinzel', serif;
  font-size: 52px;
  font-weight: 600;
  color: rgba(201,168,76,0.05);
  line-height: 1;
  margin-bottom: 16px;
}
.book-card-title {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 1px;
  line-height: 1.3;
  margin-bottom: 16px;
  opacity: 0.6;
}
.book-card-desc {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 300;
  font-style: italic;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 24px;
}
.book-card-date {
  font-family: 'Raleway', sans-serif;
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-dim);
  opacity: 0.5;
}

/* ===== BUY LINKS ===== */
.buy-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.buy-link {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(201,168,76,0.3);
  padding: 12px 24px;
  transition: all 0.3s;
}
.buy-link:hover {
  background: rgba(201,168,76,0.06);
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== ANIMATIONS ===== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes expand {
  from { width: 0; opacity: 0; }
  to { width: 60px; opacity: 0.3; }
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}
@keyframes node-pulse {
  0%, 100% { opacity: 0.08; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.8); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .section-inner,
  .premise-grid,
  .newsletter-inner,
  .protagonist-grid { padding: 0 24px; }
  .premise-grid { grid-template-columns: 1fr; }
  .premise-divider { display: none; }
  .card-featured { padding: 36px 24px; }
  .books-coming { grid-template-columns: 1fr; }
  .protagonist-grid { grid-template-columns: 1fr; gap: 48px; }
  .universe-series-row { flex-direction: column; align-items: center; }
  .universe-series-item { max-width: 100%; width: 100%; }
  .universe-series-item:not(:last-child) { border-right: 1px solid var(--border); border-bottom: none; }
  .newsletter-form { flex-direction: column; }
  .newsletter-input { border-right: 1px solid var(--border); border-bottom: none; }
}
