/* ═══════════════════════════════════════════════════════
   MOSKITO — style.css
   Brand: Cinzel / Crimson Pro / Inter
   Palette: Void/Abyss/Shadow darks, Crimson, Gold, Bone
═══════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --void:       #060709;
  --abyss:      #0A0C12;
  --shadow:     #0F1219;
  --dusk:       #1A1E2A;
  --iron:       #2C3040;
  --ash:        #6B7280;
  --bone:       #E8E0D0;
  --parchment:  #F5F0E8;
  --blood:      #7A0C0C;
  --crimson:    #8B0000;
  --ember:      #A01515;
  --gold-dim:   #8B7340;
  --gold:       #B8975A;
  --gold-light: #D4AF6E;

  --font-display: 'Cinzel', serif;
  --font-body:    'Crimson Pro', Georgia, serif;
  --font-ui:      'Inter', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --section-pad: clamp(80px, 10vw, 140px);
  --inner-max: 1200px;
  --inner-pad: clamp(24px, 6vw, 80px);
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: clamp(17px, 1.1vw, 19px);
  line-height: 1.75;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── UTILITY ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.desktop-br { display: none; }
@media (min-width: 900px) { .desktop-br { display: inline; } }

/* ── SECTION SCAFFOLD ── */
.section-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: var(--section-pad) var(--inner-pad);
}

/* ── SECTION LABELS ── */
.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.label-rule {
  display: block;
  width: 32px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

/* ── HEADLINES ── */
.section-headline {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.05;
  margin-bottom: 28px;
}
.headline-top {
  display: block;
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 600;
  color: var(--ash);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.headline-accent {
  display: block;
  font-size: clamp(36px, 5vw, 64px);
  color: var(--parchment);
  text-transform: uppercase;
}
.section-headline-center {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 900;
  color: var(--parchment);
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 20px;
}
.section-intro {
  font-size: clamp(17px, 1.2vw, 20px);
  color: var(--ash);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
  line-height: 1.8;
}

/* ── BODY COPY ── */
.body-copy p {
  font-size: clamp(17px, 1.1vw, 19px);
  color: var(--ash);
  line-height: 1.8;
  max-width: 560px;
}
.body-copy p + p { margin-top: 16px; }
.body-copy-p {
  font-size: clamp(17px, 1.1vw, 19px);
  color: var(--ash);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 32px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 14px 32px;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--crimson);
  color: var(--parchment);
}
.btn-primary:hover { background: var(--ember); }
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(232,224,208,0.25);
  color: var(--bone);
}
.btn-ghost:hover { border-color: var(--bone); }
.btn-gold {
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
}
.btn-gold:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-text {
  background: transparent;
  padding-left: 0;
  padding-right: 0;
  color: var(--ash);
}
.btn-text:hover { color: var(--bone); }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
  align-items: center;
}

/* ── SCROLL REVEALS ── */
.reveal-block {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal-block.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════
   NAVIGATION
══════════════════════════════════════ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 64px);
  height: 64px;
  background: transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.site-nav.scrolled {
  background: rgba(6, 7, 9, 0.96);
  border-color: rgba(44, 48, 64, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-logo { display: flex; align-items: center; }
.nav-wordmark { height: 36px; width: auto; display: block; }
.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}
.nav-link {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ash);
  transition: color 0.2s ease;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-link:hover { color: var(--bone); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 1px;
  background: var(--bone);
  transition: all 0.3s ease;
}
.mobile-menu {
  position: fixed; inset: 0;
  z-index: 99;
  background: rgba(6,7,9,0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.mobile-menu[hidden] { display: none; }
.mobile-close {
  position: absolute; top: 20px; right: 24px;
  font-size: 32px; color: var(--ash); line-height: 1;
  transition: color 0.2s;
}
.mobile-close:hover { color: var(--bone); }
.mobile-nav { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.mobile-link {
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ash);
  transition: color 0.2s ease;
}
.mobile-link:hover { color: var(--parchment); }

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
#hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-cover {
  position: absolute; inset: 0; z-index: 0;
}
/* The source file is a full print spread (front + spine + back).
   background-size: 250% scales the image so only the front cover
   (right ~40% of original) fills the viewport at background-position: right top. */
.hero-cover-img {
  position: absolute; inset: 0;
  background-image: url('assets/images/Cover Image.png');
  background-size: cover;
  background-position: center top;
  transform: scale(1.08);
  transform-origin: center top;
  will-change: transform;
  transition: none;
}
.hero-cover-overlay {
  position: absolute; inset: 0;
  background:
    /* Top — darken nav area */
    linear-gradient(to bottom,
      rgba(6,7,9,0.72) 0%,
      rgba(6,7,9,0.20) 22%,
      rgba(6,7,9,0.10) 40%,
      rgba(6,7,9,0.55) 60%,
      rgba(6,7,9,0.92) 78%,
      rgba(6,7,9,1.00) 100%
    ),
    /* Left edge — darken for text readability */
    linear-gradient(to right,
      rgba(6,7,9,0.70) 0%,
      rgba(6,7,9,0.20) 45%,
      rgba(6,7,9,0.00) 100%
    );
}
.hero-particles {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* Living wallpaper canvas — fog parts on cursor, revealing eyes beneath.
   Sits above the static cover image; falls back to it if WebGL fails. */
.hero-webgl {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}

/* Custom mosquito cursor — only active while hovering the hero */
#hero, #hero * { cursor: none; }
#heroSkeeter {
  position: fixed;
  top: 0; left: 0;
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  z-index: 150;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}
#heroSkeeter.active { opacity: 1; }
#heroSkeeter.flying .skeeter-wing-l { animation: skeeterFlapL 0.07s linear infinite; transform-box: fill-box; transform-origin: 30% 90%; }
#heroSkeeter.flying .skeeter-wing-r { animation: skeeterFlapR 0.07s linear infinite; transform-box: fill-box; transform-origin: 30% 90%; }
@keyframes skeeterFlapL { 0%{transform:rotate(8deg) scaleY(1)} 50%{transform:rotate(-46deg) scaleY(0.7)} 100%{transform:rotate(8deg) scaleY(1)} }
@keyframes skeeterFlapR { 0%{transform:rotate(-8deg) scaleY(1)} 50%{transform:rotate(46deg) scaleY(0.7)} 100%{transform:rotate(-8deg) scaleY(1)} }
.hero-content {
  position: relative; z-index: 2;
  width: 100%;
  max-width: var(--inner-max);
  margin: 0 auto;
  /* Push content to bottom third — cover art owns upper two-thirds */
  padding: 0 var(--inner-pad) clamp(60px, 8vw, 100px);
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-wordmark { width: 100%; max-width: 680px; margin-bottom: 20px; }
.hero-wordmark-svg { width: 100%; height: auto; display: block; }
.hero-rule {
  width: 80px; height: 1px; border: none;
  background: linear-gradient(to right, var(--gold), transparent);
  margin-bottom: 20px;
  transform-origin: left;
}
.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 300; font-style: italic;
  color: var(--parchment);
  line-height: 1.5; margin-bottom: 16px;
  max-width: 560px;
}
.hero-sub {
  font-size: clamp(14px, 1vw, 16px);
  font-family: var(--font-ui);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ash);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 540px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.hero-scroll {
  position: absolute;
  bottom: 32px; right: clamp(24px, 5vw, 64px);
  z-index: 2;
}
.scroll-line {
  width: 1px; height: 64px;
  background: linear-gradient(to bottom, transparent, var(--gold-dim));
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; transform: scaleY(0.6) translateY(-8px); }
  50%       { opacity: 0.7; transform: scaleY(1) translateY(0); }
}

/* Hero reveal */
.reveal-hero {
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 1s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes heroReveal {
  to { opacity: 1; transform: translateY(0); }
}
.hero-rule.reveal-hero {
  transform: scaleX(0);
  transform-origin: left;
  animation: ruleReveal 0.7s ease forwards;
  animation-delay: var(--d, 0s);
}
@keyframes ruleReveal {
  to { transform: scaleX(1); opacity: 1; }
}

/* ══════════════════════════════════════
   FEATURED BOOK
══════════════════════════════════════ */
#featured-book { background: var(--abyss); }
.book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.book-cover-col { display: flex; justify-content: center; }
.book-cover-frame {
  position: relative;
  max-width: 320px; width: 100%;
}
.book-cover-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(44,48,64,0.5);
  pointer-events: none;
}
.book-cover-img {
  width: 100%;
  aspect-ratio: 5.5 / 8.5;
  display: block;
  background-image: url('assets/images/Cover Image.png');
  background-size: cover;
  background-position: center top;
}

/* ══════════════════════════════════════
   THE SAGA
══════════════════════════════════════ */
#the-saga { background: var(--shadow); }
.section-header { margin-bottom: 60px; }
.section-header .section-label { justify-content: center; }
.volumes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.volume-card {
  border-top: 1px solid var(--iron);
  padding: 36px 32px 36px 0;
}
.volume-card + .volume-card {
  border-left: 1px solid var(--iron);
  padding-left: 32px;
}
.volume-num {
  display: block;
  font-family: var(--font-ui);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.volume-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 900; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--parchment);
  margin-bottom: 16px;
}
.volume-body {
  font-size: 16px; color: var(--ash);
  line-height: 1.75; margin-bottom: 24px;
}
.saga-cta {
  text-align: center; margin-top: 60px;
  padding-top: 60px; border-top: 1px solid var(--iron);
}

/* ══════════════════════════════════════
   THE BLACKROBE
══════════════════════════════════════ */
#the-blackrobe {
  background: var(--void);
  position: relative;
}
#the-blackrobe::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 65% 50%, rgba(122,12,12,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.blackrobe-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.blackrobe-text { position: relative; z-index: 1; }
.blackrobe-sub {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.5vw, 22px);
  font-style: italic; font-weight: 300;
  color: var(--bone); line-height: 1.6;
  margin-bottom: 24px;
  border-left: 2px solid var(--crimson);
  padding-left: 24px;
}
.blackrobe-video-col { position: relative; z-index: 1; }
.video-frame {
  position: relative; width: 100%;
  aspect-ratio: 16/9; background: var(--dusk); overflow: hidden;
}
.video-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: none;
}
.video-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--iron); background: var(--dusk);
}
.video-placeholder-inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  color: var(--ash); text-align: center; padding: 24px;
}
.video-placeholder-inner svg { color: var(--crimson); opacity: 0.5; }
.video-placeholder-inner p {
  font-family: var(--font-display); font-size: 13px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--bone);
}
.video-placeholder-inner span {
  font-family: var(--font-ui); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.video-caption {
  margin-top: 16px;
  font-family: var(--font-ui); font-size: 10px;
  font-weight: 400; letter-spacing: 0.35em;
  text-transform: uppercase; color: var(--gold-dim); text-align: center;
}

/* ══════════════════════════════════════
   JOIN THE WATCH
══════════════════════════════════════ */
#join-the-watch {
  background: var(--abyss); position: relative; overflow: hidden;
}
.watch-particles {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; opacity: 0.35;
}
.watch-inner { position: relative; z-index: 1; }
.watch-content { max-width: 680px; margin: 0 auto; text-align: center; }
.watch-headline {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 900; letter-spacing: 0.06em;
  color: var(--parchment); line-height: 1.15; margin-bottom: 16px;
}
.watch-sub {
  font-size: clamp(17px, 1.2vw, 20px);
  color: var(--ash); margin-bottom: 40px;
  font-style: italic; font-weight: 300;
}
.watch-form { margin-bottom: 40px; }
.form-row {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 16px;
}
.form-field { flex: 1; min-width: 180px; }
.form-input {
  width: 100%; background: transparent;
  border: 1px solid var(--iron);
  padding: 14px 20px;
  font-family: var(--font-body); font-size: 16px;
  color: var(--bone); outline: none;
  transition: border-color 0.25s ease; -webkit-appearance: none;
}
.form-input::placeholder { color: var(--ash); opacity: 0.7; }
.form-input:focus { border-color: var(--gold-dim); }
.form-confirm { padding: 20px 0; }
.confirm-main {
  font-family: var(--font-display);
  font-size: 18px; letter-spacing: 0.1em;
  color: var(--parchment); margin-bottom: 8px;
}
.confirm-sub { font-size: 15px; color: var(--ash); }
.form-disclaimer {
  font-family: var(--font-ui); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ash); opacity: 0.6;
}
.watch-socials {
  display: flex; gap: 32px;
  justify-content: center; flex-wrap: wrap;
}
.social-link {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 11px;
  font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ash); transition: color 0.2s ease;
}
.social-link:hover { color: var(--bone); }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer { background: var(--void); border-top: 1px solid var(--iron); }
.footer-inner {
  max-width: var(--inner-max); margin: 0 auto;
  padding: 60px var(--inner-pad) 40px;
  display: flex; flex-direction: column;
  align-items: center; gap: 24px; text-align: center;
}
.footer-top { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-wordmark { height: 40px; width: auto; display: block; margin: 0 auto; }
.footer-author {
  font-family: var(--font-ui); font-size: 11px;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--ash);
}
.footer-rule { width: 100%; height: 1px; border: none; background: var(--iron); }
.footer-nav, .footer-social {
  display: flex; flex-wrap: wrap;
  gap: 8px 20px; align-items: center; justify-content: center;
}
.footer-link, .footer-social-link {
  font-family: var(--font-ui); font-size: 10px;
  font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ash); transition: color 0.2s ease;
}
.footer-link:hover, .footer-social-link:hover { color: var(--bone); }
.footer-pipe { color: var(--iron); font-size: 12px; }
.footer-copy {
  font-family: var(--font-ui); font-size: 10px;
  letter-spacing: 0.1em; color: var(--ash); opacity: 0.5;
}
.footer-whisper {
  font-family: var(--font-body); font-size: 11px;
  font-style: italic; color: var(--void); user-select: none;
}
.footer-whisper:hover { color: var(--iron); transition: color 0.3s; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero-content { padding-top: 96px; }
  .hero-wordmark { max-width: 100%; }
  .book-grid { grid-template-columns: 1fr; }
  .book-cover-col { order: -1; }
  .book-cover-frame { max-width: 240px; }
  .volumes-grid { grid-template-columns: 1fr; }
  .volume-card { padding: 28px 0; }
  .volume-card + .volume-card {
    border-left: none; border-top: 1px solid var(--iron); padding-left: 0;
  }
  .blackrobe-inner { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .form-field { min-width: unset; }
}
@media (max-width: 600px) {
  .hero-tagline { font-size: 20px; }
  .hero-sub { display: none; }
  .btn { padding: 13px 22px; font-size: 10px; }
  .hero-ctas .btn-text { display: none; }
}
