/* Espresso: back to black. The standard as a spec sheet blown up to the page, the shot running beside it;
   then the grinder: its collar an arc across the foot, the shot's time as big as the frame above it. */
.espresso_wrap { --ink: #f3efe8; --mute: rgba(243, 239, 232, 0.56); --line: rgba(243, 239, 232, 0.2); --red: #ff2a1c; --crema: #c98a45;
  --gx: clamp(20px, 4vw, 64px); --gt: clamp(84px, 11vh, 112px); --gb: clamp(24px, 4vh, 44px);
  position: relative; height: 660vh; margin-top: -100vh; background: none; color: var(--ink); font-family: 'LM Sans', 'Helvetica Neue', Arial, sans-serif; }
.espresso_wrap .espresso_contain { position: sticky; top: 0; height: 100vh; overflow: clip; background: #000; visibility: var(--vis, hidden); clip-path: inset(var(--curtain, 100%) 0 0 0); transform: translateY(var(--hold, 0px)); }
.espresso_wrap .espresso_sound { position: absolute; top: 22px; right: clamp(20px, 4vw, 64px); z-index: 6; display: flex; align-items: center; gap: 3px; height: 32px; padding: 0 12px; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(243, 239, 232, 0.2); border-radius: 999px; color: #f3efe8; cursor: pointer; backdrop-filter: blur(8px); font: 500 12px 'LM Sans', sans-serif; pointer-events: auto; }
.espresso_wrap .espresso_sound i { width: 2px; height: 4px; background: currentColor; border-radius: 1px; }
.espresso_wrap .espresso_sound span { margin-left: 8px; }
.espresso_wrap .espresso_sound[aria-pressed="true"] i { animation: espresso-eq 1.1s ease-in-out infinite; }
.espresso_wrap .espresso_sound[aria-pressed="true"] i:nth-child(2) { animation-delay: -0.3s; } .espresso_wrap .espresso_sound[aria-pressed="true"] i:nth-child(3) { animation-delay: -0.6s; } .espresso_wrap .espresso_sound[aria-pressed="true"] i:nth-child(4) { animation-delay: -0.15s; }
@keyframes espresso-eq { 0%, 100% { height: 4px; } 50% { height: 13px; } }
@media (prefers-reduced-motion: reduce) { .espresso_wrap .espresso_sound[aria-pressed="true"] i { animation: none; height: 10px; } }
.espresso_wrap .espresso_part { position: absolute; inset: 0; padding: var(--gt) var(--gx) var(--gb); visibility: hidden; }
.espresso_wrap .espresso_part.is-on { visibility: inherit; }
/* the handover, one held move: the sheet's numbers and photo lift away while the collar rises and the shot pours in;
   only the two headings (same place) swap, quickly, so the frame is never empty and never text on text */
.espresso_wrap .is-def { transform: translateY(calc(var(--xk, 0) * -14vh)); }
.espresso_wrap .is-def .espresso_rows, .espresso_wrap .is-def .espresso_shot { opacity: clamp(0, calc(1 - var(--xk, 0) * 2.6), 1); }
.espresso_wrap .is-def .espresso_shot { transform: translateY(calc(var(--xk, 0) * -40vh)); }
.espresso_wrap .is-def .espresso_head { opacity: clamp(0, calc((0.5 - var(--xk, 0)) * 10), 1); }
.espresso_wrap .is-dial .espresso_head { opacity: clamp(0, calc((var(--xk, 0) - 0.5) * 10), 1); transform: translateY(calc((1 - var(--xk, 0)) * 3vh)); }
.espresso_wrap .is-dial .espresso_read { opacity: clamp(0, calc(var(--xk, 0) * 2.6 - 1.4), 1); transform: translateY(calc((1 - var(--xk, 0)) * 6vh)); }
.espresso_wrap .is-dial .espresso_grinder { transform: translateY(calc((1 - var(--xk, 0)) * 50vh + (1 - var(--out2, 1)) * 50vh)); }
.espresso_wrap .is-dial .espresso_streams { opacity: clamp(0, calc(var(--xk, 0) * 1.8 - 0.4), 1); clip-path: inset(0 0 calc((1 - var(--xk, 0)) * 100%) 0); }
/* the bar's dark rises from below: the grinder's words and numbers leave before its edge reaches them */
.espresso_wrap .is-dial { opacity: var(--out, 1); transform: translateY(calc((1 - var(--out, 1)) * -6vh)); }
.espresso_wrap .espresso_meta { display: flex; gap: 28px; font-size: 12px; color: var(--mute); margin: 0 0 18px; }
.espresso_wrap .espresso_h2 { font-size: clamp(40px, 4.2vw, 76px); line-height: 0.9; font-weight: 620; font-stretch: 78%; letter-spacing: -0.04em; margin: 0 0 20px; }
.espresso_wrap .espresso_note { font-size: clamp(15px, 1.1vw, 18px); line-height: 1.45; color: var(--ink); opacity: 0.78; margin: 0; max-width: 26rem; }

/* I · the sheet: five rows, each a full-width rule; number left, label and tolerance right */
.espresso_wrap .is-def { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, 0.9fr); grid-template-rows: 1fr; column-gap: clamp(20px, 3vw, 48px); }
.espresso_wrap .is-def .espresso_head { grid-column: 1; align-self: start; }
.espresso_wrap .espresso_rows { grid-column: 2; margin: calc(var(--gt) * -0.6) 0 0; display: grid; grid-template-rows: repeat(5, 1fr); height: calc(100% + var(--gt) * 0.6); }
.espresso_wrap .espresso_rows div { display: grid; grid-template-columns: 1fr auto; align-items: end; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.espresso_wrap .espresso_rows div::after { content: ''; position: absolute; left: 0; top: -1px; height: 1px; width: calc(var(--k, 0) * 100%); background: var(--crema); }
.espresso_wrap .espresso_rows dt { grid-column: 2; grid-row: 1; align-self: start; font-size: 12px; color: var(--mute); padding-top: 10px; text-align: right; }
.espresso_wrap .espresso_rows dd { grid-column: 1 / -1; grid-row: 1; margin: 0; display: flex; align-items: baseline; gap: 10px; transform: translateY(calc((1 - var(--k, 0)) * 100%)); }
.espresso_wrap .espresso_rows b { font-size: clamp(64px, 13.5vh, 150px); line-height: 0.82; font-weight: 650; font-stretch: 75%; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.espresso_wrap .espresso_rows span { font-size: clamp(18px, 2.4vh, 28px); font-weight: 500; }
.espresso_wrap .espresso_rows small { margin-left: auto; font-size: 13px; color: var(--crema); font-variant-numeric: tabular-nums; padding-bottom: 0.6em; }
.espresso_wrap .espresso_shot { grid-column: 3; margin: calc(var(--gt) * -1) calc(var(--gx) * -1) calc(var(--gb) * -1) 0; position: relative; overflow: hidden; }
.espresso_wrap .espresso_shot img { width: 100%; height: 100%; object-fit: cover; display: block; max-width: none; transform: scale(var(--bgz, 1.1)); filter: saturate(0.85) contrast(1.06); clip-path: inset(calc((1 - var(--shot, 0)) * 100%) 0 0 0); }
.espresso_wrap .espresso_shot figcaption { position: absolute; right: var(--gx); bottom: 14px; font-size: 10px; color: rgba(243, 239, 232, 0.7); }

/* II · the grinder */
/* the shot, drawn whole: the spouts at the top edge, the two streams, the cup they fall into */
.espresso_wrap .espresso_streams { position: absolute; left: 50%; top: 0; width: 260px; height: 62vh; transform: translateX(-50%); overflow: visible; }
.espresso_wrap .espresso_streams .is-flow { animation: espresso-flow 0.9s linear infinite; filter: drop-shadow(0 0 10px rgba(201, 138, 69, 0.45)); }
.espresso_wrap .espresso_streams .is-line { fill: none; stroke: rgba(243, 239, 232, 0.72); stroke-width: 1.5; }
.espresso_wrap .espresso_streams .is-steel { fill: #1c1b1a; stroke: rgba(243, 239, 232, 0.5); stroke-width: 1.2; }
@keyframes espresso-flow { to { stroke-dashoffset: -60; } }
.espresso_wrap .espresso_read { position: absolute; right: var(--gx); top: var(--gt); margin: 0; display: grid; justify-items: end; text-align: right; }
.espresso_wrap .espresso_read b { font-size: clamp(140px, 30vh, 330px); line-height: 0.78; font-weight: 650; font-stretch: 75%; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.espresso_wrap .espresso_read span { font-size: clamp(22px, 3vh, 34px); font-weight: 500; margin-top: -0.2em; }
.espresso_wrap .espresso_read em { font-style: normal; font-size: 14px; color: var(--crema); margin-top: 14px; max-width: 18rem; }
.espresso_wrap .espresso_grinder { position: absolute; left: 0; right: 0; bottom: 0; height: 46vh; cursor: grab; touch-action: pan-y; user-select: none; outline: none; }
.espresso_wrap .espresso_grinder:active { cursor: grabbing; }
.espresso_wrap .espresso_grinder svg { width: 100%; height: 100%; display: block; overflow: visible; }
.espresso_wrap .espresso_grinder text { fill: var(--ink); font: 600 34px 'LM Sans', sans-serif; font-stretch: 80%; }
.espresso_wrap .espresso_grinder text.is-sm { fill: var(--mute); font: 500 18px 'LM Sans', sans-serif; }
.espresso_wrap .espresso_grinder line { stroke: rgba(243, 239, 232, 0.4); }

@media (max-width: 767px) {
  .espresso_wrap .is-def { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .espresso_wrap .espresso_rows { grid-column: 1; grid-row: 2; margin: 18px 0 0; height: auto; }
  .espresso_wrap .espresso_rows b { font-size: 9vh; }
  .espresso_wrap .espresso_shot { display: none; }
  .espresso_wrap .espresso_note { font-size: 13px; }
  /* phone: the words on top, then the shot (left) beside its time (right), the collar across the foot */
  .espresso_wrap .espresso_read { top: auto; bottom: calc(30vh + 24px); }
  .espresso_wrap .espresso_read b { font-size: min(17vh, 34vw); }
  .espresso_wrap .espresso_read em { font-size: 13px; max-width: 8.5rem; }
  .espresso_wrap .espresso_grinder { height: 30vh; }
  .espresso_wrap .espresso_streams { left: 30%; width: 180px; top: auto; bottom: calc(30vh + 8px); height: calc(70vh - 330px); min-height: 200px; }
}

.espresso_wrap button:focus-visible, .espresso_wrap a:focus-visible, .espresso_wrap [tabindex]:focus-visible { outline: 2px solid #ff2a1c; outline-offset: 3px; }
@media (max-width: 767px) { .espresso_wrap .espresso_sound span { display: none; } .espresso_wrap .espresso_sound { padding: 0 10px; top: 16px; } }

/* the editor's canvas: only the stills of the live page (stage.js canvasStills) */
.espresso_wrap.is-canvas { height: auto !important; margin: 0 !important; background: #000; }
.espresso_wrap.is-canvas > :not(.espresso_stills) { display: none !important; }
.espresso_wrap .espresso_stills { display: block; }
