/* Black Friday: a black unit with copper edging powers on in a dark room; only its scale, pointer and displays give light. Loaded only while site.json "sale" is enabled;
   html.sale (sale-gate.js) switches it on until the end of the sale. */
:root:not(.sale) [data-sale], :root:not(.sale) .sbf { display: none !important; }
.sale [data-nosale] { display: none !important; }

.sale { --g: 255, 106, 52; --lamp: #ff9d6b; --lamp-2: #ffe9da; --bg: #0c0a0a; --b1: #221413; --b2: #150f0e; --bar: 16, 12, 12; --ink: #ffc9a6; --ink2: #c48a6b; --hot: #ff4a22; --mute: #94877f;
  --bg-2: #100d0d; --panel: #151212; --panel-2: #1a1616; --panel-3: #211c1b; --gold: #f1c490; --gold-2: #ffe8ca; --gold-3: #d98a54; }
.sale body { background: radial-gradient(1000px 620px at 50% 430px, var(--b1) 0, var(--b2) 48%, transparent 80%), var(--bg); background-repeat: no-repeat; }
.sale .hero__glow { opacity: .18; }
.sale .hero { padding-top: calc(var(--hdr) + clamp(22px, 3.4vw, 46px)); }
.sale .hero__lead { display: none; }
.sale .hero__eyebrow { margin-bottom: 16px; letter-spacing: .02em; text-transform: none; font: 500 1rem/1.3 var(--f-sans); color: var(--lamp); }
.sale .hero__title { font-size: clamp(2.3rem, 5.6vw, 4.5rem); }
.hero__slead { margin-top: 16px; max-width: 100%; color: var(--text-2); font-size: clamp(1rem, 1.3vw, 1.1rem); text-wrap: balance; }
.sale .hero__act { position: relative; z-index: 1; }
.sale .hero__cta { margin-top: 28px; }
.hero__auto { margin-top: 16px; text-align: center; font-size: .92rem; color: var(--lamp); }
.sale .hero__os { margin-top: 6px; }

.sale .btn--gold { color: #160f06; background: linear-gradient(180deg, color-mix(in srgb, var(--gold-2) 82%, #fff) 0, var(--gold) 55%, color-mix(in srgb, var(--gold) 88%, var(--gold-3)) 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(0, 0, 0, .2), 0 12px 34px -14px rgba(var(--g), .55); }
.sale .btn--gold:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -1px 0 rgba(0, 0, 0, .2), 0 16px 44px -14px rgba(var(--g), .8); }

/* ---------------------------------------------------------------- the rack unit */
.unit { position: relative; width: 100%; max-width: 1180px; margin-top: 30px; container-type: inline-size; isolation: isolate; text-align: left; }
.unit::before { content: ""; position: absolute; z-index: -2; inset: -24% -5% -30%; pointer-events: none; background: radial-gradient(closest-side, rgba(var(--g), .20), rgba(var(--g), .06) 55%, transparent); }
.unit__pic { position: relative; aspect-ratio: 1180 / 264; background: url("/assets/img/sale/rack-ember.webp") center / 100% 100% no-repeat; border-radius: 8px; box-shadow: 0 0 0 1px #000, 0 0 46px -8px rgba(var(--g), .38); }
/* the black floor: the unit mirrored, fading fast */
.unit__refl { position: absolute; z-index: -1; left: 0; right: 0; top: calc(100% + 2px); height: 62%; overflow: hidden; pointer-events: none; opacity: .34; filter: blur(1.5px); -webkit-mask-image: linear-gradient(#000, transparent 88%); mask-image: linear-gradient(#000, transparent 88%); }
.unit__refl::before { content: ""; position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1180 / 264; background: url("/assets/img/sale/rack-ember.webp") center / 100% 100% no-repeat; transform: scaleY(-1); }
/* lamp light on the dark face and a hair of it on the glass of each display */
.unit__lit { position: absolute; left: 6.36%; top: 14.8%; width: 25.25%; height: 70.4%; border-radius: 7px; pointer-events: none; mix-blend-mode: screen; -webkit-mask: radial-gradient(25.1% 23.6% at 50% 103%, transparent 97%, #000); mask: radial-gradient(25.1% 23.6% at 50% 103%, transparent 97%, #000);
  background: radial-gradient(62% 96% at 50% 104%, rgba(255, 120, 60, .62), rgba(255, 84, 30, .24) 46%, transparent 78%), radial-gradient(34% 40% at 11% 44%, rgba(255, 60, 24, .34), transparent 72%); }
/* one light runs round the copper edge when the unit powers on, and again when Apply is hovered */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 250deg; }
.unit__run { --a: 250deg; position: absolute; inset: 0; border-radius: 8px; padding: 3px; pointer-events: none; opacity: 0;
  background: conic-gradient(from var(--a) at 50% 50%, transparent 0 78%, rgba(255, 160, 104, .0) 80%, #ffb183 95%, #fff3e8 98.5%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); filter: drop-shadow(0 0 7px rgba(var(--g), .95)); }
@media (prefers-reduced-motion: no-preference) {
  .unit__run { animation: unitrun 2.6s .25s cubic-bezier(.45, .05, .3, 1) both; }
  .unit:has(.unit__apply:hover) .unit__run, .unit:has(.unit__apply:focus-visible) .unit__run { animation: unitrun2 2.2s linear infinite; }
  .unit__w { animation: pwr 1s .75s both; } .unit__w--code { animation-delay: .9s; } .unit__w--time { animation-delay: 1.05s; }
  .unit__vu .vu__arc, .unit__vu .vu__t, .unit__vu .vu__n, .unit__vu .vu__l, .unit__vu .vu__nd, .unit__vu .vu__sh { animation: pwr .9s .55s both; } .unit__lit { animation: lit 1.1s .5s both; }
}
@keyframes unitrun { 0% { --a: 250deg; opacity: 0; } 8% { opacity: 1; } 86% { opacity: 1; } 100% { --a: 610deg; opacity: 0; } }
@keyframes unitrun2 { from { --a: 250deg; opacity: 1; } to { --a: 610deg; opacity: 1; } }
@keyframes pwr { 0% { opacity: 0; } 22% { opacity: .75; } 30% { opacity: .12; } 46% { opacity: .9; } 54% { opacity: .45; } 100% { opacity: 1; } }
@keyframes lit { 0% { opacity: 0; } 22% { opacity: .5; } 32% { opacity: .1; } 100% { opacity: 1; } }
.unit__vu { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.unit__vu--mob { display: none; }
.unit__vu { filter: drop-shadow(0 0 5px rgba(255, 120, 60, .38)); }
.vu__arc { fill: none; stroke: var(--ink); stroke-width: 1.7; }
.vu__arc--hot { stroke: var(--hot); stroke-width: 4.2; filter: drop-shadow(0 0 5px rgba(255, 66, 26, .9)); }
.vu__t { stroke: var(--ink); stroke-width: 1.3; } .vu__t--b { stroke-width: 2; } .vu__t--hot { stroke: var(--hot); }
.vu__n { font: 600 15px/1 var(--f-sans); fill: var(--ink); text-anchor: middle; } .vu__n--hot { fill: var(--hot); }
.vu__l { font: 500 11.5px/1 var(--f-sans); fill: var(--ink2); text-anchor: middle; }
.vu__nd { filter: drop-shadow(0 0 3px rgba(255, 92, 40, .95)) drop-shadow(0 0 9px rgba(255, 80, 30, .7)); } .vu__nd path { stroke: #ffd2b8; stroke-width: 2.4; stroke-linecap: round; }
.vu__sh path { stroke: rgba(0, 0, 0, .55); stroke-width: 3; stroke-linecap: round; }

.unit__w { position: absolute; display: flex; color: var(--lamp); }
.unit__w--price { left: 34.92%; top: 11.36%; width: 27.29%; height: 77.27%; flex-direction: column; align-items: center; justify-content: center; }
.unit__w--code { left: 64.75%; top: 11.36%; width: 29.66%; height: 35.6%; align-items: center; justify-content: space-between; gap: 3%; padding: 0 1.2cqw 0 1.5cqw; }
.unit__w--time { left: 64.75%; top: 53.03%; width: 29.66%; height: 35.6%; align-items: stretch; flex-direction: column; justify-content: center; padding: 0 1.5cqw; }
.unit__was { font-size: max(12px, 1.2cqw); color: var(--mute); }
.unit__was s { color: #cfc4b0; text-decoration-color: #d8442e; text-decoration-thickness: 2px; font-variant-numeric: tabular-nums; }
.unit__now { margin-top: .25em; font: 600 6.1cqw/1 var(--f-sans); letter-spacing: -.045em; font-variant-numeric: tabular-nums; color: var(--lamp-2); text-shadow: 0 0 .32em rgba(var(--g), .55); white-space: nowrap; }
.unit__save { margin-top: .75em; font-size: max(14px, 1.5cqw); font-weight: 560; color: var(--lamp); }
.unit__each { margin-top: .3em; font-size: max(12px, 1.15cqw); color: var(--mute); }
.unit__lab { display: block; font-size: max(11.5px, 1.02cqw); line-height: 1.2; color: var(--mute); }
.unit__copy { padding: 0; border: 0; background: none; text-align: left; cursor: pointer; min-width: 0; }
.unit__code { margin-top: .22em; display: flex; align-items: center; gap: .4em; font: 400 2.5cqw/1 var(--f-mono); letter-spacing: .02em; color: var(--lamp-2); text-shadow: 0 0 .5em rgba(var(--g), .45); white-space: nowrap; }
.unit__code svg, .sbf__code svg { flex: none; width: max(14px, .72em); height: max(14px, .72em); fill: none; stroke: currentColor; stroke-width: 2; opacity: .6; transition: opacity .2s; }
.unit__copy:hover svg, .sbf__code:hover svg { opacity: 1; }
.unit__apply { flex: none; min-height: 40px; height: 4.1cqw; padding: 0 1.55cqw; border: 0; border-radius: 8px; cursor: pointer; font: 600 max(14px, 1.3cqw)/1 var(--f-sans); color: #1d1205;
  background: linear-gradient(180deg, #ffe8ca, #f1c490 58%, #d79b62); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(90, 45, 0, .28), 0 2px 5px rgba(0, 0, 0, .8), 0 0 26px -4px rgba(var(--g), .5); transition: filter .2s, transform .12s; }
.unit__apply:hover { filter: brightness(1.07); } .unit__apply:active { transform: translateY(1px); }
.unit__ends2 { display: none; }
.unit__digits { margin-top: .5cqw; display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; }
.unit__seg { display: flex; align-items: baseline; gap: .32em; }
.unit__seg b { font: 400 2.5cqw/1 var(--f-mono); color: var(--lamp-2); text-shadow: 0 0 .5em rgba(var(--g), .45); font-variant-numeric: tabular-nums; }
.unit__seg i { font: 400 max(11.5px, 1.02cqw)/1 var(--f-sans); color: var(--mute); }

/* ---------------------------------------------------------------- bar under the header, once the unit is out of sight */
.sbf { position: fixed; z-index: 48; left: 0; right: 0; top: calc(var(--hdr) + var(--sat, 0px)); height: 46px; background: rgba(var(--bar), .95); border-bottom: 1px solid rgba(var(--g), .28);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transform: translateY(-130%); visibility: hidden; transition: transform .4s var(--ease), visibility 0s .4s; }
.sale.sale-bar .sbf { transform: none; visibility: visible; transition: transform .4s var(--ease); }
.sale.sale-bar .hdr { background: rgba(var(--bar), .95); border-bottom-color: transparent; }
.mnav-open .sbf { visibility: hidden !important; }
.sbf__in { height: 100%; display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 34px); font-size: .95rem; }
.sbf__t { font-weight: 560; color: var(--text); white-space: nowrap; }
.sbf__code { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px dashed rgba(var(--g), .55); background: rgba(var(--g), .08); color: var(--lamp-2); font: 400 1rem/1 var(--f-mono); cursor: pointer; }
.sbf__code b { font-weight: 400; }
.sbf__time { color: var(--lamp); font: 400 1rem/1 var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sale.sale-bar { scroll-padding-top: calc(var(--hdr) + 62px); }
.sale body:not(.page-home) main { padding-top: 46px; }

/* ---------------------------------------------------------------- price card */
.sale .price { border-color: transparent; background: linear-gradient(color-mix(in srgb, var(--bg) 88%, #fff), color-mix(in srgb, var(--bg) 93%, #fff)) padding-box, linear-gradient(160deg, var(--gold-2), var(--gold-3) 28%, #3a2a22 55%, var(--gold-3) 82%, var(--gold-2)) border-box; border-width: 2px; box-shadow: 0 0 120px -30px rgba(var(--g), .5); }
.sale .price__amt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 18px; color: var(--lamp-2); }
.sale .price__amt .price__old { order: 2; font-size: .42em; font-weight: 500; letter-spacing: -.02em; color: var(--text-3); text-decoration-color: #d8442e; text-decoration-thickness: 2px; }
.price__sale { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.price__code { display: inline-flex; align-items: stretch; padding: 0; border: 1px dashed rgba(var(--g), .55); border-radius: 10px; overflow: hidden; background: rgba(var(--g), .07); color: var(--lamp-2); cursor: pointer; }
.price__code b { padding: 9px 13px; font: 400 1.05rem/1 var(--f-mono); }
.price__code span { padding: 9px 12px; background: rgba(var(--g), .16); font: 600 1rem/1 var(--f-sans); color: var(--lamp); }
.price__left { color: var(--text-2); font-size: .92rem; } .price__left b { color: var(--lamp); font: 400 1rem/1 var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sale .sbar__price s { color: var(--text-3); margin-right: 2px; }
.sale .hdr__buy { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 20px -8px rgba(var(--g), .7); }

@media (min-width: 761px) and (max-width: 1080px) {
  .unit__seg i { display: none; } .unit__seg { gap: 0; } .unit__digits { justify-content: start; } .unit__seg b { font-size: 3.1cqw; letter-spacing: -.03em; }
  .unit__seg + .unit__seg b::before { content: ":"; opacity: .55; margin: 0 -.16em; } .unit__lab { font-size: max(10.5px, 1.02cqw); } .unit__ends2 { display: inline; } .unit__endl { display: none; }
}
@media (max-width: 760px) {
  .unit { margin-top: 22px; max-width: 440px; }
  .unit__pic { aspect-ratio: 360 / 436; border-radius: 12px; background-image: url("/assets/img/sale/rack-m-ember.webp"); }
  .unit__run { border-radius: 12px; } .unit__refl { height: 22%; } .unit__refl::before { aspect-ratio: 360 / 436; background-image: url("/assets/img/sale/rack-m-ember.webp"); }
  .unit__lit { left: 9.2%; top: 11.2%; width: 81.6%; height: 36.3%; -webkit-mask: radial-gradient(22.2% 24.2% at 50% 104%, transparent 97%, #000); mask: radial-gradient(22.2% 24.2% at 50% 104%, transparent 97%, #000); }
  .unit::before { inset: -14% -12% -12%; }
  .unit__vu--desk { display: none; } .unit__vu--mob { display: block; }
  .unit__w--price { left: 6.67%; top: 52.75%; width: 86.66%; height: 21.1%; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; align-content: center; column-gap: 2cqw; padding: 0 4.2cqw; }
  .unit__now { grid-row: 1 / 4; grid-column: 1; align-self: center; margin: 0; font-size: 11.6cqw; }
  .unit__was, .unit__save, .unit__each { grid-column: 2; text-align: right; } .unit__was span { display: none; } .unit__was, .unit__save, .unit__each { white-space: nowrap; line-height: 1.2; } .unit__was { font-size: 3.7cqw; }
  .unit__save { font-size: 3.5cqw; margin-top: 1.2cqw; } .unit__each { font-size: 3.1cqw; margin-top: 1.2cqw; }
  .unit__w--code { left: 6.67%; top: 76.6%; width: 41.67%; height: 17.9%; padding: 0 3.4cqw; }
  .unit__w--time { left: 51.67%; top: 76.6%; width: 41.67%; height: 17.9%; padding: 0 3.4cqw; }
  .unit__apply { display: none; }
  .unit__copy { width: 100%; height: 100%; }
  .unit__lab { font-size: 3.15cqw; } .unit__code { font-size: 6.6cqw; margin-top: 1.6cqw; }
  .unit__endl { display: none; } .unit__ends2 { display: inline; }
  .unit__digits { margin-top: 2cqw; justify-content: start; grid-template-columns: repeat(4, auto); gap: 0; }
  .unit__seg { gap: 0; } .unit__seg b { font-size: 5.5cqw; letter-spacing: -.03em; } .unit__seg i { display: none; }
  .unit__seg + .unit__seg b::before { content: ":"; opacity: .55; margin: 0 -.16em; }
  .sale .hero__title { font-size: clamp(1.5rem, 7.7vw, 3rem); letter-spacing: -.04em; }
  .sale .hero__l2 { white-space: nowrap; }
  .sale .hero__cta { display: flex; margin-top: 20px; order: -1; } .sale .hero__cta .btn { width: 100%; } .sale .hero__more { display: none; }
  .hero__auto { order: -1; margin: 12px 0 18px; }
  .sale .hero__sub { display: none; }
  .sbf__in { justify-content: space-between; gap: 10px; font-size: .84rem; }
  .sbf__code { padding: 0 9px; font-size: .9rem; } .sbf__time { font-size: .86rem; }
}
@media (max-width: 400px) { .sbf__in { gap: 6px; } .sbf__t { font-size: .76rem; } .sbf__code { padding: 0 7px; font-size: .82rem; } .sbf__code svg { display: none; } .sbf__time { font-size: .8rem; } }
@media (prefers-reduced-motion: reduce) { .sbf { transition: none !important; } }
.modal.co p.co__left { margin-top: 4px; font-size: .84rem; color: var(--text-3); } .modal.co p.co__left b { color: var(--lamp); font: 400 .9rem/1 var(--f-mono); font-variant-numeric: tabular-nums; }
