/* ═════ Tokens ═════ */
:root {
  --cream: #F5EFE6;
  --paper: #FBF8F3;
  --ink: #2A1D15;
  --mocha: #6B5444;
  --soft: #9A8676;
  --line: rgba(42, 29, 21, .12);
  --terra: #C4532D;
  --sage: #7C8B6A;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --drawer: cubic-bezier(.32, .72, 0, 1);
  --pad: clamp(18px, 4vw, 56px);
  --max: 1240px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }            /* layout rules must never override hidden */
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
body.lock { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--ink); color: var(--cream); }
.kicker { margin: 0 0 14px; font: 500 12.5px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--terra); }

/* ═════ Buttons ═════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 24px;
  border-radius: 999px; font: 600 15px/1 var(--sans); user-select: none; -webkit-user-select: none;
  transition: transform .16s var(--ease), background-color .2s, color .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn-dark:hover { background: #3E2C21; }
  .btn-line:hover { background: var(--ink); color: var(--cream); }
}
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; transition: background-color .2s; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: rgba(42, 29, 21, .07); } }

/* ═════ Header ═════ */
.announce { background: var(--ink); color: var(--cream); text-align: center; font: 500 12.5px var(--mono); letter-spacing: .03em; padding: 9px 12px; }
.header {
  position: sticky; top: 0; z-index: 30; height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 var(--pad); background: rgba(245, 239, 230, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.header.scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 21px var(--serif); letter-spacing: -.02em; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--mocha); transition: color .2s, background-color .2s; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--ink); background: rgba(42, 29, 21, .06); } }
.cart-btn { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line); transition: transform .16s var(--ease); }
.cart-btn:active { transform: scale(.94); }
.badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--terra); color: #fff; font: 600 11px/20px var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.badge.bump { animation: bump .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ═════ Hero ═════ */
.hero { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 7vw, 90px) var(--pad) clamp(30px, 5vw, 60px); display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 70px); align-items: center; }
.hero h1 { font: 600 clamp(44px, 6.4vw, 88px)/.98 var(--serif); letter-spacing: -.035em; max-width: 11ch; }
.lede { margin: 22px 0 0; max-width: 44ch; font-size: clamp(17px, 1.5vw, 19px); color: var(--mocha); text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.in { opacity: 0; transform: translateY(18px); animation: rise .8s var(--ease) var(--d, 0s) forwards; }
.hero h1.in { transform: translateY(30px); }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero-bags { position: relative; height: clamp(320px, 38vw, 470px); }
.hero-bags .bag { position: absolute; bottom: 0; left: 50%; width: clamp(150px, 15vw, 210px); transform-origin: 50% 100%; opacity: 0; animation: bagIn .9s var(--ease) var(--d) forwards; }
.hero-bags .bag:nth-child(1) { --r: -12deg; --x: -118%; --d: .2s; }
.hero-bags .bag:nth-child(2) { --r: 0deg; --x: -50%; --d: .1s; z-index: 2; width: clamp(170px, 17vw, 236px); }
.hero-bags .bag:nth-child(3) { --r: 12deg; --x: 18%; --d: .3s; }
@keyframes bagIn { from { opacity: 0; transform: translate(var(--x), 60px) rotate(0deg); } to { opacity: 1; transform: translate(var(--x), 0) rotate(var(--r)); } }
.facts { list-style: none; max-width: var(--max); margin: 0 auto; padding: 22px var(--pad); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--mocha); font-size: 15px; }
.facts b { font: 600 22px var(--serif); color: var(--ink); margin-right: 6px; }

/* ═════ Bag (drawn in CSS) ═════ */
.bag { aspect-ratio: 3 / 4.2; position: relative; filter: drop-shadow(0 26px 30px rgba(42, 29, 21, .22)); }
.bag-body {
  position: absolute; inset: 7% 0 0; border-radius: 10px 10px 16px 16px; background: var(--c);
  background-image: linear-gradient(100deg, rgba(255, 255, 255, .12), transparent 30%, transparent 70%, rgba(0, 0, 0, .14));
  overflow: hidden;
}
.bag-top { position: absolute; top: 0; left: 4%; right: 4%; height: 11%; border-radius: 6px 6px 2px 2px; background: var(--c); filter: brightness(.86);
  background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 7px); }
.bag-valve { position: absolute; top: 17%; right: 12%; width: 9%; aspect-ratio: 1; border-radius: 50%; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .25); }
.bag-label { position: absolute; left: 11%; right: 11%; top: 30%; bottom: 12%; border-radius: 6px; background: var(--paper); color: var(--ink); padding: 9% 9% 0; display: flex; flex-direction: column; text-align: center; }
.bag-label small { font: 500 clamp(7px, .65vw, 9px) var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.bag-label b { font: 700 clamp(15px, 1.5vw, 22px)/1 var(--serif); letter-spacing: -.02em; margin: 6% 0 3%; }
.bag-label em { font: italic 400 clamp(9px, .8vw, 12px) var(--serif); color: var(--mocha); }
.bag-label i { margin: auto auto 10%; width: 46%; height: 3px; border-radius: 3px; background: var(--c); }

/* ═════ Sections ═════ */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(70px, 10vw, 130px) var(--pad) 0; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section h2 { font: 600 clamp(32px, 4.4vw, 56px)/1.02 var(--serif); letter-spacing: -.03em; text-wrap: balance; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.product { background: var(--paper); border-radius: 22px; padding: 22px; box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
@media (hover: hover) and (pointer: fine) { .product:hover { box-shadow: 0 0 0 1px var(--line), 0 24px 40px -24px rgba(42, 29, 21, .35); transform: translateY(-3px); } }
.product-art { display: grid; place-items: center; padding: 18px 0 26px; border-radius: 16px; background: radial-gradient(70% 60% at 50% 60%, rgba(255, 255, 255, .7), transparent), var(--tint); cursor: pointer; }
.product-art .bag { width: 54%; transition: transform .5s var(--ease); }
@media (hover: hover) and (pointer: fine) { .product:hover .product-art .bag { transform: rotate(-3deg) translateY(-6px); } }
.product h3 { margin-top: 18px; font-size: 25px; }
.origin { margin: 2px 0 12px; color: var(--soft); font-size: 14px; }
.notes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.notes span { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--cream); color: var(--mocha); }
.roast { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font: 500 12px var(--mono); color: var(--soft); }
.roast-dots { display: flex; gap: 4px; }
.roast-dots i { width: 14px; height: 6px; border-radius: 3px; background: rgba(42, 29, 21, .12); }
.roast-dots i.on { background: var(--mocha); }
.buy { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font: 600 22px var(--serif); font-variant-numeric: tabular-nums; }
.price small { font: 400 13px var(--sans); color: var(--soft); margin-left: 4px; }
.quick { position: relative; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: var(--cream); font-weight: 600; font-size: 14px; overflow: hidden; min-width: 112px; transition: transform .16s var(--ease), background-color .3s; }
.quick:active { transform: scale(.96); }
.quick span { display: block; transition: transform .35s var(--ease), opacity .25s, filter .25s; }
.quick .q2 { position: absolute; inset: 0; display: grid; place-items: center; transform: translateY(100%); opacity: 0; filter: blur(3px); }
.quick.done { background: var(--sage); }
.quick.done .q1 { transform: translateY(-100%); opacity: 0; filter: blur(3px); }
.quick.done .q2 { transform: none; opacity: 1; filter: none; }
.details-link { font-size: 14px; color: var(--mocha); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); padding: 10px 0; }

/* Subscribe */
.sub { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(24px, 5vw, 70px); align-items: start; }
.sub-copy p:not(.kicker) { color: var(--mocha); margin-top: 18px; max-width: 38ch; }
.builder { background: var(--paper); border-radius: 24px; padding: clamp(20px, 3vw, 32px); box-shadow: 0 0 0 1px var(--line); display: grid; gap: 22px; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font: 500 12.5px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--soft); margin-bottom: 10px; padding: 0; }
.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice { position: relative; text-align: left; padding: 14px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .2s, background-color .2s; }
.choice b { display: block; font: 600 16px var(--serif); }
.choice small { color: var(--soft); font-size: 13px; }
.choice[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--ink); background: var(--cream); }
.choice[aria-checked="true"]::after { content: "✓"; position: absolute; top: 10px; right: 12px; font-size: 13px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 3px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; font-size: 18px; transition: background-color .2s, transform .12s var(--ease); }
.stepper button:active { transform: scale(.9); }
@media (hover: hover) and (pointer: fine) { .stepper button:hover { background: rgba(42, 29, 21, .07); } }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper output { min-width: 26px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper.big button { width: 44px; height: 44px; }
.stepper.big output { min-width: 40px; font-size: 18px; }
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); isolation: isolate; }
.seg button { position: relative; z-index: 1; height: 42px; padding: 0 18px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--mocha); transition: color .25s; white-space: nowrap; }
.seg button[aria-checked="true"] { color: var(--cream); }
.seg-pill { position: absolute; z-index: 0; inset: 4px; border-radius: 999px; background: var(--ink); clip-path: inset(0 50% 0 0 round 999px); transition: clip-path .25s var(--ease); }
.seg.small button { height: 36px; padding: 0 14px; font-size: 13.5px; }
.summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.sum-label { display: block; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--soft); }
.price-big { font: 600 30px var(--serif); font-variant-numeric: tabular-nums; }
.price-big s { font-size: 18px; color: var(--soft); font-weight: 400; margin-right: 4px; }

/* How */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps li { padding: 26px; border-radius: 22px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.steps span { display: inline-block; font: 500 12px var(--mono); padding: 5px 10px; border-radius: 999px; background: var(--ink); color: var(--cream); letter-spacing: .04em; text-transform: uppercase; }
.steps h3 { margin-top: 18px; font-size: 26px; }
.steps p { margin: 8px 0 0; color: var(--mocha); }

/* Brew */
.brew { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 70px); align-items: center; padding-bottom: clamp(70px, 10vw, 120px); }
.brew-copy p:not(.kicker) { color: var(--mocha); margin-top: 18px; max-width: 40ch; }
.calc { background: var(--ink); color: var(--cream); border-radius: 24px; padding: clamp(22px, 3vw, 34px); display: grid; gap: 22px; }
.calc .seg { background: rgba(245, 239, 230, .08); box-shadow: none; justify-self: start; }
.calc .seg button { color: rgba(245, 239, 230, .7); }
.calc .seg button[aria-checked="true"] { color: var(--ink); }
.calc .seg-pill { background: var(--cream); }
.calc-row { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; font: 500 13px var(--mono); text-transform: uppercase; letter-spacing: .04em; color: rgba(245, 239, 230, .7); }
.calc-row output { justify-self: end; font: 600 22px var(--serif); color: var(--cream); }
.calc-row input { grid-column: 1 / -1; width: 100%; accent-color: var(--terra); }
.calc-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.calc-out div { padding: 14px; border-radius: 16px; background: rgba(245, 239, 230, .07); }
.calc-out b { display: block; font: 600 clamp(28px, 3vw, 40px)/1 var(--serif); font-variant-numeric: tabular-nums; }
.calc-out span { font-size: 13px; color: rgba(245, 239, 230, .65); }

/* Footer */
.footer { background: var(--paper); border-top: 1px solid var(--line); padding: 50px var(--pad) 30px; }
.foot-top { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.foot-brand { margin: 0; font: 700 30px var(--serif); letter-spacing: -.03em; }
.foot-note { margin: 10px 0 0; color: var(--soft); font-size: 14px; max-width: 42ch; }
.news label { display: block; font-weight: 600; margin-bottom: 10px; }
.news-row { display: flex; gap: 8px; }
.news input {
  flex: 1; min-width: 0; height: 50px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--cream);
  box-shadow: inset 0 0 0 1.5px var(--line); font: 16px var(--sans); color: var(--ink);   /* 16px: phones won't zoom in */
}
.news input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.news input.bad { box-shadow: inset 0 0 0 2px var(--terra); animation: shake .4s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.news-msg { margin: 8px 0 0; min-height: 1.4em; font-size: 14px; color: var(--sage); }
.news-msg.err { color: var(--terra); }
.foot-bottom { max-width: var(--max); margin: 36px auto 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--soft); }
.foot-bottom a { color: var(--ink); font-weight: 500; }

/* ═════ Scrim, sheet, cart ═════ */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(28, 19, 13, .45); opacity: 0; transition: opacity .4s var(--drawer); }
.scrim.on { opacity: 1; }
.sheet, .cart {
  position: fixed; z-index: 60; background: var(--paper); box-shadow: -20px 0 60px rgba(28, 19, 13, .2);
  display: flex; flex-direction: column; transition: transform .5s var(--drawer);
}
.sheet { top: 0; right: 0; bottom: 0; width: min(520px, 100%); transform: translateX(100%); }
.cart { top: 0; right: 0; bottom: 0; width: min(440px, 100%); transform: translateX(100%); }
.sheet.on, .cart.on { transform: none; }
.sheet-grab { display: none; }
.sheet-close { position: absolute; top: 14px; right: 14px; z-index: 2; background: var(--paper); }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 30px clamp(20px, 4vw, 36px) 36px; }
.sheet-art { display: grid; place-items: center; padding: 30px 0; border-radius: 20px; background: var(--tint); margin-bottom: 22px; }
.sheet-art .bag { width: 42%; }
.sheet-body h2 { font-size: 34px; }
.sheet-body .story { color: var(--mocha); margin: 12px 0 18px; }
.opt { margin-top: 20px; }
.opt-label { display: flex; justify-content: space-between; font: 500 12.5px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--soft); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 40px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; transition: box-shadow .2s, background-color .2s, color .2s; }
.chip[aria-checked="true"] { background: var(--ink); color: var(--cream); box-shadow: none; }
.sheet-buy { position: sticky; bottom: 0; display: flex; gap: 12px; align-items: center; margin: 26px calc(clamp(20px, 4vw, 36px) * -1) -36px; padding: 16px clamp(20px, 4vw, 36px) calc(16px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
.sheet-buy .btn { flex: 1; }
.roll { display: inline-block; font-variant-numeric: tabular-nums; }
.roll.tick { animation: tick .35s var(--ease); }
@keyframes tick { from { transform: translateY(40%); opacity: 0; filter: blur(2px); } }

.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px 26px; }
.cart-head h2 { font-size: 26px; }
.ship { padding: 0 26px 16px; border-bottom: 1px solid var(--line); }
.ship p { margin: 0 0 8px; font-size: 14px; color: var(--mocha); }
.ship-bar { height: 6px; border-radius: 6px; background: rgba(42, 29, 21, .1); overflow: hidden; }
.ship-bar i { display: block; height: 100%; width: 100%; border-radius: 6px; background: var(--sage); transform-origin: left; transform: scaleX(0); transition: transform .6s var(--ease); }
.lines { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.line { position: relative; overflow: hidden; }
.line-del { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 24px; background: var(--terra); color: #fff; font-weight: 600; font-size: 14px; }
.line-inner { position: relative; display: grid; grid-template-columns: 62px 1fr auto; gap: 14px; align-items: center; padding: 14px 20px 14px 26px; background: var(--paper); touch-action: pan-y; will-change: transform; }
.line-art { width: 62px; height: 70px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); }
.line-art .bag { width: 34px; filter: none; }
.line-art .bag .bag-label { display: none; }
.line h3 { font: 600 16px var(--serif); }
.line small { display: block; color: var(--soft); font-size: 13px; }
.line .stepper { margin-top: 8px; }
.line .stepper button { width: 30px; height: 30px; font-size: 16px; }
.line-price { font: 600 16px var(--serif); font-variant-numeric: tabular-nums; align-self: start; }
.line.leaving { transition: height .3s var(--ease), opacity .2s; opacity: 0; }
.cart-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--soft); text-align: center; padding: 30px; }
.cart-empty p { margin: 0; }
.cart-foot { padding: 18px 26px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 8px; }
.totals { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.totals b { font: 600 20px var(--serif); }
.totals.small { font-size: 14px; color: var(--soft); margin-bottom: 8px; }
#checkout { position: relative; }
#checkout.loading .lbl { opacity: 0; }
#checkout.loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(245, 239, 230, .35); border-top-color: var(--cream); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.done { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 12px; padding: 30px; }
.done h3 { font-size: 30px; }
.done p { margin: 0; color: var(--mocha); max-width: 30ch; }
.done-circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .5s var(--ease) forwards; }
.done-check { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s var(--ease) .45s forwards; }   /* check draws after the circle */
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Toasts */
.toasts { position: fixed; z-index: 80; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(380px, calc(100% - 28px)); list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 721px) { .toasts { left: 24px; bottom: 24px; transform: none; } }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 14px; background: var(--ink); color: var(--cream); box-shadow: 0 14px 34px rgba(28, 19, 13, .3); font-size: 14.5px; transition: transform .35s var(--ease), opacity .35s var(--ease); }
.toast.pre, .toast.out { transform: translateY(110%); opacity: 0; }   /* enters and leaves along the same path */
.toast span { flex: 1; }
.toast button { height: 34px; padding: 0 12px; border-radius: 999px; font-weight: 600; font-size: 13.5px; background: rgba(245, 239, 230, .14); }


/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.inview { opacity: 1; transform: none; }

/* ═════ Responsive ═════ */
@media (max-width: 960px) {
  .grid, .steps { grid-template-columns: 1fr 1fr; }
  .sub, .brew { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero-bags { height: 280px; }
  .hero-bags .bag { width: 116px; }
  .hero-bags .bag:nth-child(2) { width: 138px; }
  .grid, .steps, .foot-top { grid-template-columns: 1fr; }
  .choice-row { grid-template-columns: 1fr; }
  /* product sheet becomes a bottom sheet you can drag down */
  .sheet { top: auto; left: 0; width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; transform: translateY(100%); box-shadow: 0 -20px 60px rgba(28, 19, 13, .25); }
  .sheet-grab { display: grid; place-items: center; height: 26px; touch-action: none; cursor: grab; flex: none; }
  .sheet-grab i { width: 40px; height: 5px; border-radius: 5px; background: rgba(42, 29, 21, .2); }
  .sheet-close { top: 10px; }
  .sheet-body { padding-top: 6px; }
}
/* Reduced motion means gentler, not none: slides, lifts and shakes become short
   fades; colour changes and tap feedback stay. */
@keyframes fadeOnly { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .in, .hero h1.in { transform: none; animation: fadeOnly .4s ease forwards; }
  .hero-bags .bag { transform: translate(var(--x), 0) rotate(var(--r)); animation: fadeOnly .4s ease forwards; }
  .reveal { transform: none !important; transition: opacity .3s ease; }
  .product:hover, .product:hover .product-art .bag { transform: none; }
  /* sheet and cart fade in place instead of sliding */
  .sheet, .cart, .sheet.on, .cart.on { transform: none !important; transition: opacity .2s ease; }
  .sheet:not(.on), .cart:not(.on) { opacity: 0; }
  .toast, .toast.pre, .toast.out { transform: none; transition: opacity .2s ease; }
  .roll.tick { animation: fadeOnly .2s ease; }
  .news input.bad { animation: none; }
  .badge.bump { animation: none; }
}

