/* Derick James — home page only (loads after site.css) */

/* ---------- Hero ---------- */
.hero {
  height: 100vh; height: 100svh; min-height: 620px; overflow: hidden;
  display: flex; align-items: center; padding: 0;
  position: relative; z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, rgba(0, 229, 255, 0.14), transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(0, 229, 255, 0.07), transparent 70%),
    radial-gradient(ellipse 35% 45% at 10% 32%, rgba(0, 229, 255, 0.11), transparent 70%),
    radial-gradient(ellipse 35% 45% at 90% 32%, rgba(0, 229, 255, 0.11), transparent 70%),
    var(--bg);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(234, 239, 245, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 239, 245, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 65% 60% at 50% 45%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 65% 60% at 50% 45%, #000 30%, transparent 75%);
}
.hero-line { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; z-index: 3; background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.55), transparent); }
.hero-content { position: relative; z-index: 2; width: 100%; max-width: 1120px; margin: 0 auto; padding: 90px 24px 40px; text-align: center; }

.hero-eyebrow {
  font-family: var(--display); font-size: 13px; font-weight: 500;
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent); margin-bottom: 24px;
}
.hero-title {
  font-family: var(--display); font-weight: 700; font-size: clamp(38px, 6vw, 84px);
  line-height: 1.05; letter-spacing: 0.01em; text-shadow: 0 0 40px rgba(0, 229, 255, 0.25);
}
/* headline is hidden until magic.js is ready to animate it; CSS failsafe shows it after 3.5s regardless */
html.js .hero-title { opacity: 0; animation: titleFail 0.01s 3.5s forwards; }
html.title-ready .hero-title { opacity: 1; animation: none; }
@keyframes titleFail { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.js .hero-title { opacity: 1; animation: none; } }

.hero-ctas { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* characters flanking the headline (static, inside the hero) */
.hero-char {
  position: absolute; z-index: 1; top: 14vh; width: min(40vw, 540px); aspect-ratio: 1; height: auto;
  pointer-events: none; user-select: none; mix-blend-mode: screen; opacity: 0.7;
}
.hero-char-f {
  left: -3vw;
  -webkit-mask-image: radial-gradient(ellipse 82% 76% at 26% 44%, #000 45%, transparent 85%);
  mask-image: radial-gradient(ellipse 82% 76% at 26% 44%, #000 45%, transparent 85%);
}
.hero-char-m {
  right: -3vw;
  -webkit-mask-image: radial-gradient(ellipse 82% 76% at 74% 44%, #000 45%, transparent 85%);
  mask-image: radial-gradient(ellipse 82% 76% at 74% 44%, #000 45%, transparent 85%);
}

/* drifting cover art behind the page: transparent WebP, moved by transform only */
.art-drift {
  position: fixed; z-index: -1; pointer-events: none; aspect-ratio: 1;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: 0.5; will-change: transform;
}
.art-zero      { top: 14vh; right: 4vw;  width: 300px; background-image: url('zero-state-falling.webp'); }
.art-sentience { top: 36vh; left: 4vw;   width: 280px; background-image: url('sentience-falling.webp'); }
.art-hourglass { top: 46vh; right: 17vw; width: 290px; background-image: url('hourglass-falling.webp'); }

/* ---------- Sections ---------- */
.home-section { padding: 100px 0; }
.section-tag {
  font-family: var(--display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.section-title { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4vw, 44px); line-height: 1.15; margin-bottom: 28px; }

/* ---------- Book showcase ---------- */
.book-showcase { display: grid; grid-template-columns: 420px 1fr; gap: 60px; align-items: center; }
.book-showcase .book-mockup { position: relative; display: flex; justify-content: center; padding-bottom: 34px; perspective: 1200px; }
.book-showcase .book-mockup::before {
  content: ""; position: absolute; inset: 8% 10%;
  background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.2), transparent 65%);
  filter: blur(28px); pointer-events: none;
}
.book-showcase .book-cover {
  position: relative; width: 320px; max-width: 100%; height: auto; border-radius: 14px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 229, 255, 0.18);
}
.synopsis { font-size: 16.5px; color: var(--muted); max-width: 560px; }
.buy-row { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Newsletter ---------- */
.neural-net {
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: 20px; padding: 48px 44px;
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.10), 0 20px 60px rgba(0, 0, 0, 0.4);
  max-width: 720px; margin: 0 auto;
}
.neural-net h2 { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.25; margin-bottom: 10px; }
.neural-net .lede { color: var(--muted); font-size: 15.5px; margin-bottom: 28px; }
.neural-form { display: flex; gap: 12px; flex-wrap: wrap; }
.neural-form input { flex: 1; min-width: 220px; width: auto; }
.neural-form .form-status { flex-basis: 100%; margin-top: 4px; }

@media (max-width: 900px) {
  .book-showcase { grid-template-columns: 1fr; gap: 36px; }
  .home-section { padding: 72px 0; }
  .hero-content { padding-top: 96px; }
  /* characters stay on phones, tucked in low and softer */
  .hero-char { top: auto; bottom: 4vh; width: min(66vw, 380px); opacity: 0.5; }
  .hero-char-f { left: -16vw; }
  .hero-char-m { right: -16vw; }
  .art-zero, .art-sentience, .art-hourglass { width: 220px; opacity: 0.55; }
}
@media (max-width: 600px) {
  .neural-net { padding: 32px 22px; }
  .neural-net h2 { font-size: 23px; }
}
