/* /sweets/ — Sherbet & Co. A retro British sweet shop: candy-stripe awning, cream and raspberry, glass jars.
   This file loads before demo.css, so rules that must beat `.dm-page h2` etc. start with `.sw-page`. */
@font-face { font-family: "Lilita One"; src: url(/assets/fonts/lilita-one.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url(/assets/fonts/nunito-normal-400-900.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Overpass Mono"; src: url(/assets/fonts/overpass-mono-normal-400-700.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

.sw-page {
  --f-display: "Lilita One", system-ui, sans-serif; --f-body: "Nunito", system-ui, sans-serif; --f-mono: "Overpass Mono", ui-monospace, monospace; --h-weight: 400;
  --pg-bg: #fff4e6; --pg-ink: #3b1424; --rasp: #d6336c; --rasp-d: #a3174b; --mint: #8fd9c4; --lemon: #ffd84d; --muted: #7a4a5a; --line: rgba(59, 20, 36, .12);
  --bar-bg: #3b1424; --bar-fg: #fff4e6; --tag: #ffd84d; --btn-bg: #ffd84d; --btn-fg: #3b1424;
}
.sw-page h1, .sw-page h2, .sw-page h3 { letter-spacing: .005em; font-weight: 400; }
.sw-page .dm-bar__name { font: 400 1.3rem var(--f-display); }
.sw-page .dm-bar .sw-barbag { display: inline-flex; gap: .35rem; font-family: var(--f-mono); }

/* candy-stripe awning with a scalloped edge */
.sw-awning { height: 46px; background: repeating-linear-gradient(90deg, var(--rasp) 0 46px, #fff8ee 46px 92px);
  -webkit-mask: radial-gradient(23px at 23px 23px, #000 98%, transparent) 0 0 / 46px 46px repeat-x, linear-gradient(#000, #000) 0 0 / 100% 23px no-repeat;
  mask: radial-gradient(23px at 23px 23px, #000 98%, transparent) 0 0 / 46px 46px repeat-x, linear-gradient(#000, #000) 0 0 / 100% 23px no-repeat;
  filter: drop-shadow(0 6px 6px rgba(59, 20, 36, .15)); }

.sw-intro { text-align: center; padding: 1.2rem 16px 1.6rem; }
.sw-kick { margin: 0 0 .5rem; font: 600 .76rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--rasp); }
.sw-page .sw-intro h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1; margin: 0 0 .6rem; color: var(--pg-ink); }
.sw-intro h1 span { color: var(--rasp); }
.sw-lead { margin: 0 auto; max-width: 40rem; font-size: 1.12rem; color: var(--muted); }
.sw-lead b { color: var(--pg-ink); }

/* ---------- the shop: jars + scale on the left, the bag on the right ---------- */
.sw-shop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); grid-template-areas: "jars stage" "scale stage"; gap: 1.4rem 2.2rem; align-items: start;
  padding: 0 max(16px, (100vw - 1160px) / 2) clamp(3rem, 6vw, 5rem); }
.sw-counter { display: contents; }
.sw-jars { grid-area: jars; list-style: none; margin: 0; padding: 1.2rem 1.2rem .4rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem .9rem;
  border-radius: 22px; background: linear-gradient(transparent calc(50% - 6px), #e3b98c calc(50% - 6px) calc(50% + 4px), transparent calc(50% + 4px)), linear-gradient(transparent 97%, #e3b98c 97%), #fde9d3; }
.sw-jar { width: 100%; display: grid; justify-items: center; gap: .15rem; padding: 0 0 .6rem; border: 0; background: none; cursor: pointer; color: var(--pg-ink); font: inherit; }
.sw-jar__glass { position: relative; width: min(100%, 118px); aspect-ratio: 1 / 1.08; border-radius: 16px 16px 22px 22px; overflow: hidden;
  background: linear-gradient(90deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .08) 22%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .35)), rgba(255, 255, 255, .25);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8), inset 0 -10px 18px rgba(59, 20, 36, .08), 0 10px 16px -12px rgba(59, 20, 36, .5); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.sw-jar__fill { position: absolute; inset: 14% 4% 3%; background: no-repeat center bottom / 100% auto; }
.sw-jar__glass::after { content: ""; position: absolute; left: 12%; top: 18%; width: 9%; height: 58%; border-radius: 99px; background: rgba(255, 255, 255, .55); }
.sw-jar__lid { position: absolute; z-index: 1; left: 10%; right: 10%; top: 0; height: 13%; border-radius: 0 0 8px 8px; background: linear-gradient(var(--rasp), var(--rasp-d)); box-shadow: 0 2px 0 rgba(0, 0, 0, .1); }
.sw-jar__name { margin-top: .35rem; font-weight: 800; font-size: .92rem; line-height: 1.15; text-align: center; }
.sw-jar__g { font: 500 .68rem var(--f-mono); color: var(--muted); }
.sw-jar:hover .sw-jar__glass, .sw-jar:focus-visible .sw-jar__glass { transform: translateY(-5px) rotate(-2deg); }
.sw-jar:focus-visible { outline: none; } .sw-jar:focus-visible .sw-jar__glass { box-shadow: inset 0 0 0 2px #fff, 0 0 0 3px var(--rasp); }
.sw-move .sw-jar.is-scoop .sw-jar__glass { animation: sw-scoop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes sw-scoop { 30% { transform: translateY(-14px) rotate(-8deg) scale(1.04); } 60% { transform: translateY(-4px) rotate(5deg); } }

.sw-stage { grid-area: stage; position: relative; border-radius: 26px; overflow: hidden;
  background: radial-gradient(70% 55% at 50% 38%, #fff, transparent 70%), repeating-linear-gradient(90deg, #fbe2c8 0 70px, #f8dcc0 70px 140px); box-shadow: inset 0 0 0 1px var(--line); }
.sw-canvas { display: block; width: 100%; aspect-ratio: 5 / 6; touch-action: manipulation; }
.sw-hint { position: absolute; left: 0; right: 0; top: 14px; margin: 0; text-align: center; font-size: .84rem; font-weight: 700; color: var(--muted); pointer-events: none; }
.sw-hint--touch, .sw-touch .sw-hint--fine { display: none; } .sw-touch .sw-hint--touch { display: inline; }
.sw-full { position: absolute; left: 50%; top: 40%; translate: -50% 0; margin: 0; padding: .55rem 1.1rem; border-radius: 999px; background: var(--pg-ink); color: #fff; font: 400 1.15rem var(--f-display); }

.sw-scale { grid-area: scale; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: .4rem 1.4rem; align-items: center; padding: 1.2rem 1.3rem; border-radius: 22px; background: #fff; box-shadow: 0 18px 40px -30px rgba(59, 20, 36, .5), inset 0 0 0 1px var(--line); }
.sw-dial { width: 100%; grid-row: span 2; }
.sw-dial__arc { fill: none; stroke: #f1e2d2; stroke-width: 14; stroke-linecap: round; }
.sw-dial__goal { fill: none; stroke: var(--mint); stroke-width: 14; stroke-linecap: round; opacity: .55; }
.sw-dial__ticks line { stroke: #b48a96; stroke-width: 2; }
.sw-dial__ticks text { font: 600 9px var(--f-mono); fill: var(--muted); }
.sw-dial__needle { stroke: var(--rasp); stroke-width: 4; stroke-linecap: round; }
.sw-dial__hub { fill: var(--pg-ink); }
.sw-read { display: flex; align-items: baseline; gap: 1rem; }
.sw-read p { margin: 0; }
.sw-read__g { font: 400 2.6rem/1 var(--f-display); }
.sw-read__g b { font-weight: 400; }
.sw-read__p b { font: 700 1.5rem var(--f-mono); color: var(--rasp); }
.sw-goal__bar { height: 10px; border-radius: 99px; background: #f1e2d2; overflow: hidden; }
.sw-goal__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--mint), #3fbf9c); transition: width .4s; }
.sw-goal__t { margin: .35rem 0 0; font-size: .86rem; color: var(--muted); }
.sw-goal__t b { color: var(--pg-ink); }
.sw-mix { grid-column: 1 / -1; margin: .3rem 0 0; font-size: .92rem; line-height: 1.45; min-height: 2.9em; }
.sw-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; }
.sw-btn { min-height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 2px solid var(--pg-ink); background: #fff; color: var(--pg-ink); font: 800 .95rem var(--f-body); cursor: pointer; transition: background .15s, transform .15s; }
.sw-btn:hover { background: #fdebd8; transform: translateY(-1px); }
.sw-btn--shake { background: var(--lemon); }
.sw-btn--buy { margin-left: auto; background: var(--rasp); border-color: var(--rasp); color: #fff; }
.sw-btn--buy:hover { background: var(--rasp-d); }
.sw-note { grid-column: 1 / -1; margin: 0; }

/* ---------- sections ---------- */
.sw-sec { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.sw-page .sw-sec h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; margin: .5rem 0 clamp(1.4rem, 3vw, 2.2rem); }
.sw-page .dm-eyebrow { color: var(--rasp); }
.sw-mixes { background: #fde9d3; }
.sw-mixlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.sw-mixcard { padding: 1.4rem 1.4rem 1.5rem; border-radius: 22px; background: #fff; border-top: 8px solid var(--rasp); box-shadow: 0 18px 36px -28px rgba(59, 20, 36, .5); }
.sw-mixcard--fizzy { border-top-color: #c96a2a; } .sw-mixcard--retro { border-top-color: var(--lemon); }
.sw-page .sw-mixcard h3 { font-size: 1.5rem; margin: 0 0 .4rem; }
.sw-mixcard p { margin: 0 0 1rem; color: var(--muted); }
.sw-visit__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem 4rem; align-items: start; }
.sw-visit__grid > div > p { color: var(--muted); max-width: 32rem; }
.sw-hours { margin: 0; padding: 1.2rem 1.4rem; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.sw-hours div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.sw-hours div:last-child { border: 0; }
.sw-hours dt { font-weight: 800; } .sw-hours dd { margin: 0; color: var(--muted); }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .sw-shop { grid-template-columns: minmax(0, 1fr); grid-template-areas: "jars" "stage" "scale"; }
  .sw-stage { max-width: 470px; width: 100%; justify-self: center; }
  /* trim the empty sky above the bag so the jars and the bag fit on one phone screen */
  .sw-stage { aspect-ratio: 100 / 84; }
  .sw-canvas { margin-top: -36%; }
  .sw-hint { top: auto; bottom: 3px; font-size: .78rem; color: #6b4226; }   /* on the counter strip, clear of the bag's label */
  .sw-mixlist { grid-template-columns: 1fr; max-width: 34rem; }
  .sw-visit__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .sw-jars { padding: .9rem .7rem .2rem; gap: .7rem .5rem; }
  .sw-jar__name { font-size: .78rem; } .sw-jar__g { display: none; }
  .sw-scale { grid-template-columns: 140px minmax(0, 1fr); gap: .3rem .9rem; padding: 1rem; }
  .sw-read__g { font-size: 2rem; } .sw-read__p b { font-size: 1.15rem; }
  .sw-btn--buy { margin-left: 0; }
}
