/* Countdown page. Values come from the design system tokens (--bz-*); the few literals below are page-specific
   recipes from the design handoff (the translucent counter glass). */

.cd {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
}

/* Two copies of every state-dependent text live in the markup; the state on .cd picks one. */
.cd[data-state='live'] [data-show='launched'],
.cd[data-state='launched'] [data-show='live'] {
  display: none !important;
}

.cd-plate {
  width: 100%;
  max-width: 680px;
  padding: clamp(24px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── logo ───────────────────────────────────────────────────────── */

.cd-logo-row {
  display: flex;
  justify-content: center;
  padding-top: var(--bz-space-1);
}

.cd-logo {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
}

.cd-logo__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
}

.cd-logo__halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--bz-accent-base) 35%, transparent), transparent);
  animation: cd-halo 3.2s ease-in-out infinite;
}

.cd-logo__orbit {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent,
    color-mix(in srgb, var(--bz-accent-light) 90%, transparent) 12%,
    transparent 26%
  );
  -webkit-mask: radial-gradient(closest-side, transparent 88%, #000 90%, #000 99%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 88%, #000 90%, #000 99%, transparent 100%);
  animation: cd-orbit 6s linear infinite;
}

.cd-logo__img {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 6px 10px rgb(96 72 232 / 0.35));
  animation: cd-float 5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

/* The wordmark stands in when the logo cannot load. */
.cd-logo__text {
  display: none;
  font-family: var(--bz-font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--bz-accent-base);
}

.cd-logo--failed .cd-logo__mark {
  display: none;
}

.cd-logo--failed .cd-logo__text {
  display: block;
}

/* ── headline ───────────────────────────────────────────────────── */

.cd-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--bz-space-3);
}

.cd-eyebrow {
  font-size: var(--bz-text-mono-xs-size);
  letter-spacing: 0.16em;
  color: var(--bz-ink-secondary);
}

.cd-title {
  margin: 0;
  font-size: clamp(26px, 4.6vw, 38px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--bz-ink-heading);
  text-wrap: balance;
}

.cd-lead {
  margin: 0;
  max-width: 46ch;
  font-size: var(--bz-text-body-md-size);
  line-height: var(--bz-text-body-md-lh);
  color: var(--bz-ink-body);
  text-wrap: pretty;
}

/* ── timer ──────────────────────────────────────────────────────── */

.cd-timer {
  position: relative;
  padding: clamp(10px, 2.4vw, 18px) 0;
}

.cd-timer__panel {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: var(--bz-radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgb(214 216 229 / 0.6), rgb(199 202 219 / 0.44));
  box-shadow:
    inset 0 1px 0 var(--bz-glass-place-edge-top),
    inset 0 -1px 0 var(--bz-glass-place-edge-bottom),
    0 1px 1px rgb(66 70 102 / 0.1),
    0 2px 3px -1px rgb(66 70 102 / 0.11),
    0 10px 18px -8px rgb(66 70 102 / 0.22);
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--bz-space-2);
  padding: clamp(16px, 3.4vw, 24px) var(--bz-space-1-5) clamp(13px, 2.6vw, 18px);
}

.cd-unit + .cd-unit {
  box-shadow:
    inset 1px 0 0 rgb(108 110 142 / 0.14),
    inset 2px 0 0 rgb(255 255 255 / 0.5);
}

.cd-digits {
  position: relative;
  display: flex;
  height: 1em;
  overflow: hidden;
  font-family: var(--bz-font-display);
  font-size: clamp(30px, 7vw, 52px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--bz-ink-heading);
}

.cd-digit {
  display: inline-block;
  animation: cd-roll 0.55s var(--bz-ease-standard);
}

.cd-unit__label {
  font-size: var(--bz-text-label-size);
  font-weight: var(--bz-text-label-weight);
  letter-spacing: var(--bz-text-label-ls);
  text-transform: uppercase;
  color: var(--bz-ink-heading);
}

/* ── date row ───────────────────────────────────────────────────── */

.cd-when {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--bz-space-2) var(--bz-space-4);
}

.cd-when__date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--bz-space-1) var(--bz-space-2);
  font-size: var(--bz-text-body-size);
  color: var(--bz-ink-body);
}

.cd-when__date .bz-icon {
  font-size: var(--bz-icon-sm);
  color: var(--bz-ink-secondary);
}

.cd-when__date time {
  white-space: nowrap;
}

.cd-rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--bz-line-hairline);
}

/* ── email form ─────────────────────────────────────────────────── */

.cd-form {
  display: flex;
  flex-direction: column;
  gap: var(--bz-form-gap);
}

.cd-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bz-space-2-5);
}

.cd-form__field {
  flex: 1 1 240px;
}

.cd-form__row .bz-btn {
  flex: 0 0 auto;
}

.cd-form__msg {
  font-size: var(--bz-text-caption-size);
}

/* ── confirmation ───────────────────────────────────────────────── */

.cd-done:focus-visible {
  outline: 2px solid var(--bz-focus-color);
  outline-offset: 2px;
}

.cd-done .bz-alert__icon {
  font-size: var(--bz-icon-md);
  line-height: 1.1;
}

.cd-done__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cd-done__title {
  font-size: var(--bz-text-body-size);
  font-weight: 600;
  color: var(--bz-ink-heading);
}

.cd-done__text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--bz-ink-body);
  overflow-wrap: anywhere;
}

.cd-done__text strong {
  font-weight: 600;
  color: var(--bz-ink-heading);
}

.cd-done__edit {
  align-self: flex-start;
  margin-top: var(--bz-space-1-5);
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--bz-accent-link);
  cursor: pointer;
}

.cd-footer {
  font-size: var(--bz-text-caption-size);
  color: var(--bz-ink-secondary);
}

/* ── keyframes ──────────────────────────────────────────────────── */

@keyframes cd-roll {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes cd-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-6px) rotate(-3deg);
  }
}

@keyframes cd-halo {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
}

@keyframes cd-orbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

