/* brewdrop store · flat cream ground, bean brown ink, the mineral on screen is the only accent.
   no gradients, no glows, no drop shadows, no capitals, no pill buttons: the blob is the only container. */
:root {
  --cream: #f2f0e8; --bean: #452511; --navy: #072a4a;
  --name: #ed6223; --mark: #bf96c5; --fill: #dac0dc;           /* magnesium (default accent) */
  --display: "Gochi Hand", "Short Stack", "Patrick Hand", cursive;
  --body: "Nunito Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --margin: clamp(22px, 6vw, 96px);
}
body[data-accent="mg"], [data-m="mg"]  { --name: #ed6223; --mark: #bf96c5; --fill: #dac0dc; }
body[data-accent="pt"], [data-m="pt"]  { --name: #6693a7; --mark: #e87e6a; --fill: #f5b0a1; }
[data-m="kit"] { --name: #452511; --mark: #e87e6a; --fill: #dac0dc; }   /* the lineup: a cool fill with a warm mark */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.ready, body { overscroll-behavior-y: none; }
body {
  margin: 0; background: var(--cream); color: var(--bean);
  font: 400 17px/1.62 var(--body); text-transform: none; overflow-x: clip;
}
::selection { background: var(--fill); color: var(--bean); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(46px, 7.2vw, 104px); color: var(--name); transition: color .7s; }
h2 { font-size: clamp(34px, 4.8vw, 62px); color: var(--bean); }
p { margin: 0 0 1em; max-width: 34em; }
a { color: inherit; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.sub { font-size: 1.08rem; opacity: .86; }
.small { font-size: .86rem; margin: .2em auto; text-align: center; max-width: none; }
.mono, .dose { font-family: var(--mono); font-weight: 500; font-size: .86rem; letter-spacing: 0; }
.dose { color: var(--mark); transition: color .7s; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tlink { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .22em; font-family: var(--display); font-size: 1.25rem; cursor: pointer; }
.tlink:hover { text-decoration-color: var(--name); }

/* hairline frame: the one mark allowed inside the margin */
.frame { position: fixed; inset: 14px; border: 1px solid var(--bean); opacity: .28; pointer-events: none; z-index: 40; }
@media (max-width: 720px) { .frame { inset: 8px; } }

/* the falling scroll drop */
.scroll-drop { position: fixed; right: 26px; top: 0; width: 20px; height: 30px; z-index: 41; pointer-events: none; will-change: transform; }
.scroll-drop path { fill: var(--fill); stroke: var(--mark); stroke-width: 1.6; transition: fill .7s, stroke .7s; }
@media (max-width: 900px) { .scroll-drop { right: 14px; } }

/* header: centred axis */
.top { position: sticky; top: 0; z-index: 30; background: var(--cream); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 22px var(--margin) 14px; }
.logo img { width: 150px; height: auto; }
.nav { display: flex; gap: 1.6rem; font-family: var(--display); font-size: 1.3rem; }
.nav a { text-decoration: none; padding: .2em 0; white-space: nowrap; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .22em; text-decoration-color: var(--name); }
.nav-r { justify-content: flex-end; }
@media (max-width: 720px) { .nav-l a:nth-child(2) { display: none; } .logo img { width: 112px; } .nav { gap: 1rem; font-size: 1.1rem; } .top { padding-top: 18px; } }

section { position: relative; padding: clamp(64px, 11vh, 140px) var(--margin); scroll-margin-top: 70px; }

/* blob buttons: the blob is the container */
.bbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 190px; height: 66px; padding: 0 34px; text-decoration: none; color: var(--bean); font-family: var(--display); font-size: 1.4rem; border: 0; background: none; cursor: pointer; isolation: isolate; line-height: 1; }
.bbtn svg { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); z-index: -1; overflow: visible; }
.bbtn .fl { fill: var(--fill); transition: fill .7s; }
.bbtn .gh { fill: none; stroke: var(--mark); stroke-width: 1.8; transition: stroke .7s; }
.bbtn:focus-visible, .tlink:focus-visible, a:focus-visible, canvas:focus-visible, input:focus-visible { outline: 2px solid var(--name); outline-offset: 4px; }

/* hero */
.hero { min-height: calc(100svh - 96px); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 5vw, 90px); padding-top: clamp(24px, 5vh, 70px); }
.hero-visual { aspect-ratio: 1 / 1; width: 100%; max-width: 760px; justify-self: center; }
.hero-copy .lede { font-size: clamp(1.05rem, 1.5vw, 1.28rem); margin-top: 1.4rem; max-width: 27em; }
.hero-actions { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-dose { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; max-width: none; margin: 0; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 12px; }
  .hero-copy .lede, .hero-copy p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { max-width: 520px; }
}

/* blob image frames */
[data-blobimg] { position: relative; }
.bi { position: relative; width: 100%; height: 100%; }
.bi svg.bi-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.bi .back { fill: var(--fill); transition: fill .7s; }
.bi image { opacity: 0; transition: opacity .7s; }
.bi image.on { opacity: 1; }
.bi .ghost { fill: none; stroke: var(--mark); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: stroke .7s; stroke-width: 1.8px; }
.bi .fall { position: absolute; left: 50%; top: 0; width: clamp(14px, 2.4%, 26px); aspect-ratio: 20 / 30; margin-left: -1.2%; pointer-events: none; will-change: transform; }
.bi .fall path { fill: var(--fill); stroke: var(--mark); stroke-width: 1.6; }

/* shop grid */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 70px); margin-top: clamp(36px, 7vh, 80px); align-items: start; }
.card { text-align: center; }
.card:nth-child(2) { margin-top: clamp(0px, 5vw, 70px); }       /* the kit sits a little lower: the blob is the only thing allowed off-balance */
.card .pic { aspect-ratio: 1 / 1; max-width: 460px; margin: 0 auto; }
.card h3 { font-size: clamp(32px, 3.2vw, 44px); color: var(--name); margin-top: .5rem; transition: color .7s; }
.card .words { font-family: var(--display); font-size: 1.28rem; display: flex; justify-content: center; gap: 1.1rem; flex-wrap: wrap; color: var(--name); margin: .3rem 0 .5rem; }
.card .blurb { margin: 0 auto .6rem; font-size: .98rem; opacity: .9; }
.price { font-family: var(--mono); font-weight: 500; font-size: 1.05rem; margin: .3rem 0 1rem; }
.price s { opacity: .55; margin-left: .7rem; font-size: .9rem; }
.card .row { display: flex; flex-direction: column; align-items: center; gap: .9rem; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } .card:nth-child(2) { margin-top: 0; } }

/* the drop toy */
.toy-stage { width: min(520px, 92vw, max(300px, calc((100svh - 360px) * .875))); aspect-ratio: 7 / 8; margin: clamp(10px, 3vh, 36px) auto 0; }
.toy-stage canvas { width: 100%; height: 100%; display: block; cursor: pointer; touch-action: manipulation; }
.toy-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.8rem; margin-top: 8px; }
.toy-switch { display: flex; justify-content: center; gap: 1.8rem; margin: 1.4rem 0 .6rem; font-family: var(--display); font-size: 1.5rem; }
.sw { text-decoration: none; opacity: .55; }
.sw.is-on { opacity: 1; color: var(--name); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
#toyCount { min-width: 5.5em; }

/* deep sections */
.deep { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 110px); align-items: center; }
.deep.flip .deep-visual { order: 2; }
.deep-visual { position: relative; padding-bottom: clamp(28px, 4vw, 54px); }
.picwrap { position: relative; width: 100%; max-width: 680px; margin: 0 auto; }
.picwrap .pic { aspect-ratio: 1 / 1; width: 100%; }
.bigname { position: absolute; left: 50%; bottom: -.16em; transform: translateX(-50%); font-family: var(--display); font-size: clamp(54px, 10.4vw, 156px); line-height: .9; color: var(--name); white-space: nowrap; pointer-events: none; transition: color .7s; z-index: 2; }
.thumbs { display: flex; gap: 12px; justify-content: center; margin-top: clamp(64px, 8vw, 120px); flex-wrap: wrap; }
.thumb { width: 66px; height: 66px; border: 0; padding: 0; background: var(--fill); cursor: pointer; opacity: .6; transition: opacity .3s; -webkit-mask: var(--blobmask) center / 100% 100% no-repeat; mask: var(--blobmask) center / 100% 100% no-repeat; }
.thumb.on, .thumb:hover { opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.deep-text h2 { color: var(--name); font-size: clamp(38px, 5vw, 70px); transition: color .7s; }
.deep-text .kicker { font-family: var(--display); font-size: 1.4rem; margin: .4rem 0 1.2rem; max-width: 30em; }
.deep-text .words { font-family: var(--display); font-size: 1.7rem; color: var(--name); display: flex; flex-direction: column; gap: .15rem; margin: 1.2rem 0; transition: color .7s; }
.deep-text .buy { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; margin-top: 1.4rem; }
@media (max-width: 900px) { .deep { grid-template-columns: 1fr; } .deep.flip .deep-visual { order: 0; } .deep-text { text-align: center; } .deep-text p { margin-left: auto; margin-right: auto; } .deep-text .words { align-items: center; } .deep-text .buy { justify-content: center; } }

/* how */
.how-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 110px); align-items: center; }
.how-visual { aspect-ratio: 1 / 1; width: 100%; max-width: 620px; justify-self: center; }
.steps { list-style: none; margin: clamp(26px, 5vh, 52px) 0 0; padding: 0; display: grid; gap: clamp(20px, 3.4vh, 34px); max-width: 30em; }
.steps li { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }
@media (max-width: 900px) { .how-grid { grid-template-columns: 1fr; text-align: center; } .steps li { align-items: center; } .steps { margin-left: auto; margin-right: auto; } }
.steps .num { font-family: var(--display); font-size: clamp(32px, 4vw, 48px); color: var(--name); transition: color .7s; }
.steps .txt { font-size: 1.15rem; }

/* notes */
.note-form { display: flex; justify-content: center; align-items: center; gap: 2rem; flex-wrap: wrap; margin-top: 2rem; }
.note-form input[type=email] { font: 400 1.1rem var(--body); color: var(--bean); background: none; border: 0; border-bottom: 1.5px solid var(--bean); padding: .6rem .2rem; width: min(340px, 78vw); text-align: center; border-radius: 0; }
.note-form input::placeholder { color: var(--bean); opacity: .55; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.foot { text-align: center; padding: 70px var(--margin) 80px; }
.foot-mark { margin: 0 auto 14px; opacity: .9; }

/* Commerce follows the same cream, ink and mineral palette. */
[hidden] { display: none !important; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: .15em; }
.bbtn[aria-disabled="true"], .bbtn:disabled { opacity: .5; cursor: not-allowed; }
.deep-text h1 { font-size: clamp(38px, 5vw, 70px); }
.deep-text > p { white-space: pre-line; }
.variant-choice { display: block; margin: 1rem 0; }
.variant-choice select, .bag-line input { background: var(--cream); color: var(--bean); border: 1px solid var(--bean); border-radius: 0; padding: .5rem; font: inherit; }
button.tlink { border: 0; background: none; color: inherit; padding: .3rem; }
button:focus-visible, select:focus-visible { outline: 2px solid var(--name); outline-offset: 4px; }
.bag-dialog { color: var(--bean); background: var(--cream); border: 1px solid var(--bean); width: min(680px, calc(100% - 32px)); max-height: calc(100svh - 48px); padding: clamp(22px, 5vw, 44px); overscroll-behavior: contain; }
.bag-dialog::backdrop { background: rgb(69 37 17 / .28); }
.bag-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.bag-line { display: grid; grid-template-columns: 80px 1fr; gap: 1.2rem; padding: 1.2rem 0; border-bottom: 1px solid var(--mark); }
.bag-line > div { grid-column: 2; }
.bag-line img { width: 80px; height: 100px; object-fit: contain; }
.bag-line p { margin: .4rem 0; }
.bag-line input { width: 5rem; }
.bag-line .bag-error { font-size: .9rem; }
.bag-summary { text-align: center; margin-top: 2rem; }
.bag-summary > p { max-width: none; }
#bagMessage { margin: 1rem 0 0; }
.route-message { min-height: 60svh; }
.route-message p { margin: 2rem auto; }
@media (max-width: 480px) { .bag-line { grid-template-columns: 52px 1fr; gap: .7rem; } .bag-line img { width: 52px; height: 72px; } }

/* reduced motion: still, quiet */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .scroll-drop { display: none; } * { transition-duration: .01s !important; } }

@media (max-width: 480px) { .scroll-drop { display: none; } }

/* These placeholders exist only while the backend request is outstanding. */
.page-loading { display: none; padding: 65px var(--margin); }
html.js[data-route="inner"]:not([data-ready]) .page-loading { display: block; }
html.js[data-route="inner"]:not([data-ready]) main { display: none; }
.loading-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 7vw; align-items: center; }
.skeleton-blob { aspect-ratio: 1; border-radius: 46% 54% 61% 39% / 52% 44% 56% 48%; background: var(--fill); opacity: .38; }
.skeleton-copy i, .skeleton-card i { display: block; height: 1.1rem; background: var(--bean); opacity: .08; margin: 1.2rem 0; width: 80%; }
.skeleton-copy i:first-child { height: 3rem; width: 94%; }
.skeleton-copy i:last-child, .skeleton-card i:last-child { width: 55%; }
.skeleton-card { width: 100%; }
.skeleton-card i { margin: 1.2rem auto; }
.network-status { position: fixed; bottom: 20px; left: var(--margin); z-index: 60; background: var(--cream); color: var(--bean); padding: .4rem .7rem; margin: 0; border-left: 3px solid var(--mark); font: .8rem var(--mono); pointer-events: none; }

.checkout-page { padding-top: clamp(30px, 6vh, 70px); }
.checkout-intro { margin-bottom: clamp(40px, 7vw, 90px); }
.checkout-intro h1 { margin: 1.3rem 0 .5rem; font-size: clamp(48px, 7vw, 88px); }
.checkout-intro p { margin: 1rem 0; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(36px, 7vw, 100px); align-items: start; }
.checkout-details fieldset { border: 0; border-top: 1px solid var(--mark); padding: 1.4rem 0 2.8rem; margin: 0; min-width: 0; }
.checkout-details legend { padding: 0 1rem 0 0; color: var(--name); font: clamp(27px, 3vw, 38px)/1.15 var(--display); }
.checkout-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 1.7rem; }
.checkout-fields label { display: flex; flex-direction: column; gap: .45rem; font-size: .95rem; }
.checkout-fields .field-wide { grid-column: 1 / -1; }
.checkout-fields input, .checkout-fields select { min-width: 0; width: 100%; border: 0; border-bottom: 1px solid var(--bean); border-radius: 0; padding: .75rem .15rem; background: transparent; color: var(--bean); font: inherit; }
.checkout-fields input[aria-invalid="true"] { border-bottom: 2px solid #ed6223; }
.checkout-fields input:disabled, .checkout-fields select:disabled { opacity: .55; }
#saveDelivery { margin-top: 1.7rem; }
.shipping-option { display: flex; gap: .8rem; align-items: center; padding: 1rem 0; cursor: pointer; }
.shipping-option strong { margin-left: auto; }
.shipping-option input, .policy-agreement input { accent-color: var(--bean); width: 18px; height: 18px; flex: 0 0 18px; }
.checkout-details h3 { font-size: 32px; margin: .8rem 0; }
.payment-note { font-size: .95rem; max-width: 35em; }
.checkout-summary { position: sticky; top: 118px; border-top: 1px solid var(--mark); border-bottom: 1px solid var(--mark); padding: 1.5rem 0 2rem; }
.checkout-summary h2 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 1.6rem; }
.checkout-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 1.1rem; margin: 1.4rem 0; align-items: center; }
.checkout-item > div { grid-column: 2; }
.checkout-item img { width: 64px; height: 90px; object-fit: contain; }
.checkout-item h3 { font: 400 1.2rem/1.3 var(--display); }
.checkout-item p { margin: .3rem 0; font-size: .9rem; }
#checkoutTotals { margin: 2rem 0; }
#checkoutTotals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: .65rem 0; }
#checkoutTotals dd { margin: 0; font: .9rem var(--mono); text-align: right; }
#checkoutTotals .checkout-grand-total { border-top: 1px solid var(--mark); margin-top: 1.1rem; padding-top: 1rem; font: 1.7rem var(--display); }
#checkoutTotals .checkout-grand-total dd { font-size: 1.1rem; }
#placeOrder { width: 100%; min-width: 0; padding: 0 25px; margin: 1rem 0; }
#checkoutMessage { margin: 1.3rem 0 0; font-size: .95rem; }
.policy-agreement { display: flex; gap: .8rem; align-items: start; font-size: .9rem; }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } .checkout-summary { position: static; } .loading-layout { grid-template-columns: 1fr; } .loading-layout .skeleton-copy { display: none; } }
@media (max-width: 480px) { .checkout-fields { grid-template-columns: 1fr; } .checkout-intro { margin-bottom: 2.5rem; } .checkout-summary { padding-top: 1.4rem; } .checkout-item { grid-template-columns: 52px 1fr; } .checkout-item img { width: 52px; } }
