/* ==========================================================================
   Section: countdown-banner  →  assets/section-countdown-banner.css
   Figma 1346-4868: #f6f6f6, flush under Shop The Look. A 1215×1330 layer of product cut-outs
   (top 40, centred 18.5px left of the page centre) behind a centred 685px column: eyebrow, heading,
   body, then the countdown and the button, 40px apart.
   The section is a scroll track; the frame is sticky and as tall as the room under the header,
   which is 820px — Figma's frame — on a 1440×877 window. The script sizes the track and moves things
   (assets/js/sections/countdown-banner.js); the CSS on its own is the still layout.
   ========================================================================== */
.countdown-banner {
  --sticky-top: calc(var(--header-height) + 1px);
  /* one Figma pixel: 1px at 1440 and wider, scaling down with the section below that */
  --px: clamp(0.45px, calc(100cqw / 1440), 1px);

  container-type: inline-size;
  background: var(--color-surface-tertiary);
}

.countdown-banner__track {
  display: block;
}

.countdown-banner__frame {
  position: sticky;
  top: var(--sticky-top);
  height: calc(100svh - var(--sticky-top));
  min-height: 560px;
  overflow: clip;
}

/* ---------------------------------------------------------------- objects */
.countdown-banner__objects {
  position: absolute;
  top: calc(40 * var(--px));
  left: calc(50% - 626 * var(--px));
  width: calc(1215 * var(--px));
  height: calc(1330 * var(--px));
  pointer-events: none;
  will-change: transform;
}

.countdown-banner__object {
  position: absolute;
  top: calc(var(--y) * var(--px));
  left: calc(var(--x) * var(--px));
  width: calc(var(--w) * var(--px));
  max-width: none;
  height: auto;
}

/* ---------------------------------------------------------------- content
   Figma centres the column on 720.5px, so the left padding carries one extra pixel. */
.countdown-banner__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 0 var(--page-gutter) 0 calc(var(--page-gutter) + 1px);
}

.countdown-banner__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 685px;
  max-width: 100%;
  text-align: center;
}

/* Label/M */
.countdown-banner__eyebrow {
  color: var(--color-success);
  font-size: var(--text-body-s-size);
  font-weight: 500;
  line-height: 1.2;
}

.countdown-banner__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Display/M */
.countdown-banner__heading {
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: clamp(32px, 3.889vw, var(--text-display-m-size)); /* 56px at 1440 */
  font-weight: 500;
  line-height: 1.2;
}

/* the script's letter-by-letter copy keeps words whole when the line wraps */
.countdown-banner__word {
  white-space: nowrap;
}

/* Body/L: Inter 500 16px / 1.6 */
.countdown-banner__text {
  color: var(--color-text-secondary);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
}

.countdown-banner__offer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* Button/M: 4% tracking; Figma's 40px button has no border, so the shared 1px border comes out
   of the padding, and the label box leaves out the tracking after the last letter */
.countdown-banner__cta {
  --button-padding-x: 15px;
  letter-spacing: 0.04em;
}

.countdown-banner__cta > span {
  width: calc-size(max-content, round(up, size - 0.04em, 1px));
}

/* -------------------------------------------------------------- countdown
   64px units 12px apart with a 24px colon between: a 64px number box (Heading/H2) over a 27px
   label box (Label/S), frosted white with a #e2e2e2 hairline. */
.countdown {
  display: flex;
  align-items: center;
  gap: 12px;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  width: 64px;
}

.countdown__value,
.countdown__label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--color-border-tertiary);
  background: rgba(255, 255, 255, 0.64);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.countdown__value {
  height: 64px;
  border-radius: 2px 2px 0 0;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
}

.countdown__label {
  height: 27px;
  border-top: 0;
  border-radius: 0 0 2px 2px;
  font-size: var(--text-label-s-size);
  font-weight: 500;
  line-height: 1;
}

.countdown .icon-colon {
  color: var(--color-icon-secondary);
}

/* ---------------------------------------------------------------- phones */
@media (max-width: 749px) {
  .countdown-banner__content {
    gap: 32px;
  }

  .countdown-banner__text {
    font-size: var(--text-body-m-size);
  }

  .countdown-banner__text br {
    display: none;
  }

  .countdown-banner__offer {
    gap: 32px;
  }

  .countdown {
    gap: 6px;
  }

  .countdown__unit {
    width: 56px;
  }

  .countdown__value {
    height: 56px;
    font-size: 32px;
  }

  .countdown .icon-colon {
    width: 16px;
    height: 16px;
  }
}
