/* ==========================================================================
   Explore — Case Study 01: The Fall of the Berlin Wall
   The photo is rebuilt from four cut-out layers inside a 3:2 composition box (--h0 tall).
   js/explore.js sets each layer's transform, the frame's --grow (0 → 1: the frame gets
   ~10% longer, downward) and the editorial SVGs' --d draw progress from the scroll position
   through the tall .bw-track. While the scene is pinned the site header slides away so the
   photo can use the full height of the screen.
   ========================================================================== */
body[data-page="explore"], .explore { background: #F7F7F7; color: #fff; }
body[data-page="explore"] .site-header { transition: transform .45s cubic-bezier(.2,.8,.2,1); }
body.bw-immersive .site-header { transform: translateY(-100%); }

/* ---- geometry ---- */
.bw {
  --vh-: var(--vh, 100vh);
  --gmax: 0.05;                                                          /* how much longer the frame gets */
  --fw: min(94vw, 1500px, calc((var(--vh-) - 72px) / (1 + var(--gmax)) * 1.5));
  --h0: calc(var(--fw) / 1.5);                                           /* the composed photo's height */
  --top: calc(22px + (var(--vh-) - 72px - var(--h0) * (1 + var(--gmax))) / 2);
}
.bw-track { position: relative; height: 600vh; } /* separation, widening, then the notes settling into the register */
.bw-stage { position: sticky; top: 0; height: var(--vh-); overflow: visible; background: #F7F7F7; } /* visible: the card's and bottle's shadows reach past its bottom edge */
/* the inset window the whole scene plays in (white margin all round) */
.bw-view { position: absolute; z-index: 1; inset: var(--bw-pad); overflow: hidden; clip-path: inset(0); background: transparent; } /* clip-path as well: iOS Safari doesn't always clip moved/blurred layers with overflow alone */
.bw { --bw-pad: clamp(20px, 5vw, 88px); }
@media (max-width: 599px) { .bw { --bw-pad: 14px; } }

/* ---- the frame (grows downward with --grow) ---- */
.bw-frame {
  position: absolute; left: 50%; top: var(--top); margin: 0;
  width: var(--fw); height: calc(var(--h0) * (1 + var(--gmax))); /* fixed: changing it every frame forced a full relayout */
  transform: translateX(-50%);
}
.bw-window {
  position: absolute; inset: 0; overflow: hidden;
  background: transparent; /* no sky: the wall and crowd stand against the page (and the map behind it) */
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
/* every layer is the size of the composed photo, anchored at the top, so the frame can grow beneath it */
.bw-layer { position: absolute; left: 0; top: 0; width: 100%; height: var(--h0); transform-origin: 50% 50%; will-change: transform; }
.bw-layer img { position: absolute; height: auto; max-width: none; pointer-events: none; user-select: none; }
.bw-free { pointer-events: none; }
/* the sky's lower edge melts into the night below it, so no seam shows as the frame grows */

/* ---- shadows, cast only where the reference photo has them ----
   Each is a black silhouette copy of the cut-out, offset and masked to one area.
   Both deepen only slightly as the crowd separates (--lift-people). */
.bw-shade { filter: brightness(0); }
/* the front of the crowd (the man holding up the hat): hard, at 45° down-right onto the wall */
.bw-shade--crowd {
  --d: calc(var(--fw) * 0.0175);
  translate: var(--d) var(--d); opacity: .72; filter: brightness(0) blur(.6px);
  -webkit-mask-image: linear-gradient(90deg, transparent 58%, #000 66%); mask-image: linear-gradient(90deg, transparent 58%, #000 66%);
}
/* the jumper's legs only: like the crowd's shadow at 45°, a touch softer and lighter */
.bw-shade--legs {
  --d: calc(var(--fw) * (0.013 + 0.0025 * var(--lift-people, 0)));
  translate: var(--d) var(--d); opacity: .62; filter: brightness(0) blur(1.3px);
  -webkit-mask-image: linear-gradient(180deg, transparent 32%, #000 44%), linear-gradient(90deg, transparent 44%, #000 54%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, transparent 32%, #000 44%), linear-gradient(90deg, transparent 44%, #000 54%);
  mask-composite: intersect;
}

/* ---- wet-lens bloom: a blurred, brightened copy of the bright areas, glowing past their edges ---- */
.bw-bloom { filter: blur(calc(var(--fw) * 0.007)) brightness(1.25); mix-blend-mode: screen; opacity: .55; pointer-events: none; }
.bw-bloom--hand  { -webkit-mask-image: radial-gradient(ellipse 17% 15% at 29% 52%, #000 20%, transparent 100%); mask-image: radial-gradient(ellipse 17% 15% at 29% 52%, #000 20%, transparent 100%); }
.bw-bloom--hands {
  -webkit-mask-image: radial-gradient(ellipse 7% 17% at 39.5% 45%, #000 20%, transparent 100%), radial-gradient(ellipse 6% 15% at 39.5% 68%, #000 20%, transparent 100%);
          mask-image: radial-gradient(ellipse 7% 17% at 39.5% 45%, #000 20%, transparent 100%), radial-gradient(ellipse 6% 15% at 39.5% 68%, #000 20%, transparent 100%);
}
.bw-bloom--wall  { opacity: .45; -webkit-mask-image: radial-gradient(ellipse 7% 9% at 36% 66%, #000 15%, transparent 100%); mask-image: radial-gradient(ellipse 7% 9% at 36% 66%, #000 15%, transparent 100%); }

/* ---- the flag's lower edge: a darkened copy, masked to that edge, fading in as the wall separates ---- */
.bw-dim--flag {
  opacity: calc(var(--lift, 0) * .9);
  -webkit-mask-image: radial-gradient(ellipse 3.9% 3.3% at 21.2% 52.4%, #000 35%, transparent 100%);
          mask-image: radial-gradient(ellipse 3.9% 3.3% at 21.2% 52.4%, #000 35%, transparent 100%);
}

/* ---- rain on the lens (above the photo, fixed to the frame, not to any layer) ----
   Each droplet fades in at its own point (--k) of the scroll (--p on the frame). */
.bw-lens { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; mix-blend-mode: screen; }
.bw-lens { will-change: opacity; }
.bw-lens--blur { opacity: 0; filter: blur(calc(var(--fw) * 0.0035)); } /* the spots, softened with the rest of the scene */
.bw-lens .drop { position: absolute; display: block; opacity: 0; will-change: opacity; }
/* a droplet: an out-of-focus aperture shape (soft-edged hexagon or octagon, like the spots in the original sky).
   The shape is cut on the inner layer and the blur is on the drop itself, so the edges stay soft. */
.bw-lens .drop {
  width: calc(var(--fw) * 0.016 * var(--s)); aspect-ratio: 1; margin: calc(var(--fw) * -0.008 * var(--s));
  filter: blur(calc(var(--fw) * 0.0004 * var(--b, 1))); /* each drop has its own focus (--b) */
}
.bw-lens .drop::before {
  content: ""; position: absolute; inset: 0; rotate: var(--rot, 0deg);
  background: radial-gradient(circle at 46% 42%, rgba(255,255,255,.78) 0%, rgba(238,242,255,.5) 45%, rgba(232,238,255,.42) 78%, rgba(248,250,255,.6) 100%);
}
.bw-lens .drop--hex::before { clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); }
.bw-lens .drop--oct::before { clip-path: polygon(30% 2%, 70% 2%, 98% 30%, 98% 70%, 70% 98%, 30% 98%, 2% 70%, 2% 30%); }
.bw-lens .drop--big { filter: blur(calc(var(--fw) * 0.0007 * var(--b, 1))); }

/* ---- rubble: a chip of the wall's own concrete (cut from the ledge beside the hammer in wall.png) and a few crumbs ---- */
.bw-rubble { position: absolute; inset: 0; pointer-events: none; }
.bw-rubble i {
  position: absolute; display: block; opacity: 0; will-change: transform, opacity;
  width: calc(var(--fw) * 0.019 * var(--z, 1)); aspect-ratio: 1.15; margin: calc(var(--fw) * -0.0095 * var(--z, 1));
  /* the shadow sits on the outer box, the cut-out shape on the inner one, so the shape doesn't clip its own shadow */
  filter: drop-shadow(2.5px 3px .5px rgba(8,8,12,.7)) blur(.7px); /* the blur comes last, outside the cut-out, so the edges soften */
}
.bw-rubble i::before {
  content: ""; position: absolute; inset: 0; transform: rotate(var(--rot, 0deg));
  background: url(../assets/img/rubble.png) center / cover; /* a small tile of the warm speckled ledge right beside the hammer (cut from wall.png) */
  filter: brightness(1.2) contrast(1.08) saturate(.75); /* a touch brighter: freshly broken; colour eased back a little */
}
.bw-rubble .chip::before { clip-path: polygon(12% 18%, 46% 0, 88% 10%, 100% 52%, 78% 92%, 36% 100%, 4% 70%); }
.bw-rubble .crumb::before { clip-path: polygon(20% 0, 90% 22%, 100% 80%, 40% 100%, 0 55%); }
/* soft-focus twin: no hard clipped outline (it would sharpen the blur's edge), just a soft rounded fleck */
.bw-rubble i.blurred { filter: blur(calc(var(--fw) * 0.0022)); }
.bw-rubble i.blurred::before { clip-path: none; border-radius: 42%; }

/* ---- moving parts (built by js/explore.js): a piece of a cut-out, lifted off its layer and pivoted ----
   The outer element moves and casts any shadow; the inner one shows the piece, feathered at its edges. */
.bw-part { position: absolute; pointer-events: none; will-change: transform; }
.bw-part i { position: absolute; inset: 0; display: block; background-repeat: no-repeat; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.bw-part--legs { filter: drop-shadow(var(--sd) var(--sd) 1.3px rgba(8,8,12,.62)); --sd: calc(var(--fw) * 0.0145); }
.bw-part--flag { animation: bwFlag 4.6s ease-in-out infinite; }
@keyframes bwFlag { 0%, 100% { transform: skewY(0deg) scaleX(1) rotate(0deg); } 24% { transform: skewY(-5deg) scaleX(.965) rotate(-1.2deg); } 52% { transform: skewY(3.6deg) scaleX(1.02) rotate(.8deg); } 78% { transform: skewY(-2deg) scaleX(.985) rotate(-.4deg); } }
@media (prefers-reduced-motion: reduce) { .bw-part--flag { animation: none; } }
.bw-frame.is-still .bw-part--flag { animation-play-state: paused; }
/* parts on top of the wall carry their own copy of the motion smear, so it moves with them */
.bw-part > b.halo { position: absolute; inset: 0; display: block; filter: blur(6px); opacity: .32; }
.bw-part--flag > b.halo { opacity: .5; }
.bw-part--flag > .dim { filter: brightness(.3); opacity: calc(var(--lift, 0) * .9); }   /* its lower edge darkens as the scene separates */
.bw-part--smudge > i { filter: blur(3px); opacity: .9; }                                 /* hides the hammer's old position like motion blur */

/* ---- motion smear: the people on top of the wall blur softly into the sky, as in the original ---- */
.bw-smear-wrap { position: absolute; inset: 0; filter: blur(6px); opacity: .32; pointer-events: none; } /* lighter now the sky is white */
.bw-smear { -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 56%); mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 56%); }

.bw-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- the title, set into the open sky ---- */
.bw-title { position: absolute; left: 3.6%; top: calc(var(--h0) * 0.05); width: 44%; z-index: 1; text-shadow: 0 1px 14px rgba(10,14,24,.5); }
.bw-kicker { display: flex; align-items: center; gap: 10px; font-size: max(9px, calc(var(--fw) * 0.0072)); font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.bw-kicker i { display: block; width: 24px; height: 1px; background: var(--orange); }
.bw-title h1 { margin-top: calc(var(--fw) * 0.008); font-family: var(--serif); font-weight: 400; font-size: max(15px, calc(var(--fw) * 0.027)); line-height: 1.08; letter-spacing: -0.005em; }
.bw-title h1 em { font-style: italic; }
.bw-date { margin-top: calc(var(--fw) * 0.005); font-size: max(8.5px, calc(var(--fw) * 0.0072)); font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: #ff7a6e; }
.bw-deck { width: 74%; margin-top: calc(var(--fw) * 0.008); font-size: max(10px, calc(var(--fw) * 0.0095)); line-height: 1.55; color: rgba(255,255,255,.78); }

/* ---- editorial lines and fragments between the photographic layers ---- */
.bw-ed { overflow: visible; --d: 0; }
.bw-ed--self { position: absolute; inset: 0; width: 100%; height: 100%; --d: var(--lift, 0); }
.bw-ed .draw { fill: none; stroke: rgba(255,255,255,.62); stroke-width: 1.2; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--d)); }
.bw-ed .draw.thin { stroke: rgba(255,255,255,.3); }
.bw-ed .draw.dash { stroke-dasharray: 0.012 0.016; stroke-dashoffset: 0; opacity: var(--d); }
.bw-ed .accent-blue { stroke: #8fb3ea; }
.bw-ed .accent-red { stroke: #d9534a; stroke-width: 1.6; }
.bw-ed .mark { fill: none; stroke: rgba(255,255,255,.75); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: var(--d); }
.bw-ed .frag { opacity: calc(var(--d) * .9); transform-box: fill-box; transform-origin: center; }
.bw-ed .fill-orange { fill: var(--orange); }
.bw-ed .fill-red { fill: #d9534a; }
.bw-ed .outline { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bw-ed text { fill: #fff; opacity: var(--d); font-family: var(--sans); paint-order: stroke; stroke: rgba(8,10,16,.55); stroke-width: 3px; stroke-linejoin: round; }
.bw-ed .ed-label { font-size: 17px; font-weight: 700; letter-spacing: 3.4px; }
.bw-ed .ed-sub { font-size: 11.5px; font-weight: 500; letter-spacing: 2.4px; fill: rgba(255,255,255,.78); }
.bw-ed .ed-coord { font-size: 11.5px; font-weight: 500; letter-spacing: 2px; fill: rgba(255,255,255,.6); }

/* ---- the reading: gradient, register plate, and the notes travelling into it ----
   --plate (0 → 1) fades in the gradient and the plate's frame; each entry appears as its note lands (.is-in). */
/* soft focus, made light enough for Safari: every layer has a twin that is blurred once (never re-blurred while
   scrolling) and simply fades in on top (--soft), plus a faint darkening. Fading is cheap; live blurring is not. */
.bw-soften { position: absolute; inset: 0; pointer-events: none; background: #07080c; opacity: 0; will-change: opacity; }
.bw-blur { filter: blur(calc(var(--fw) * 0.0022)) !important; opacity: 0; will-change: opacity; }
.bw-part > b.blurwrap { position: absolute; inset: 0; display: block; filter: blur(calc(var(--fw) * 0.0022)); opacity: 0; will-change: opacity; }
/* the case-study tag (black and orange, after the Home manifesto): a tab at the top-left of the window that
   stretches into a full black bar as the scroll begins (clip-path set by site script) */
.bw-casebar { position: absolute; left: 0; right: 0; top: 0; height: 50px; z-index: 4; display: flex; align-items: center; justify-content: space-between;
  background: #111; color: #fff; pointer-events: none; clip-path: inset(0 var(--bar-r, 80%) 0 0); will-change: clip-path; }
.bw-case { display: flex; align-items: stretch; height: 100%; }
.bw-case-label { display: flex; align-items: center; padding: 0 18px 0 clamp(20px, 3.2vw, 56px); font-size: 13px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }
.bw-case-no { display: flex; align-items: center; padding: 0 16px; background: var(--orange); font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: .04em; }
.bw-casebar-meta { padding-right: clamp(20px, 3.2vw, 56px); font-size: 10px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: rgba(255,255,255,.62); opacity: 0; }

/* the map of divided Berlin behind the title (above the photo, below the title; spills past the window's edges) */
.bw-map { position: absolute; z-index: 0; left: 0; top: 0; width: 900px; pointer-events: none; opacity: .25; will-change: opacity; mix-blend-mode: multiply; }
.bw-map img { display: block; width: 100%; height: auto; filter: brightness(.62) contrast(1.15); }
/* (placed by explore.js: its topmost border post sits behind the dot of the "i" in "Berlin") */

/* the title, large and set in two lines in the open white space; slides up and away once the scene comes apart */
.bw-heading { position: absolute; left: clamp(20px, 3.2vw, 56px); top: calc(50px + clamp(22px, 4vh, 46px)); max-width: 46%; pointer-events: none; z-index: 3; will-change: transform, opacity; }
.bw-heading-title { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5.6vw, 92px); line-height: .94; letter-spacing: -0.015em; color: #111; }
.bw-heading-title em { font-style: italic; }
.bw-heading-date { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: 11px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: #111; }
.bw-heading-date span { padding: 6px 10px; background: var(--orange); color: #fff; }
@media (max-width: 599px) { .bw-heading { max-width: 80%; } .bw-case-label { font-size: 10px; letter-spacing: .22em; } .bw-casebar-meta { display: none; } }

.bw-plate-shade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 64%; pointer-events: none; opacity: 0; will-change: opacity;
  background: linear-gradient(0deg, rgba(7,8,12,.97) 0%, rgba(7,8,12,.9) 34%, rgba(7,8,12,.55) 64%, rgba(7,8,12,0) 100%);
}
/* the register: a white card, Fragrantica-style (tiers stacked, centred rows), hanging over the image's bottom edge */
.bw { --hang: min(calc(var(--bw-pad) * .72), 58px); }
.bw-plate {
  position: absolute; left: calc(var(--bw-pad) + clamp(16px, 3vw, 52px)); bottom: var(--bw-pad); /* the image's bottom is cropped behind it, so it still overhangs */
  width: min(560px, 44vw); padding: 36px 32px 34px; color: var(--ink);
  /* a torn sheet of paper: the sheet is drawn by ::before (masked to a ragged outline); its shadow is a plain soft box
     tucked just inside the torn edge (::after). No CSS filter: Safari draws large filtered layers in tiles, leaving seams */
  opacity: 0; transform: translateY(18px); pointer-events: none; will-change: opacity, transform;
}
.bw-plate::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fdfdfb;
  -webkit-mask: url("../assets/img/torn-paper.svg") 0 0 / 100% 100% no-repeat; mask: url("../assets/img/torn-paper.svg") 0 0 / 100% 100% no-repeat; }
.bw-plate::after { content: ""; position: absolute; inset: 10px 4px 12px; z-index: -2; border-radius: 6px;
  box-shadow: 0 26px 44px -6px rgba(0,0,0,.28), 0 4px 10px rgba(0,0,0,.12); }
.bw-plate-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.bw-plate-intro { margin-top: 14px; padding: 12px 14px; background: #f1f2f4; border-radius: 4px; font-size: 11px; line-height: 1.6; color: #55595f; }
.bw-plate-kicker { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 13px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--orange); }
.bw-plate-kicker svg { flex: none; width: 22px; height: 22px; color: var(--orange); fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.bw-plate-title { margin-top: 6px; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.3vw, 34px); line-height: 1.05; }
.bw-plate-meta { text-align: right; font-size: 9.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--maroon); }
.bw-plate-meta span { display: block; margin-top: 5px; font-weight: 500; letter-spacing: .14em; color: #8a8e96; }
.bw-tier { margin-top: 14px; }
.bw-tier h3 { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; font-size: 9.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: #8a8e96; }
.bw-tier h3::before, .bw-tier h3::after { content: ""; height: 1px; background: #e6e7ea; }
.bw-tier ol { display: flex; justify-content: center; gap: clamp(10px, 1.4vw, 22px); margin: 10px 0 0; padding: 0; list-style: none; }
.bw-tier li { display: flex; flex-direction: column; align-items: center; width: clamp(96px, 9vw, 124px); text-align: center;
  opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.bw-tier li.is-in { opacity: 1; transform: none; }
.bw-note-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(246,241,228,.4); color: var(--cream); }
/* the note photos: rounded squares, the same size travelling and in the card */
.bw-note-ic--photo { flex: none; overflow: hidden; background: #fff; border-radius: 10px; border-color: rgba(20,20,20,.08); width: 52px; height: 52px; }
.bw-note-ic--photo { position: relative; }
.bw-note-ic--photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; } /* pinned to the box, so grid centring can't leave a sliver of white at the top */
/* a closer crop for the photos with more empty space around their subject */
.bw-note-ic--sekt img, .bw-note-ic--mineral img, .bw-note-ic--linden img { transform: scale(1.55); }
.bw-note-ic--rose img, .bw-note-ic--chrysanthemum img, .bw-note-ic--rain img { transform: scale(1.3); }
.bw-tier li .bw-note-ic { visibility: hidden; }            /* the travelling note takes this place when it lands */
.bw-tier li.is-landed .bw-note-ic { visibility: visible; }
.bw-tier .tx { align-self: stretch; }
.bw-tier .tx b { display: block; margin-top: 8px; font-family: var(--sans); font-weight: 500; font-size: 13.5px; line-height: 1.25; letter-spacing: .01em; color: #141414; }
.bw-tier .tx small { display: block; margin: 3px calc(50% - 26px) 0 0; text-align: right; font-size: 6.5px; font-weight: 500; letter-spacing: .1em; line-height: 1.5; /* flush with the photo's right edge */ text-transform: uppercase; color: #8a8e96; }

/* per-note descriptor alignment */
.bw-tier li:is([data-note="leather"], [data-note="rain"], [data-note="mineral"], [data-note="rose"], [data-note="chrysanthemum"]) .tx small { margin-right: 0; text-align: center; }
.bw-tier li:is([data-note="rose"], [data-note="chrysanthemum"]) .tx small { white-space: nowrap; margin-left: -20px; margin-right: -20px; }
/* Greenhouse Rose: two lines, "Rose" set flush left under "Greenhouse" (the block stays centred) */
.bw-tier li[data-note="rose"] .tx { display: flex; flex-direction: column; align-items: flex-start; align-self: center; width: max-content; }
.bw-tier li[data-note="rose"] .tx b { text-align: left; }
.bw-tier li[data-note="rose"] .tx small { margin: 3px 0 0 !important; text-align: left; }
/* Linden Leaf: right edge of the descriptor lines up with the right edge of the name above */
.bw-tier li[data-note="linden"] .tx { align-self: center; width: max-content; }
.bw-tier li[data-note="linden"] .tx small { width: 0; min-width: 100%; margin-right: 0; text-align: right; }

/* callout to the cap: an open circle on the cap, a white line, and a note at the far end */
.bw-callout { position: absolute; left: 50%; top: 17%; width: 0; height: 0; pointer-events: none; opacity: 0; will-change: opacity;
  --len: clamp(130px, 13.9vw, 220px); --ang: 35deg; --cos: .819; --sin: .574; --stroke: 2px; }
.bw-callout-dot { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border: var(--stroke) solid #fff; border-radius: 50%; box-shadow: 0 0 6px rgba(0,0,0,.45); }
/* the line runs from the circle down and to the left (it starts at the circle's edge, so the ring stays open) */
.bw-callout-line { position: absolute; right: 0; top: calc(var(--stroke) / -2); width: var(--len); height: var(--stroke);
  background: linear-gradient(to left, transparent 7px, #fff 7px); filter: drop-shadow(0 0 3px rgba(0,0,0,.5));
  transform-origin: 100% 50%; transform: rotate(calc(var(--ang) * -1)) scaleX(var(--draw, 0)); }
.bw-callout-text { position: absolute; right: calc(var(--len) * var(--cos) + 22px); top: calc(var(--len) * var(--sin)); transform: translateY(-50%); width: 200px; text-align: right; color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.75); }
.bw-callout-text b { display: block; font-size: 10px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--orange); }
.bw-callout-text span { display: block; margin-top: 5px; font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.3; }

/* the finished fragrance: rises into view once the notes have settled, hanging over the image's bottom edge */
.bw-bottle { position: absolute; right: calc(var(--bw-pad) + clamp(24px, 7vw, 130px)); bottom: var(--bw-pad);
  height: min(66vh, 640px); margin: 0; opacity: 0; transform: translateY(40px); pointer-events: none; will-change: opacity, transform; }
.bw-bottle img { position: relative; display: block; height: 100%; width: auto; }
/* its shadow: soft gradients rather than a filter (Safari clips filter shadows to the image's own box) */
.bw-bottle::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: -5%; height: 16%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,.42), rgba(0,0,0,.18) 55%, transparent); }
.bw-bottle::after { content: ""; position: absolute; left: 9%; right: 9%; bottom: -1.2%; height: 4%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,.5), transparent); }

/* the notes as they emerge from the scene and travel to the register */
.bw-trails { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.bw-trails path { fill: none; stroke: rgba(246,241,228,.6); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 0.5 6; }
.bw-marks { position: absolute; inset: 0; pointer-events: none; }
.bw-mark { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 9px; opacity: 0; will-change: transform, opacity; }
.bw-mark .bw-note-ic { background: rgba(10,12,18,.62); border-color: rgba(246,241,228,.6); box-shadow: 0 0 0 6px rgba(246,241,228,.06), 0 6px 18px rgba(0,0,0,.35); }
.bw-mark .lb { padding: 5px 10px 5px 11px; border-radius: 999px; background: rgba(10,12,18,.62); font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #fff; white-space: nowrap; text-shadow: 0 1px 6px rgba(0,0,0,.5); transition: opacity .3s ease; }
.bw-mark.is-travelling .lb { opacity: 0; }


/* ---- progress read-out and scroll hint, just under the fully grown frame ---- */
.bw-hud, .bw-hint {
  position: absolute; left: 50%; width: var(--fw); transform: translateX(-50%);
  top: calc(var(--top) + var(--h0) * (1 + var(--gmax)) + 18px);
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  transition: opacity .4s ease;
}
.bw-hud { display: none; } /* (no room for it under a full-screen photo) */
.bw-hud.is-on { opacity: 1; }
.bw-hud-bar { position: relative; flex: 1; height: 1px; background: rgba(255,255,255,.18); }
.bw-hud-bar i { position: absolute; left: 0; top: -0.5px; height: 2px; width: calc(var(--p, 0) * 100%); background: var(--orange); }
.bw-hud-count { min-width: 92px; text-align: right; color: rgba(255,255,255,.72); }
.bw-hud-count b { color: #fff; font-weight: 700; }
.bw-hint { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0; color: rgba(255,255,255,.82); text-shadow: 0 1px 10px rgba(0,0,0,.75); }
.bw-stage .bw-hint { top: auto; bottom: 26px; z-index: 3; } /* sits over the bottom of the full-screen photo */
.bw-hint svg { width: 9px; height: 11px; animation: bwNudge 1.8s ease-in-out infinite; }
.bw-hint.is-gone { opacity: 0; }
@keyframes bwNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---- phones and tablets (first pass; to be refined) ---- */
@media (max-width: 1023px) {
  .bw-track { height: 480vh; }
}
@media (max-width: 599px) {
  .bw-deck, .bw-kicker { display: none; }
  .bw-hud { font-size: 8px; gap: 10px; }
  .bw-hud-count { min-width: 70px; }
}
@media (prefers-reduced-motion: reduce) { .bw-hint svg { animation: none; } }

/* ---- closing title, after the scene ---- */
.bw-close { position: relative; padding: clamp(8px, 2vh, 24px) 24px clamp(80px, 12vh, 140px); text-align: center; background: transparent; color: var(--ink); } /* transparent so the shadows above show through */
.bw-close-kicker { display: inline-flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--orange); }
.bw-close-kicker svg { width: 15px; height: 15px; }
.bw-close h2 { margin-top: 18px; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6vw, 96px); line-height: 1; letter-spacing: -0.015em; color: #111; }
.bw-close h2 em { font-style: italic; color: var(--orange); }
.bw-close > * { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.8,.2,1); }
.bw-close.is-in > * { opacity: 1; transform: none; }
.bw-close.is-in h2 { transition-delay: .12s; }
@media (prefers-reduced-motion: reduce) { .bw-close > * { opacity: 1; transform: none; transition: none; } }

/* stacking: map (0) < photo window (1) < everything that hangs over it (2) */
.bw-plate, .bw-bottle, .bw-trails, .bw-marks { z-index: 2; }

/* page-coloured boxes behind the title and the date, so they read cleanly over the map (negative margins keep the text where it was) */
.bw-heading-title { width: fit-content; background: #F7F7F7; padding: .14em .02em .1em .24em; margin: -.14em -.02em -.1em -.24em; }
.bw-heading-date .bw-heading-day { background: #F7F7F7; color: #111; padding: 6px 10px; margin-left: -10px; }

/* the scroll hint: a small black tab (like the case-study bar) so it reads over any part of the photo, with a pulsing caret */
.bw-stage .bw-hint {
  width: max-content; gap: 12px; padding: 10px 16px 10px 18px; border-radius: 999px;
  background: rgba(17,17,17,.86); color: #fff; text-shadow: none; font-size: 10px; letter-spacing: .26em;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.bw-stage .bw-hint svg { width: 12px; height: 8px; color: inherit; animation: bwCaret 1.6s ease-in-out infinite; }
@keyframes bwCaret { 0%, 100% { transform: translateY(-2px); opacity: .45; } 50% { transform: translateY(2px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bw-stage .bw-hint svg { animation: none; } }

/* the small print, tucked under the bottle (it fades in with it) */
.bw-fine { position: absolute; left: 50%; top: calc(100% + 30px); width: 280px; transform: translateX(-50%); margin: 0;
  font-size: 9.5px; line-height: 1.55; letter-spacing: .02em; text-align: center; color: rgba(17,17,17,.45); }

/* ---- SERVICES: two commission cards on a band of scent swirls beneath the closing title ---- */
.bw-close { padding-bottom: clamp(28px, 3.5vw, 48px); }
.svc { position: relative; padding: clamp(40px, 4.5vw, 64px) 24px clamp(44px, 5vw, 72px);
  background: #DFE4ED url("../assets/img/scent-swirls.svg") center / cover no-repeat; color: var(--ink); }
/* the band tucks up under the title, with a soft edge so the swirls rise out of the page */
.svc::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 72px; background: linear-gradient(#F7F7F7 0, #F7F7F7 3px, rgba(247,247,247,0)); pointer-events: none; }
.svc-grid { position: relative; max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2vw, 28px); }
/* blue palette: #3A63AC (accent), #4E7DCB (soft accent), #DBE5F3 (tint), #E4E6EA (rules), with black, white and the muted grey */
.svc-card { display: flex; flex-direction: column; padding: clamp(24px, 2.5vw, 36px) clamp(24px, 2.8vw, 40px) clamp(22px, 2.2vw, 30px);
  background: #fff; border: 1px solid #DBE5F3; border-radius: 16px; box-shadow: 0 24px 60px -30px rgba(58,99,172,.35); }
.svc-head { display: flex; align-items: center; gap: 18px; min-height: 72px; box-sizing: border-box; padding-bottom: 14px; border-bottom: 1px solid #E4E6EA; }
.svc-no { display: block; font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1; color: #4E7DCB; }
.svc-for { margin: 7px 0 0; font-size: 10.5px; font-weight: 600; letter-spacing: .22em; line-height: 1.6; text-transform: uppercase; color: #3A63AC; }
.svc-ic { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 14px; background: #F1F5FE; box-shadow: inset 0 0 0 1px #DBE5F3; color: #3A63AC; }
.svc-ic svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.svc-ic .ln { stroke-dasharray: 1.3 1.5; }
.svc-ic .fp { stroke-width: 1; }
.svc-meta { min-width: 0; }
.svc-title { margin: 20px 0 0; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.6vw, 38px); line-height: 1; letter-spacing: -0.015em; color: #111; }
.svc-title em { font-style: italic; }
/* the lead, set off with the slight blue rule used under the home page's title */
.svc-lead { margin: 16px 0 0; padding-left: 16px; border-left: 2px solid #4E7DCB; font-size: 16.5px; font-weight: 500; line-height: 1.5; color: #111; }
.svc-body { margin: 10px 0 22px; font-size: 14.5px; line-height: 1.7; color: var(--muted); }
.svc-spec { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: auto 0 0; padding: 12px 18px; border-radius: 10px; background: #F1F5FE; }
.svc-spec dt { font-size: 10.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #3A63AC; }
.svc-spec dd { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1; color: #111; }
.svc-spec dd small { font-family: var(--sans); font-size: 10.5px; font-weight: 600; letter-spacing: .18em; color: #3A63AC; margin-left: 4px; }
.svc-note { margin: 12px 0 0; font-family: var(--serif); font-style: italic; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
@media (max-width: 899px) {
  .svc-grid { grid-template-columns: 1fr; }
  .svc-lead { font-size: 17px; }
}

/* ---- CLOSING CALL TO ACTION: deep blue, no cards, ends the page; the perfumer stands in it on the right ---- */
.cta { position: relative; clip-path: inset(-600px 0 0 0); /* clips the portrait at the band's bottom and sides, but lets the head rise over the top */
  background: #3A63AC; color: #fff; padding: clamp(48px, 5.5vw, 76px) 24px clamp(44px, 5vw, 68px); }
/* a faint echo of the scent swirls, so the band belongs to the one above */
.cta::before { content: ""; position: absolute; inset: 0; background: url("../assets/img/scent-swirls.svg") center / cover no-repeat; opacity: .08; mix-blend-mode: screen; pointer-events: none; }
.cta-wrap { position: relative; max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); }
.cta-main { position: relative; z-index: 1; }
.cta h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 3.8vw, 56px); line-height: 1.04; letter-spacing: -0.015em; color: #fff; }
.cta h2 em { font-style: italic; color: #DBE5F3; white-space: nowrap; }
@media (max-width: 1099px) { .cta-br { display: none; } }
.cta-text { max-width: 470px; margin: 22px 0 0; padding-left: 18px; border-left: 2px solid rgba(219,229,243,.55); font-size: 15.5px; font-weight: 300; line-height: 1.7; color: rgba(255,255,255,.86); }
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin-top: clamp(26px, 3vw, 36px); }
.cta-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 28px; box-sizing: border-box; border-radius: 4px; background: #fff; color: #3A63AC; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; box-shadow: 0 6px 14px rgba(10,24,56,.22); transition: background .2s; } /* same shape as the site's other buttons (4px corners, 46px tall, 11px caps) */
.cta-btn svg { width: 12px; height: 12px; transition: transform .2s; }
.cta-btn:hover { background: #F1F5FE; }
.cta-btn:hover svg { transform: translateX(3px); }
.cta-home { position: absolute; left: 0; right: 0; bottom: calc(-1 * clamp(44px, 5vw, 68px) + 22px); z-index: 2; display: flex; justify-content: center; }  /* sits in the band's bottom margin, so it adds no height */
.cta-home--left { justify-content: flex-start; }   /* set by explore.js when the photo's tray would cover the link */
.cta .back-home { color: rgba(255,255,255,.72); }
.cta .back-home:hover { color: #fff; }
/* the portrait: anchored to the band's bottom edge (the photo is cut at the hips), rising above the band's top */
.cta-nose { position: relative; margin: 0; align-self: end; }
.cta-art { position: absolute; right: -16%; bottom: calc(-1 * clamp(44px, 5vw, 68px) - 6px); /* -6px: the photo's last rows are soft, so sink it past the band's edge */ width: min(650px, 132%); aspect-ratio: 1100 / 887; }
.cta-art > img { position: relative; display: block; width: 100%; height: auto; }
/* aroma molecules rising out of the bottles on the tray and the vial in his hand, drifting up and left into the band */
.cta-cloud { position: absolute; inset: 0; pointer-events: none; }
.cta-mol { position: absolute; height: auto; opacity: var(--o); transform: translate(-50%, -50%) rotate(var(--r));
  animation: ctaDrift var(--d) ease-in-out var(--dl) infinite alternate; will-change: transform; }
@keyframes ctaDrift { from { transform: translate(-50%, -50%) rotate(var(--r)); } to { transform: translate(calc(-50% - 6px), calc(-50% - 12px)) rotate(var(--r)); } }  /* drift only, no turning, so a bond stays level */
@media (prefers-reduced-motion: reduce) { .cta-mol { animation: none; } }
@media (max-width: 899px) {
  .cta-wrap { grid-template-columns: 1fr; }
  .cta-btn { width: 100%; justify-content: center; box-sizing: border-box; }
  .cta-actions { align-items: stretch; }
  /* phones: the portrait standing on the band's bottom edge, back-home link above it */
  /* phones: Nicolai stands at the right edge, so the molecule cloud drifts through the middle of the screen */
  .cta-nose { display: flex; justify-content: flex-end; margin-top: -28px; order: 3; grid-column: auto; grid-row: auto; }
  .cta-mol { scale: 1.3; }   /* molecules a little bigger on phones (separate from the drift transform) */
  .cta-art { position: relative; right: auto; bottom: auto; margin-right: -96px; width: min(108%, 460px); margin-bottom: calc(-1 * clamp(44px, 5vw, 68px) - 36px); }
  .cta-home { position: static; order: 2; margin-top: 0; }
}

/* service cards: a gentle highlight on hover (pointer devices only) */
.svc-card { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease; }
.svc-ic { transition: background .35s ease, color .35s ease, box-shadow .35s ease; }
.svc-spec { transition: background .35s ease; }
@media (hover: hover) {
  .svc-card:hover { transform: translateY(-6px); border-color: #4E7DCB; box-shadow: 0 0 0 1px #4E7DCB, 0 34px 70px -28px rgba(58,99,172,.55); }
  .svc-card:hover .svc-ic { background: #3A63AC; color: #fff; box-shadow: none; }
  .svc-card:hover .svc-spec { background: #DBE5F3; }
}
@media (prefers-reduced-motion: reduce) { .svc-card:hover { transform: none; } }

/* ===================== PHONES ===================== */
/* the scene is cropped to the screen (it scales to cover it), so nothing may push the page sideways */
.explore { overflow-x: clip; }
.bw-bottle-m { display: none; }
.m-br { display: none; }
@media (max-width: 767px) {
  /* the notes card: nearly full width, three tight columns */
  .bw-plate { padding: 26px 16px 26px; }
  .bw-plate-kicker { font-size: 11px; letter-spacing: .2em; gap: 8px; }
  .bw-plate-kicker svg { width: 18px; height: 18px; }
  .bw-plate-intro { margin-top: 12px; padding: 12px 14px; font-size: 12.5px; line-height: 1.55; }
  .bw-tier { margin-top: 12px; }
  .bw-tier ol { gap: 6px; margin-top: 8px; }
  .bw-tier li { width: calc((100% - 12px) / 3); }
  .bw-tier .tx b { font-size: 12.5px; margin-top: 6px; }
  .bw-tier li:is([data-note="rose"], [data-note="chrysanthemum"]) .tx small { white-space: normal; margin-left: 0; margin-right: 0; }
}
@media (max-width: 767px) { .m-br { display: inline; } }
/* tablets and phones: the bottle leaves the scene and is shown after it; the card sits centred */
@media (max-width: 1023px) {
  .bw-plate { left: 0; right: 0; width: min(560px, calc(100% - 24px)); margin: 0 auto; }
  .bw-bottle { display: none; }
  .bw-bottle-m { display: flex; flex-direction: column; align-items: center; margin: 8px auto clamp(36px, 8vh, 64px); }
  .bw-bottle-m figcaption { display: flex; flex-direction: column; align-items: center; max-width: 250px; text-align: center; }
  .bw-bottle-m figcaption b { font-size: 10px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--orange); }
  .bw-bottle-m figcaption span { margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.35; color: #111; }
  .bw-bottle-m figcaption i { display: block; width: 1.5px; height: 30px; margin: 12px 0 4px; background: #111; }
  .bw-bottle-m img { position: relative; z-index: 1; display: block; width: auto; height: min(56vh, 420px); }
  .bw-bottle-m-shadow { display: block; width: 74%; max-width: 260px; height: 26px; margin-top: -16px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.28), rgba(0,0,0,0)); }
  .bw-fine-m { max-width: 280px; margin: 14px 0 0; font-size: 10px; line-height: 1.55; text-align: center; color: rgba(17,17,17,.45); }
}

/* ---- phones: the scene is a square (under the case-study bar), centred on screen; the notes card rises to the top ---- */
@media (max-width: 767px) {
  .bw { --sq: calc(100vw - 2 * var(--bw-pad)); }
  .bw-view { bottom: auto; height: calc(var(--sq) + 50px); top: max(var(--bw-pad), calc((100% - var(--sq) - 50px) / 2 - 28px)); }
  .bw-stage .bw-hint { bottom: 16px; font-size: 9px; padding: 9px 14px 9px 16px; }
  .bw-plate { top: var(--bw-pad); bottom: auto; }
}
