/* Rolling final build: cohesion rules shared by every section of the home page. */

/* One pop-up at a time: the Prime capsule sits in the hero, so the sliding Prime card does not also appear here. */
.gp-peek { display: none !important; }
/* BonBon's corner thought cloud waits until someone taps BonBon; it does not pop up over the page by itself. */
html.fh-on .bbx-tease { display: none !important; }

/* "Show interest first": long sections start as a short preview and unfold in place (js/final-cohesion.js). */
[data-fc="closed"], [data-fc="opening"] { position: relative; overflow: hidden; }
[data-fc="closed"] { max-height: var(--fc-peek, 400px); }
[data-fc="opening"] { transition: max-height 0.6s cubic-bezier(0.22, 0.8, 0.24, 1); }
[data-fc="closed"]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 150px; pointer-events: none;
  background: linear-gradient(180deg, rgba(253, 248, 240, 0) 0%, #FDF8F0 68%);
}
.fc-open {
  position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: #4A1942; color: #FDF8F0; font: 700 0.92rem/1 'DM Sans', system-ui, sans-serif; white-space: nowrap;
  box-shadow: 0 12px 24px -14px rgba(74, 25, 66, 0.7);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fc-open:active { transform: translateX(-50%) scale(0.96); }
.fc-open i { width: 32px; height: 32px; border-radius: 50%; background: #D4A843; position: relative; flex: none; }
.fc-open i::before, .fc-open i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; border-radius: 2px; background: #4A1942; transform: translate(-50%, -50%); }
.fc-open i::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.fc-open[aria-expanded="true"] i::after { transform: translate(-50%, -50%) rotate(0deg); }
.fc-open:focus-visible { outline: 2px solid #D4A843; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { [data-fc="opening"] { transition: none; } .fc-open, .fc-open i::after { transition: none; } }

/* Capsule version (?sec=2): the section waits behind one pill. */
[data-fc="pill"] { display: none !important; }
.fc-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(460px, calc(100% - 32px)); min-height: 60px; margin: 12px auto; padding: 0 10px 0 22px;
  border: 1px solid rgba(212, 168, 67, 0.55); border-radius: 999px; cursor: pointer; background: linear-gradient(180deg, #fffdf8, #f8eedb); color: #4A1942;
  font: 500 1.12rem/1.1 'Fraunces', Georgia, serif; box-shadow: 0 14px 28px -20px rgba(74, 25, 66, 0.55); transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fc-pill:active { transform: scale(0.97); }
.fc-pill i { width: 40px; height: 40px; border-radius: 50%; background: #4A1942; position: relative; flex: none; }
.fc-pill i::before, .fc-pill i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; border-radius: 2px; background: #D4A843; transform: translate(-50%, -50%); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.fc-pill i::after { transform: translate(-50%, -50%) rotate(90deg); }
.fc-pill.is-open i::after { transform: translate(-50%, -50%) rotate(0deg); }
.fc-pill:focus-visible { outline: 2px solid #D4A843; outline-offset: 3px; }
.fc-tour .fc-modes { display: flex; flex-wrap: wrap; gap: 6px; }
@media (prefers-reduced-motion: reduce) { .fc-pill, .fc-pill i::before, .fc-pill i::after { transition: none; } }

/* Held until shipping is confirmed open: the "Now shipping" badge on the home brownies section. */
#ship-brownies .sb-eyebrow { display: none !important; }

/* Sol's opening options: the extra side Build-A-Box link wrapped badly in its narrow column and repeats buttons already on the page. */
.fcs-order { display: none !important; }

/* Capsules at every width (he reviews on desktop too): the long Prime and Thanksgiving sections never show before interest. */
html[data-tg-tucked] body #thanksgiving:not(.tg-in-env) { display: none; }
html.fh-on .gpcap { display: block; }
html.fh-on #r2cFunnel, html.fh-on #wpWeeklyRoom { display: none !important; }
@media (min-width: 900px) {
  html.fh-on #hero #gpCapsule { width: min(520px, 100%); }
  html.fh-on #hero .tg-tk[data-stage="2"] { max-width: 640px; }
}

/* The Thanksgiving capsule on desktop: inside the capsule the section keeps its phone layout, so nothing spills outside it. */
@media (min-width: 900px) {
  #thanksgiving.tg-in-env .tg-wrap { max-width: 560px; grid-template-columns: minmax(0, 1fr); gap: 18px; }
  #thanksgiving.tg-in-env .tg-intro { grid-column: auto; display: block; text-align: center; padding: 16px 18px 22px; }
  #thanksgiving.tg-in-env .tg-intro > .tg-eyebrow { justify-self: auto; }
  #thanksgiving.tg-in-env .tg-intro > .tg-sub { margin-left: auto; }
  #thanksgiving.tg-in-env .tg-sig { grid-column: auto; grid-row: auto; }
  #thanksgiving.tg-in-env .tg-sig-stage { width: 230px; height: 214px; }
  #thanksgiving.tg-in-env .tg-sig-ring { width: 196px; height: 196px; }
  #thanksgiving.tg-in-env .tg-sig-roll { width: 164px; height: 164px; }
  #thanksgiving.tg-in-env .tg-title { font-size: 40px; }
  #thanksgiving.tg-in-env .tg-lead { font-size: 23px; }
  #thanksgiving.tg-in-env .tg-flavors-block, #thanksgiving.tg-in-env #tgTicket, #thanksgiving.tg-in-env #tgPromise, #thanksgiving.tg-in-env .tg-order { grid-column: auto; padding: 18px 18px 22px; }
  #thanksgiving.tg-in-env .tg-fl-row { display: grid; grid-auto-flow: column; grid-auto-columns: 42%; flex-wrap: nowrap; justify-content: normal; margin: 0 -18px; padding: 2px 18px 8px; overflow-x: auto; gap: 10px; }
  #thanksgiving.tg-in-env .tg-fl { flex: none; }
  #thanksgiving.tg-in-env .tg-block { padding: 18px 18px 22px; }
  #thanksgiving.tg-in-env .tg-h { font-size: 24px; }
  html.fh-on #hero .tg-tk[data-stage="2"] { max-width: 600px; }
}

/* Launch is local pickup only: the shipped-brownies section is off the home page until shipping opens (the code stays). */
#ship-brownies { display: none !important; }
/* One floating helper at a time on the home page: the corner BonBon stays, the floating Glaze Core pills go. */
html.fh-on a:has(> .core-smart-label), html.fh-on a:has(> .core-edge-label), html.fh-on a:has(.core-smart-label), html.fh-on a:has(.core-edge-label) { display: none !important; }
/* Capsule pills sit together as one tidy group. */
.fc-pill + [data-fc="pill"] + .fc-pill { margin-top: 12px; }
html body #wpWhn[data-fc="pill"], html body #wpExhibit[data-fc="pill"], html body #ship-brownies#ship-brownies { display: none !important; }
html.fh-on .core-peek, html.fh-on a.core-edge, html.fh-on a.core-smart { display: none !important; }
.fc-tour a.fc-check { border: 1.5px solid #d4a843; background: #fff6df; font-weight: 700; }
