/* LOLO'S MIX — the site's illustration and motion layer. See
   /js/lolos-mix.js (and its "m6-" class prefix). Scoped to html[data-mix].
   Colours are the Identity V2 palette tokens only (--choc Chocolate Noir, --milk Cacao, --almond, --cream Porcelain,
   --rose Rose Poudre, --green French Sage); type is Bodoni for editorial
   moments and Montserrat for information, as the guide sets out. */

/* ---- One conveyor: the hero's belts, pinned, and their chocolate twin ------ */
/* The hero's own belts are pinned to the screen (lolos-mix.js clips them to the part
   of the hero still visible). Their twin sits behind the rest of the page,
   moving in lockstep; the ONLY difference is colour: the cream drawings are
   tinted to chocolate and set lighter so they sit quietly on porcelain. */
.pastry-belts.m6-pinned { position: fixed; inset: 0; }
.pastry-belts.m6-amb { position: fixed; inset: 0; z-index: 0; opacity: .3; }
.pastry-belts.m6-amb img { filter: brightness(.3) sepia(.55) saturate(1.4); }
@media (max-width: 640px) { .pastry-belts.m6-amb { opacity: .3; } }

[data-mix] section, [data-mix] .strip, [data-mix] footer { position: relative; z-index: 1; }
/* Every section shows the belts, forms and box drop included (Ken). The two
   exceptions keep their own dark bands: the hero (it has belts of its own)
   and the About story, whose light text was written for chocolate. */
[data-mix] section:not(.hero):not(#about) { background: transparent !important; }

/* ---- The drawn stat strip ------------------------------------------------- */
[data-mix] .strip.m6-story { background: transparent; padding: 4rem 2rem 3.6rem; gap: 2.5rem; align-items: flex-end; }
[data-mix] .strip .st { position: relative; }
[data-mix] .strip .sdv { height: 120px; align-self: center; }
[data-mix] .strip .st { width: 280px; }
[data-mix] .strip .sn { font-size: clamp(2.6rem, 5vw, 3.8rem); margin: .6rem 0 .45rem; font-variant-numeric: tabular-nums; }
.m6-art { position: relative; height: 92px; display: flex; align-items: flex-end; justify-content: center; }
.m6-draw { width: 100%; height: 100%; overflow: visible; }
.m6-draw path { fill: none; stroke: var(--choc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.m6-story.is-on .m6-draw path { transition: stroke-dashoffset 2.2s cubic-bezier(.5, 0, .3, 1); stroke-dashoffset: 0; }
/* the croissant, drawn live: a pen traces each of its six strokes in turn
   (largest first), then the real ink settles in and the pen lines lift */
.m6-croissant .m6-pen { height: 78px; width: auto; overflow: visible; }
.m6-croissant img { height: 78px; width: auto; }
.m6-pen .m6-ink { fill: var(--choc); opacity: 0; }
.m6-pen .m6-strokes path { fill: none; stroke: var(--choc); stroke-width: 1.4px; vector-effect: non-scaling-stroke;
  stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.m6-story.is-on .m6-pen .m6-strokes path { animation: m6-pen 1.5s calc(.15s + var(--i) * .32s) cubic-bezier(.45, .05, .35, 1) forwards; }
.m6-story.is-on .m6-pen .m6-ink { animation: m6-settle .9s 2.2s ease forwards; }
.m6-story.is-on .m6-pen .m6-strokes { animation: m6-lift .9s 2.5s ease forwards; }
@keyframes m6-pen { to { stroke-dashoffset: 0; } }
@keyframes m6-settle { to { opacity: 1; } }
@keyframes m6-lift { to { opacity: 0; } }
/* ---- The middle stat: the mille-feuille, layered (Ken, 2026-10-26) -------- */
/* "100% made from scratch", shown as building one: the brand mille-feuille,
   five times over, each copy clipped to one band, set down in turn from the
   base up with the iced top last. It plays once when the strip comes on
   screen and holds the finished pastry. Ken chose it from five (rolling out
   dough, whisking in a bowl, a cupcake piped live, a macaron sandwiched, this);
   the others are in this branch's history. It replaced a rolling pin whose
   side-to-side was not how a chef uses one. */
.m6-alt { position: relative; height: 62px; aspect-ratio: 266 / 126; }
.m6-alt > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none; }
.m6-layer { opacity: 0; translate: 0 -40px; }
.m6-layer:nth-child(1) { clip-path: polygon(0 76%, 100% 76%, 100% 100%, 0 100%); }
.m6-layer:nth-child(2) { clip-path: polygon(0 60%, 100% 60%, 100% 76%, 0 76%); }
.m6-layer:nth-child(3) { clip-path: polygon(0 42%, 100% 42%, 100% 60%, 0 60%); }
.m6-layer:nth-child(4) { clip-path: polygon(0 25%, 100% 25%, 100% 42%, 0 42%); }
.m6-layer:nth-child(5) { clip-path: polygon(0 0, 100% 0, 100% 25%, 0 25%); }
.m6-story.is-on .m6-layer { animation: m6-layer .55s cubic-bezier(.3, 1.5, .5, 1) calc(.3s + var(--l) * .35s) forwards; }
@keyframes m6-layer { from { opacity: 0; translate: 0 -40px; } 40% { opacity: 1; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 640px) { .m6-alt { height: 48px; } }

/* ---- The gliding cakes ---------------------------------------------------- */
[data-mix] #cake-wall { display: block; max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }
.m6-stage { --k: 1; }
/* Rows sit close together (Ken). They clip SIDEWAYS only, so a hovered cake
   can grow past its row's top and bottom and overlap the row beside it. */
.m6-stage { position: relative; }
.m6-row { position: relative; overflow-x: clip; overflow-y: visible; padding: 1.1rem 0; }
.m6-row:hover { z-index: 3; }
.m6-track { display: flex; width: max-content; will-change: transform; }
.m6-copy { display: flex; align-items: center; gap: calc(44px * var(--k)); padding-right: calc(44px * var(--k)); }
[data-mix] .m6-cake {
  flex: 0 0 auto; width: auto; padding: 12px 12px 10px !important;
  grid-column: auto !important; margin: 0 !important; opacity: 1 !important;
  transform: none !important;
  rotate: 0deg; translate: 0 0; scale: 1;
  animation: m6-sway var(--sd, 12s) ease-in-out var(--sdl, 0s) infinite alternate,
             m6-bob var(--bd, 8s) ease-in-out var(--sdl, 0s) infinite alternate;
  transition: scale .9s cubic-bezier(.2, .8, .25, 1), box-shadow .9s ease;
  box-shadow: 0 14px 30px rgba(41, 23, 20, .12);
}
[data-mix] .m6-cake:hover, [data-mix] .m6-cake:focus-visible {
  scale: 1.16; box-shadow: 0 34px 60px rgba(41, 23, 20, .26); z-index: 2;
}
/* one height for every cake; a landscape photo simply runs wider */
[data-mix] .m6-cake picture, [data-mix] .m6-cake img { display: block; height: calc(330px * var(--k)); width: auto !important; max-width: none; }
@keyframes m6-sway { from { rotate: -1.5deg; } to { rotate: 1.5deg; } }
@keyframes m6-bob  { from { translate: 0 -5px; } to { translate: 0 5px; } }

/* ---- The galleries own their gaps ----------------------------------------- */
/* Behind the cake rows and each pastry wall the belts drop to a whisper (20%)
   between the photographs, feathered at top and bottom, and come back to full
   strength above and below (Ken). This is CUT INTO THE BELT LAYER'S MASK by
   lolos-mix.js (see carve), not painted: a painted porcelain wash came out a shade
   off the page's own porcelain on a real screen and read as a lingering pale
   band (Ken, 2026-10-26). It starts at the wall itself, never above it, so it
   cannot fog the run's heading. */

/* ---- The pastry wall, standing forward ----------------------------------- */
[data-mix] .art {
  scale: .94; opacity: 0;
  box-shadow: 0 2px 6px rgba(41, 23, 20, .06);
  transition: scale 1s cubic-bezier(.2, .8, .25, 1), opacity .9s ease, box-shadow 1s ease, transform .5s cubic-bezier(.2, .7, .3, 1);
}
[data-mix] .art.m6-up { scale: 1; opacity: 1; box-shadow: 0 22px 48px rgba(41, 23, 20, .16), 0 3px 10px rgba(41, 23, 20, .08); }
[data-mix] .art:hover { box-shadow: 0 34px 64px rgba(41, 23, 20, .24), 0 4px 12px rgba(41, 23, 20, .1); }

@media (max-width: 640px) {
  [data-mix] .strip .sdv { display: none; }
  .m6-row { padding: .8rem 0; }
  /* the "Everything begins by hand" note cards only balance a desktop row;
     on a one-column phone wall they are filler (Ken) */
  [data-mix] .wall .art.note { display: none; }
  /* No zoom on phones (Ken, 2026-10-26): a card growing from 94% as it
     scrolls in did not read smoothly on a phone, where one card fills the
     width. It still fades in and lifts its shadow. */
  [data-mix] .art { scale: 1; }
  /* Phones: "10+" and "100%" share a row, and NYC takes the full width below
     with a larger skyline, because that drawing is the strip's best moment. */
  [data-mix] .strip.m6-story { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem .75rem; padding: 3rem 1rem 2.8rem; }
  [data-mix] .strip .st { width: auto; min-width: 0; }
  [data-mix] .strip .st:last-child { grid-column: 1 / -1; }
  [data-mix] .strip .st:not(:last-child) .sn { font-size: 2.5rem; }
  [data-mix] .strip .st:not(:last-child) .sl { font-size: .58rem; letter-spacing: .12em; }
  [data-mix] .strip .st:not(:last-child) .m6-art { height: 70px; }
  .m6-croissant .m6-pen, .m6-croissant img { height: 62px; }
  [data-mix] .strip .st:last-child .m6-art { height: 128px; }
  [data-mix] .strip .st:last-child .m6-draw { width: min(100%, 360px); }
  [data-mix] .strip .st:last-child .sn { font-size: 3.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  [data-mix] .m6-cake { animation: none; }
  .m6-track { width: auto; }
  .m6-copy { flex-wrap: wrap; justify-content: center; row-gap: 2rem; padding: 0 1rem; }
  .m6-croissant img { clip-path: none; }
  .m6-draw path { stroke-dashoffset: 0; }
  .m6-pen .m6-ink { opacity: 1; } .m6-pen .m6-strokes { display: none; }
  .m6-layer { opacity: 1; translate: 0 0; }
  [data-mix] .art { scale: 1; opacity: 1; }
}

/* ---- Section titles: the "Statement" treatment (Ken chose B of three) ------ */
/* Magazine-scale Bodoni at 500: the size does the work, not the weight. The
   belts clear behind each line of it like any other words (see below). */
[data-mix] .st2 {
  position: relative; color: var(--choc);
  font-size: clamp(3.2rem, 7.4vw, 6.4rem); font-weight: 500; line-height: .98; letter-spacing: -.025em; margin-bottom: 1.2rem;
}
[data-mix] .ey { font-weight: 600; color: var(--rose); font-size: .8rem; letter-spacing: .34em; margin-bottom: 1.1rem; }
[data-mix] .ssub { max-width: 560px; color: var(--milk); font-size: .95rem; }

/* ---- Words and drawings read clear of the belts (Lauren, 2026-10-26) ------- */
/* She loved the belts but found words hard to read on her phone where a
   drawing crossed them. THE BELTS NOW OPEN A HOLE FOR EVERY LINE OF WORDS AND
   EVERY FOREGROUND DRAWING, and only that tightly (Ken): a drawing fades out
   within about 6px of the words and is back at full strength just past them,
   never in a wide circle that leaves bare canvas.

   HOLES, NOT PAINT. Earlier rounds laid porcelain over the belts behind the
   words (halos, then a porcelain ground per line). On a real Mac screen that
   porcelain never quite matches the page's own porcelain: Chrome draws
   different layers through slightly different colour paths, so every clearing
   showed as a pale box (Ken's recording; Chrome's own screenshots cannot show
   it). Now nothing is painted. lolos-mix.js masks the belt layer itself (with CSS
   gradients, never an image: see carve), so what shows through a hole IS the
   page ground, identical by construction.

   WHERE THE HOLES GO. lolos-mix.js puts an invisible copy of each block of words
   exactly over it (.m6-way-bg: same box, same font, never drawn) and wraps
   the copy's words in .m6-way, whose boxes it reads every frame. A span's box
   is cut per line, as long as that line's words, and padded here to the
   line's FULL line-height, so the lines of a paragraph fuse into one stepped
   hole with nothing peeking through between them. The copy rather than the
   words themselves, so the live text is never restructured (the stat
   counters rewrite theirs every frame; the copy simply follows).

   Phones also step body text from Light to Regular and one step darker,
   where the type is smallest. The stat strip's divider rules are gone (Ken):
   the drawings separate the three stats on their own. */
[data-mix] .strip .sdv { display: none; }
.m6-way-host { position: relative; }
.m6-way-bg {
  position: absolute; inset: 0; padding: inherit; visibility: hidden;
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.m6-way {
  /* line-height tall, less the glyph box (~1.15em), so lines just meet. No
     side padding: on an inline box it takes real space on every line and
     made the copy wrap onto a line the words never use (lolos-mix.js widens each
     hole sideways instead) */
  padding: .35em 0; padding-block: max(0px, calc((1lh - 1.15em) / 2));
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
@media (max-width: 640px) {
  [data-mix] :is(.ssub, .bx-empty p, .bx-min-note, .bx-pay, .dm-note) { font-weight: 400; color: var(--tm); }
  [data-mix] .strip .sl { font-weight: 500; color: var(--tm); }
}
