/* =====================================================================
   Little Rosetta: a specialty café and roastery in Singapore (fictional).
   Cream like steamed milk, ink like espresso, a moss green and one
   terracotta, for the shophouse tiles. Daylight, not a studio.
   ===================================================================== */

:root {
    --cream: #f6efe4;
    --cream-2: #efe5d5;
    --milk: #fffaf2;
    --ink: #1d1511;
    --ink-2: #594a3f;
    --ink-3: #8d7c6e;
    --line: rgba(29, 21, 17, 0.14);
    --line-2: rgba(29, 21, 17, 0.26);
    --crema: #c77d3a;
    --crema-2: #e2a66a;
    --green: #3f6b52;
    --green-2: #4f8a68;
    --terracotta: #d35a3a;
    --pandan: #d6dcb3;
    --display: "Fraunces", "Iowan Old Style", Georgia, serif;
    --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
    --mono: "DM Mono", ui-monospace, Menlo, monospace;
    --gutter: clamp(16px, 4.2vw, 64px);
    --wrap: 1240px;
    --r: 22px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font: 400 16px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}
img, canvas, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--crema-2); color: var(--ink); }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0.01em; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 0 auto; }

/* the one WebGL canvas, behind everything */
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .nav, .foot, .shout, .sheet { position: relative; z-index: 1; }
.slot { position: relative; }
.slot .still { display: none; width: 100%; height: 100%; object-fit: contain; }
.no-webgl .slot .still { display: block; }

/* ---------------------------------------------------------------
   Type
   --------------------------------------------------------------- */
.eyebrow {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px;
    font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow span {
    display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    background: var(--ink); color: var(--cream); font: 500 12px/1 var(--mono); letter-spacing: 0;
}
h1 {
    font: 400 clamp(64px, 11vw, 168px)/0.9 var(--display);
    font-variation-settings: "opsz" 144, "SOFT" 60;
    letter-spacing: -0.035em;
}
h2 {
    font: 400 clamp(38px, 5vw, 76px)/0.98 var(--display);
    font-variation-settings: "opsz" 144, "SOFT" 40;
    letter-spacing: -0.025em;
    text-wrap: balance;
}
h1 em, h2 em { font-style: italic; font-weight: 300; color: var(--terracotta); }
h3 { font: 500 clamp(22px, 2vw, 28px)/1.1 var(--display); font-variation-settings: "opsz" 48; letter-spacing: -0.01em; }
.lede { margin-top: 20px; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.6; color: var(--ink-2); max-width: 54ch; text-wrap: pretty; }
.head--wide .lede { max-width: 64ch; }
.head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px 26px; border-radius: 999px; border: 1.5px solid var(--ink);
    background: var(--ink); color: var(--cream);
    font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer;
    transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.3s var(--spring);
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--terracotta); border-color: var(--terracotta); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.btn--small { padding: 11px 18px; font-size: 14px; }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }

/* ---------------------------------------------------------------
   Nav
   --------------------------------------------------------------- */
.nav {
    position: fixed; inset: 0 0 auto; z-index: 50;
    display: flex; align-items: center; gap: 28px;
    padding: 14px var(--gutter);
    border-bottom: 1px solid transparent;
    transition: background 0.35s, border-color 0.35s, padding 0.35s;
}
.nav.is-solid { background: rgba(246, 239, 228, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); padding-block: 10px; }
.concept-flag {
    display: inline-flex; align-items: center; gap: 6px; flex-direction: row;
    padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2);
    font: 500 12px/1 var(--mono); text-decoration: none; color: var(--ink-2); white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.concept-flag small { font: inherit; color: var(--ink-3); padding-left: 8px; border-left: 1px solid var(--line-2); }
.concept-flag:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.concept-flag:hover small { color: var(--cream-2); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-left: auto; margin-right: auto; }
.brand__mark { width: 30px; height: 30px; color: var(--green); }
.brand__word { font: 600 20px/1 var(--display); font-variation-settings: "opsz" 24; letter-spacing: 0.02em; }
.nav__links { display: flex; gap: 22px; }
.nav__links a { font: 500 14px/1 var(--sans); text-decoration: none; color: var(--ink-2); transition: color 0.2s; }
.nav__links a:hover { color: var(--terracotta); }
.btn--sheet { padding: 11px 18px; font-size: 14px; gap: 8px; }
.btn--sheet b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--terracotta); color: #fff; font: 600 12px/1 var(--mono); }
.btn--sheet b.is-bump { animation: bump 0.5s var(--spring); }
@keyframes bump { 50% { transform: scale(1.35); } }
@media (max-width: 1080px) { .nav__links { display: none; } }
@media (max-width: 640px) {
    .nav { gap: 12px; }
    .concept-flag small { display: none; }
    .brand__word { display: none; }
    .btn--sheet span { display: none; }
    .btn--sheet { padding: 10px 14px; }
    .btn--sheet::before { content: "Order"; }
}

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero {
    position: relative; min-height: 100svh;
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 24px;
    padding: 110px var(--gutter) 60px;
}
.hero__copy { position: relative; z-index: 2; }
.status {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
    padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--milk); border: 1px solid var(--line);
    font: 500 13px/1 var(--mono); color: var(--ink-2);
}
.status i { width: 9px; height: 9px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 4px rgba(47, 138, 102, 0.18); }
.status.is-closed i { background: var(--terracotta); box-shadow: 0 0 0 4px rgba(211, 90, 58, 0.18); }
.hero .lede { max-width: 42ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.promises { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 34px; color: var(--ink-2); font-size: 14px; }
.promises li { display: flex; align-items: center; gap: 8px; }
.promises li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--crema); }
.hero__slot {
    aspect-ratio: 1 / 1; width: 100%; max-height: 82vh; justify-self: end;
    touch-action: pan-y;
}
.hero__cue {
    position: absolute; left: var(--gutter); bottom: 22px;
    font: 500 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
}
.hero__cue span { display: inline-block; margin-right: 8px; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(4px); } }
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding-top: 96px; gap: 0; align-content: start; }
    .hero__slot { max-height: 58vh; order: -1; aspect-ratio: 1 / 0.92; }
    .hero__copy { margin-top: -12px; }
    h1 { font-size: clamp(60px, 18vw, 110px); }
    .hero__cue { display: none; }
}

/* the shouts at the counter */
.shout { overflow: hidden; border-block: 1.5px solid var(--ink); padding: 14px 0; background: var(--pandan); color: var(--ink); }
.shout__track li b { font-weight: 500; color: var(--terracotta); }
.shout__track { display: flex; gap: 48px; width: max-content; animation: shout 60s linear infinite; font: 500 15px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }
.shout__track li { white-space: nowrap; display: flex; align-items: center; gap: 48px; }
.shout__track li::after { content: "·"; }
@keyframes shout { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .shout__track { animation: none; } }

/* ---------------------------------------------------------------
   Sections, generally
   --------------------------------------------------------------- */
section { padding: clamp(72px, 9vw, 130px) 0; }
.head { max-width: 760px; }
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------------------------------------------------------------
   01 The lab
   --------------------------------------------------------------- */
.lab__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: center; }
.lab__controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.lab__hint { margin-top: 16px; font-size: 14px; color: var(--ink-2); min-height: 1.5em; transition: opacity 0.4s; }
.lab__hint.is-quiet { opacity: 0.6; }
.lab__how { display: grid; gap: 14px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.lab__how div { display: grid; grid-template-columns: 92px 1fr; gap: 14px; font-size: 14px; color: var(--ink-2); }
.lab__how dt { font: 500 12px/1.7 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.lab__slot {
    aspect-ratio: 1 / 1; width: 100%; max-width: 680px; justify-self: center; border-radius: 50%;
    touch-action: pan-y; cursor: crosshair; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.lab__slot.is-pouring { cursor: grabbing; }
.lab__slot:focus-visible { outline-offset: -3px; }
@media (max-width: 900px) {
    .lab__grid { grid-template-columns: 1fr; }
    .lab__slot { order: -1; max-width: 86vw; }
}

/* ---------------------------------------------------------------
   02 The decoder
   --------------------------------------------------------------- */
.decoder__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px 56px; align-items: start; }
.decoder .head--wide { grid-column: 1 / -1; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--milk); border: 1px solid var(--line); }
.seg button { padding: 10px 22px; border: 0; border-radius: 999px; background: transparent; font: 600 15px/1 var(--sans); cursor: pointer; color: var(--ink-2); transition: background 0.25s, color 0.25s; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.opt { margin-top: 26px; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.opt legend { grid-column: 1 / -1; margin-bottom: 10px; font: 500 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.opt button {
    display: grid; gap: 4px; justify-items: start; text-align: left;
    padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: transparent; cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.3s var(--spring);
}
.opt button b { font: 600 17px/1.1 var(--display); font-variation-settings: "opsz" 24; }
.opt button span { font-size: 12.5px; color: var(--ink-3); }
.opt button:hover { border-color: var(--ink); transform: translateY(-1px); }
.opt button[aria-pressed="true"], .opt button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.opt button[aria-pressed="true"] span, .opt button[aria-checked="true"] span { color: var(--cream-2); }
.dice { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; padding: 10px 14px; border: 0; background: none; cursor: pointer; font: 600 14px/1 var(--sans); color: var(--ink-2); border-radius: 999px; transition: color 0.2s; }
.dice svg { width: 20px; height: 20px; transition: transform 0.6s var(--spring); }
.dice:hover { color: var(--terracotta); }
.dice:hover svg { transform: rotate(-90deg); }
.decoder__cup { position: relative; display: grid; gap: 0; }
.cup__slot { aspect-ratio: 5 / 6; width: 100%; max-width: 560px; justify-self: center; }
.ticket {
    position: relative; margin: -40px auto 0; width: min(100%, 440px); padding: 26px 28px 22px;
    background: var(--milk); border: 1.5px solid var(--ink); border-radius: 18px;
    box-shadow: 8px 8px 0 var(--ink);
}
.ticket__say { font: italic 400 15px/1.2 var(--display); color: var(--ink-3); }
.ticket__tags { margin-top: 4px; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--terracotta); }
.ticket__tags[hidden] { display: none; }
.ticket__parts { margin-top: 12px; font: 500 13px/1.5 var(--mono); color: var(--ink-2); }
.bar { display: flex; gap: 2px; height: 14px; margin-top: 10px; border-radius: 7px; overflow: hidden; }
.bar span { flex: 1 1 0; min-width: 0; }
.bar span[hidden] { display: none; }
.bar [data-part="espresso"] { background: #2a1810; }
.bar [data-part="milk"] { background: #e9dfcf; }
.bar [data-part="foam"] { background: #fbf8f2; border: 1px solid var(--line); }
.bar [data-part="water"] { background: #bcd3d6; }
.bar__key { display: flex; gap: 14px; margin-top: 8px; font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.bar__key i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.ticket__about { margin-top: 12px; color: var(--ink-2); font-size: 14.5px; }
.ticket__milk { margin-top: 8px; color: var(--ink-3); font-size: 13.5px; }
.ticket__milk[hidden] { display: none; }
.ticket__vessel { margin-top: 10px; font: 500 12px/1.5 var(--mono); color: var(--ink-3); }
.opt button:disabled { opacity: 0.4; cursor: default; transform: none; }
.opt--drinks { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
.ticket__phrase { margin-top: 8px; font: 500 clamp(34px, 3.4vw, 46px)/1 var(--display); font-variation-settings: "opsz" 72; letter-spacing: -0.02em; color: var(--green); }
.ticket__meaning { margin-top: 10px; color: var(--ink-2); font-size: 15.5px; }
.ticket__note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(211, 90, 58, 0.1); color: var(--ink); font-size: 13.5px; }
.ticket__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
@media (max-width: 900px) {
    .decoder__grid { grid-template-columns: 1fr; }
    .decoder__cup { order: -1; }
    .decoder .head--wide { order: -2; }
    .cup__slot { max-width: 420px; }
}

/* ---------------------------------------------------------------
   03 The counter
   --------------------------------------------------------------- */
.menu { background: var(--ink); color: var(--cream); }
.menu .eyebrow { color: var(--cream-2); }
.menu .eyebrow span { background: var(--cream); color: var(--ink); }
.menu h2 em { color: var(--crema-2); }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.18); }
.tabs button { padding: 11px 20px; border: 0; border-radius: 999px; background: transparent; color: var(--cream-2); font: 600 14px/1 var(--sans); cursor: pointer; transition: background 0.25s, color 0.25s; }
.tabs button[aria-selected="true"] { background: var(--cream); color: var(--ink); }
.menu__note { margin-top: 22px; font-size: 14px; color: var(--cream-2); max-width: 70ch; }
.menu__note abbr { text-decoration: none; font: 500 12px/1 var(--mono); padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); }
.dishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 34px; }
.dishes[hidden] { display: none; }
.dish {
    position: relative; display: grid; align-content: start; gap: 10px;
    padding: 22px 22px 20px; min-height: 180px; border-radius: var(--r);
    background: rgba(246, 239, 228, 0.06); border: 1px solid rgba(246, 239, 228, 0.18);
    transition: background 0.25s, transform 0.3s var(--spring), border-color 0.25s;
}
.dish:hover { background: var(--cream); color: var(--ink); transform: translateY(-3px); border-color: var(--cream); }
.dish p { font-size: 14.5px; color: var(--cream-2); transition: color 0.25s; }
.dish:hover p { color: var(--ink-2); }
.dish--lead { grid-column: span 2; background: var(--crema-2); color: var(--ink); border-color: var(--crema-2); }
.dish--lead p { color: var(--ink-2); }
.dish--lead h3 { font-size: clamp(28px, 2.6vw, 38px); }
.dish__price { font: 500 16px/1 var(--mono); margin-top: auto; }
.dish__tag { position: absolute; top: 18px; right: 18px; padding: 6px 10px; border-radius: 999px; background: var(--ink); color: var(--cream); font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.dish__diet { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 4px; }
.dish__diet abbr { text-decoration: none; font: 500 11px/1 var(--mono); padding: 4px 6px; border-radius: 6px; border: 1px solid currentColor; opacity: 0.7; }
.dish--lead .dish__diet { bottom: 20px; right: 120px; }
/* the whole box is the button */
.dish__add { position: absolute; inset: 0; border: 0; background: transparent; border-radius: var(--r); cursor: pointer; color: transparent; font-size: 0; }
.dish__add:focus-visible { outline-offset: 2px; }
.dish.is-added { animation: added 0.6s var(--spring); }
@keyframes added { 30% { transform: scale(0.97); } 70% { transform: scale(1.02); } }
@media (max-width: 640px) { .dish--lead { grid-column: span 1; } }

/* ---------------------------------------------------------------
   04 Roasted upstairs
   --------------------------------------------------------------- */
.beans__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 40px; margin-top: 48px; align-items: start; }
.beans__grid .roast { grid-column: 2; grid-row: 1 / span 2; }
.beans__grid .also { grid-column: 1; margin-top: 0; }
.bags { display: grid; gap: 12px; }
.bag { position: relative; padding: 22px 24px; border-radius: var(--r); background: var(--milk); border: 1.5px solid var(--line-2); transition: border-color 0.25s, transform 0.3s var(--spring); }
.bag:hover { border-color: var(--ink); transform: translateY(-2px); }
.bag__kind { font: 500 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 8px; }
.bag__origin { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); }
.notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.notes li { padding: 6px 11px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); font-size: 13px; }
.bag__fresh { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.bag__fresh i { width: 10px; height: 10px; border-radius: 50%; background: var(--green-2); flex: none; }
.bag__fresh.is-resting i { background: var(--crema); }
.bag__fresh.is-old i { background: var(--ink-3); }
.bag__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.bag .dish__add { position: static; inset: auto; border-radius: 999px; padding: 10px 16px; background: var(--ink); color: var(--cream); font: 600 13px/1 var(--sans); z-index: 1; }
.bag .dish__add:hover { background: var(--terracotta); }
.bag.is-added { animation: added 0.6s var(--spring); }
.roast { padding: 22px 22px 18px; border-radius: var(--r); background: var(--ink); color: var(--cream); position: sticky; top: 90px; }
.roast__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.toggle button { padding: 8px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--cream-2); font: 600 13px/1 var(--sans); cursor: pointer; transition: background 0.25s, color 0.25s; }
.toggle button[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.roast__read { font-size: 13px; color: var(--cream-2); }
.roast__chart { width: 100%; height: auto; margin-top: 14px; }
.roast__chart .grid { stroke: rgba(255, 255, 255, 0.12); stroke-width: 1; }
.roast__chart .axis { fill: rgba(246, 239, 228, 0.6); font: 500 11px var(--mono); }
.roast__chart .curve { fill: none; stroke: var(--crema-2); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.roast__chart .fill { fill: url(#roastFill); }
.roast__chart .mark { stroke: rgba(246, 239, 228, 0.55); stroke-dasharray: 3 4; }
.roast__chart .mark-dot { fill: var(--cream); }
.roast__chart .label { fill: var(--cream); font: 500 12px var(--sans); }
.roast__chart .label small { font-size: 11px; opacity: 0.7; }
.roast__chart .hover { opacity: 0; transition: opacity 0.15s; }
.roast__chart.is-hover .hover { opacity: 1; }
.roast__chart .hover line { stroke: rgba(246, 239, 228, 0.5); }
.roast__chart .hover circle { fill: var(--cream); stroke: var(--ink); stroke-width: 2; }
.roast__chart .tip rect { fill: var(--cream); }
.roast__chart .tip text { fill: var(--ink); font: 500 11.5px var(--mono); }
.roast figcaption { margin-top: 10px; font-size: 13px; color: var(--cream-2); }
@media (max-width: 900px) { .beans__grid { grid-template-columns: 1fr; } .roast { position: static; } .beans__grid .roast { grid-column: 1; grid-row: auto; } }

/* ---------------------------------------------------------------
   05 Dial it in
   --------------------------------------------------------------- */
.brew { background: var(--cream-2); }
.brew__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; }
.dial { padding: 26px; border-radius: var(--r); background: var(--milk); border: 1.5px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.dial__methods { display: flex; flex-wrap: wrap; gap: 6px; }
.dial__methods button { padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: transparent; font: 600 13.5px/1 var(--sans); cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.dial__methods button:hover { border-color: var(--ink); }
.dial__methods button[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.dial__sliders { display: grid; gap: 18px; margin-top: 26px; }
.dial__sliders label { display: grid; gap: 8px; }
.dial__sliders label span { display: flex; justify-content: space-between; font: 500 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.dial__sliders output { color: var(--ink); font-size: 14px; letter-spacing: 0; text-transform: none; }
input[type="range"] { width: 100%; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: var(--line-2); border-radius: 3px; }
input[type="range"]::-moz-range-track { height: 3px; background: var(--line-2); border-radius: 3px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9.5px; border-radius: 50%; background: var(--terracotta); border: 3px solid var(--milk); box-shadow: 0 0 0 1.5px var(--ink); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--terracotta); border: 3px solid var(--milk); box-shadow: 0 0 0 1.5px var(--ink); cursor: pointer; }
.dial__read { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; padding-top: 22px; border-top: 1px dashed var(--line-2); }
.dial__read dt { font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.dial__read dd { margin-top: 8px; font: 500 20px/1.1 var(--display); font-variation-settings: "opsz" 48; }
.dial__big { grid-column: span 1; }
.dial__big dd { font-size: clamp(34px, 3vw, 44px); color: var(--green); }
.dial__taste { margin-top: 20px; font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 900px) { .brew__grid { grid-template-columns: 1fr; } .dial__read { grid-template-columns: repeat(2, 1fr); } }

/* ---------------------------------------------------------------
   06 Find us
   --------------------------------------------------------------- */
.visit__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 48px; align-items: start; }
.visit__addr { margin-top: 26px; font: 500 17px/1.5 var(--display); font-variation-settings: "opsz" 24; font-style: normal; }
.hours { display: grid; gap: 6px; margin-top: 22px; max-width: 420px; }
.hours div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); font-size: 15px; }
.hours dt { color: var(--ink-2); }
.hours dd { font-family: var(--mono); font-size: 14px; }
.hours div.is-today { color: var(--green); font-weight: 600; }
.hours div.is-today dt { color: inherit; }
.rules { display: grid; gap: 10px; margin-top: 26px; font-size: 14.5px; color: var(--ink-2); }
.rules b { color: var(--ink); font-weight: 600; }
.visit__side { display: grid; gap: 18px; }
.busy { padding: 20px 22px 14px; border-radius: var(--r); background: var(--milk); border: 1.5px solid var(--line-2); }
.busy figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.busy figcaption .mono { color: var(--ink-2); font-size: 12.5px; }
.busy svg { margin-top: 12px; width: 100%; height: auto; overflow: visible; }
.busy .bar { fill: var(--crema-2); transition: fill 0.2s; }
.busy .bar.is-closed { fill: var(--cream-2); }
.busy .bar.is-now { fill: var(--terracotta); }
.busy .bar:hover, .busy .bar.is-hover { fill: var(--ink); }
.busy .axis { fill: var(--ink-3); font: 500 11px var(--mono); }
.busy .base { stroke: var(--line-2); }
.busy .tip rect { fill: var(--ink); }
.busy .tip text { fill: var(--cream); font: 500 11.5px var(--mono); }
.busy .tip { opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.busy .tip.is-on { opacity: 1; }
.map { border-radius: var(--r); overflow: hidden; border: 1.5px solid var(--ink); }
.map svg { width: 100%; height: auto; }
.map__road { fill: var(--ink-3); font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.map__label { fill: var(--ink); font: 600 15px var(--display); }
.map__label--faint { fill: var(--ink-3); font: 500 12px var(--mono); }
.map__mrt { fill: #fff; font: 700 12px var(--sans); }
.map__pin { animation: pin 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pin { 50% { transform: translate(236px, 172px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .map__pin { animation: none; } }
@media (max-width: 900px) { .visit__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------
   The Satu card
   --------------------------------------------------------------- */
.card { background: var(--ink); color: var(--cream); }
.card .eyebrow { color: var(--cream-2); }
.card .eyebrow span { background: var(--cream); color: var(--ink); }
.card .lede { color: var(--cream-2); }
.card h2 em { color: var(--crema-2); }
.card__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.stamps { padding: 26px; border-radius: var(--r); background: var(--cream); color: var(--ink); border: 1.5px solid var(--cream); }
.stamps__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stamps__grid li { aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--line-2); display: grid; place-items: center; color: var(--ink-3); font: 500 12px var(--mono); transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.5s var(--spring); }
.stamps__grid li.is-on { background: var(--green); border-color: var(--green); color: var(--cream); border-style: solid; }
.stamps__grid li.is-on svg { width: 55%; height: 55%; }
.stamps__grid li.is-free { border-color: var(--terracotta); color: var(--terracotta); }
.stamps__grid li.is-free.is-on { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.stamps__grid li.is-new { animation: stamp 0.5s var(--spring); }
@keyframes stamp { 0% { transform: scale(1.5) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.stamps__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 900px) { .card__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------
   The order sheet
   --------------------------------------------------------------- */
.sheet { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.sheet::before { content: ""; position: absolute; inset: 0; background: rgba(29, 21, 17, 0.35); opacity: 0; transition: opacity 0.35s; }
.sheet.is-open { pointer-events: auto; }
.sheet.is-open::before { opacity: 1; }
.sheet__panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
    overflow: auto; padding: 24px 26px 32px; background: var(--milk); border-left: 1.5px solid var(--ink);
    transform: translateX(104%); transition: transform 0.45s var(--ease);
}
.sheet.is-open .sheet__panel { transform: none; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; }
.sheet__head h2 { font-size: 32px; }
.sheet__close { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line-2); background: transparent; font-size: 22px; cursor: pointer; }
.sheet__close:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.sheet__empty { margin-top: 24px; color: var(--ink-2); font-size: 15px; }
.sheet__items { margin-top: 20px; display: grid; gap: 4px; }
.sheet__items li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-2); font-size: 15px; }
.sheet__items li b { font-weight: 500; }
.sheet__items li small { display: block; color: var(--ink-3); font-size: 12.5px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: 999px; }
.qty button { width: 30px; height: 30px; border: 0; background: transparent; cursor: pointer; font-size: 16px; border-radius: 50%; }
.qty button:hover { background: var(--cream-2); }
.qty span { min-width: 22px; text-align: center; font-family: var(--mono); font-size: 14px; }
.sheet__form { margin-top: 20px; display: grid; gap: 14px; }
.sheet__form[hidden] { display: none; }
.sheet__total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1.5px solid var(--ink); font-size: 14px; color: var(--ink-2); }
.sheet__total dd { font: 500 28px/1 var(--display); color: var(--ink); }
.sheet__form label { display: grid; gap: 6px; font: 500 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.sheet__form input, .sheet__form select { padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--cream); font: 400 15px var(--sans); color: var(--ink); letter-spacing: 0; text-transform: none; }
.sheet__form input:focus, .sheet__form select:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; border-color: var(--ink); }
.sheet__form input:invalid:not(:placeholder-shown) { border-color: var(--terracotta); }
.sheet__fine { font-size: 12.5px; color: var(--ink-3); }
.sheet__done { margin-top: 30px; padding: 26px; border-radius: 18px; border: 1.5px dashed var(--ink); text-align: center; }
.sheet__done[hidden] { display: none; }
.sheet__ticket { color: var(--ink-3); font-size: 13px; }
.sheet__done h3 { margin-top: 10px; font-size: 40px; }
.sheet__done p + p, .sheet__done .btn { margin-top: 12px; }
.sheet__done .btn { margin-top: 20px; }

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.foot { padding: 64px 0 40px; border-top: 1.5px solid var(--ink); background: var(--cream); }
.foot__top { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.brand--foot { margin: 0; }
.foot__def { color: var(--ink-2); font-size: 15px; max-width: 54ch; }
.foot__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px; margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.foot__grid h4 { font: 500 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); margin-bottom: 10px; }
.foot__grid a { text-decoration-color: var(--line-2); }
.foot__grid a:hover { color: var(--terracotta); }
.foot__base { margin-top: 40px; font-size: 12.5px; color: var(--ink-3); max-width: 90ch; }

/* ---------------------------------------------------------------
   Without WebGL
   --------------------------------------------------------------- */
.no-webgl #stage { display: none; }
.no-webgl .lab__slot { cursor: default; }

/* ---------------------------------------------------------------
   After the panel: the facts up front, milk on the card, a phone bar
   --------------------------------------------------------------- */
.hero__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 22px; font: 500 13px/1.4 var(--mono); color: var(--ink-2); }
.hero__facts a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.hero__facts a:hover { color: var(--terracotta); }
.hero__facts span[aria-hidden] { color: var(--ink-3); }
.ig { color: var(--ink-3); }
.ticket__ratio { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
.ticket__foot .mono { font-size: 22px; }
.dish__milk { position: relative; z-index: 2; display: inline-flex; gap: 4px; margin-top: 2px; }
.dish__milk button { padding: 6px 10px; border-radius: 999px; border: 1px solid currentColor; background: transparent; font: 500 11.5px/1 var(--mono); cursor: pointer; opacity: 0.7; transition: opacity 0.2s, background 0.2s, color 0.2s; }
.dish__milk button[aria-pressed="true"] { opacity: 1; background: currentColor; }
.dish__milk button[aria-pressed="true"]::after { content: attr(data-chip); }
.dish__milk button[aria-pressed="true"] { color: var(--cream); background: var(--cream); color: var(--ink); }
.dish:hover .dish__milk button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.dish--lead .dish__milk button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.dish__milk button[aria-pressed="true"]::after { content: ""; }
.dish:has(.dish__milk) .dish__diet { bottom: 56px; }
.dish--lead:has(.dish__milk) .dish__diet { right: 20px; }
.also { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.bag--also h3 { font-size: 20px; }
.bag--also p { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.bag--also .bag__foot { margin-top: 12px; padding-top: 10px; }
.bag--quiet { background: transparent; border-style: dashed; }
.bag--quiet:hover { transform: none; border-color: var(--line-2); }
@media (max-width: 640px) { .also { grid-template-columns: 1fr; } }
.tabbar { display: none; }
@media (max-width: 1080px) {
    .tabbar {
        position: fixed; left: 50%; bottom: 14px; z-index: 60; transform: translateX(-50%);
        display: flex; gap: 2px; padding: 4px; border-radius: 999px;
        background: rgba(29, 21, 17, 0.92); border: 1px solid rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 10px 30px rgba(29, 21, 17, 0.25);
    }
    .tabbar a, .tabbar button { padding: 10px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--cream); font: 600 13px/1 var(--sans); text-decoration: none; cursor: pointer; }
    .tabbar button { background: var(--terracotta); color: #fff; }
    .tabbar a:hover { background: rgba(255, 255, 255, 0.12); }
    body { padding-bottom: 72px; }
    .sheet__panel { padding-bottom: 90px; }
}
@media (max-width: 900px) {
    .cup__slot { max-width: 360px; aspect-ratio: 1 / 1; }
    .hero__slot { max-height: 52vh; margin-bottom: 18px; }
    .hero__copy { margin-top: 0; }
}

/* ---------------------------------------------------------------
   Round two: the cup section composed, the cup kept in view
   --------------------------------------------------------------- */
@media (min-width: 1280px) {
    .decoder__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 36px 48px; }
    .decoder__cup {
        position: sticky; top: 96px;
        grid-template-columns: minmax(0, 1.15fr) minmax(300px, 1fr); align-items: center; gap: 8px;
    }
    .cup__slot { max-width: none; aspect-ratio: 4 / 5; }
    .ticket { margin: 0; width: 100%; }
}
@media (min-width: 901px) and (max-width: 1279px) {
    .decoder__cup { position: sticky; top: 90px; }
}
@media (max-width: 1080px) {
    .hero { padding-bottom: 96px; }
}

/* the cutaway's labels: pinned to each layer by builder.js */
.cup__tags { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.35s; }
.cup__tags.is-in { opacity: 1; }
.cup__tags[hidden], .no-webgl .cup__tags { display: none; }
.cup__tag {
    position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 0;
    margin-top: -11px; white-space: nowrap;
    font: 500 12px/22px var(--mono); color: var(--ink);
    transition: transform 0.25s var(--ease);
}
.cup__tag { flex-direction: row-reverse; }
.cup__tag::before { content: ""; width: 34px; height: 1px; margin-left: 8px; background: var(--ink); opacity: 0.55; }
.cup__tag::after { content: ""; position: absolute; right: -3px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.cup__tag[hidden] { display: none; }
@media (max-width: 640px) { .cup__tag { font-size: 11px; } .cup__tag::before { width: 18px; } }
@media (min-width: 1280px) { .opt--drinks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.opt button b { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------
   Round two: the small forms, the map link, the quiet summaries
   --------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; align-items: end; }
.mini label { display: grid; gap: 6px; font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.mini input, .mini select { padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--cream); font: 400 14px var(--sans); color: var(--ink); letter-spacing: 0; text-transform: none; min-width: 0; }
.mini input:focus, .mini select:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; border-color: var(--ink); }
.mini input[aria-invalid] { border-color: var(--terracotta); }
.mini .btn { grid-column: 1 / -1; justify-self: start; }
.mini [hidden] { display: none !important; }
.mini__done { grid-column: 1 / -1; padding: 10px 12px; border-radius: 10px; background: rgba(79, 138, 104, 0.12); color: var(--ink); font-size: 13.5px; }
.mini--inline { margin-top: 10px; max-width: 460px; }
.visit__map { display: inline-block; margin-top: 8px; font: 600 14px var(--sans); color: var(--terracotta); text-underline-offset: 3px; }
.visit__addr small { font: 400 12.5px var(--sans); color: var(--ink-3); }
.sheet__note { margin-top: -6px; font-size: 12.5px; color: var(--ink-3); min-height: 0; }
.sheet__note:empty { display: none; }
@media (max-width: 520px) { .mini { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------
   The hero: the whole drink, step by step
   --------------------------------------------------------------- */
.process { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; gap: 10px; justify-items: center; padding: 0 8px 4px; pointer-events: none; }
.process__steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 250, 242, 0.88); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: auto; }
.process__steps button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 7px; border: 0; border-radius: 999px; background: transparent; font: 600 13px/1 var(--sans); color: var(--ink-2); cursor: pointer; transition: background 0.25s, color 0.25s; }
.process__steps button i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-2); font: 500 11px/1 var(--mono); font-style: normal; transition: background 0.25s, color 0.25s, border-color 0.25s; }
.process__steps button:hover { color: var(--ink); }
.process__steps button.is-done i { background: var(--ink-3); border-color: var(--ink-3); color: var(--cream); }
.process__steps button.is-on { background: var(--ink); color: var(--cream); }
.process__steps button.is-on i { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.process__say { max-width: 48ch; padding: 7px 14px; border-radius: 12px; text-align: center; font-size: 14px; line-height: 1.4; color: var(--ink); background: rgba(255, 250, 242, 0.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.process__say:has(#heroCaption:empty) { visibility: hidden; }
.process__say b { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 6px; background: var(--ink); color: var(--cream); font-size: 12.5px; font-weight: 500; }
.process__say b:empty { display: none; }
.no-webgl .process { display: none; }
@media (max-width: 900px) {
    /* on a phone the steps sit under the picture, not on it */
    .hero__slot { margin-bottom: 92px; }
    .process { top: 100%; bottom: auto; padding-top: 8px; gap: 6px; }
    .process__steps { flex-wrap: nowrap; }
    .process__steps button { padding: 6px; font-size: 12px; gap: 0; }
    .process__steps button span { display: none; }
    .process__steps button.is-on { padding-right: 11px; gap: 6px; }
    .process__steps button.is-on span { display: inline; }
    .process__steps button i { width: 20px; height: 20px; }
    .process__say { font-size: 12.5px; padding: 5px 10px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--ink-2); }
}
.mini__err { grid-column: 1 / -1; font-size: 13px; color: var(--terracotta); }
/* the hero's picture fades into the page, so the machine never ends in a hard frame edge */
.hero__slot::after { content: ""; position: absolute; inset: -1px; z-index: 1; pointer-events: none; box-shadow: inset 0 0 36px 28px var(--cream); border-radius: 4px; }
.no-webgl .hero__slot::after { display: none; }
@media (max-width: 900px) { .hero__slot::after { box-shadow: inset 0 0 16px 10px var(--cream); } }
