/* The "closed for a moment" page shown while the store is shut before (or after) Black Friday: RO = the Shopify
   password page (layout/password.liquid + sections/qk-bf-closed.liquid), EU/PL/HU = the headless
   public/maintenance.html that the Vercel firewall rule sends visitors to. Same file in both repos
   (tema-qwertykey/assets/qk-bf-closed.css and the headless public/qk-bf-closed.css): change both. Dark like the
   Black Friday page, Space Grotesk from --qkbc-font. */
html, body { margin: 0; background: #0a0a0a; color-scheme: dark; }

.qkbc {
  --ink: #fff;
  --muted: #9a9a9a;
  --line: #262626;
  --accent: #ff3900;
  --pad: clamp(20px, 5vw, 48px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto auto;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: clip;
  background: #0a0a0a;
  color: var(--ink);
  font-family: var(--qkbc-font, 'QK Space Grotesk'), 'Space Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.qkbc *, .qkbc *::before, .qkbc *::after { box-sizing: border-box; }
.qkbc :where(h1, p, figure, details, summary, form, label) { margin: 0; padding: 0; }
.qkbc [hidden] { display: none !important; }

/* Phases (assets/qk-bf-closed.js): soon = before the start, open = started but the store is still shut,
   over = after the end. Rendered "soon". */
.qkbc:not([data-phase="soon"]) [data-show="soon"],
.qkbc:not([data-phase="open"]) [data-show="open"],
.qkbc:not([data-phase="over"]) [data-show="over"] { display: none !important; }

/* One page for three languages (headless): the head script sets html[data-qkbc-lang] before the body paints. */
html:not([data-qkbc-lang]) .qkbc [data-lang]:not([data-lang="en"]),
html[data-qkbc-lang="en"] .qkbc [data-lang]:not([data-lang="en"]),
html[data-qkbc-lang="pl"] .qkbc [data-lang]:not([data-lang="pl"]),
html[data-qkbc-lang="hu"] .qkbc [data-lang]:not([data-lang="hu"]) { display: none !important; }

/* ---------- Top ---------- */
.qkbc-top { display: flex; justify-content: center; padding: max(28px, env(safe-area-inset-top)) var(--pad) 0; }
.qkbc-logo { display: block; color: var(--ink); }
.qkbc-logo svg { display: block; width: 124px; height: auto; }

/* ---------- Stage ---------- */
.qkbc-stage {
  display: grid;
  align-content: center;
  justify-items: center;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(16px, 4vh, 40px) var(--pad) clamp(28px, 6vh, 56px);
}

/* The car (RO): the same studio light as the dark Black Friday page keeps a black car readable on black. */
.qkbc-visual { position: relative; z-index: 0; width: min(100%, 760px); container-type: inline-size; }
.qkbc-visual::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 22% 2% -6%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 44% 16% at 50% 88%, rgb(255 57 0 / .18), transparent 72%),
    radial-gradient(ellipse 48% 20% at 50% 86%, rgb(80 80 84 / .55), transparent 72%),
    radial-gradient(ellipse 50% 52% at 50% 48%, rgb(58 58 64 / .55), transparent 72%);
}
.qkbc-visual img { display: block; width: 100%; height: auto; }

/* ---------- Countdown: rolling digits, like the homepage hero ---------- */
.qkbc-count {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: .06em;
  color: var(--ink);
  font-size: clamp(56px, 17vw, 132px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -.02em;
}
/* Without a picture (EU/PL/HU) the clock is the picture. */
.qkbc-count--solo { font-size: clamp(64px, 19vw, 184px); }
/* Under the car the digits sit in its floor shadow. */
.qkbc-visual + .qkbc-count { margin-top: calc(-1 * clamp(18px, 5vw, 44px)); position: relative; z-index: 1; }
.qkbc-unit { display: grid; justify-items: center; gap: 0; }
.qkbc-num { display: flex; }
.qkbc-digit { display: block; width: .6em; height: 1em; overflow: hidden; }
.qkbc-strip { display: flex; flex-direction: column; transform: translateY(calc(var(--n, 0) * -1em)); transition: transform 650ms cubic-bezier(.2, .9, .2, 1); }
.qkbc-strip > span { display: block; height: 1em; }
.qkbc-sep { width: .3em; color: var(--accent); line-height: .92; }
.qkbc-label { color: rgb(255 255 255 / .6); font-size: max(11px, .13em); font-weight: 700; letter-spacing: .18em; line-height: 1; text-transform: uppercase; }

/* ---------- Text ---------- */
.qkbc-h1 {
  margin-top: clamp(30px, 5vh, 48px);
  font-size: clamp(34px, 7.4vw, 76px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.05em;
  text-wrap: balance;
}
.qkbc-line { display: block; }
.qkbc-accent { color: var(--accent); }
.qkbc-lead {
  max-width: 34em;
  margin-top: clamp(16px, 2.8vh, 26px);
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.5;
  text-wrap: balance;
}

/* ---------- Offers (RO): prices already announced on the Black Friday page, sliding by ---------- */
.qkbc-offers { min-width: 0; width: 100%; padding-bottom: clamp(28px, 5vh, 44px); }
.qkbc-offers-title { margin-bottom: 14px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .18em; line-height: 1.2; text-transform: uppercase; }
.qkbc-window {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
/* Two identical tracks; moving by half the width loops without a seam. */
.qkbc-marquee { display: flex; width: max-content; animation: qkbc-marquee var(--qkbc-marquee-time, 60s) linear infinite; }
.qkbc-window:hover .qkbc-marquee { animation-play-state: paused; }
@keyframes qkbc-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.qkbc-track { display: flex; gap: 12px; margin: 0; padding: 0 12px 0 0; list-style: none; }
.qkbc-offer { flex: 0 0 auto; width: 168px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #141414; text-align: left; }
.qkbc-offer-media { position: relative; aspect-ratio: 1; background: #1a1a1a; }
.qkbc-offer-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.qkbc-offer-off { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.15; }
.qkbc-offer-title {
  display: -webkit-box;
  min-height: 2.6em;
  margin: 10px 12px 0;
  overflow: hidden;
  color: #cfcfcf;
  font-size: 13px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.qkbc-offer-price { margin: 6px 12px 12px; color: var(--accent); font-size: 15px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.qkbc-offer-price s { margin-left: 4px; color: #767676; font-size: 12px; font-weight: 400; }
.qkbc[data-phase="over"] .qkbc-offers { display: none; }

/* ---------- Bottom: social links (RO) ---------- */
.qkbc-foot { display: flex; justify-content: center; padding: 0 var(--pad) max(28px, env(safe-area-inset-bottom)); }
.qkbc-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.qkbc-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #141414;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .2s, background-color .2s;
}
.qkbc-social a:hover { border-color: #3d3d3d; background: #1c1c1c; }
.qkbc-social a:focus-visible { outline: 1px solid rgb(255 255 255 / .7); outline-offset: 2px; }
.qkbc-social svg { display: block; flex: none; width: 18px; height: 18px; }

@media (max-width: 419px) {
  .qkbc-social { gap: 6px; }
  .qkbc-social a { gap: 7px; padding: 0 13px 0 11px; font-size: 13px; }
  .qkbc-social svg { width: 16px; height: 16px; }
}
@media (min-width: 900px) {
  .qkbc-visual + .qkbc-count { font-size: 112px; }
  .qkbc-offer { width: 196px; }
  /* With the offers under it, a smaller car lets them start on the first screen. */
  .qkbc-stage:has(+ .qkbc-offers) { padding-bottom: 36px; }
  .qkbc-stage:has(+ .qkbc-offers) .qkbc-visual { width: min(100%, 600px); }
  .qkbc-stage:has(+ .qkbc-offers) .qkbc-visual + .qkbc-count { font-size: 100px; }
  .qkbc-stage:has(+ .qkbc-offers) .qkbc-h1 { margin-top: 32px; font-size: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .qkbc-strip { transition: none; }
  .qkbc-marquee { animation: none; }
  .qkbc-window { overflow-x: auto; }
  .qkbc-track[aria-hidden] { display: none; }
}
