/* ============================================
   JENNY FIGMENT — Homepage (Storybook Studio)
   ============================================ */

.home-hero {
  position: relative;
  background-color: var(--cream-paper);
  padding-block: clamp(3rem, 8vw, 6rem);
}

/* Subtle paper grain only (no colored blobs); stacks lightly with global body grain */
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 120px;
  opacity: 0.45;
}

/* Faint warm wash behind the headline column — not a full-bleed blob */
.home-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 120% 70% at 18% 18%,
      rgba(230, 150, 95, 0.11) 0%,
      rgba(253, 240, 220, 0.04) 42%,
      transparent 68%
    );
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 64em) {
  .home-hero__inner {
    grid-template-columns: 1.3fr 0.9fr;
    gap: var(--space-12);
  }
}

.hero-kicker {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink-hot);
  margin-bottom: var(--space-4);
}

.home-hero__title {
  max-width: 14ch;
  margin-bottom: var(--space-4);
}

.home-hero__copy {
  color: var(--burgundy-light);
  max-width: 52ch;
  margin-bottom: var(--space-6);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.paint-note {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: var(--space-6);
  box-shadow: 0 10px 30px rgba(43, 22, 27, 0.11);
  border: 2px solid rgba(43, 22, 27, 0.08);
}

.paint-note__layout {
  display: grid;
  gap: var(--space-5);
  align-items: center;
  justify-items: center;
  text-align: center;
}

@media (min-width: 36em) {
  .paint-note__layout {
    grid-template-columns: 1fr minmax(7.5rem, 9.5rem);
    justify-items: stretch;
    text-align: left;
    gap: var(--space-6);
  }

  .paint-note__cover-wrap {
    justify-self: end;
  }
}

.paint-note__cover-wrap {
  display: block;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow:
    0 6px 20px rgba(43, 22, 27, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transform: rotate(2.5deg);
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s ease;
  text-decoration: none;
  line-height: 0;
}

.paint-note__cover-wrap:hover {
  transform: rotate(1deg) translateY(-3px);
  box-shadow:
    0 12px 28px rgba(43, 22, 27, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.paint-note__cover-wrap:focus-visible {
  outline: 2px solid var(--pink-hot);
  outline-offset: 4px;
}

.paint-note__cover {
  display: block;
  width: 100%;
  max-width: 11rem;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  object-position: center bottom;
  background: linear-gradient(180deg, rgba(43, 22, 27, 0.04), transparent 35%);
}

.paint-note__body {
  min-width: 0;
}

.paint-note::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 1.25rem;
  width: 4.25rem;
  height: 1.1rem;
  border-radius: 3px;
  background: rgba(255, 184, 204, 0.7);
  transform: rotate(-4deg);
}

.paint-note__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--andy-blue);
  margin-bottom: var(--space-2);
}

.paint-note h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.paint-note__body p {
  color: var(--burgundy-light);
  margin-bottom: var(--space-4);
}

.paint-note__cta {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  color: var(--pink-hot);
  transition: color var(--duration-fast);
}

.paint-note__cta:hover {
  color: var(--burgundy);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.home-paths {
  background: #fffdf8;
}

.path-grid {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

@media (min-width: 48em) {
  .path-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.path-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 2px solid rgba(43, 22, 27, 0.08);
  box-shadow: var(--shadow-sm);
}

.path-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.path-card p {
  color: var(--burgundy-light);
  margin-bottom: var(--space-4);
}

.path-card a {
  font-weight: 700;
  text-decoration: none;
}

.path-card--kids {
  border-top: 6px solid var(--arachna-teal);
}

.path-card--adults {
  border-top: 6px solid var(--flora-green);
}

.home-books {
  background: linear-gradient(
    180deg,
    rgba(214, 139, 70, 0.1) 0%,
    #fffaf7 52%,
    var(--cream-light) 100%
  );
}

.home-books__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.home-text-link {
  font-weight: 700;
  text-decoration: none;
}

.book-shelf {
  margin-top: var(--space-6);
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 48em) {
  .book-shelf {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mini-book-card {
  display: block;
  background: #fff;
  border-radius: var(--radius-md);
  border: 2px solid rgba(43, 22, 27, 0.08);
  padding: var(--space-5);
  text-decoration: none;
  color: var(--burgundy);
  transition: transform var(--duration-fast) var(--ease-bounce), box-shadow var(--duration-fast) var(--ease-smooth);
}

.mini-book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: var(--burgundy);
}

.mini-book-card__swatch {
  display: block;
  width: 2.4rem;
  height: 0.8rem;
  border-radius: 999px;
  background-color: var(--book-color, var(--pink-hot));
  margin-bottom: var(--space-3);
}

.mini-book-card__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  max-height: 9rem;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-sm);
}

.mini-book-card h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
  font-family: var(--font-kids);
}

.mini-book-card p {
  font-size: var(--text-sm);
  color: var(--burgundy-light);
  margin: 0;
}

.home-newsletter {
  background-color: var(--cream);
  text-align: center;
}

.home-newsletter__copy {
  margin-inline: auto;
  color: var(--burgundy-light);
  margin-bottom: var(--space-5);
}

.home-newsletter .newsletter-form {
  margin-inline: auto;
  justify-content: center;
}

/* Cream hairlines above and below each homepage band (single seam between adjacent sections) */
#main-content > .section {
  border-bottom: 1px solid var(--cream);
}

#main-content > .section:first-child,
#main-content > *:not(.section) + .section {
  border-top: 1px solid var(--cream);
}

#main-content > .section + .section {
  border-top: none;
}

#main-content > .home-hero {
  border-bottom: none;
}

#main-content > .home-books {
  border-bottom: none;
}

#main-content > .home-paths {
  border-bottom: none;
}


/* ============================================
   Elevated hero — pastel confetti ground,
   accented headline, Lucky Penny featured card
   ============================================ */

.home-hero--elevated {
  overflow: hidden;
  /* Tighter above the headline, unchanged below so the torn edge keeps its room */
  padding-block: clamp(2.75rem, 7vw, 5.5rem) clamp(3.5rem, 9vw, 7rem);
  background: linear-gradient(180deg, #fffdfa 0%, var(--cream-paper) 100%);
}

.home-hero--elevated::after { display: none; }

/* --- scrapbook paper ground --- */
.home-hero__confetti {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-rules {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(180deg, transparent 0 2.1rem, rgba(91, 147, 224, 0.16) 2.1rem 2.2rem),
    linear-gradient(90deg, transparent 0 3.5rem, rgba(242, 96, 155, 0.3) 3.5rem 3.62rem, transparent 3.62rem);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 70%, transparent 90%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 70%, transparent 90%, transparent);
}

.hero-torn {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2rem;
  z-index: 2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0,14 C30,2 55,22 80,12 C110,2 130,20 160,10 C195,0 215,18 245,8 C275,0 300,16 335,6 C365,0 385,18 420,8 C450,0 470,20 505,10 C535,0 560,22 595,12 C625,2 645,20 680,10 C710,0 735,18 770,8 C800,0 820,16 855,6 C885,0 910,20 945,10 C975,0 995,18 1030,8 C1060,0 1085,22 1120,12 C1150,2 1175,16 1200,8 L1200,28 L0,28 Z' fill='%23e6f2ff'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.hero-torn-top {
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 2rem;
  z-index: 2;
  pointer-events: none;
  transform: scaleY(-1);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0,14 C30,2 55,22 80,12 C110,2 130,20 160,10 C195,0 215,18 245,8 C275,0 300,16 335,6 C365,0 385,18 420,8 C450,0 470,20 505,10 C535,0 560,22 595,12 C625,2 645,20 680,10 C710,0 735,18 770,8 C800,0 820,16 855,6 C885,0 910,20 945,10 C975,0 995,18 1030,8 C1060,0 1085,22 1120,12 C1150,2 1175,16 1200,8 L1200,28 L0,28 Z' fill='%23e6f2ff'/%3E%3C/svg%3E");
}

/* The Books band picks the paper idea up again */
.home-books--paper {
  position: relative;
  overflow: hidden;
}

.home-books--paper .hero-rules {
  opacity: 0.75;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 74%, transparent 92%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 74%, transparent 92%, transparent);
}

.home-books--paper > .container {
  position: relative;
  z-index: 1;
}

.home-books--paper .hero-torn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0,14 C30,2 55,22 80,12 C110,2 130,20 160,10 C195,0 215,18 245,8 C275,0 300,16 335,6 C365,0 385,18 420,8 C450,0 470,20 505,10 C535,0 560,22 595,12 C625,2 645,20 680,10 C710,0 735,18 770,8 C800,0 820,16 855,6 C885,0 910,20 945,10 C975,0 995,18 1030,8 C1060,0 1085,22 1120,12 C1150,2 1175,16 1200,8 L1200,28 L0,28 Z' fill='%23f3ecff'/%3E%3C/svg%3E");
}

/* --- headline --- */
.home-hero--elevated .home-hero__title {
  max-width: 18ch;
  line-height: 1.05;
}

.home-hero__accent {
  position: relative;
  display: inline-block;
  color: var(--pink-hot);
}

.home-hero__accent::after {
  content: '';
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -0.12em;
  height: 0.16em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2,8 C18,2 32,10 48,5 C64,0 78,9 94,4 C104,1 112,6 118,4' fill='none' stroke='%23f0b429' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.home-hero--elevated .home-hero__copy {
  font-size: var(--text-lg);
  color: var(--burgundy-warm);
}

/* --- fact row --- */
.home-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  list-style: none;
  padding: 0;
  margin: var(--space-8) 0 0;
  font-size: var(--text-sm);
  color: var(--burgundy-light);
}

/* Keep all three facts on one line rather than wrapping to a lonely
   second line — shrink text/spacing first, and only as a last resort
   (very narrow phones) let the row scroll horizontally. */
@media (max-width: 36em) {
  .home-hero__facts {
    flex-wrap: nowrap;
    gap: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .home-hero__facts::-webkit-scrollbar {
    display: none;
  }

  .home-hero__facts li {
    flex-shrink: 0;
  }
}

.home-hero__facts li {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0;
}

.home-hero__facts li + li {
  padding-left: var(--space-6);
  border-left: 2px dotted rgba(79, 61, 66, 0.22);
}

@media (max-width: 36em) {
  .home-hero__facts li + li {
    padding-left: var(--space-3);
  }
}

.home-hero__facts strong {
  font-family: var(--font-kids);
  font-weight: 700;
  color: var(--pink-hot);
}

/* --- featured card, Lucky Penny dress --- */
.paint-note--penny {
  background: #fdf5e8;
  border-color: rgba(200, 52, 127, 0.22);
  box-shadow: 0 14px 38px rgba(36, 21, 72, 0.18);
  transform: rotate(-0.8deg);
  transition: transform var(--duration-normal) var(--ease-bounce);
}

.paint-note--penny:hover {
  transform: rotate(0deg) translateY(-3px);
}

/* Same masking tape as the taped covers on the bookshelf */
.paint-note--penny::before {
  top: -0.75rem;
  width: 4.6rem;
  height: 1.5rem;
  border-radius: 0;
  background: rgba(246, 200, 95, 0.62);
  border-left: 1px dashed rgba(255, 255, 255, 0.55);
  border-right: 1px dashed rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 2px rgba(43, 22, 27, 0.14);
  transform: rotate(-4deg);
}

.paint-note--penny h2 {
  font-size: var(--text-2xl);
  color: #c9601f;
}

.paint-note__label--new {
  display: inline-block;
  font-family: var(--font-kids);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: #fff;
  background: #b32a70;
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
}

.paint-note--penny .paint-note__cta {
  color: #c8347f;
}

.paint-note--penny .paint-note__cta:hover {
  color: #c9601f;
}

.paint-note--penny .paint-note__cover-wrap {
  box-shadow: 0 10px 26px rgba(36, 21, 72, 0.24);
  transform: rotate(2deg);
}

/* Lucky Penny's cover is ~3:4, not the 2:3 the base rule boxes covers into —
   letterboxing left a blank band above the art. Let it keep its own ratio. */
.paint-note--penny .paint-note__cover {
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  background: none;
}

.art-placeholder--featured {
  width: 100%;
  max-width: 11rem;
  padding: var(--space-4);
  border-width: 2px;
  border-radius: var(--radius-md);
}

.art-placeholder--featured .art-placeholder__title { font-size: var(--text-base); }
.art-placeholder--featured .art-placeholder__hint { font-size: 0.7rem; }
