@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Cinzel:wght@400;600;700&display=swap');

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

:root {
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --gold-dim: #8a6d2b;
  --storm-dark: #0a0c14;
  --storm-mid: #141829;
  --storm-blue: #1a2040;
  --parchment: #f0e6d3;
  --light-glow: #fffbe6;
}

html { scroll-behavior: smooth; }

body {
  background: var(--storm-dark);
  color: var(--parchment);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

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

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201,168,76,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(26,32,64,0.6) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(10,12,20,0.95) 0%, transparent 100%);
  z-index: 1;
}

/* Animated storm clouds */
.storm-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.storm-layer .cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: drift 20s ease-in-out infinite alternate;
}

.cloud:nth-child(1) { width: 600px; height: 300px; background: #2a3566; top: -5%; left: -10%; animation-duration: 25s; }
.cloud:nth-child(2) { width: 500px; height: 250px; background: #1e2952; top: 10%; right: -5%; animation-duration: 18s; animation-delay: -5s; }
.cloud:nth-child(3) { width: 700px; height: 200px; background: #1a2040; bottom: 20%; left: 20%; animation-duration: 30s; animation-delay: -10s; }
.cloud:nth-child(4) { width: 400px; height: 400px; background: #c9a84c; top: 30%; left: 45%; opacity: 0.04; animation-duration: 22s; }

@keyframes drift {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(40px) translateY(-20px); }
}

/* Lightning flash */
.lightning {
  position: absolute;
  inset: 0;
  z-index: 0;
  animation: flash 8s ease-in-out infinite;
  background: radial-gradient(ellipse at 60% 30%, rgba(255,251,230,0.05), transparent 50%);
}
@keyframes flash {
  0%, 95%, 100% { opacity: 0; }
  96% { opacity: 1; }
  97% { opacity: 0; }
  98% { opacity: 0.7; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-pre {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 1s 0.3s ease forwards;
}

.hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--gold);
  text-shadow: 0 0 60px rgba(201,168,76,0.3), 0 0 120px rgba(201,168,76,0.1);
  margin-bottom: 0.3em;
  opacity: 0;
  animation: fadeUp 1.2s 0.6s ease forwards;
}

.hero-title .amp {
  display: block;
  font-size: 0.4em;
  color: var(--gold-dim);
  letter-spacing: 0.15em;
  margin: 0.2em 0;
}

.hero-author {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.25em;
  color: var(--gold-dim);
  margin-top: 1rem;
  opacity: 0;
  animation: fadeUp 1s 1s ease forwards;
}

.hero-tagline {
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: rgba(240,230,211,0.6);
  margin-top: 2rem;
  opacity: 0;
  animation: fadeUp 1s 1.3s ease forwards;
}

.hero-cta {
  margin-top: 3rem;
  opacity: 0;
  animation: fadeUp 1s 1.6s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-gold {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 0.9em 2.5em;
  text-decoration: none;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.btn-gold::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(201,168,76,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-gold:hover {
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(201,168,76,0.15);
  color: var(--gold-light);
}

.btn-gold:hover::before { transform: translateX(100%); }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0;
  animation: fadeUp 1s 2.2s ease forwards;
}

.scroll-hint span {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold-dim), transparent);
  margin: 0 auto;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.8; } }

/* === DIVIDER === */
.divider {
  text-align: center;
  padding: 2rem 0;
  color: var(--gold-dim);
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  opacity: 0.4;
}

/* === SECTION: ABOUT THE BOOK === */
.section {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 1.5rem;
}

.section h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--gold);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.section p {
  color: rgba(240,230,211,0.75);
  margin-bottom: 1.2em;
}

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

/* === EPIGRAPH === */
.epigraph-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 5rem 2rem;
  text-align: center;
}

.epigraph {
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.8;
  color: rgba(240,230,211,0.5);
  position: relative;
}

.epigraph::before, .epigraph::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold-dim);
  margin: 1.5rem auto;
}

.epigraph-attr {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
  margin-top: 1rem;
}

/* === ABOUT AUTHOR === */
.author-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 3rem;
  align-items: start;
}

.author-portrait {
  width: 180px;
  height: 240px;
  background: linear-gradient(135deg, var(--storm-blue), var(--storm-mid));
  border: 1px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel Decorative', serif;
  font-size: 3rem;
  color: var(--gold-dim);
  opacity: 0.6;
}

.author-bio .section-label { margin-bottom: 0.8rem; }

.author-bio h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.author-bio p { color: rgba(240,230,211,0.65); }

/* === NEWSLETTER === */
.newsletter {
  max-width: 600px;
  margin: 0 auto;
  padding: 5rem 2rem;
  text-align: center;
}

.newsletter h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.newsletter p {
  color: rgba(240,230,211,0.5);
  font-style: italic;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.newsletter-form {
  display: flex;
  gap: 0;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--gold-dim);
  border-right: none;
  padding: 0.8em 1.2em;
  color: var(--parchment);
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

.newsletter-form input::placeholder { color: rgba(201,168,76,0.3); }
.newsletter-form input:focus { border-color: var(--gold); }

.newsletter-form button {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--storm-dark);
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.8em 1.8em;
  cursor: pointer;
  transition: all 0.3s;
}

.newsletter-form button:hover {
  background: var(--gold-light);
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid rgba(201,168,76,0.08);
}

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

.footer-links a {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  text-decoration: none;
  transition: color 0.3s;
}

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

.footer-copy {
  font-size: 0.8rem;
  color: rgba(240,230,211,0.2);
}

/* === COOKIE BANNER === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--storm-mid);
  border-top: 1px solid rgba(201,168,76,0.15);
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.5);
  transform: translateY(0);
  transition: transform 0.5s ease;
}

.cookie-banner.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.cookie-banner p {
  font-family: 'Crimson Text', serif;
  font-size: 0.9rem;
  color: rgba(240,230,211,0.7);
  max-width: 520px;
  line-height: 1.5;
  margin: 0;
}

.cookie-banner a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner a:hover { color: var(--gold-light); }

.cookie-btns {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.7em 1.6em;
  border: 1px solid var(--gold-dim);
  cursor: pointer;
  transition: all 0.3s;
}

.cookie-btn-accept {
  background: var(--gold);
  color: var(--storm-dark);
  border-color: var(--gold);
}

.cookie-btn-accept:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.cookie-btn-decline {
  background: transparent;
  color: var(--gold-dim);
}

.cookie-btn-decline:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.cookie-btn-settings {
  background: transparent;
  color: var(--gold-dim);
  border-color: rgba(201,168,76,0.2);
}

.cookie-btn-settings:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}

/* === EMAIL VALIDATION STATES === */
.newsletter-form input.error {
  border-color: #a33;
  box-shadow: 0 0 10px rgba(170,51,51,0.2);
}

.newsletter-form input.success {
  border-color: var(--gold);
}

.form-message {
  margin-top: 1rem;
  font-family: 'Crimson Text', serif;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.form-message.error { color: #c55; }
.form-message.success { color: var(--gold); font-family: 'Cinzel', serif; font-size: 0.85rem; letter-spacing: 0.05em; }

.form-submitting button {
  opacity: 0.6;
  pointer-events: none;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .author-section {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .author-portrait { margin: 0 auto; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { border-right: 1px solid var(--gold-dim); border-bottom: none; }
  .cookie-banner { flex-direction: column; text-align: center; padding: 1.5rem; }
  .cookie-btns { justify-content: center; }
}
