/* Typography refinements layered over the original compact stylesheet. */
:root {
  /* Replace the site's original orange accent with a complementary blue. */
  --orange: #258fca;
}

html {
  /* The custom scroll animation below controls timing and easing. */
  scroll-behavior: auto;
}

body {
  font-family: "Overpass", Arial, Helvetica, sans-serif;
}

h1 {
  line-height: 1.08;
}

h1 em {
  font-style: italic;
  font-weight: 500;
  font-variant-ligatures: none;
  letter-spacing: -0.005em;
}

.button span {
  display: inline-block;
  font-size: 1.25em;
  font-weight: 900;
  line-height: 1;
  transform: scaleX(1.18);
  transform-origin: left center;
}

/* Keep Clyde's hero treatment clean and flat. */
.hero::before {
  display: none;
}

.hero-art img {
  filter: none;
}

.hero-art .spark {
  color: var(--yellow);
}

/* Lift the stamp lettering into the circle's roomier upper half. */
.hero-stamp {
  padding-bottom: 18px;
}

.marquee div {
  display: flex;
  width: max-content;
  animation-duration: 18s;
}

.marquee div span {
  flex: none;
  padding-right: 1.5rem;
}

.quote strong {
  font-family: Georgia, serif;
}

.portrait svg {
  width: 48%;
  height: 48%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cta-second-line {
  display: inline-block;
  margin-top: 0.35em;
}

@media (max-width: 850px) {
  h1 {
    line-height: 1.1;
  }
}

/* Corner artwork for the local preview. */
.hero-flamecorner {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(160px, 21vw, 315px);
  height: auto;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 850px) {
  .hero-flamecorner { width: 125px; }
  .hero-copy .eyebrow { max-width: calc(100% - 120px); }
}
@media (max-width: 520px) {
  .hero-flamecorner { width: 90px; }
  .hero-copy .eyebrow { max-width: calc(100% - 80px); }
}

/* Story illustration and closing book display. */
.story-art {
  margin: 0;
  align-self: center;
}
.story-art img {
  display: block;
  width: 100%;
  height: auto;
}
.final-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}
.final-cta h2 {
  font-size: clamp(2.4rem, 4.1vw, 5rem);
}
.final-cta .book {
  width: 100%;
}
.final-cta .book img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
  mix-blend-mode: normal;
  transform: none;
}
@media (max-width: 850px) {
  .story-art {
    width: min(100%, 460px);
    justify-self: center;
  }
  .final-cta {
    grid-template-columns: 1fr;
  }
  .final-cta h2 {
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  }
  .final-cta .book {
    max-width: 500px;
    justify-self: center;
  }
}

/* Keep the burnt-paper outline fixed; animate only the flame interior. */
.hero-flamecorner {
  animation: none;
}
.hero-flame-flicker {
  /* Feather the moving interior into the fixed artwork without a visible seam. */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22930%22%20height%3D%22775%22%20viewBox%3D%220%200%20930%20775%22%3E%3Cdefs%3E%3Cfilter%20id%3D%22soft%22%20x%3D%22-50%25%22%20y%3D%22-50%25%22%20width%3D%22200%25%22%20height%3D%22200%25%22%3E%3CfeGaussianBlur%20stdDeviation%3D%2228%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cpath%20fill%3D%22white%22%20filter%3D%22url%28%23soft%29%22%20d%3D%22M%20290%2C-120%20H%201100%20V%20520%20L%20830%2C455%20680%2C430%20570%2C360%20470%2C240%20320%2C155%20Z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22930%22%20height%3D%22775%22%20viewBox%3D%220%200%20930%20775%22%3E%3Cdefs%3E%3Cfilter%20id%3D%22soft%22%20x%3D%22-50%25%22%20y%3D%22-50%25%22%20width%3D%22200%25%22%20height%3D%22200%25%22%3E%3CfeGaussianBlur%20stdDeviation%3D%2228%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cpath%20fill%3D%22white%22%20filter%3D%22url%28%23soft%29%22%20d%3D%22M%20290%2C-120%20H%201100%20V%20520%20L%20830%2C455%20680%2C430%20570%2C360%20470%2C240%20320%2C155%20Z%22%2F%3E%3C%2Fsvg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: corner-flame-flicker 2.7s ease-in-out infinite;
}
@keyframes corner-flame-flicker {
  0%, 100% { transform: translateX(0); filter: brightness(1); }
  13% { transform: translateX(-0.5px); filter: brightness(1.045); }
  27% { transform: translateX(0.3px); filter: brightness(0.985); }
  39% { transform: translateX(-0.8px); filter: brightness(1.06); }
  48% { transform: translateX(0.3px); filter: brightness(1.01); }
  66% { transform: translateX(-0.5px); filter: brightness(1.04); }
  81% { transform: translateX(0.4px); filter: brightness(0.99); }
  92% { transform: translateX(-0.5px); filter: brightness(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-flame-flicker {
    display: none;
  }
}

/* Mobile headline: separate sentences more than wrapped lines. */
@media (max-width: 850px) {
  .hero h1 {
    line-height: 1.05;
  }
  .hero h1 > br {
    display: none;
  }
  .hero h1 > .hero-sentence {
    display: block;
  }
  .hero h1 > .hero-sentence ~ .hero-sentence {
    margin-top: 0.24em;
  }
}

/* Compact mobile header with a clearly labeled book link. */
@media (max-width: 850px) {
  .site-header {
    height: 66px;
    padding-inline: 18px;
    gap: 16px;
  }
  .site-header .brand img {
    width: 155px;
  }
  .site-header .button-small {
    font-size: 0.8rem;
    padding: 11px 14px;
    gap: 10px;
    white-space: nowrap;
    min-height: 44px;
    flex-shrink: 0;
  }
  .site-header .button-small span {
    font-size: 1.2em;
  }
}
@media (max-width: 360px) {
  .site-header {
    padding-inline: 12px;
    gap: 10px;
  }
  .site-header .brand img {
    width: 135px;
  }
  .site-header .button-small {
    padding-inline: 12px;
    gap: 8px;
  }
}

.footer-credit-separator {
  display: inline-block;
  margin-inline: 0.35em;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1em;
  font-weight: 400;
  color: var(--ink);
}

/* Give the question, setup, and punchline distinct visual weight. */
.quote p {
  max-width: 19ch;
  font-size: clamp(2rem, 4.25vw, 4.4rem);
  line-height: 1.15;
  text-wrap: balance;
}
.quote strong {
  font-family: "Overpass", Arial, Helvetica, sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  margin-top: clamp(30px, 4vw, 54px);
}
.quote span {
  display: block;
  margin-top: clamp(24px, 3vw, 40px);
  line-height: 1;
}

/* Real creator portraits replace the illustrated badges. */
.creator-photo {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
}
@media (max-width: 850px) {
  .creator-photo {
    width: 80px;
    height: 80px;
  }
}

/* Lower the closing book slightly beside the desktop headline. */
@media (min-width: 851px) {
  .final-cta .book {
    transform: translateY(30px);
  }
}
