/* Release gate: countdown overlay and closes-in strip. Only the client's brand tokens are used for colour. */

html.rg-locked,
html.rg-locked body {
  overflow: hidden;
}

.rg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  overflow-y: auto;
  text-align: center;
  color: var(--on-primary, #fff);
  background: var(--primary);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.rg-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 34rem at 50% 28%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%),
    radial-gradient(40rem 26rem at 85% 110%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  animation: rg-breathe 6s ease-in-out infinite;
}

.rg-inner {
  position: relative;
  width: min(100%, 62rem);
}

.rg-logo {
  display: block;
  max-height: 3.5rem;
  max-width: 14rem;
  margin: 0 auto 1.5rem;
}

.rg-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  letter-spacing: var(--label-tracking, 0.12em);
  text-transform: uppercase;
  opacity: 0.8;
}

.rg-title {
  margin: 0;
  font-family: var(--os-font-display, var(--font-display));
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.08;
  font-weight: 700;
}

.rg-clock {
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  margin: clamp(1.5rem, 4vw, 2.75rem) 0 1.25rem;
}

.rg-unit {
  flex: 1 1 0;
  max-width: 10.5rem;
  min-width: 0;
  padding: clamp(0.9rem, 2.4vw, 1.6rem) 0.25rem clamp(0.7rem, 2vw, 1.2rem);
  border-radius: 1.1rem;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  background: color-mix(in srgb, currentColor 8%, transparent);
  backdrop-filter: blur(6px);
}

.rg-num {
  display: block;
  font-family: var(--os-font-display, var(--font-display));
  font-size: clamp(2.5rem, 11vw, 6.5rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.rg-num.rg-tick {
  animation: rg-flip 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rg-label {
  display: block;
  margin-top: 0.6rem;
  font-size: clamp(0.62rem, 1.6vw, 0.8rem);
  letter-spacing: var(--label-tracking, 0.12em);
  text-transform: uppercase;
  opacity: 0.7;
}

.rg-pulse {
  position: relative;
  height: 3px;
  width: min(100%, 22rem);
  margin: 0 auto 1.5rem;
  border-radius: 3px;
  background: color-mix(in srgb, currentColor 16%, transparent);
  overflow: hidden;
}

.rg-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--accent);
  border-radius: 3px;
  animation: rg-sweep 2.4s ease-in-out infinite;
}

.rg-when {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  opacity: 0.85;
}

.rg-sub {
  margin: 0.75rem auto 0;
  max-width: 36rem;
  opacity: 0.75;
}

.rg-final .rg-num[data-unit="seconds"] {
  color: var(--accent);
  animation: rg-flip 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), rg-throb 1s ease-in-out infinite;
}

.rg-live .rg-glow {
  animation: rg-burst 0.9s ease-out both;
}

.rg-live .rg-clock,
.rg-live .rg-pulse {
  opacity: 0.35;
}

/* Sales have ended: the same full-screen treatment as the countdown, without a clock. */
.rg-ended {
  animation: rg-fade-in 0.7s ease both;
}

.rg-ended .rg-title {
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  line-height: 1.05;
}

.rg-ended .rg-pulse {
  margin: clamp(1.5rem, 4vw, 2.5rem) auto;
}

.rg-ended .rg-pulse::after {
  animation-duration: 3.6s;
}

@keyframes rg-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.rg-leaving {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.rg-strip {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 0.55rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--primary);
  color: var(--on-primary, #fff);
}

.rg-strip-closing {
  background: var(--accent);
  color: var(--on-accent, var(--on-primary, #fff));
}

@keyframes rg-flip {
  from {
    transform: translateY(-28%);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes rg-sweep {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(260%);
  }
}

@keyframes rg-breathe {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

@keyframes rg-throb {
  50% {
    transform: scale(1.08);
  }
}

@keyframes rg-burst {
  from {
    transform: scale(0.8);
    opacity: 0.4;
  }
  to {
    transform: scale(1.6);
    opacity: 1;
  }
}

@media (max-width: 30rem) {
  .rg-unit {
    border-radius: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rg-glow,
  .rg-pulse::after,
  .rg-num.rg-tick,
  .rg-final .rg-num[data-unit="seconds"],
  .rg-live .rg-glow {
    animation: none;
  }
  .rg-overlay {
    transition: none;
  }
  .rg-ended {
    animation: none;
  }
}
