/* === Variables === */
:root {
  --bg:           #09071A;
  --bg2:          #0D0B22;
  --bg3:          #110F2A;
  --purple:       #7B35FF;
  --purple-light: #A855F7;
  --purple-dark:  #3D1A80;
  --teal:         #14B8A6;
  --teal-light:   #2DD4BF;
  --green:        #4ADE80;
  --text:         #C8C4E0;
  --text-bright:  #EAE6FF;
  --font-display: 'Cinzel', Georgia, serif;
  --font-body:    'Crimson Text', Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* === Notice Banner === */
.notice {
  position: relative;
  z-index: 100;
  max-width: 720px;
  margin: 20px auto 0;
  padding: 13px 18px;
  background: rgba(123, 53, 255, 0.12);
  border: 1px solid rgba(123, 53, 255, 0.35);
  border-radius: 6px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-bright);
}

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(to bottom,
      rgba(9,7,26,0.45) 0%,
      rgba(9,7,26,0.65) 50%,
      rgba(9,7,26,0.97) 100%),
    url('assets/back_cover.png') center bottom / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 120px;
  overflow: hidden;
}

/* Purple spirit glow from below */
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(123,53,255,0.18) 0%, transparent 70%);
  pointer-events: none;
}

/* Particles */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  bottom: -8px;
  border-radius: 50%;
  animation: particle-rise linear forwards;
}

@keyframes particle-rise {
  0%   { transform: translateY(0)       translateX(0);             opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 0.5; }
  100% { transform: translateY(-105vh)  translateX(var(--drift, 0px)); opacity: 0; }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.pre-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--teal-light);
  opacity: 0.75;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 5.5rem;
  font-weight: 700;
  letter-spacing: 10px;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
  margin-bottom: 14px;
  text-shadow:
    0 0 25px rgba(123,53,255,0.9),
    0 0 60px rgba(123,53,255,0.5),
    0 0 120px rgba(123,53,255,0.25);
}

.subtitle {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 4px;
  color: var(--teal-light);
  margin-bottom: 32px;
}

.tagline {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.9;
  color: var(--text);
  opacity: 0.88;
  margin-bottom: 44px;
}

/* Buttons */
.buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 34px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 3px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn.primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 0 22px rgba(123,53,255,0.45), 0 4px 14px rgba(0,0,0,0.4);
}

.btn.primary:hover {
  background: var(--purple-light);
  box-shadow: 0 0 35px rgba(123,53,255,0.75), 0 6px 20px rgba(0,0,0,0.5);
  transform: translateY(-3px);
}

.btn.secondary {
  background: transparent;
  color: var(--teal-light);
  border: 1px solid rgba(20,184,166,0.55);
  box-shadow: 0 0 14px rgba(20,184,166,0.15);
}

.btn.secondary:hover {
  background: rgba(20,184,166,0.1);
  border-color: var(--teal-light);
  box-shadow: 0 0 28px rgba(20,184,166,0.35);
  transform: translateY(-3px);
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--teal-light), transparent);
  animation: scroll-pulse 2.2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.9); }
  50%       { opacity: 0.9;  transform: scaleY(1.1); }
}

/* === Scroll fade-in === */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Section divider line === */
.section-top-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--purple-dark), transparent);
}

/* === Book Section === */
.book-section {
  position: relative;
  padding: 110px 48px;
  background: var(--bg2);
}

.book-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--purple-dark), transparent);
}

.book-container {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 80px;
  align-items: start;
}

/* Cover */
.book-cover-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.book-cover-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(ellipse at center,
    rgba(123,53,255,0.28) 0%,
    rgba(20,184,166,0.1) 45%,
    transparent 70%);
  filter: blur(24px);
  z-index: 0;
  border-radius: 50%;
}

.book-cover {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 320px;
  border-radius: 4px;
  box-shadow:
    -4px 4px 0 1px rgba(0,0,0,0.6),
    0 0 0 1px rgba(123,53,255,0.25),
    0 24px 70px rgba(0,0,0,0.75),
    0 0 45px rgba(123,53,255,0.22);
  transform: perspective(900px) rotateY(-4deg);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.book-cover:hover {
  transform: perspective(900px) rotateY(0deg) translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(123,53,255,0.45),
    0 32px 90px rgba(0,0,0,0.8),
    0 0 60px rgba(123,53,255,0.32);
}

.cover-buy-button {
  position: relative;
  z-index: 1;
  margin-top: 28px;
}

/* Book text */
.book-label {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}

.book-text h2 {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.25;
  margin-bottom: 22px;
}

.book-divider {
  width: 56px;
  height: 2px;
  background: linear-gradient(to right, var(--purple), var(--teal));
  margin-bottom: 28px;
  border-radius: 1px;
}

.book-text p {
  font-size: 1.15rem;
  line-height: 1.95;
  color: var(--text);
  margin-bottom: 14px;
}

.book-text .ominous {
  margin-top: 28px;
  padding-left: 22px;
  border-left: 2px solid rgba(123,53,255,0.4);
}

.book-text .ominous p {
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.85;
  color: rgba(200,196,224,0.72);
  margin-bottom: 14px;
}

.book-text .ominous p:last-child {
  margin-bottom: 0;
}

.book-text .ominous em {
  color: var(--teal-light);
  font-style: normal;
}

/* === Archive Links === */
.archive-section {
  position: relative;
  padding: 86px 48px;
  background: var(--bg);
}

.archive-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--purple-dark), transparent);
}

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

.archive-inner h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.25;
  margin-bottom: 22px;
}

.archive-inner .book-divider {
  margin-left: auto;
  margin-right: auto;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.archive-grid a {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 1px solid rgba(123,53,255,0.26);
  border-radius: 6px;
  color: var(--text-bright);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 1.6px;
  line-height: 1.5;
  text-transform: uppercase;
  text-decoration: none;
  background: rgba(13,11,34,0.64);
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.archive-grid a:hover {
  border-color: rgba(20,184,166,0.58);
  color: var(--teal-light);
  transform: translateY(-3px);
}

/* === Quote Section === */
.quote-section {
  position: relative;
  padding: 90px 48px;
  background: var(--bg);
  overflow: hidden;
}

.quote-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%,
    rgba(20,184,166,0.06) 0%,
    transparent 65%);
  pointer-events: none;
}


.quote-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

blockquote {
  position: relative;
}

blockquote::before {
  content: '\201C';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 6rem;
  line-height: 1;
  color: var(--teal);
  opacity: 0.18;
  pointer-events: none;
}

blockquote p {
  font-family: var(--font-body);
  font-size: 1.45rem;
  font-style: italic;
  line-height: 1.85;
  color: var(--text-bright);
  margin-bottom: 24px;
}

blockquote cite {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--teal);
  opacity: 0.8;
}

/* === Author Section === */
.author-section {
  position: relative;
  padding: 105px 48px;
  background:
    radial-gradient(ellipse at 18% 25%, rgba(123,53,255,0.09) 0%, transparent 42%),
    radial-gradient(ellipse at 82% 70%, rgba(20,184,166,0.07) 0%, transparent 46%),
    var(--bg2);
  overflow: hidden;
}

.author-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--purple-dark), transparent);
}

.author-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.author-label {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}

.author-inner h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.25;
  margin-bottom: 22px;
}

.author-inner p {
  font-size: 1.15rem;
  line-height: 1.95;
  color: var(--text);
  margin-bottom: 14px;
}

.author-inner p:last-child {
  margin-bottom: 0;
}

.author-inner em {
  color: var(--teal-light);
}

/* === Signup Section === */
.signup {
  position: relative;
  padding: 110px 48px;
  background: var(--bg3);
  overflow: hidden;
}

.signup::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%,
    rgba(123,53,255,0.1) 0%,
    transparent 60%);
  pointer-events: none;
}

.signup::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--purple-dark), transparent);
}

.signup-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.signup-ornament {
  display: inline-block;
  font-size: 1.4rem;
  color: var(--teal);
  margin-bottom: 22px;
  animation: ornament-spin 12s linear infinite;
}

@keyframes ornament-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.signup h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-bright);
  margin-bottom: 14px;
}

.signup p {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text);
  opacity: 0.8;
  margin-bottom: 38px;
}

.signup p em {
  color: var(--teal-light);
  font-style: italic;
}

.signup form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.signup input[type="email"] {
  width: 100%;
  max-width: 400px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(123,53,255,0.3);
  border-radius: 3px;
  color: var(--text-bright);
  font-family: var(--font-body);
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.signup input[type="email"]::placeholder {
  color: rgba(200,196,224,0.35);
}

.signup input[type="email"]:focus {
  border-color: rgba(20,184,166,0.6);
  box-shadow: 0 0 18px rgba(20,184,166,0.18);
}

.signup button {
  padding: 14px 44px;
  background: var(--teal);
  color: #09071A;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  box-shadow: 0 0 22px rgba(20,184,166,0.35);
}

.signup button:hover {
  background: var(--teal-light);
  box-shadow: 0 0 36px rgba(20,184,166,0.55);
  transform: translateY(-3px);
}

.g-recaptcha {
  display: flex;
  justify-content: center;
}

/* === Footer === */
footer {
  padding: 44px 24px;
  text-align: center;
  background: var(--bg);
  border-top: 1px solid rgba(123,53,255,0.12);
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 5px;
  color: rgba(255,255,255,0.18);
  margin-bottom: 10px;
}

.footer-copy {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(200,196,224,0.35);
  margin-bottom: 10px;
}

.footer-links {
  margin-top: 6px;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--teal);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.divider {
  margin: 0 10px;
  opacity: 0.25;
  color: var(--text);
}

/* === Lore / CRM-managed pages === */
.lore-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 18% 8%, rgba(123,53,255,0.16) 0%, transparent 38%),
    radial-gradient(ellipse at 84% 18%, rgba(20,184,166,0.1) 0%, transparent 36%),
    var(--bg);
  padding: 28px 24px 90px;
}

.lore-nav {
  max-width: 1120px;
  margin: 0 auto 70px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lore-nav a {
  padding: 8px 12px;
  border: 1px solid rgba(123,53,255,0.22);
  border-radius: 4px;
  color: rgba(200,196,224,0.72);
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  text-decoration: none;
}

.lore-nav a:hover,
.lore-nav a[aria-current="page"] {
  color: var(--teal-light);
  border-color: rgba(20,184,166,0.5);
  background: rgba(20,184,166,0.08);
}

.lore-hero {
  max-width: 820px;
  margin: 0 auto 60px;
  text-align: center;
}

.lore-hero h1 {
  font-family: var(--font-display);
  font-size: 3.3rem;
  line-height: 1.1;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--text-bright);
  margin-bottom: 18px;
  text-shadow: 0 0 35px rgba(123,53,255,0.55);
}

.lore-hero p:last-child {
  font-size: 1.25rem;
  line-height: 1.75;
  opacity: 0.86;
}

.lore-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.lore-grid.chapter-layout {
  max-width: 820px;
  grid-template-columns: 1fr;
}

.lore-card {
  border: 1px solid rgba(123,53,255,0.22);
  border-radius: 8px;
  background: rgba(13,11,34,0.78);
  padding: 28px;
}

.lore-kicker {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}

.lore-card h2,
.lore-empty h1,
.lore-empty h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.25;
  color: var(--text-bright);
  margin-bottom: 14px;
}

.lore-summary {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 16px;
}

.lore-body {
  font-size: 1.08rem;
  line-height: 1.9;
  color: rgba(200,196,224,0.86);
}

.chapter-reading .lore-body {
  max-width: 65ch;
  margin: 0 auto;
  overflow-wrap: break-word;
}

.chapter-reading .lore-body p + p {
  margin-top: 1.1em;
}

.chapter-closing {
  text-align: center;
}

.chapter-closing > p {
  font-size: 1.1rem;
  line-height: 1.75;
  margin-bottom: 24px;
}

.chapter-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.lore-footnote {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(123,53,255,0.18);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(45,212,191,0.78);
}

.lore-empty {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  padding: 50px 28px;
  border: 1px solid rgba(123,53,255,0.22);
  border-radius: 8px;
  background: rgba(13,11,34,0.72);
}

.lore-empty p {
  font-size: 1.1rem;
  line-height: 1.7;
}

/* === Responsive === */
@media (max-width: 960px) {
  .book-container {
    grid-template-columns: 1fr;
    gap: 52px;
    text-align: center;
  }

  .book-cover-wrap {
    max-width: 260px;
    margin: 0 auto;
  }

  .book-cover {
    transform: perspective(900px) rotateY(0deg);
  }

  .book-divider {
    margin-left: auto;
    margin-right: auto;
  }

  .book-text .ominous {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 3rem;
    letter-spacing: 6px;
  }

  .subtitle {
    font-size: 1.1rem;
    letter-spacing: 2px;
  }

  .tagline {
    font-size: 1.1rem;
  }

  .book-section,
  .archive-section,
  .quote-section,
  .author-section,
  .signup {
    padding-left: 24px;
    padding-right: 24px;
  }

  .book-section { padding-top: 70px; padding-bottom: 70px; }
  .archive-section { padding-top: 62px; padding-bottom: 62px; }
  .quote-section { padding-top: 60px; padding-bottom: 60px; }
  .author-section { padding-top: 70px; padding-bottom: 70px; }
  .signup { padding-top: 70px; padding-bottom: 70px; }

  .book-text h2 { font-size: 1.8rem; }
  .archive-inner h2 { font-size: 1.65rem; }
  .author-inner h2 { font-size: 1.8rem; }
  blockquote p  { font-size: 1.2rem; }
  .signup h2    { font-size: 1.6rem; }
  .lore-page { padding-left: 18px; padding-right: 18px; }
  .lore-nav { justify-content: flex-start; margin-bottom: 48px; }
  .lore-hero h1 { font-size: 2.25rem; letter-spacing: 3px; }
  .lore-grid { grid-template-columns: 1fr; }
  .lore-card { padding: 22px; }
}

@media (max-width: 900px) {
  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .archive-grid {
    grid-template-columns: 1fr;
  }
}
