:root {
  --bg: #0a0a10;
  --bg-ink: #06060b;
  --paper: #f4eedf;
  --ink: #ece6d6;
  --ink-soft: #a8a395;
  --ink-faint: #5e5a52;
  --magenta: #ff2a7f;
  --cyan: #2be6c2;
  --violet: #9574ff;
  --amber: #ffb347;
  --rule: rgba(244, 238, 223, 0.1);
  --rule-soft: rgba(244, 238, 223, 0.06);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(149, 116, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 80%, rgba(255, 42, 127, 0.15), transparent 60%),
    linear-gradient(var(--rule-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
  background-attachment: fixed;
  background-color: var(--bg);
}

::selection { background: var(--magenta); color: var(--bg); }

/* Overlays */
.noise {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scanlines {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 101;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.22) 3px,
    transparent 4px
  );
  opacity: 0.3;
  mix-blend-mode: multiply;
}

.vignette {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 99;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(4px);
}

.publisher-mark { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.publisher-mark .dot {
  width: 7px; height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(43, 230, 194, 0.7);
}
.status-line { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.status-line .blink { color: var(--magenta); font-size: 14px; line-height: 1; animation: blink 1.6s ease-in-out infinite; }

@keyframes blink { 0%, 65% { opacity: 1; } 75%, 100% { opacity: 0.18; } }

/* Main stage */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr);
  gap: 72px;
  padding: 72px 48px 80px;
  max-width: 1360px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

@media (max-width: 960px) {
  .stage {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 48px 24px 60px;
  }
}

/* Cover */
.cover-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-self: start;
  position: sticky;
  top: 40px;
}

@media (max-width: 960px) {
  .cover-slot { position: relative; top: auto; }
}

.cover-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 50px 100px -20px rgba(0, 0, 0, 0.75),
    0 20px 40px -10px rgba(255, 42, 127, 0.15),
    0 0 0 1px rgba(244, 238, 223, 0.09);
  transform: perspective(1800px) rotateY(-5deg) rotateX(1.5deg);
  transition: transform 700ms cubic-bezier(0.16, 0.8, 0.2, 1);
  animation: float 8s ease-in-out infinite;
}

.cover-frame:hover {
  transform: perspective(1800px) rotateY(0deg) rotateX(0deg) scale(1.015);
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

.cover-image {
  position: relative;
  width: 100%;
  height: 100%;
  background-image: url('assets/book-front-cover.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: contrast(1.04) saturate(1.08);
  animation: cover-glitch 3s infinite steps(1, end);
}

.cover-image::before,
.cover-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/book-front-cover.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0;
}

.cover-image::before {
  animation: cover-glitch-magenta 3s infinite steps(1, end);
}

.cover-image::after {
  animation: cover-glitch-cyan 3s infinite steps(1, end);
}

@keyframes cover-glitch {
  0%, 90%, 100% {
    transform: translate(0, 0);
    filter: contrast(1.04) saturate(1.08);
  }
  91% { transform: translate(-5px, 1px); filter: contrast(1.35) saturate(1.5) hue-rotate(4deg); }
  93% { transform: translate(4px, -2px); filter: contrast(1.2) saturate(1.3); }
  95% { transform: translate(-2px, 2px); filter: contrast(1.04) saturate(1.08); }
  97% { transform: translate(1px, 0); }
}

@keyframes cover-glitch-magenta {
  0%, 90%, 100% { opacity: 0; transform: translate(0, 0); clip-path: inset(0); }
  91% { opacity: 0.85; transform: translate(-7px, 0); filter: hue-rotate(-60deg) saturate(2.2); clip-path: inset(18% 0 58% 0); }
  93% { opacity: 0.7; transform: translate(5px, 2px); filter: hue-rotate(-60deg) saturate(2); clip-path: inset(62% 0 14% 0); }
  95% { opacity: 0.4; transform: translate(-3px, 0); clip-path: inset(36% 0 40% 0); }
}

@keyframes cover-glitch-cyan {
  0%, 90%, 100% { opacity: 0; transform: translate(0, 0); clip-path: inset(0); }
  91% { opacity: 0.7; transform: translate(7px, 0); filter: hue-rotate(140deg) saturate(2); clip-path: inset(44% 0 28% 0); }
  93% { opacity: 0.65; transform: translate(-5px, -2px); filter: hue-rotate(140deg) saturate(2); clip-path: inset(8% 0 72% 0); }
  95% { opacity: 0.35; transform: translate(3px, 1px); clip-path: inset(72% 0 10% 0); }
}

.cover-sweep {
  position: absolute;
  top: -120%;
  left: 0;
  width: 100%;
  height: 120%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(43, 230, 194, 0.12) 48%,
    rgba(255, 42, 127, 0.1) 52%,
    transparent 100%
  );
  mix-blend-mode: screen;
  animation: sweep 11s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sweep {
  0%, 85% { transform: translateY(0); opacity: 0; }
  88%, 97% { opacity: 1; }
  100% { transform: translateY(180%); opacity: 0; }
}

.cover-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

.cover-caption .sep {
  width: 3px; height: 3px; background: currentColor; border-radius: 50%;
  opacity: 0.6;
}

/* Content */
.content-slot {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-top: 12px;
}

/* Eyebrow */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.eyebrow-tag { color: var(--cyan); font-weight: 500; }
.eyebrow-line { flex: 0 0 36px; height: 1px; background: var(--cyan); opacity: 0.6; }
.eyebrow-author { color: var(--ink); font-weight: 600; letter-spacing: 0.25em; }

/* Title */
.title {
  font-family: 'Bungee', 'Impact', sans-serif;
  font-size: clamp(52px, 9vw, 116px);
  line-height: 0.88;
  letter-spacing: -0.015em;
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 4px 0;
  user-select: none;
}

.title-line {
  position: relative;
  display: inline-block;
  line-height: 1;
}

.title-line::before,
.title-line::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.85;
}

.title-line::before {
  color: var(--magenta);
  transform: translate(-4px, 0);
  animation: chroma-a 5s steps(2) infinite;
}

.title-line::after {
  color: var(--cyan);
  transform: translate(4px, 0);
  animation: chroma-b 5s steps(2) infinite;
}

@keyframes chroma-a {
  0%, 92%, 100% { transform: translate(-4px, 0); }
  93% { transform: translate(-9px, 1px); }
  95% { transform: translate(-2px, -1px); }
}

@keyframes chroma-b {
  0%, 92%, 100% { transform: translate(4px, 0); }
  93% { transform: translate(9px, -1px); }
  95% { transform: translate(2px, 1px); }
}

.title-and {
  font-family: 'Fraunces', 'Georgia', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.38em;
  line-height: 1;
  color: var(--ink-soft);
  padding: 6px 0 6px 22px;
  letter-spacing: 0.02em;
  position: relative;
}

.title-and::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 1px;
  background: var(--ink-soft);
  opacity: 0.5;
}

/* Coming / release */
.coming {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 2px,
      var(--rule-soft) 3px,
      transparent 4px
    );
}

.coming-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.coming-label {
  color: var(--ink-faint);
  min-width: 80px;
  font-weight: 500;
}

.coming-value {
  color: var(--paper);
  font-weight: 600;
  letter-spacing: 0.16em;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.coming-value .redact {
  background: var(--paper);
  color: transparent;
  padding: 0 6px;
  user-select: none;
  animation: flicker 6s ease-in-out infinite;
}

@keyframes flicker {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: 0.6; }
  95% { opacity: 1; }
  96% { opacity: 0.4; }
}

.coming-value .year { color: var(--paper); padding-left: 8px; }

.coming-value-sm {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0.22em;
}

.coming-row-sub { margin-top: -4px; }

/* Synopsis */
.synopsis {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 640px;
  font-family: 'Fraunces', 'Georgia', serif;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
}

.synopsis .pull {
  font-style: italic;
  font-size: 19px;
  line-height: 1.4;
  color: var(--paper);
  border-left: 2px solid var(--magenta);
  padding: 4px 0 4px 20px;
  margin: 4px 0 6px;
}

.synopsis .pull p { font-family: inherit; }

.synopsis .pull .pull-stars {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  font-size: 18px;
  line-height: 1;
  color: var(--magenta);
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px rgba(255, 42, 127, 0.45);
}

.synopsis .pull cite {
  display: block;
  margin-top: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--magenta);
  font-weight: 500;
}

.synopsis em {
  color: var(--cyan);
  font-style: italic;
  font-weight: 500;
}

.synopsis .debut-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-soft);
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
  letter-spacing: 0.01em;
}

/* Retailers */
.retailers {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}

.retailers-heading {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 14px;
}

.retailers-heading::before {
  content: '→';
  color: var(--magenta);
  font-size: 14px;
}

.retailers-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--rule) 0%, transparent 100%);
}

.retailer-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 8px;
}

.retailer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  background: rgba(244, 238, 223, 0.015);
  font-size: 11.5px;
  color: var(--ink-soft);
  cursor: not-allowed;
  user-select: none;
  transition: border-color 260ms ease, color 260ms ease, background 260ms ease;
  position: relative;
  overflow: hidden;
}

.retailer::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--magenta);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.retailer:hover {
  color: var(--paper);
  border-color: rgba(255, 42, 127, 0.5);
  background: rgba(255, 42, 127, 0.05);
}

.retailer:hover::before { transform: scaleY(1); }

.retailer:hover .retailer-tag {
  color: var(--magenta);
  border-color: var(--magenta);
}

.retailer-name {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
}

.retailer-tag {
  font-size: 9px;
  letter-spacing: 0.28em;
  padding: 3px 7px;
  border: 1px solid var(--rule);
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 260ms ease, border-color 260ms ease;
}

.retailers-note {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-family: 'IBM Plex Mono', monospace;
}

/* Author */
.author {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

.author-heading {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-heading::before {
  content: '→';
  color: var(--cyan);
  font-size: 14px;
}

.author-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--rule) 0%, transparent 100%);
}

.author-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
  font-family: 'Fraunces', 'Georgia', serif;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
}

.author-body .author-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--paper);
  font-weight: 600;
}

.author-body em {
  color: var(--cyan);
  font-style: italic;
  font-weight: 500;
}

/* Footer */
.bottombar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 48px;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-top: 1px solid var(--rule);
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
}

/* Entrance animations */
.topbar, .cover-slot, .content-slot > *, .bottombar {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 900ms cubic-bezier(0.16, 0.8, 0.2, 1) forwards;
}

.topbar { animation-delay: 60ms; }
.cover-slot { animation-delay: 220ms; }
.content-slot > *:nth-child(1) { animation-delay: 280ms; }
.content-slot > *:nth-child(2) { animation-delay: 360ms; }
.content-slot > *:nth-child(3) { animation-delay: 460ms; }
.content-slot > *:nth-child(4) { animation-delay: 560ms; }
.content-slot > *:nth-child(5) { animation-delay: 660ms; }
.content-slot > *:nth-child(6) { animation-delay: 760ms; }
.bottombar { animation-delay: 880ms; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .topbar, .cover-slot, .content-slot > *, .bottombar {
    opacity: 1;
    transform: none;
  }
  .title-line::before { transform: translate(-2px, 0); }
  .title-line::after { transform: translate(2px, 0); }
}

/* Small screens */
@media (max-width: 700px) {
  .topbar, .bottombar {
    padding: 18px 22px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .title-line::before { transform: translate(-2.5px, 0); }
  .title-line::after { transform: translate(2.5px, 0); }
  .title-and { padding-left: 4px; }
  .title-and::before { display: none; }
  .cover-frame { max-width: 320px; }
}

@media (max-width: 400px) {
  .retailer-grid { grid-template-columns: 1fr 1fr; }
}
