/* Rolling final build: the proposed hero mounted on the real home page (see js/final-hero.js). */
html { scroll-behavior: auto; }                     /* the box launch drives its own scroll */

/* Retired everywhere, with or without the proposed hero: the "716 Buffalo's own" pill and the down arrow. */
#hero .mini-launch-kicker, #hero .scroll-indicator { display: none !important; }
/* One BonBon bubble at a time in the hero, never a stack. */
#hero .bbl-thread p.bbl-b:nth-last-of-type(n+2) { display: none; }

.fh-wrap { display: none; }
html.fh-on:not(.fh-keepbar) #tb9Bar,
html.fh-on:not(.fh-keepbar) .tb9-mini,
html.fh-on.fh-keepbar .fh-wrap.fh-header,
html.fh-on #hero h1.fh-old,
html.fh-on:not(.fh-keepcar) #r2cHero,
html.fh-on.fh-keepcar .fh-wrap.fh-carousel,
html.fh-on #hero .wp-hero-sub,
html.fh-on #hero .hero-cta-note { display: none !important; }
html.fh-on .fh-wrap { display: block; width: 100%; font: 400 16px/1.5 var(--hl-sans); color: var(--hl-ink); text-align: center; }
html.fh-on .fh-wrap .hl-slot { display: flex; flex-direction: column; align-items: center; }
html.fh-on .fh-wrap.fh-header { position: relative; z-index: 30; }
html.fh-on .fh-wrap.fh-header .hl-slot { align-items: stretch; }
html.fh-on .fh-wrap.fh-copy { order: 2; }           /* the hero lays its parts out by order: button is 1, this sits right under it */
/* the old bars are hidden, so the sticky step guide no longer needs to clear them */
html.fh-on:not(.fh-keepbar) #orderGuide.glz-journey,
html.fh-on:not(.fh-keepbar) #orderGuide.glz-journey.visible { top: 0; }
.fh-wordmark[hidden] { display: none; }

/* Versions sheet: links to the versions that still live on their own pages */
.fh-ui[hidden] { display: none; }
.fh-more { margin: 10px 0 4px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.12); display: grid; gap: 6px; }
.fh-more p { margin: 0 0 2px; font: 700 0.72rem/1.3 var(--hl-sans); letter-spacing: 0.04em; color: rgba(246, 239, 230, 0.7); }
.fh-more a { display: block; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); color: #f6efe6; text-decoration: none; font: 600 0.84rem/1.3 var(--hl-sans); }

@media (max-width: 899px) {
  html.fh-on .fh-wrap.fh-header { margin: 0 -16px; width: auto; }
  html.fh-on #bxlChip.bxl-chip { top: auto !important; bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important; left: 12px; }   /* preview-only launch chooser: off the top bar */
}

/* Desktop: one centered story column beside the review reel, under a full-width top bar. */
@media (min-width: 900px) {
  html.fh-on .fh-wrap.fh-header .sol-header { max-width: 1200px; padding-left: 32px; padding-right: 32px; }
  html.fh-on #hero { align-items: center; }
  html.fh-on #hero .wp-hero-top,
  html.fh-on #hero .wp-hero-action { text-align: center; }
  html.fh-on #hero .wp-hero-top > *,
  html.fh-on #hero .wp-hero-action > * { margin-left: auto; margin-right: auto; }
  html.fh-on #hero .fh-wordmark > * { margin-left: auto; margin-right: auto; }
  html.fh-on #hero .fh-wrap h1 { text-align: center; }
  html.fh-on #hero a.hero-cta-primary,
  html.fh-on #hero .bbl-host,
  html.fh-on #hero .tg-tk,
  html.fh-on #hero #gpCapsule { margin-left: auto; margin-right: auto; }
  html.fh-on #hero .bbl-host { max-width: 420px; }
  html.fh-on .fh-wrap.fh-promise, html.fh-on .fh-wrap.fh-copy { max-width: 520px; margin-left: auto; margin-right: auto; }
  html.fh-on .fh-wrap.fh-carousel { grid-column: 1 / -1; grid-row: auto; align-self: center; }   /* one centered column, carousel under the story as on a phone */
}

/* Versions sheet: the button that brings the photo tile bar back */
.fh-keep { flex: 0 0 auto; padding: 0 12px; min-height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #f6efe6; font: 700 0.8rem/1 var(--hl-sans); cursor: pointer; }
.fh-keep.is-on { background: var(--hl-gold-light); color: #2a1a26; border-color: transparent; }

/* Original carousel as the default (fh-keepcar): no dot bar, no second BonBon line, nothing spilling over the headline. */
html.fh-on.fh-keepcar #r2cHero .cn9-ctl, html.fh-on.fh-keepcar #r2cHero .r2c-ctl, html.fh-on.fh-keepcar #r2cHero .r2c-dots,
html.fh-on.fh-keepcar #r2cHero > .glz-nar { display: none !important; }
html.fh-on.fh-keepcar #r2cHero { overflow: visible; }

/* The real Glaze wordmark (Nov 14): solid plum letters from the official wordmark, BonBon in full color on the e.
   No gradient fill and no light sweep: those made the letters look patchy. */
html.fh-on #hlWordmark { position: relative; isolation: isolate; width: min(212px, 60vw); margin: 4px auto 6px; aspect-ratio: 847 / 449; animation: fhLogoIn 0.9s cubic-bezier(0.2, 1.25, 0.3, 1) both; }
html.fh-on #hlWordmark::before {
  content: ''; position: absolute; z-index: -1; inset: -26% -16%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(236, 200, 120, 0.38), rgba(236, 200, 120, 0.1) 58%, rgba(236, 200, 120, 0) 80%);
  animation: fhLogoHalo 7s ease-in-out infinite;
}
html.fh-on #hlWordmark #logoSlot, html.fh-on[data-wp-hero] #hlWordmark #logoSlot {
  position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important;
  background: #4A1942 !important; overflow: visible !important;
  -webkit-mask: url("/assets/glaze/core/glaze-wordmark-letters.png") center / contain no-repeat !important;
  mask: url("/assets/glaze/core/glaze-wordmark-letters.png") center / contain no-repeat !important;
}
html.fh-on #hlWordmark #logoSlot > * { visibility: hidden !important; }
html.fh-on #hlWordmark .fh-bon { position: absolute; z-index: 2; pointer-events: none; transform-origin: 50% 92%; filter: drop-shadow(0 4px 5px rgba(74, 25, 66, 0.18)); }
html.fh-on[data-fh-logo="1"] #hlWordmark .fh-bon { left: 74%; top: -2.5%; width: 25%; animation: fhBonDrop 0.9s cubic-bezier(0.25, 1.5, 0.4, 1) 0.45s both, fhBonBob 4.8s ease-in-out 1.5s infinite; }
html.fh-on[data-fh-logo="2"] #hlWordmark .fh-bon { left: 0; top: 0; width: 100%; height: 100%; transform-origin: 88% 36%; animation: fhBonDrop 0.9s cubic-bezier(0.25, 1.5, 0.4, 1) 0.45s both, fhBonBob 4.8s ease-in-out 1.5s infinite; }
@keyframes fhLogoIn { 0% { opacity: 0; transform: translateY(14px) scale(0.94); } 100% { opacity: 1; transform: none; } }
@keyframes fhLogoHalo { 0%, 100% { opacity: 0.55; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.03); } }
@keyframes fhBonDrop { 0% { opacity: 0; translate: 0 -40%; } 60% { opacity: 1; } 100% { opacity: 1; translate: 0 0; } }
@keyframes fhBonBob { 0%, 100% { rotate: 0deg; } 30% { rotate: -4deg; } 60% { rotate: 3deg; } }
@media (prefers-reduced-motion: reduce) { html.fh-on #hlWordmark, html.fh-on #hlWordmark::before, html.fh-on #hlWordmark .fh-bon { animation: none !important; } }

/* Headline 3: a hand-drawn gold underline draws itself under each new word. */
.hl-promise-3 .p3-ink::after {
  content: ''; position: absolute; z-index: 2; left: 4%; right: -2%; bottom: -0.2em; height: 0.26em; pointer-events: none;
  background: var(--hl-gold-deep, #a87b1f);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M3 13 C 60 6, 130 5, 190 8 S 270 12, 297 6' fill='none' stroke='black' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M3 13 C 60 6, 130 5, 190 8 S 270 12, 297 6' fill='none' stroke='black' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0); opacity: 0.9;
}
.hl-promise-3 .pr-blank.is-on .p3-ink::after { clip-path: inset(0 0 0 0); transition: clip-path 0.6s cubic-bezier(0.6, 0, 0.2, 1) 0.42s; }
.hl-promise-3 .pr-blank.is-out .p3-ink::after { clip-path: inset(0 0 0 0); opacity: 0; transition: opacity 0.2s; }
@media (prefers-reduced-motion: reduce) { .hl-promise-3 .p3-ink::after { clip-path: none !important; transition: none !important; } }

/* Spot option 2: a customer comment shows an initial coin in place of a photo. */
.hl-kicker-2 .k2-box.is-comment .k2-ava { display: grid; place-items: center; background: #4A1942; box-shadow: 0 0 0 2px #fffaf2, 0 0 0 3.5px rgba(212, 168, 67, 0.8); }
.hl-kicker-2 .k2-box.is-comment .k2-ava::before { content: attr(data-initial); color: #F4D58A; font: 600 1.05rem/1 'Fraunces', Georgia, serif; }
.hl-kicker-2 .k2-txt q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Desktop: every carousel option was drawn for a phone, so it stays in a phone-wide frame and never spills over the story. */
@media (min-width: 900px) {
  html.fh-on .fh-wrap.fh-carousel { width: min(420px, 100%); justify-self: center; overflow: hidden; contain: layout paint; border-radius: 28px; }
  html.fh-on .fh-wrap.fh-carousel .hl-slot { width: 100%; max-width: 420px; }
}
/* Carousel options size themselves from their slot, so the slot's child must take the full width (it collapsed to a sliver). */
html.fh-on .fh-wrap.fh-carousel .hl-slot > * { width: 100%; min-width: 0; }
@media (min-width: 900px) { html.fh-on .fh-wrap.fh-carousel .hl-carousel-2 .c2-stage { --w: 290px; } }

.fh-build { display: block; margin-top: 4px; opacity: 0.8; }
.fh-build button { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; color: #F4D58A; }
.fh-build button:focus-visible { outline: 2px solid #F4D58A; outline-offset: 2px; }

/* Desktop hero is one centered column (same order as the phone), not a story column with the carousel off to the side. */
@media (min-width: 900px) {
  html.fh-on #hero.hero { display: flex !important; flex-direction: column; align-items: center; }
  html.fh-on #hero.hero > .fh-wrap:not(.fh-carousel), html.fh-on #hero.hero .hero-content > * { width: min(640px, 100%); }
  html.fh-on #hero.hero > .hero-content, html.fh-on #hero.hero > #r2cHero, html.fh-on #hero.hero > .fh-wrap.fh-carousel { grid-column: 1 / -1 !important; grid-row: auto !important; justify-self: center; }
  html.fh-on.fh-keepcar #hero.hero #r2cHero { width: min(440px, 100%) !important; align-self: center !important; justify-self: center !important; margin: 36px auto 0 !important; }
  html.fh-on #hero .fh-wrap.fh-carousel { margin-top: 8px; }
}

/* Hero order (Nov 14 phone review): promise, one BonBon line (no quick buttons), Build-A-Box, Thanksgiving, Prime,
   then the reviews, then the pickup ticket that leads into the builder. Nothing removed except the three quick buttons. */
html.fh-on #hero.hero > * { order: 20; }
/* Desktop too: the action wrappers must not box the ordered pieces, or the whole stack jumps above the logo and headline. */
html.fh-on #hero.hero .wp-hero-action, html.fh-on #hero.hero .wp-hero-action .hero-actions { display: contents !important; }
html.fh-on #hero.hero .wp-hero-top { order: 1; }
html.fh-on #hero.hero .bbl-host { order: 2; }
html.fh-on #hero.hero a.hero-cta-primary { order: 3; }
html.fh-on #hero.hero .tg-tk { order: 4; }
html.fh-on #hero.hero #gpCapsule { order: 5; }
html.fh-on #hero.hero .fh-carousel { order: 6; }
html.fh-on #hero.hero .fh-copy { order: 7; }
html.fh-on #hero.hero .wp-hero-top, html.fh-on #hero.hero .bbl-host, html.fh-on #hero.hero a.hero-cta-primary, html.fh-on #hero.hero .tg-tk,
html.fh-on #hero.hero #gpCapsule, html.fh-on #hero.hero .fh-carousel, html.fh-on #hero.hero .fh-copy { order: var(--fh-o); }
html.fh-on #hero.hero .wp-hero-top { --fh-o: 1; } html.fh-on #hero.hero .bbl-host { --fh-o: 2; } html.fh-on #hero.hero a.hero-cta-primary { --fh-o: 3; }
html.fh-on #hero.hero .tg-tk { --fh-o: 4; } html.fh-on #hero.hero #gpCapsule { --fh-o: 5; } html.fh-on #hero.hero .fh-carousel { --fh-o: 6; } html.fh-on #hero.hero .fh-copy { --fh-o: 7; }
html.fh-on #hero.hero .bbl-host .bbl-chips { display: none !important; }
/* Nov 15 speed: the first BonBon line waits in the spot the live bubble takes a moment later (under the headline), so the
   logo and headline no longer drop 77px and jump back as the curtain lifts. Without bonbon-live it simply stays there. */
html.fh-on #hero.hero .wp-hero-action > .glz-nar[data-nar="hero"] { order: 2; }
/* Nov 15 speed: the hero clips its overflow instead of hiding it. Its content is taller than its box, and with overflow:
   hidden a scrollIntoView on anything inside could scroll the hero within itself and shift the pills. overflow: clip
   draws the same but can never scroll. Browsers without clip keep overflow: hidden. */
@supports (overflow: clip) { #hero.hero { overflow: clip; } }
html.fh-on #hero.hero a.hero-cta-primary { margin-top: 6px !important; margin-bottom: 18px !important; }
html.fh-on #hero.hero .fh-copy { margin-top: 8px; }
