/* Home — scoped styles (templates/home.php) */

/* Light variants of the heading pair on the dark story band */
/* Story (comp screen-1 §5, white band; review R1-11): large rounded then/now photo, airy copy, small pill. */
#jf-home-story { padding-top: clamp(48px, 5.2vw, 84px); padding-bottom: clamp(48px, 5.2vw, 84px); }
#jf-home-story .jf-subhead { font-weight: 500; }
#jf-home-story .jf-story-copy p { font-size: 15px; line-height: 1.9; max-width: 60ch; margin-bottom: 1.15rem; }
#jf-home-story .btn-sm { padding: 0.4rem 1.6rem; font-size: 12px; }
.jf-story-photo-wrap { position: relative; } /* holds the holiday layer over the photo */
.jf-story-photo { width: 100%; height: auto; border-radius: 24px; display: block; }
@media (max-width: 991.98px) { .jf-story-photo-wrap { max-width: 560px; margin: 0 auto; } .jf-story-photo { border-radius: 16px; } }

/* Flavor carousel: scroll-snap, looping (js/home.js clones the set either side). Crops up to 280px as on the
   retired Sweets page and in the comp (client 2026-11-11): 5-up from 1600px, 4-up from 1200, 3-up from 768, and
   one large flavor with a peek of the next on phones. */
.jf-slider-wrap { max-width: 1640px; padding-left: 72px; padding-right: 72px; }
.jf-slider {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 20px) / 4);
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 6px 2px 10px;
}
.jf-slider::-webkit-scrollbar { display: none; }
.jf-slider:focus-visible { outline: 3px solid var(--jf-accent); outline-offset: 4px; border-radius: 12px; }
.jf-slide { scroll-snap-align: start; text-align: center; display: grid; gap: 8px; align-content: start; }
.jf-slide-name { color: var(--jf-primary); font-size: 20px; font-weight: 700; margin: 0; min-height: 2.4em; display: flex; align-items: end; justify-content: center; }
.jf-slide .jf-flavor-crop { max-width: 280px; }
.jf-slide-link { display: block; }
.jf-slide-link:hover .jf-flavor-crop { transform: scale(1.04); }
.jf-flavor-crop { transition: transform 0.15s ease; }
.jf-slide-blurb { font-size: 15px; color: var(--jf-ink); margin: 0 auto; max-width: 26ch; line-height: 1.45; }
.jf-slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--jf-primary);
    background: #fff; color: var(--jf-primary); display: grid; place-items: center; cursor: pointer; z-index: 2;
}
.jf-slider-btn:hover { background: var(--jf-primary); color: #fff; }
.jf-slider-prev { left: 16px; }
.jf-slider-next { right: 16px; }
@media (min-width: 1600px) { .jf-slider { grid-auto-columns: calc((100% - 4 * 20px) / 5); } }
@media (max-width: 1199.98px) { .jf-slider-wrap { padding-left: 64px; padding-right: 64px; } .jf-slider { grid-auto-columns: calc((100% - 2 * 16px) / 3); gap: 16px; } }
@media (max-width: 767.98px) {
    .jf-slider-wrap { padding-left: 16px; padding-right: 0; }
    .jf-slider { grid-auto-columns: 62%; gap: 14px; scroll-padding-left: 0; }
    .jf-slider-btn { display: none; }
    .jf-slide-name { font-size: 18px; min-height: 0; }
}

/* Product grid */
.jf-product-card .jf-plate { transition: transform 0.15s ease; }
.jf-product-card .jf-plate:hover { transform: translateY(-2px); }
.jf-product-name { font-size: 17px; font-weight: 700; line-height: 1.3; }
.jf-product-name .jf-price { white-space: nowrap; }
.jf-product-name .jf-price .woocommerce-Price-amount { font-weight: 700; }

/* Split photo (favors) */
.jf-split-photo { width: 100%; height: auto; border-radius: 14px; display: block; }

/* Featured review */


/* Hero video: still image hidden while the video plays; reduced motion shows the still */
/* Same specificity as the shared `.jf-hero-media img` rule so the still really is hidden while the video plays. */
.jf-hero-media .jf-hero-still { display: none; }
@media (prefers-reduced-motion: reduce) {
    .jf-hero-media .jf-hero-video { display: none; }
    .jf-hero-media .jf-hero-still { display: block; }
}

/* Home hero with photo/video (Carlos 2026-10-30, comp screen-1 §1; review R1-06): full-bleed media, light veil,
   outlined headline, white serif subtitle, small burgundy pill with a white rim, flat bottom edge (no wave). */
#jf-home-hero:not(.jf-hero--typeled) { min-height: clamp(340px, 34vw, 640px); display: flex; align-items: center; }
#jf-home-hero:not(.jf-hero--typeled) > .container { padding-top: 40px; padding-bottom: 48px; width: 100%; }
#jf-home-hero .jf-hero-media::after { background: linear-gradient(180deg, rgba(40, 22, 14, 0.10), rgba(40, 22, 14, 0.28)); }
#jf-home-hero:not(.jf-hero--typeled) .jf-hero-h1 { font-size: clamp(36px, 5.6vw, 84px); }
#jf-home-hero:not(.jf-hero--typeled) .jf-hero-sub { color: #fff; font-size: clamp(18px, 2.6vw, 38px); line-height: 1.15; margin-top: 8px;
  text-shadow: 0 0 1px rgba(45, 35, 30, 0.9), 0 2px 10px rgba(45, 35, 30, 0.55); }
#jf-home-hero:not(.jf-hero--typeled) .jf-hero-actions .btn { font-size: 13px; padding: 0.45rem 1.9rem; border: 2px solid #fff; }

/* Flavors → Order Your Sweets transition (Carlos 2026-10-30, comp screen-1 §3; review R1-09): the comp's own divider
   asset at full width, white above the swirl, cream below; heading tucked into its lower-left. Divider height is
   1913:351 of the width (18.35vw); phones show the right 55% enlarged so the carriage stays readable. */
/* Gap closed (client 2026-11-11): the Build Your Box pill hangs into the divider's empty upper band, so the
   boxes start about 100px sooner at 1440. */
/* Heads no longer cut off (Adam 2026-11-16, review R1-44): the flavors band used to paint over that overlap and
   with it the driver's hat and the horses' ears. Now only the pill is raised; the divider is two layers (swirl +
   illustration) so the illustration shows whole and can swap with the holiday theme. */
#jf-home-flavors { padding-bottom: 0; }
#jf-home-flavors .jf-flavors-cta { position: relative; z-index: 2; pointer-events: none; }
#jf-home-flavors .jf-flavors-cta .btn { pointer-events: auto; }
@media (min-width: 768px) { #jf-home-flavors .jf-flavors-cta { margin-bottom: calc(18.35vw * -0.2); } }
#jf-home-products { --jf-div-h: 18.35vw; position: relative; overflow: hidden; padding-top: 0;
  background: linear-gradient(#fff, #fff) top left / 100% calc(var(--jf-div-h) - 2px) no-repeat, var(--jf-bg); }
.jf-carriage-divider { width: 100%; line-height: 0; }
.jf-divider-stage { position: relative; width: 100%; aspect-ratio: 1913 / 351; }
.jf-divider-swirl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.jf-divider-swirl path { fill: var(--jf-bg); }
/* 716x320 box at the comp's spot (1058,12 of 1913x351), a touch further right so the lead horse clears the pill above it. */
.jf-divider-art { position: absolute; left: 56.4%; top: 3.42%; width: 37.43%; height: auto; display: block; }
#jf-home-products .jf-under-divider { position: relative; z-index: 1; margin-top: calc(var(--jf-div-h) * -0.42); }
@media (max-width: 767.98px) {
  #jf-home-products { --jf-div-h: 33.03vw; }
  .jf-divider-stage { width: 180%; margin-left: -80%; }
  #jf-home-products .jf-under-divider { margin-top: 8px; }
}

/* Favors + Fudge of the Month: one tan section with the gold-plate photo and the comp's ribbon into white
   (review R1-10). Ribbon is 1920:252 of the width; the section reserves room for it below the content. */
#jf-home-favors { position: relative; padding-top: clamp(48px, 5.5vw, 88px); padding-bottom: calc(9.79vw + 8px); }
#jf-home-favors > .container { position: relative; z-index: 1; }
.jf-favors-block + .jf-favors-block { margin-top: clamp(36px, 4.4vw, 64px); }
#jf-home-favors .jf-subhead { margin-bottom: 0; }
.jf-favors-copy { font-size: 15px; line-height: 1.9; max-width: 56ch; margin: 14px 0 18px; }
#jf-home-favors .btn-sm { padding: 0.4rem 1.6rem; font-size: 12px; }
.jf-favors-photo-wrap { position: relative; } /* holds the holiday layer over the photo */
.jf-favors-photo { display: block; width: 100%; height: auto; border-radius: 24px; }
.jf-reviews-ribbon { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: auto; aspect-ratio: 1920 / 188; display: block; }
@media (max-width: 991.98px) { #jf-home-favors { padding-bottom: calc(9.79vw + 24px); } .jf-favors-photo { border-radius: 16px; } }

/* Reviews (comp screen-1 §8; review R1-10): gold quote mark, uppercase dark headline, airy body, bold name,
   swipeable slides with a dot pager. */
#jf-home-reviews { padding-top: 8px; }
.jf-review-quote { display: block; width: clamp(110px, 10vw, 150px); height: auto; margin: 10px auto 28px; }
.jf-review-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; max-width: 980px; margin: 0 auto; }
.jf-review-track::-webkit-scrollbar { display: none; }
.jf-review-slide { flex: 0 0 100%; scroll-snap-align: center; margin: 0; padding: 0 8px; }
.jf-review-title { font-family: var(--jf-font-header); font-weight: 700; text-transform: uppercase; font-size: clamp(15px, 1.15vw, 18px); color: var(--jf-ink); letter-spacing: 0.01em; margin-bottom: 0.6rem; }
.jf-review-body p { font-size: clamp(15px, 1.1vw, 17px); line-height: 2.25; margin-bottom: 0; }
.jf-review-name { font-family: var(--jf-font-header); font-weight: 700; font-size: 1.1rem; color: var(--jf-ink); margin-top: 0.6rem; }
.jf-review-dots { display: flex; justify-content: center; gap: 4px; margin-top: 18px; }
.jf-review-dot { width: 28px; height: 28px; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.jf-review-dot::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--jf-accent); background: transparent; transition: background-color 0.15s; }
.jf-review-dot[aria-current="true"]::before { background: var(--jf-accent); }
.jf-review-dot:focus-visible { outline: 2px solid var(--jf-primary); outline-offset: 2px; border-radius: 50%; }
@media (max-width: 575.98px) { .jf-review-body p { line-height: 1.9; } }

/* Holiday Themes ribbon on chosen slider flavors (burgundy; a theme kit may recolour it). */
.jf-slide-link { position: relative; }
.jf-slide-ribbon { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); z-index: 1; white-space: nowrap; background: var(--jf-primary); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; box-shadow: var(--jf-shadow); }

/* Phones: touch sizes, second mobile pass (R1-70) */
@media (max-width: 767.98px) {
    #jf-home-story .btn-sm, #jf-home-favors .btn-sm { padding: 0.6rem 1.7rem; font-size: 13px; }
    #jf-home-hero:not(.jf-hero--typeled) .jf-hero-actions .btn { font-size: 14px; padding: 0.66rem 2rem; }
    .jf-review-dots { gap: 0; }
    .jf-review-dot { width: 36px; height: 40px; }
}
