/* ============================================================
   JJ LANG — painted midnight author site
   Palette: storm navy / electric blue / koi orange / warm ivory
   Type: Anton (display) · Mr Dafoe (script) · Newsreader (body)
   ============================================================ */

:root {
  --ink: #061222;
  --ink-2: #091a2f;
  --plum: #102944;
  --pink: #d66b42;
  --pink-soft: #efad78;
  --violet: #4e9bdf;
  --cream: #f5e5c7;
  --grey: #afc1d2;
  --display: 'Anton', sans-serif;
  --script: 'Mr Dafoe', cursive;
  --body: 'Newsreader', serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 1.1rem;
  font-weight: 340;
  line-height: 1.65;
  overflow-x: hidden;
}

/* grain overlay */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--pink); color: var(--ink); }

img { display: block; max-width: 100%; }

/* ---------- nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 4vw;
  transition: background .4s, padding .4s, box-shadow .4s;
}
nav.scrolled {
  background: rgba(6, 18, 34, .9);
  backdrop-filter: blur(12px);
  padding: .6rem 4vw;
  box-shadow: 0 1px 0 rgba(78, 155, 223, .3);
}
.wordmark {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: .06em;
  color: var(--cream);
  text-decoration: none;
}
.wordmark span { color: var(--pink); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  color: var(--grey);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-family: var(--body);
  transition: color .25s;
}
.nav-links a:hover { color: var(--pink-soft); }
.nav-links .nav-cta {
  color: var(--ink);
  background: var(--pink);
  padding: .45rem 1.1rem;
  border-radius: 2px;
}
.nav-links .nav-cta:hover { color: var(--ink); background: var(--pink-soft); }
.nav-burger { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6,18,34,.96) 0%, rgba(6,18,34,.84) 42%, rgba(6,18,34,.42) 70%, rgba(6,18,34,.72) 100%),
    url('images/hero-bg-painted.webp') center bottom / cover no-repeat,
    radial-gradient(ellipse at 75% 24%, #173a64 0%, var(--ink) 68%);
  animation: heroDrift 40s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}

/* rain layers */
.rain {
  position: absolute; inset: -10% 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    12deg,
    transparent 0px, transparent 46px,
    rgba(78, 155, 223, .12) 46px, rgba(245, 229, 199, .16) 47px,
    transparent 47.5px, transparent 96px
  );
  animation: rainFall 1.1s linear infinite;
  opacity: .55;
}
.rain-back {
  background-image: repeating-linear-gradient(
    12deg,
    transparent 0px, transparent 27px,
    rgba(245, 229, 199, .07) 27px, rgba(245, 229, 199, .09) 27.5px,
    transparent 28px, transparent 61px
  );
  animation-duration: 1.7s;
  opacity: .4;
}
@keyframes rainFall {
  from { transform: translateY(-6%); }
  to   { transform: translateY(6%); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, 92vw);
  margin: 0 auto;
  padding: 8rem 0 5rem;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 3rem;
  align-items: center;
}

.script-eyebrow {
  font-family: var(--script);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--pink-soft);
  transform: rotate(-3deg);
  text-shadow: 0 0 18px rgba(214, 107, 66, .38);
  margin-bottom: .3rem;
}
.series-tag {
  font-size: .8rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 1.2rem;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(4rem, 10vw, 8.5rem);
  line-height: .92;
  letter-spacing: .015em;
  color: var(--cream);
  text-shadow: 0 6px 40px rgba(0,0,0,.6);
}
.hero h1 span {
  color: var(--pink);
  text-shadow: 0 0 34px rgba(214, 107, 66, .4), 0 6px 40px rgba(0,0,0,.6);
}
.hero-blurb {
  max-width: 34ch;
  margin: 1.6rem 0;
  font-size: 1.25rem;
  color: #d7e0e8;
}

/* spice meter */
.spice { display: flex; align-items: center; gap: .45rem; margin-bottom: 2rem; }
.spice-label, .spice-num {
  font-size: .78rem; letter-spacing: .25em; text-transform: uppercase; color: var(--grey);
}
.spice-label { margin-right: .35rem; }
.spice-num { margin-left: .5rem; }
.flame {
  width: 14px; height: 18px;
  background: #29425a;
  clip-path: polygon(50% 0%, 78% 32%, 100% 62%, 82% 100%, 18% 100%, 0% 62%, 22% 32%);
}
.flame.lit {
  background: linear-gradient(180deg, var(--pink-soft), var(--pink));
  box-shadow: 0 0 12px rgba(214, 107, 66, .6);
}

/* release lockup */
.release {
  display: inline-block;
  border-left: 3px solid var(--pink);
  padding: .35rem 0 .35rem 1.2rem;
  margin-bottom: 2rem;
}
.release-label {
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--grey);
}
.release-date {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  letter-spacing: .04em;
  color: var(--cream);
  text-shadow: 0 0 26px rgba(78, 155, 223, .32);
  margin: .15rem 0;
}
.release-byline {
  font-family: var(--script);
  font-size: 1.45rem;
  color: var(--pink-soft);
  transform: rotate(-2deg);
  transform-origin: left center;
  text-shadow: 0 0 14px rgba(214, 107, 66, .35);
}

/* buttons */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .95rem 1.9rem;
  border-radius: 2px;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
  cursor: pointer;
}
.btn-solid {
  background: var(--pink);
  color: var(--ink);
  box-shadow: 0 0 24px rgba(214, 107, 66, .28);
}
.btn-solid:hover {
  background: var(--pink-soft);
  transform: translateY(-2px);
  box-shadow: 0 0 38px rgba(214, 107, 66, .42);
}
.btn-ghost {
  color: var(--cream);
  border: 1px solid rgba(242, 234, 217, .35);
}
.btn-ghost:hover { border-color: var(--pink); color: var(--pink-soft); transform: translateY(-2px); }
.btn-small { padding: .7rem 1.4rem; font-size: .75rem; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* hero cover */
.hero-cover { display: flex; justify-content: center; perspective: 1200px; }
.cover-tilt {
  transition: transform .15s ease-out;
  will-change: transform;
}
.cover-tilt a { display: block; }
.cover-tilt img {
  width: min(400px, 38vw);
  border-radius: 4px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .75),
    0 0 62px rgba(78, 155, 223, .28),
    0 0 22px rgba(214, 107, 66, .12);
}
.hero-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 22vh;
  background: linear-gradient(180deg, transparent, var(--ink));
  z-index: 2;
}

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden;
  border-top: 1px solid rgba(78, 155, 223, .3);
  border-bottom: 1px solid rgba(78, 155, 223, .3);
  background: var(--ink-2);
  padding: .8rem 0;
}
.ticker-track {
  display: flex; align-items: center; gap: 2.2rem;
  width: max-content;
  animation: tick 30s linear infinite;
}
.ticker-track span {
  font-family: var(--display);
  font-size: .95rem;
  letter-spacing: .22em;
  color: var(--grey);
  white-space: nowrap;
}
.ticker-track i { color: var(--pink); font-style: normal; }
@keyframes tick {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- sections ---------- */
.section {
  padding: 7rem 4vw;
  max-width: 1240px;
  margin: 0 auto;
}
.section-head { text-align: center; margin-bottom: 4rem; }
.section-head h2, .newsletter-box h2, .about-copy h2 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  letter-spacing: .02em;
  color: var(--cream);
}
.section-head h2 span, .newsletter-box h2 span, .about-copy h2 span { color: var(--pink); }
.section-sub {
  max-width: 56ch;
  margin: 1rem auto 0;
  color: var(--grey);
  font-size: 1.08rem;
}

/* book grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.6rem;
}
.book-grid-single {
  grid-template-columns: minmax(280px, 390px);
  justify-content: center;
}
.book-card { text-align: center; }
.book-cover {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.6);
  transition: transform .35s ease, box-shadow .35s ease;
}
.book-card:hover .book-cover {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow: 0 30px 70px rgba(0,0,0,.7), 0 0 40px rgba(78,155,223,.25);
}
.book-cover img { width: 100%; }
.badge {
  position: absolute; top: 12px; left: 12px;
  z-index: 2;
  font-family: var(--body);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: .4rem .8rem;
  border-radius: 2px;
}
.badge-live { background: var(--pink); color: var(--ink); box-shadow: 0 0 16px rgba(214,107,66,.5); }
.badge-soon { background: rgba(11,8,16,.75); color: var(--cream); border: 1px solid rgba(242,234,217,.35); backdrop-filter: blur(4px); }
.badge.inline { position: static; display: inline-block; margin-top: .8rem; }

.book-card h3, .standalone-copy h3, .book-feature-copy h3 {
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: .03em;
  margin-top: 1.5rem;
  color: var(--cream);
}
.book-no {
  font-size: .75rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--pink-soft);
  margin: .3rem 0 .9rem;
}
.book-blurb {
  color: var(--grey);
  font-size: .98rem;
  margin-bottom: 1.4rem;
  text-align: left;
}
.book-card .book-blurb { text-align: center; }

.book-feature-list {
  display: grid;
  gap: 4rem;
}
.book-feature {
  display: grid;
  scroll-margin-top: 6rem;
  grid-template-columns: minmax(250px, 355px) minmax(0, 1fr);
  gap: clamp(2.2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3.2rem);
  border: 1px solid rgba(78,155,223,.24);
  border-radius: 10px;
  background:
    radial-gradient(ellipse 70% 110% at 0% 0%, rgba(78,155,223,.12), transparent 65%),
    linear-gradient(145deg, rgba(16,41,68,.72), rgba(9,26,47,.84));
  box-shadow: 0 28px 75px rgba(0,0,0,.34);
}
.book-feature-deep {
  background:
    radial-gradient(ellipse 65% 120% at 100% 0%, rgba(24,190,221,.22), transparent 62%),
    linear-gradient(145deg, rgba(8,48,72,.86), rgba(9,26,47,.9));
  border-color: rgba(85,210,231,.34);
}
.book-feature-deep .book-feature-cover { grid-column: 2; grid-row: 1; }
.book-feature-deep .book-feature-copy { grid-column: 1; grid-row: 1; }
.book-feature-cover {
  position: relative;
  width: 100%;
  max-width: 355px;
  justify-self: center;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0,0,0,.62);
  transition: transform .35s ease, box-shadow .35s ease;
}
.book-feature-cover:hover {
  transform: translateY(-7px) rotate(-.5deg);
  box-shadow: 0 32px 78px rgba(0,0,0,.7), 0 0 42px rgba(78,155,223,.24);
}
.book-feature-cover a { display: block; }
.book-feature-cover img { width: 100%; }
.book-feature-copy h3 {
  margin: .35rem 0 1.1rem;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: .95;
}
.book-title-link {
  color: inherit;
  text-decoration: none;
  transition: color .25s;
}
.book-title-link:hover { color: var(--pink-soft); }
.book-kicker {
  font-size: .76rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--pink-soft);
}
.book-hook {
  display: grid;
  gap: .55rem;
  margin: 1rem 0 1.6rem;
  padding-left: 1.2rem;
  border-left: 3px solid #45c8e5;
}
.book-hook strong {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  line-height: 1.08;
  letter-spacing: .045em;
  color: var(--cream);
}
.book-hook em {
  color: #d7e7ee;
  font-size: 1.08rem;
  line-height: 1.5;
}
.book-long-blurb {
  color: var(--grey);
  font-size: .98rem;
  line-height: 1.62;
}
.book-long-blurb p { margin-bottom: .8rem; }
.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.8rem;
}

.series-mockup { margin-top: 5rem; }
.series-mockup img {
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
}

/* ---------- heat after dark ---------- */
.section-neon {
  max-width: none;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(78, 155, 223, .13), transparent 70%),
    var(--ink-2);
  border-top: 1px solid rgba(78,155,223,.18);
  border-bottom: 1px solid rgba(78,155,223,.18);
}
.neon-script {
  font-family: var(--script);
  font-size: clamp(2.6rem, 5vw, 4rem);
  color: var(--pink-soft);
  transform: rotate(-2deg);
  text-shadow:
    0 0 8px rgba(239,173,120,.7),
    0 0 28px rgba(214,107,66,.5),
    0 0 70px rgba(78,155,223,.3);
  margin-bottom: .5rem;
}
.city-row {
  display: flex;
  gap: 1.6rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1240px;
  margin: 0 auto;
}
.city-card {
  width: clamp(150px, 17vw, 210px);
  transition: transform .3s ease;
}
.city-card:hover { transform: translateY(-10px) rotate(1.2deg); }
.city-card img {
  border-radius: 4px;
  box-shadow: 0 14px 40px rgba(0,0,0,.65);
  transition: box-shadow .3s;
}
.city-card:hover img { box-shadow: 0 22px 55px rgba(0,0,0,.75), 0 0 34px rgba(78,155,223,.35); }
.city-card figcaption {
  text-align: center;
  margin-top: .8rem;
  font-family: var(--display);
  font-size: .95rem;
  letter-spacing: .2em;
  color: var(--grey);
}
.center { text-align: center; margin-top: 3rem; }
.series-genre-tag {
  display: inline-block;
  margin-top: .9rem;
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--pink-soft);
}

/* ---------- newsletter ---------- */
.section-newsletter { padding-top: 5rem; padding-bottom: 5rem; }
.newsletter-box {
  text-align: center;
  background:
    radial-gradient(ellipse 70% 90% at 50% -20%, rgba(78, 155, 223, .16), transparent 60%),
    linear-gradient(160deg, var(--plum), var(--ink-2));
  border: 1px solid rgba(78,155,223,.28);
  border-radius: 8px;
  padding: 4.5rem 6vw;
}
.signup {
  display: flex;
  gap: .8rem;
  justify-content: center;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}
.signup input {
  font-family: var(--body);
  font-size: 1rem;
  padding: .95rem 1.3rem;
  width: min(340px, 80vw);
  background: rgba(6,18,34,.72);
  border: 1px solid rgba(242,234,217,.25);
  border-radius: 2px;
  color: var(--cream);
  outline: none;
  transition: border-color .25s;
}
.signup input:focus { border-color: var(--pink); }
.signup input::placeholder { color: #72889c; }
.signup .btn { border: none; }
.signup-note {
  margin-top: 1rem;
  min-height: 1.2em;
  font-size: .95rem;
  color: var(--pink-soft);
}
.fine { margin-top: 1.3rem; font-size: .82rem; color: #72889c; }

/* ---------- about ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3.5rem;
  align-items: center;
}
.about-portrait {
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0,0,0,.65), 0 0 40px rgba(78,155,223,.18);
  border: 1px solid rgba(78,155,223,.24);
}
.about-copy p { margin-bottom: 1.1rem; color: #d7e0e8; }
.about-copy h2 { margin-bottom: 1.2rem; }
.about-copy .fine { margin-top: 1.4rem; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid rgba(78,155,223,.22);
  padding: 3rem 4vw 3.5rem;
  text-align: center;
  background: var(--ink-2);
}
.footer-logo {
  width: 84px;
  margin: 0 auto 1.6rem;
  border-radius: 50%;
  opacity: .85;
}
.footer-links { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.4rem; }
.footer-links a {
  color: var(--grey);
  text-decoration: none;
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: color .25s;
}
.footer-links a:hover { color: var(--pink-soft); }
.footer-note { font-size: .82rem; color: #72889c; }
.footer-note a { color: var(--grey); }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rain, .hero-bg, .ticker-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: 7rem; }
  .hero-blurb { margin-left: auto; margin-right: auto; }
  .spice, .hero-ctas { justify-content: center; }
  .hero-cover { order: -1; }
  .cover-tilt img { width: min(300px, 60vw); }
  .book-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .book-feature {
    grid-template-columns: minmax(0, 1fr);
    max-width: 620px;
    margin: 0 auto;
  }
  .book-feature-cover,
  .book-feature-deep .book-feature-cover { grid-column: 1; grid-row: 1; }
  .book-feature-copy,
  .book-feature-deep .book-feature-copy { grid-column: 1; grid-row: 2; }
  .book-feature-copy h3 { font-size: clamp(2.8rem, 13vw, 4.8rem); }
  .book-actions { justify-content: center; }
  .about-inner { grid-template-columns: 1fr; text-align: center; }
  .about-portrait { margin: 0 auto; width: min(280px, 70vw); }

  .nav-links {
    position: fixed; inset: 0;
    background: rgba(6,18,34,.98);
    flex-direction: column;
    justify-content: center;
    gap: 2.4rem;
    transform: translateX(100%);
    transition: transform .35s ease;
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1rem; }
  .nav-burger {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    z-index: 101; padding: .4rem;
  }
  .nav-burger span {
    width: 26px; height: 2px;
    background: var(--cream);
    transition: transform .3s, opacity .3s;
  }
  .nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 560px) {
  .signup { flex-direction: column; align-items: center; }
}
