#hug-time .section-lead {
  max-width: 32em;
}

#hug-time .cbi p {
  line-height: 1.65;
}

#hug-time .section-note {
  max-width: 42em;
}

/* Gallery images belong to this section's own grid. */
#hug-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:clamp(10px,3vw,36px);height:auto;min-height:0;padding:22px var(--lp-inline-space) 36px;margin:0}
#hug-gallery .hug-loop-track{grid-column:1/-1;grid-row:1;min-width:0;overflow:hidden;font-size:clamp(35px,8vw,100px)}
#hug-gallery .hug-cut,#hug-gallery .hug-cut.c1,#hug-gallery .hug-cut.c2,#hug-gallery .hug-cut.c3{position:static;inset:auto;width:100%;height:auto;aspect-ratio:1.45;transform:none;grid-row:1}
#hug-gallery .hug-cut.c1{grid-column:1}
#hug-gallery .hug-cut.c2{grid-column:2}
#hug-gallery .hug-cut.c3{grid-column:3}

@media (max-width: 750px) {
  #hug-time .tt {
    font-size: clamp(28px, 7.4vw, 34px);
  }
  #hug-gallery{padding-inline:16px;gap:8px}
  #hug-gallery .hug-cut{border-radius:12px}
}

/* PDF page 1: HUG 1251–3053px at the 750px artboard width. */
#hug-time {
  display: flex;
  margin-top: -2px;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: calc(1470 * var(--u));
  padding: calc(70 * var(--u)) var(--lp-inline-space) calc(30 * var(--u));
  background: var(--pdf-mint);
}
#hug-time .lab { margin-bottom: calc(20 * var(--u)); }
#hug-time .tt {
  max-width: none;
  margin: 0 auto calc(22 * var(--u));
  font-size: clamp(26px, calc(47 * var(--u)), 47px);
  line-height: 1.43;
}
#hug-time .section-lead {
  margin: 0 auto calc(25 * var(--u));
  font-size: clamp(13px, calc(21 * var(--u)), 21px);
}
#hug-time .cbr {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: calc(640 * var(--u));
  margin: 0 auto;
  gap: calc(58 * var(--u));
}
#hug-time .baby-illustration {
  order: 1;
  width: min(100%, calc(410 * var(--u)));
  height: auto;
  aspect-ratio: 1.35;
  margin-inline: auto;
}
#hug-time .baby-illustration img {
  width: 100%;
  max-width: none;
  height: 100%;
  filter: none;
}
#hug-time .cbg { order: 2; display: grid; width: 100%; gap: calc(25 * var(--u)); }
#hug-time .cbi { padding: 0; }
#hug-time .cbi b {
  color: var(--pdf-red);
  font-size: clamp(16px, calc(28 * var(--u)), 28px);
  line-height: 1.4;
}
#hug-time .cbi p {
  font-size: clamp(12px, calc(18 * var(--u)), 18px);
  line-height: 1.6;
}
#hug-time .section-note {
  max-width: calc(640 * var(--u));
  margin: calc(28 * var(--u)) auto 0;
  text-align: left;
}
#hug-gallery {
  min-height: calc(332 * var(--u));
  padding: calc(15 * var(--u)) calc(18 * var(--u)) calc(30 * var(--u));
  gap: calc(8 * var(--u));
  background: var(--pdf-mint);
}
#hug-gallery .hug-loop-track {
  grid-row: 1;
  align-self: center;
  z-index: 1;
  color: #f7adb8;
  font-size: clamp(30px, 9vw, 45px);
  font-weight: 700;
  opacity: .8;
}
#hug-gallery .hug-cut,
#hug-gallery .hug-cut.c1,
#hug-gallery .hug-cut.c2,
#hug-gallery .hug-cut.c3 {
  grid-row: 1;
  align-self: center;
  z-index: 2;
  aspect-ratio: 1.25;
  border-radius: calc(14 * var(--u));
}
#hug-gallery .hug-gallery-caption {
  font-weight: 500;
  grid-column: 1 / -1;
  grid-row: 2;
  margin: calc(12 * var(--u)) 0 0;
  color: #766e6c;
  font-size: clamp(9px, calc(13 * var(--u)), 13px);
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transition: opacity .7s ease .14s;
}

@media (min-width: 750px) {
  #hug-time { min-height: 900px; padding: 100px var(--lp-inline-space) 75px; background: #d0e5e4; }
  #hug-time .tt { font-size: clamp(34px, 3.7vw, 54px); }
  #hug-time .cbr { flex-direction: row; align-items: center; max-width: 1120px; gap: clamp(32px, 5vw, 88px); }
  #hug-time .baby-illustration { flex: 0 0 42%; width: auto; max-width: 430px; height: auto; aspect-ratio: 1.2; }
  #hug-time .cbg { flex: 1; width: auto; gap: 22px; }
  #hug-time .cbi b { font-size: clamp(18px, 1.9vw, 26px); }
  #hug-time .cbi p { font-size: clamp(13px, 1.2vw, 17px); }
  #hug-time .section-note { max-width: 1120px; width: 100%; text-align: center; }
  #hug-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; min-height: 360px; padding: 28px var(--lp-inline-space) 40px; gap: 20px; background: #d0e5e4; }
  #hug-gallery .hug-cut { max-width: 330px; justify-self: center; }
}

/* The gallery appears once, then fades when its central photo passes the viewport center. */
#hug-gallery { overflow: hidden; }
#hug-gallery .hug-loop-track {
  width: max-content;
  max-width: none;
  justify-content: flex-start;
  gap: 0;
  overflow: visible;
  animation: hugTextMarquee 32s linear infinite;
  will-change: transform;
}
@keyframes hugTextMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
#hug-gallery .hug-cut,
#hug-gallery .hug-cut.c1,
#hug-gallery .hug-cut.c2,
#hug-gallery .hug-cut.c3 {
  width: clamp(68px, calc(125 * var(--u)), 170px);
  height: auto;
  aspect-ratio: 1;
  justify-self: center;
  opacity: 0;
  transform: scale(.75);
  animation: none;
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}
#hug-gallery .hug-cut.c2 { width: clamp(112px, calc(210 * var(--u)), 300px); transition-delay: .14s; }
#hug-gallery .hug-cut.c3 { width: clamp(78px, calc(150 * var(--u)), 225px); transition-delay: .28s; }
#hug-gallery.is-visible .hug-cut { opacity: 1; transform: scale(1); }
#hug-gallery.is-visible .hug-gallery-caption { opacity: 1; }
#hug-gallery.is-past-center .hug-cut { opacity: 0; transform: scale(.85); transition-delay: 0s; }
#hug-gallery.is-past-center .hug-gallery-caption { opacity: 0; transition-delay: 0s; }
@media (min-width: 750px) {
  #hug-gallery .hug-loop-track {
    margin-inline: calc(-1 * var(--lp-inline-space));
    font-size: clamp(74px, 9.5vw, 150px);
  }
  #hug-gallery .hug-cut.c1 { width: clamp(125px, 13vw, 170px); }
  #hug-gallery .hug-cut.c2 { width: clamp(210px, 21vw, 300px); }
  #hug-gallery .hug-cut.c3 { width: clamp(150px, 16vw, 225px); }
}
@media (prefers-reduced-motion: reduce) {
  #hug-gallery .hug-loop-track { animation: none; }
  #hug-gallery .hug-cut { transition: none; }
  #hug-gallery .hug-gallery-caption { transition: none; }
}
