:root {
    --night: #0f1620;
    --night-2: #16202d;
    --haze: #aab6c4;
    --paper: #e8ecf1;
    --amber: #e3a04a;
    --glitch: #5fd3d8;
    --muted: #8b98a8;
    --line: rgba(232,236,241,.14);
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--night);
    color: var(--paper);
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
    font-size: 1.125rem;
    line-height: 1.65;
  }
  a { color: inherit; }
  :focus-visible { outline: 3px solid var(--glitch); outline-offset: 3px; }
  .wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

  h1, h2, h3, .display {
    font-family: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
    font-weight: 900;
    line-height: .95;
    margin: 0;
    letter-spacing: .01em;
  }

  /* ---------- Top bar ---------- */
  header.top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--line);
  }
  .studio { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
  .studio .logo { height: 84px; width: auto; display: block; }
  .studio .logo.small { height: 64px; }
  .studio span { font-family: "Big Shoulders Display", Impact, sans-serif; font-weight: 700; font-size: 1.25rem; }
  .studio small { display: block; font-family: "Source Serif 4", Georgia, serif; font-weight: 400; font-size: .8rem; color: var(--muted); line-height: 1.1; }
  nav { display: flex; gap: 1.4rem; font-size: 1rem; }
  nav a { text-decoration: none; color: var(--haze); padding: .3rem 0; }
  nav a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 6px; }

  /* ---------- Hero: two worlds with a glitch seam ---------- */
  .hero { position: relative; padding: 5rem 0 0; }
  .hero-top {
    background: linear-gradient(180deg, var(--night) 0%, #24354a 100%);
    padding-bottom: 3.2rem;
  }
  .hero h1 { font-size: clamp(4.2rem, 15vw, 10.5rem); }
  .hero .tag { max-width: 34ch; font-size: 1.35rem; color: var(--haze); margin: 1.4rem 0 0; }
  .seam {
    height: 10px; position: relative;
    background:
      repeating-linear-gradient(90deg, var(--glitch) 0 38px, transparent 38px 61px, var(--amber) 61px 79px, transparent 79px 130px);
    animation: jitter 5s steps(1) infinite;
  }
  @keyframes jitter {
    0%, 92%, 100% { transform: translateX(0); }
    93% { transform: translateX(14px); }
    95% { transform: translateX(-9px); }
    97% { transform: translateX(6px); }
  }
  .hero-bottom {
    background:
      radial-gradient(circle at 12% 30%, rgba(227,160,74,.35) 0 6px, transparent 90px),
      radial-gradient(circle at 78% 60%, rgba(227,160,74,.28) 0 5px, transparent 110px),
      radial-gradient(circle at 45% 90%, rgba(95,211,216,.14) 0 4px, transparent 120px),
      #0b1017;
    padding: 2rem 0 3rem;
  }
  .hero-bottom p { margin: 0; max-width: 46ch; }
  .btns { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
  .btn {
    display: inline-block; text-decoration: none;
    font-family: "Big Shoulders Display", Impact, sans-serif; font-weight: 700;
    font-size: 1.25rem; letter-spacing: .03em;
    padding: .7rem 1.5rem; border: 2px solid var(--amber);
    background: var(--amber); color: #1a1208; cursor: pointer;
  }
  .btn:hover { background: #f0b562; border-color: #f0b562; }
  .btn.ghost { background: transparent; color: var(--paper); border-color: var(--haze); }
  .btn.ghost:hover { background: rgba(255,255,255,.08); }
  .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

  /* ---------- Sections ---------- */
  section { padding: 4.5rem 0; border-top: 1px solid var(--line); }
  section h2 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: .5rem; }
  .lead { color: var(--haze); max-width: 55ch; margin: 0 0 2.5rem; }

  .books { display: grid; gap: 3rem; }
  .book { display: grid; grid-template-columns: 260px 1fr; gap: 2.2rem; align-items: start; }

  /* Placeholder cover. When you have the real cover, see the note in the README steps. */
  .cover {
    aspect-ratio: 2 / 3; width: 100%; position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 1.1rem; border: 1px solid var(--line);
    background:
      linear-gradient(180deg, #4a6079 0%, #22303f 49%, transparent 49%),
      radial-gradient(circle at 25% 78%, rgba(227,160,74,.5) 0 5px, transparent 80px),
      radial-gradient(circle at 80% 88%, rgba(227,160,74,.35) 0 4px, transparent 70px),
      #0a0e14;
  }
  .cover::after {
    content: ""; position: absolute; left: 0; right: 0; top: 49%; height: 7px;
    background: repeating-linear-gradient(90deg, var(--glitch) 0 22px, transparent 22px 37px, var(--amber) 37px 47px, transparent 47px 78px);
  }
  .cover .series { font-size: .8rem; color: var(--paper); opacity: .85; }
  .cover .ttl { font-family: "Big Shoulders Display", Impact, sans-serif; font-weight: 900; font-size: 2.4rem; line-height: .92; }
  .cover .by { font-family: "Big Shoulders Display", Impact, sans-serif; font-weight: 700; font-size: 1.15rem; letter-spacing: .08em; }
  .cover .mid { position: relative; z-index: 1; }

  .badge {
    display: inline-block; font-size: .95rem; padding: .15rem .7rem;
    border: 1px solid var(--glitch); color: var(--glitch); margin-bottom: .9rem;
  }
  .book h3 { font-size: clamp(2rem, 5vw, 2.8rem); }
  .book .sub { color: var(--amber); font-style: italic; margin: .35rem 0 1rem; }
  .book p { max-width: 52ch; margin: 0 0 1rem; }

  /* ---------- Subscribe ---------- */
  .subscribe { background: var(--night-2); }
  .subscribe .box { max-width: 640px; }
  .subscribe .note { color: var(--muted); font-size: .95rem; margin-top: 1rem; }

  /* ---------- About ---------- */
  .about p { max-width: 60ch; }
  .about .grid { display: grid; grid-template-columns: 1fr 200px; gap: 3rem; align-items: start; }
  .about .photo { width: 100%; max-width: 200px; height: auto; display: block; border: 1px solid var(--line);  }
  @media (max-width: 720px) { .about .grid { grid-template-columns: 1fr; } .about .photo { max-width: 180px; } }

  /* ---------- Footer ---------- */
  footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--muted); font-size: .95rem; }
  footer .row { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
  footer .studio span { font-size: 1.1rem; color: var(--paper); }

  @media (max-width: 720px) {
    .book { grid-template-columns: 1fr; }
    .cover { max-width: 260px; }
    nav { gap: 1rem; font-size: .95rem; }
    .hero { padding-top: 3rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    .seam { animation: none; }
    html { scroll-behavior: auto; }
  }

.section-gap { margin-top: 5rem; margin-bottom: 2rem; }
img.cover-img { padding: 0; height: auto; aspect-ratio: 2 / 3; object-fit: cover; display: block; }

.page-404 { padding-top: 6rem; padding-bottom: 6rem; }
.big-404 { font-size: clamp(4rem, 14vw, 8rem); }

.cover.tall { aspect-ratio: 9 / 16; }
