/*
  ╔══════════════════════════════════════════════════════════════════╗
  ║  LORD OF WATER — Book I                                          ║
  ║  Shared Stylesheet — lordofwater.css                             ║
  ║  Upload to: lordofwater.com/chapters/lordofwater.css             ║
  ║                                                                  ║
  ║  To edit styles across ALL chapter pages, edit this file only.   ║
  ║  Changes apply instantly to all 18 pages without re-uploading.   ║
  ╚══════════════════════════════════════════════════════════════════╝
*/

/* ── CSS Variables — edit colours here ────────────────────────────── */
:root {
  --deep:    #060d18;   /* page background — darkest */
  --ocean:   #0a1f3a;   /* sidebar background */
  --mid:     #1a3a5c;   /* borders, scrollbar */
  --wave:    #2a6a9a;   /* progress bar start, hover accents */
  --seafoam: #4a9fc8;   /* nav unlocked, links, labels */
  --gold:    #c8a84b;   /* headings, current nav, chapter numbers */
  --gold-lt: #e8cc7a;   /* gold hover / lighter gold */
  --text:    #d8e8f0;   /* body text */
  --muted:   #7a9ab8;   /* meta text, subtitles */
  --locked:  #2a3a4a;   /* locked nav items */
}

/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Base body ─────────────────────────────────────────────────────── */
body {
  background: var(--deep);
  color: var(--text);
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 18px;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Atmospheric background glow ───────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(10,31,58,0.8) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(26,58,92,0.4) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Animated ocean wave footer ────────────────────────────────────── */
.wave-bg {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  z-index: 0;
  opacity: 0.15;
  overflow: hidden;
}
.wave-bg svg {
  width: 200%;
  animation: wave-scroll 12s linear infinite;
}
@keyframes wave-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Site header ───────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(6,13,24,0.98), rgba(6,13,24,0.85));
  border-bottom: 1px solid rgba(200,168,75,0.3);
  backdrop-filter: blur(12px);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-decoration: none;
}
.site-logo span {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8rem;
  display: block;
  letter-spacing: 0.1em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-buy {
  font-family: 'Raleway', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--deep);
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.45rem 1.2rem;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-buy:hover {
  background: var(--gold-lt);
  border-color: var(--gold-lt);
}

/* ── Reading progress bar ──────────────────────────────────────────── */
.progress-bar {
  position: fixed;
  top: 64px; left: 260px; right: 0;
  height: 2px;
  background: rgba(42,106,154,0.15);
  z-index: 89;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--wave), var(--gold));
  transition: width 0.1s;
}

/* ── Sidebar navigation ────────────────────────────────────────────── */
.progress-nav {
  position: fixed;
  left: 0; top: 64px; bottom: 0;
  width: 260px;
  background: rgba(6,13,24,0.95);
  border-right: 1px solid rgba(42,106,154,0.2);
  overflow-y: auto;
  z-index: 90;
  padding: 1.5rem 0 2rem;
  transition: transform 0.3s ease;
}
.progress-nav::-webkit-scrollbar { width: 4px; }
.progress-nav::-webkit-scrollbar-track { background: transparent; }
.progress-nav::-webkit-scrollbar-thumb { background: var(--mid); border-radius: 2px; }

.nav-title {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 0 1.5rem 1rem;
  border-bottom: 1px solid rgba(42,106,154,0.2);
  margin-bottom: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.5rem;
  text-decoration: none;
  font-family: 'Raleway', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-item.unlocked { color: var(--text); cursor: pointer; }
.nav-item.unlocked:hover {
  background: rgba(42,106,154,0.15);
  border-left-color: var(--seafoam);
  color: var(--seafoam);
}
.nav-item.current {
  background: rgba(42,106,154,0.2);
  border-left-color: var(--gold);
  color: var(--gold);
  font-weight: 500;
}
.nav-item.locked {
  color: var(--locked);
  cursor: default;
  pointer-events: none;
}

.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-item.unlocked .nav-icon { color: var(--seafoam); }
.nav-item.current  .nav-icon { color: var(--gold); }
.nav-item.locked   .nav-icon { color: var(--locked); }

.nav-chapter-num {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  color: var(--muted);
  display: block;
}
.nav-item.locked .nav-chapter-num { color: var(--locked); }

/* ── Mobile nav toggle ─────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  position: fixed;
  top: 72px; left: 1rem;
  z-index: 95;
  background: var(--ocean);
  border: 1px solid rgba(42,106,154,0.4);
  color: var(--seafoam);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

/* ── Main content area ─────────────────────────────────────────────── */
.main-content {
  margin-left: 260px;
  padding-top: 64px;
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ── Chapter hero ──────────────────────────────────────────────────── */
.chapter-hero {
  padding: 4rem 4rem 3rem;
  border-bottom: 1px solid rgba(42,106,154,0.2);
  position: relative;
  overflow: hidden;
}
.chapter-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(42,106,154,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Chapter hero typography — animate in on load ──────────────────── */
.chapter-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--seafoam);
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fade-up 0.6s ease 0.2s forwards;
}
.chapter-number {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fade-up 0.6s ease 0.3s forwards;
}
.chapter-title {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fade-up 0.6s ease 0.4s forwards;
}
.chapter-divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fade-up 0.6s ease 0.5s forwards;
}
.chapter-meta {
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0;
  animation: fade-up 0.6s ease 0.6s forwards;
}

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

/* ── Chapter body text ─────────────────────────────────────────────── */
.chapter-body {
  padding: 3rem 4rem 6rem;
  max-width: 780px;
}
.chapter-body p {
  margin-bottom: 1.4em;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.85;
  opacity: 0;
  animation: fade-in 0.5s ease forwards;
}

/* Staggered paragraph entrance */
.chapter-body p:nth-child(1)  { animation-delay: 0.7s; }
.chapter-body p:nth-child(2)  { animation-delay: 0.8s; }
.chapter-body p:nth-child(3)  { animation-delay: 0.9s; }
.chapter-body p:nth-child(4)  { animation-delay: 1.0s; }
.chapter-body p:nth-child(n+5){ animation-delay: 1.1s; }

/* Drop cap on first paragraph */
.chapter-body p:first-child::first-letter {
  font-family: 'Cinzel', serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--gold);
  float: left;
  line-height: 0.8;
  margin: 0.1em 0.12em 0 0;
}

/* ── Tease box ─────────────────────────────────────────────────────── */
.tease-box {
  margin: 0 4rem 4rem;
  max-width: 780px;
  background: linear-gradient(135deg, rgba(10,31,58,0.8), rgba(6,13,24,0.9));
  border: 1px solid rgba(200,168,75,0.2);
  border-radius: 4px;
  padding: 2.5rem 3rem;
  position: relative;
  overflow: hidden;
}
.tease-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.tease-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--seafoam);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.tease-next-title {
  font-family: 'Crimson Pro', serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.tease-hook {
  font-family: 'Crimson Pro', serif;
  font-size: 1rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.tease-timing {
  font-family: 'Raleway', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--seafoam);
}

/* ── Banners — inline placeholders ────────────────────────────────────
   These divs are invisible by default.
   below and re-upload this CSS file only — no HTML changes needed.

   Example — Full Access banner:
     margin: 2rem 0;
     padding: 1.5rem 2rem;
     background: linear-gradient(135deg, var(--ocean), var(--mid));
     border: 1px solid rgba(200,168,75,0.4);
     border-radius: 4px;
     text-align: center;
   }

   Example — Ad slot:
     margin: 2rem 0;
     min-height: 90px;
     display: flex;
     align-items: center;
     justify-content: center;
   }
─────────────────────────────────────────────────────────────────────── */

  /* Shared base — invisible until you style the specific class below */
  display: block;
  width: 100%;
}

/* ── 1/3 Banner — Get Full Access ──────────────────────────────────── */
  /* ADD YOUR STYLES HERE */
}

/* ── 2/3 Banner — Ad / Affiliate Slot ─────────────────────────────── */
  /* ADD YOUR STYLES HERE */
}

/* ── Chapter footer navigation ─────────────────────────────────────── */
.chapter-footer {
  padding: 2rem 4rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(42,106,154,0.2);
  max-width: 780px;
  gap: 1rem;
}
.nav-btn {
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(42,106,154,0.4);
  color: var(--seafoam);
  border-radius: 2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-btn:hover { background: rgba(42,106,154,0.15); border-color: var(--seafoam); }
.nav-btn.next {
  background: rgba(200,168,75,0.08);
  border-color: rgba(200,168,75,0.4);
  color: var(--gold);
}
.nav-btn.next:hover { background: rgba(200,168,75,0.15); border-color: var(--gold); }
.nav-btn.disabled { opacity: 0.3; pointer-events: none; }

/* ── Book cover ────────────────────────────────────────────────────── */
.chapter-hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
}

.chapter-hero-text {
  flex: 1;
  min-width: 0;
}

.cover-hero {
  width: 160px;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
  transition: transform 0.3s ease, filter 0.3s ease;
  opacity: 0;
  animation: fade-up 0.6s ease 0.4s forwards;
}
.cover-hero:hover {
  transform: translateY(-4px) scale(1.03);
  filter: drop-shadow(0 16px 32px rgba(42,106,154,0.5));
}

.tease-cover {
  float: right;
  width: 100px;
  margin: 0 0 1rem 1.5rem;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.6));
  transition: transform 0.3s ease;
}
.tease-cover:hover {
  transform: translateY(-3px);
}

.cover-cta {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(200,168,75,0.15);
  clear: both;
}
.cover-cta img {
  width: 80px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
.cover-cta-text {
  font-family: 'Crimson Pro', serif;
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
}
.cover-cta-text a {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--deep);
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.4rem 1rem;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.2s;
  font-style: normal;
}
.cover-cta-text a:hover {
  background: var(--gold-lt);
  border-color: var(--gold-lt);
}

/* ── Responsive / Mobile ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .progress-nav { transform: translateX(-100%); }
  .progress-nav.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .progress-bar { left: 0; }
  .nav-toggle { display: block; }
  .chapter-hero { padding: 4rem 1.5rem 2rem; }
  .chapter-hero-inner { flex-direction: column-reverse; gap: 1.5rem; }
  .cover-hero { width: 120px; align-self: center; }
  .chapter-body { padding: 2rem 1.5rem 4rem; }
  .chapter-footer { padding: 2rem 1.5rem; flex-direction: column; }
  .tease-box { margin: 0 1.5rem 3rem; padding: 1.5rem; }
  .nav-btn { width: 100%; justify-content: center; }
  .tease-cover { width: 75px; }
  .cover-cta { flex-direction: column; gap: 1rem; }
  .cover-cta img { width: 70px; }
}
