/* Round 6 · 05 What it costs: the page's one night band. A centred title, the receipt printer in the middle,
   four die-cut "Free" stickers slapped on either side, and a rubber stamp that lands once the receipt prints. */

.cost { position: relative; overflow: clip; isolation: isolate; padding: var(--sec) 0 calc(var(--sec) * .85);
  background: radial-gradient(120% 80% at 50% 0%, var(--night-2) 0%, var(--night) 62%, #160c36 100%); color: #fff; }
.cost__blob { position: absolute; z-index: -1; width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; border-radius: 50%; filter: blur(80px); opacity: .22; pointer-events: none; }
.cost__blob--a { left: -12vw; top: 8%; background: var(--cat-design); }
.cost__blob--b { right: -14vw; top: 30%; background: var(--cat-writing); }
.cost__blob--c { left: 30%; bottom: -22vw; background: var(--cat-tech); }
.is-live .cost__blob--a { animation: blob-a 19s ease-in-out infinite alternate; }
.is-live .cost__blob--b { animation: blob-b 23s ease-in-out infinite alternate; }
.is-live .cost__blob--c { animation: blob-c 17s ease-in-out infinite alternate; }
@keyframes blob-a { to { transform: translate(14vw, 10vh) scale(1.15); } }
@keyframes blob-b { to { transform: translate(-12vw, -8vh) scale(.9); } }
@keyframes blob-c { to { transform: translate(-16vw, -6vh) scale(1.1); } }

.cost__head { display: grid; justify-items: center; text-align: center; }
.cost__head .kicker { color: rgba(255, 255, 255, .7); }
.cost__head .kicker__n { color: var(--sun); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .55); }
.cost__title { font-size: clamp(46px, 6vw, 92px); }
.cost__title .title__light { max-width: none; margin-top: .12em; font-size: .62em; line-height: 1.05; letter-spacing: -.02em; color: var(--sun); }
.cost__lead { margin-top: 22px; max-width: 36em; font-size: 19px; line-height: 1.55; color: rgba(255, 255, 255, .8); }

.cost__stage { display: grid; gap: 28px; margin-top: clamp(40px, 5vw, 64px); }

/* ── stickers ── */
.cost__stk { display: contents; }
.cost .stk { --rot: var(--r, 0deg); position: relative; transform: rotate(var(--rot)); }
.cost.stk-wait .stk { opacity: 0; }
.cost .stk.m-slap { opacity: 1; }
.stk__b { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; padding: 14px 18px 14px 14px; border: 4px solid #fff; border-radius: 24px;
  background: var(--bg); color: var(--fg); box-shadow: 0 2px 0 rgba(0, 0, 0, .08), 0 22px 36px -16px rgba(0, 0, 0, .65); }
.stk__ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .28); grid-row: span 2; }
.stk__ic svg { width: 21px; height: 21px; }
.stk__what { font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.stk__free { font-family: var(--display); font-size: 34px; line-height: .9; letter-spacing: -.03em; }
.stk--sun { --bg: var(--sun); --fg: var(--ink); }
.stk--sun .stk__ic { background: rgba(3, 21, 20, .1); }
.stk--pink { --bg: color-mix(in srgb, var(--cat-writing) 45%, var(--cat-writing-d)); --fg: #fff; }
.stk--blue { --bg: color-mix(in srgb, var(--cat-tech) 45%, var(--cat-tech-d)); --fg: #fff; }
.stk--green { --bg: var(--cat-admin); --fg: var(--ink); }
.stk--green .stk__ic { background: rgba(3, 21, 20, .1); }

/* ── printer + amount chips ── */
.printer { position: relative; width: min(100%, 420px); justify-self: center; }
.printer__picks { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-bottom: 22px; }
.printer__q { flex: 1 0 100%; text-align: center; font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .62); margin-bottom: 4px; }
.chip-btn { height: 46px; min-width: 86px; padding: 0 20px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
  font-family: var(--display); font-size: 18px; color: #fff; cursor: pointer; transition: background-color .25s, color .25s, box-shadow .35s, transform .3s var(--spring); }
.chip-btn:hover { background: rgba(255, 255, 255, .16); }
.chip-btn:active { transform: scale(.95); }
.chip-btn[aria-checked="true"] { background: var(--sun); color: var(--ink); box-shadow: 0 0 0 4px rgba(255, 210, 63, .22), 0 0 30px rgba(255, 210, 63, .55); }
.chip-btn:focus-visible { outline-color: #fff; }
.printer__body { position: relative; z-index: 2; height: 64px; border-radius: 22px 22px 18px 18px; background: linear-gradient(180deg, #fff 0, #e9e5f8 70%, #d9d3f1 100%);
  box-shadow: 0 18px 34px -14px rgba(0, 0, 0, .6), inset 0 -2px 0 rgba(42, 20, 98, .12); }
.printer__led { position: absolute; right: 22px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--cat-admin); box-shadow: 0 0 10px var(--cat-admin); }
.printer[data-printing] .printer__led { background: var(--coral); box-shadow: 0 0 10px var(--coral); animation: blink .3s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.printer__slot { position: absolute; left: 26px; right: 26px; bottom: 14px; height: 9px; border-radius: 6px; background: #1b0f40; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .9); }
.printer__out { position: relative; z-index: 1; margin: -20px 30px 0; padding-bottom: 30px; clip-path: inset(0 -80px -90px -80px); }

/* ── the receipt (kept from v5, lit for the night band) ── */
.receipt { position: relative; padding: 34px 24px 26px; background: linear-gradient(180deg, #ecebf3 0, #fffdf9 26px); color: var(--ink); box-shadow: 0 34px 60px -26px rgba(0, 0, 0, .75); transform: translateY(var(--ry, 0%)); }
.receipt.is-retract { transition: transform .32s cubic-bezier(.6, 0, .8, .4); }
.receipt.is-print { transition: transform 1.25s cubic-bezier(.33, .9, .3, 1); }
.receipt__top { display: flex; align-items: center; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 2px solid var(--ink); }
.receipt__top img { height: 20px; width: auto; }
.receipt__h { margin: 4px 0 6px; font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.rrow { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 7px 0; font-size: 15.5px; line-height: 1.35; }
.rrow b { font-family: var(--display); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rrow--total { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-weight: 700; }
.rrow--total b { font-size: clamp(24px, 7vw, 30px); letter-spacing: -.02em; }
.rrow--teal b { color: var(--teal); }
.receipt__cut { position: relative; height: 2px; margin: 22px -24px 20px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px); }
.receipt__cut::before, .receipt__cut::after { content: ""; position: absolute; top: -9px; width: 20px; height: 20px; border-radius: 50%; background: #21114f; }
.receipt__cut::before { left: -10px; }
.receipt__cut::after { right: -10px; }
.receipt__foot { margin-top: 16px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.receipt__teeth { position: absolute; left: 0; right: 0; bottom: -11px; height: 12px; background: linear-gradient(135deg, #fffdf9 50%, transparent 50%) 0 0 / 14px 12px repeat-x, linear-gradient(225deg, #fffdf9 50%, transparent 50%) 0 0 / 14px 12px repeat-x; }
.receipt.m-shake { animation: m-shake 300ms linear both; }

/* the rubber stamp: lands on the "You pay" block once the paper is out */
.rcpt__stamp { --rot: -12deg; position: absolute; left: calc(50% - 34px); top: 28px; width: 100px; height: 100px; color: var(--teal-m); mix-blend-mode: multiply; pointer-events: none; opacity: 0; transform: rotate(var(--rot)); }
.rcpt__stamp svg { width: 100%; height: 100%; }
.rcpt__stamp text { font-family: var(--display); font-size: 12px; letter-spacing: .05em; fill: currentColor; }
.rcpt__stamp.is-on { opacity: .92; }

/* ── desktop: stickers either side of the receipt ── */
@media (min-width: 960px) {
  .cost__stage { grid-template-columns: minmax(0, 1fr) minmax(0, 420px) minmax(0, 1fr); gap: 40px; align-items: start; }
  .cost__stk { display: grid; align-content: start; gap: 56px; padding-top: 120px; }
  .cost__stk--l { justify-items: end; }
  .cost__stk--r { justify-items: start; padding-top: 190px; }
  .cost__stk--l .stk:nth-child(2) { margin-right: 42px; }
  .cost__stk--r .stk:nth-child(2) { margin-left: 30px; }
  .stk__b { min-width: 214px; padding: 16px 22px 16px 16px; }
  .stk__what { font-size: 15.5px; }
  .stk__free { font-size: 40px; }
}
@media (min-width: 960px) and (max-height: 800px) {
  .cost { padding-top: 96px; }
  .cost__title { font-size: clamp(44px, 5vw, 76px); }
}

/* ── phone: the stickers sit in a wrapped row above the printer ── */
@media (max-width: 959px) {
  .cost__stage { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; padding: 0 7px; }
  .printer { grid-column: 1 / -1; order: 2; margin-top: 18px; }
  .stk__b { grid-template-columns: 1fr; justify-items: start; padding: 10px 12px; border-width: 3px; border-radius: 18px; }
  .stk__ic { width: 30px; height: 30px; grid-row: auto; }
  .stk__ic svg { width: 17px; height: 17px; }
  .stk__what { font-size: 13px; }
  .stk__free { font-size: 28px; }
  .cost .stk { --rot: calc(var(--r, 0deg) * .5); }
  .rcpt__stamp { left: auto; right: 10px; top: 22px; width: 82px; height: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  .is-live .cost__blob--a, .is-live .cost__blob--b, .is-live .cost__blob--c { animation: none; }
  .rcpt__stamp { opacity: .92; }
  .cost.stk-wait .stk { opacity: 1; }
}
