/* ============================================================
   J. O'Neill — joneillauthor.com
   Void Palette · Design System v3.0
   Playfair shouts · DM Sans informs · Caveat seasons
   ============================================================ */

:root {
  --obsidian: #1A1A2E;
  --indigo: #201B45;
  --deep: #0D0D1F;
  --bone: #F5F0EB;
  --pink: #E63E62;
  --gold: #C9943A;
  --purple: #6C3FC5;
  --berry: #9B2D52;
  --smoke: #444466;
  --lilac: #9494AA;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", -apple-system, "Segoe UI", sans-serif;
  --font-accent: "Caveat", cursive;

  --container: 1120px;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--deep);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Film grain over everything — the atmosphere layer */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: var(--bone); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--lilac);
}

.hot { color: var(--pink); font-style: italic; }
.gold { color: var(--gold); }

.caveat {
  font-family: var(--font-accent);
  font-weight: 600;
  color: var(--gold);
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  transform: rotate(-2deg);
  display: inline-block;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.divider::before, .divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05rem 2.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-primary {
  background: var(--pink);
  color: var(--deep);
  box-shadow: 0 8px 30px rgba(230, 62, 98, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(230, 62, 98, 0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--bone);
  border-color: var(--smoke);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn-gold {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold); color: var(--deep); transform: translateY(-2px); }
.btn:disabled,
.btn:disabled:hover {
  cursor: progress;
  opacity: 0.72;
  transform: none;
  box-shadow: 0 4px 18px rgba(230, 62, 98, 0.22);
}

.btn:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 31, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(68, 68, 102, 0.35);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--bone);
  white-space: nowrap;
}
.wordmark .hot { font-style: italic; }
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.2rem);
}
.site-nav a:not(.btn) {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--lilac);
  transition: color 0.15s ease;
}
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--bone); }
.site-nav .btn { padding: 0.62rem 1.35rem; font-size: 0.78rem; }
.site-nav .nav-short { display: none; }

@media (max-width: 640px) {
  .site-nav { gap: 0.9rem; }
  .site-nav a.nav-link { font-size: 0.74rem; letter-spacing: 0.08em; }
  .site-nav .nav-long { display: none; }
  .site-nav .nav-short { display: inline; }
  .site-nav .btn {
    padding: 0.55rem 1.1rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }
  .wordmark { font-size: 1.15rem; }
}
/* Small phones: the wordmark, both nav links and the CTA must still share one row. */
@media (max-width: 400px) {
  .site-header .container { padding-left: 0.9rem; padding-right: 0.9rem; gap: 0.6rem; }
  .site-nav { gap: 0.55rem; }
  .wordmark { font-size: 1rem; }
  .site-nav a.nav-link { font-size: 0.7rem; letter-spacing: 0.06em; }
  .site-nav .btn { padding: 0.5rem 0.8rem; font-size: 0.68rem; letter-spacing: 0.08em; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background:
    radial-gradient(ellipse 60% 45% at 70% 20%, rgba(108, 63, 197, 0.22), transparent 65%),
    radial-gradient(ellipse 55% 50% at 25% 85%, rgba(230, 62, 98, 0.12), transparent 60%),
    linear-gradient(180deg, var(--deep) 0%, var(--obsidian) 55%, var(--deep) 100%);
  overflow: hidden;
}
/* gold dust */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 30%, rgba(201, 148, 58, 0.8), transparent 100%),
    radial-gradient(1px 1px at 28% 68%, rgba(201, 148, 58, 0.5), transparent 100%),
    radial-gradient(2px 2px at 45% 15%, rgba(201, 148, 58, 0.55), transparent 100%),
    radial-gradient(1px 1px at 62% 42%, rgba(245, 240, 235, 0.4), transparent 100%),
    radial-gradient(1.5px 1.5px at 78% 78%, rgba(201, 148, 58, 0.6), transparent 100%),
    radial-gradient(1px 1px at 88% 25%, rgba(201, 148, 58, 0.45), transparent 100%),
    radial-gradient(1.5px 1.5px at 8% 82%, rgba(108, 63, 197, 0.5), transparent 100%),
    radial-gradient(1px 1px at 55% 90%, rgba(201, 148, 58, 0.5), transparent 100%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5.5rem);
}
.hero-copy { position: relative; z-index: 2; }

.scarcity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 0.45rem 1.1rem;
  margin-bottom: 1.6rem;
}
.scarcity-badge .pulse {
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.hero h1 {
  font-size: clamp(2.9rem, 7.2vw, 5.4rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  text-wrap: balance;
  margin: 0 0 1.4rem;
}
.hero-tag {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--lilac);
  max-width: 34rem;
  margin-bottom: 1.1rem;
}
.hero-tag strong { color: var(--bone); font-weight: 600; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.9rem;
}
.hero-note {
  margin-top: 1.1rem;
  font-size: 0.88rem;
  color: var(--lilac);
}
.hero-note a { color: var(--gold); }

/* Hero cover */
.hero-cover {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
}
.hero-cover img {
  width: min(360px, 78vw);
  border-radius: 6px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.75),
    0 0 90px rgba(108, 63, 197, 0.35);
  transform: rotate(2deg);
  transition: transform 0.35s ease;
}
.hero-cover img:hover { transform: rotate(0deg) scale(1.015); }
.hero-cover .caveat {
  position: absolute;
  bottom: -1.4rem;
  right: clamp(0rem, 4vw, 1.5rem);
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding-left: clamp(1.25rem, 4vw, 2.5rem);
    padding-right: clamp(1.25rem, 4vw, 2.5rem);
  }
  .hero-cover { order: -1; margin-bottom: 0.5rem; }
  .hero-cover img { width: min(250px, 62vw); }
  .hero-cover .caveat { bottom: -0.8rem; }
}
@media (max-width: 640px) {
  .hero-grid { padding-top: 2rem; gap: 1.4rem; }
  .hero h1 { font-size: 2.6rem; }
  .hero-cover img { width: auto; max-height: 38vh; }
  .hero-cover .caveat { bottom: -0.6rem; }
  .scarcity-badge { margin-bottom: 1.1rem; }
}

/* ---------- Proof strip ---------- */

.proof-strip {
  background: var(--obsidian);
  border-top: 1px solid rgba(68, 68, 102, 0.35);
  border-bottom: 1px solid rgba(68, 68, 102, 0.35);
  padding: 1.5rem 0;
}
.proof-strip .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.2rem, 4vw, 3rem);
  text-align: center;
}
.proof-item {
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  color: var(--lilac);
}
.proof-item .stars { color: var(--gold); letter-spacing: 0.18em; font-size: 0.95rem; }
.proof-item strong { color: var(--bone); font-weight: 600; }

/* ---------- Sections ---------- */

section { position: relative; }
.section-pad { padding: clamp(4rem, 9vw, 7rem) 0; }

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head .eyebrow { display: block; margin-bottom: 0.9rem; }
.section-head h2 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 900;
  text-wrap: balance;
}
.section-head p { margin-top: 1.1rem; color: var(--lilac); }

/* ---------- Book blocks ---------- */

.book-block {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.book-block.flip { grid-template-columns: minmax(0, 1.38fr) minmax(0, 0.62fr); }
.book-block.flip .book-cover { order: 2; }
.book-block + .book-block { margin-top: clamp(4rem, 8vw, 6.5rem); }

.book-cover img {
  width: min(320px, 100%);
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 60px rgba(108, 63, 197, 0.22);
  transition: transform 0.3s ease;
}
.book-cover img:hover { transform: translateY(-6px); }

.book-info .eyebrow { display: block; margin-bottom: 0.8rem; }
.book-info h3 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 900;
  margin-bottom: 1.2rem;
}
.book-info .blurb { color: var(--lilac); max-width: 38rem; }
.book-info .blurb em { color: var(--bone); font-style: italic; }
.book-info .blurb p + p { margin-top: 0.9rem; }
.book-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.7rem;
}
.book-meta {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--lilac);
}
.book-meta a { color: var(--lilac); }

@media (max-width: 820px) {
  .book-block, .book-block.flip { grid-template-columns: 1fr; }
  .book-block.flip .book-cover { order: 0; }
  .book-cover img { width: min(240px, 70vw); }
}

/* ---------- Reviews ---------- */

.reviews {
  background:
    radial-gradient(ellipse 50% 60% at 50% 0%, rgba(108, 63, 197, 0.14), transparent 70%),
    var(--obsidian);
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
}
.review-card {
  position: relative;
  background: rgba(32, 27, 69, 0.55);
  border: 1px solid rgba(68, 68, 102, 0.45);
  border-radius: var(--radius);
  padding: 2rem 1.8rem 1.6rem;
}
.review-card::before {
  content: "\201C";
  position: absolute;
  top: 0.2rem;
  left: 1.1rem;
  font-family: var(--font-display);
  font-size: 3.4rem;
  color: var(--purple);
  line-height: 1;
}
.review-card blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.04rem;
  line-height: 1.55;
  color: var(--bone);
}
.review-card blockquote .gold { font-style: italic; }
.review-card figcaption {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.review-card .stars { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.2em; }

/* ---------- Dispatch (newsletter) ---------- */

.dispatch {
  background:
    radial-gradient(ellipse 55% 65% at 50% 100%, rgba(230, 62, 98, 0.14), transparent 70%),
    var(--deep);
}
.dispatch-box {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}
.dispatch-box h2 {
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 900;
  margin-bottom: 1.2rem;
}
.dispatch-box > p {
  color: var(--lilac);
  max-width: 36rem;
  margin: 0 auto 2rem;
}
.dispatch-box .magnet { color: var(--bone); font-weight: 600; }

.dispatch-form {
  display: flex;
  gap: 0.8rem;
  max-width: 36rem;
  margin: 0 auto;
}
.dispatch-form input[type="email"] {
  flex: 1;
  min-width: 13rem;
  background: rgba(32, 27, 69, 0.6);
  border: 1px solid var(--smoke);
  border-radius: 999px;
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 1rem 1.5rem;
  transition: border-color 0.15s ease;
}
.dispatch-form input[type="email"]::placeholder { color: var(--lilac); }
.dispatch-form input[type="email"]:focus { border-color: var(--pink); outline: none; }
.dispatch-form input[type="email"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.form-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--lilac);
}
.form-status {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--gold);
  min-height: 1.4em;
}

@media (max-width: 560px) {
  .dispatch-form { flex-direction: column; }
}

/* ---------- About teaser ---------- */

.about-teaser .container {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.about-teaser img {
  /* polaroid-style PNGs with transparency — shadow the shape, not the canvas */
  filter: saturate(0.9) drop-shadow(0 18px 32px rgba(0, 0, 0, 0.55));
  transform: rotate(-2deg);
}
.about-teaser h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 1.2rem;
}
.about-teaser p { color: var(--lilac); max-width: 34rem; }
.about-teaser .btn { margin-top: 1.7rem; }

@media (max-width: 760px) {
  .about-teaser .container { grid-template-columns: 1fr; }
  .about-teaser img { max-width: min(320px, 100%); }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--deep);
  border-top: 1px solid rgba(68, 68, 102, 0.35);
  padding: 3.2rem 0 2.4rem;
}
.footer-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.2rem;
}
.footer-brand .wordmark { font-size: 1.2rem; }
.footer-brand p {
  margin: 0.7rem auto 0;
  font-size: 0.85rem;
  color: var(--lilac);
  max-width: 20rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.footer-links h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.footer-links ul { list-style: none; }
.footer-links li + li { margin-top: 0.5rem; }
.footer-links a {
  font-size: 0.92rem;
  color: var(--lilac);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--bone); }
.footer-bottom {
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(68, 68, 102, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
  font-size: 0.8rem;
  color: var(--lilac);
}
.footer-bottom .caveat { font-size: 1.15rem; transform: rotate(-1deg); color: var(--gold); }

/* ---------- Inner pages ---------- */

.page-hero {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(108, 63, 197, 0.18), transparent 70%),
    linear-gradient(180deg, var(--obsidian), var(--deep));
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
}
.page-hero .eyebrow { display: block; margin-bottom: 1rem; }
.page-hero p {
  max-width: 38rem;
  margin: 1.2rem auto 0;
  color: var(--lilac);
}

/* About page */
.about-body {
  max-width: 44rem;
  margin: 0 auto;
}
.about-body p + p { margin-top: 1.3rem; }
.about-body p { color: var(--lilac); }
.about-body p strong { color: var(--bone); }
.about-body .lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--bone);
  line-height: 1.5;
}
.about-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.6rem 0;
}
.about-photos img {
  /* polaroid-style PNGs with transparency — shadow the shape, not the canvas */
  filter: saturate(0.9) drop-shadow(0 14px 26px rgba(0, 0, 0, 0.5));
}
.about-photos img:nth-child(1) { transform: rotate(-2.5deg); }
.about-photos img:nth-child(2) { transform: rotate(1.5deg); }
.about-photos img:nth-child(3) { transform: rotate(-1deg); }
@media (max-width: 640px) {
  .about-photos { grid-template-columns: 1fr; max-width: 320px; margin-left: auto; margin-right: auto; }
}

.contact-card {
  margin-top: 3rem;
  text-align: center;
  border: 1px solid rgba(68, 68, 102, 0.45);
  border-radius: var(--radius);
  background: rgba(32, 27, 69, 0.4);
  padding: 2.4rem 2rem;
}
.contact-card h2 { font-size: 1.7rem; font-weight: 700; margin-bottom: 0.7rem; }
.contact-card p { color: var(--lilac); }
.contact-card a.mail {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--gold);
  text-decoration: none;
}
.contact-card a.mail:hover { text-decoration: underline; }

/* Reading order strip (saga page) */
.reading-order {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lilac);
}
.reading-order .step {
  border: 1px solid rgba(68, 68, 102, 0.6);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  background: rgba(32, 27, 69, 0.45);
}
.reading-order .step strong { color: var(--bone); font-weight: 600; }
.reading-order .step .num { color: var(--gold); font-weight: 700; margin-right: 0.5rem; }
.reading-order .arrow { color: var(--gold); }
@media (max-width: 560px) {
  .reading-order { flex-direction: column; gap: 0.6rem; font-size: 0.78rem; letter-spacing: 0.08em; }
  .reading-order .step { text-align: center; white-space: nowrap; }
  .reading-order .arrow { transform: rotate(90deg); line-height: 1; }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pink);
  color: var(--deep);
  padding: 0.7rem 1.2rem;
  z-index: 200;
  font-weight: 700;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Reveal on scroll — hidden only when JS is present to reveal it again */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}
