/* First-month offer: a broadcast-style countdown sheet and a pinned banner.
   Fixed studio surfaces in both themes, like a stream overlay. */
.offer-banner,
.offer-sheet {
  --offer-ink: var(--on-studio);
  --offer-muted: var(--studio-muted);
  --offer-surface: var(--studio);
  --offer-deep: #170a2c;
  --offer-line: rgb(204 178 255 / 22%);
  --offer-lilac: var(--brand-lilac);
  --offer-hot: #ff7a98;
  --offer-pulse: var(--offer-lilac);
  --offer-ease: cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--offer-ink);
  font-family: var(--font-body);
}

.offer-banner.is-urgent,
.offer-sheet.is-urgent {
  --offer-pulse: var(--offer-hot);
}

.offer-banner [hidden],
.offer-sheet [hidden] {
  display: none !important;
}

.offer-banner ::selection,
.offer-sheet ::selection {
  background: var(--offer-lilac);
  color: var(--offer-surface);
}

.offer-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Depleting VOD timeline shared by the banner and the sheet. */
.offer-timeline {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: rgb(204 178 255 / 14%);
}

.offer-timeline > span {
  position: absolute;
  inset: 0;
  background: var(--offer-pulse);
  transform: scaleX(var(--offer-left, 1));
  transform-origin: left;
  transition: transform 1s linear, background-color 0.4s;
}

.offer-timeline > span::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -1px;
  width: 3px;
  height: 9px;
  border-radius: 2px;
  background: var(--offer-ink);
}

/* ─── Pinned banner ──────────────────────────────────────────────────── */

.offer-banner {
  position: fixed;
  z-index: 90;
  inset: 0 0 auto;
  padding-top: env(safe-area-inset-top);
  background: var(--offer-surface);
  border-bottom: 1px solid var(--offer-line);
  box-shadow: 0 6px 18px -8px rgb(8 2 20 / 55%);
  overflow: hidden;
  transition: transform 0.5s var(--offer-ease);
}

@starting-style {
  .offer-banner {
    transform: translateY(-100%);
  }
}

.offer-banner-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 20px;
  width: 100%;
  min-height: 48px;
  padding: 8px 16px 11px;
  border: 0;
  background: none;
  color: inherit;
  font: 600 14px/1.3 var(--font-body);
  text-align: left;
  cursor: pointer;
}

.offer-banner-button:focus-visible {
  outline: 2px solid var(--offer-lilac);
  outline-offset: -4px;
  border-radius: 6px;
}

.offer-banner-deal strong {
  font: 700 21px/1 var(--font-display);
  color: var(--offer-lilac);
}

.offer-banner-deal,
.offer-banner-price,
.offer-banner-timer {
  white-space: nowrap;
}

.offer-banner-price s {
  color: var(--offer-muted);
  font-weight: 400;
  text-decoration-color: var(--offer-hot);
  text-decoration-thickness: 2px;
}

.offer-banner-price strong {
  color: var(--offer-ink);
  font-weight: 700;
}

.offer-banner-timer {
  color: var(--offer-muted);
  font-weight: 400;
}

.offer-banner-timer time {
  display: inline-block;
  min-width: 4.4em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--offer-deep);
  color: var(--offer-pulse);
  font: 700 19px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: center;
  transition: color 0.4s;
}

.offer-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--offer-lilac);
  color: var(--offer-surface);
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.offer-banner-button:hover .offer-banner-cta {
  background: var(--brand-lilac-hover);
}

.offer-banner-cta svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--offer-ease);
}

.offer-banner-button:hover .offer-banner-cta svg {
  transform: translateX(3px);
}

/* First finished job: a sheen sweeps the strip and it briefly lights up. */
.offer-banner.is-glowing {
  animation: offer-glow 2.1s ease-in-out 3;
}

.offer-banner.is-glowing::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 30%) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%;
  animation: offer-sheen 2.1s ease-in-out 3;
}

.offer-banner.is-glowing .offer-banner-cta {
  animation: offer-cta-pop 2.1s var(--offer-ease) 3;
}

@keyframes offer-glow {
  0%, 100% {
    box-shadow: 0 6px 18px -8px rgb(8 2 20 / 55%), inset 0 0 0 0 rgb(204 178 255 / 0%);
  }
  50% {
    box-shadow: 0 10px 40px -2px rgb(204 178 255 / 60%), inset 0 0 0 2px rgb(204 178 255 / 85%);
  }
}

@keyframes offer-sheen {
  from { background-position: 130% 0; }
  to { background-position: -130% 0; }
}

@keyframes offer-cta-pop {
  0%, 100% { transform: none; }
  50% { transform: scale(1.06); }
}

/* ─── Sheet ──────────────────────────────────────────────────────────── */

.offer-sheet {
  width: min(500px, calc(100vw - 32px));
  max-width: none;
  max-height: min(92dvh, 820px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--offer-line);
  border-radius: 20px;
  background: var(--offer-surface);
  box-shadow: 0 40px 90px -30px rgb(8 2 20 / 80%);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgb(204 178 255 / 35%) transparent;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition:
    opacity 0.35s var(--offer-ease),
    transform 0.5s var(--offer-ease),
    overlay 0.35s allow-discrete,
    display 0.35s allow-discrete;
}

.offer-sheet:focus {
  outline: none;
}

.offer-sheet[open] {
  opacity: 1;
  transform: none;
}

@starting-style {
  .offer-sheet[open] {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
}

.offer-sheet::backdrop {
  background: rgb(10 4 22 / 0%);
  backdrop-filter: blur(0);
  transition:
    background-color 0.35s,
    backdrop-filter 0.35s,
    overlay 0.35s allow-discrete,
    display 0.35s allow-discrete;
}

.offer-sheet[open]::backdrop {
  background: rgb(10 4 22 / 72%);
  backdrop-filter: blur(6px);
}

@starting-style {
  .offer-sheet[open]::backdrop {
    background: rgb(10 4 22 / 0%);
    backdrop-filter: blur(0);
  }
}

.offer-clock-band {
  position: relative;
  padding: 28px 24px 30px;
  background: var(--offer-deep);
  text-align: center;
}

.offer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--offer-muted);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.offer-close:hover {
  background: rgb(204 178 255 / 12%);
  color: var(--offer-ink);
}

.offer-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.offer-clock-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--offer-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.offer-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--offer-hot);
  animation: offer-live 1.6s ease-out infinite;
}

.offer-sheet.is-urgent .offer-live {
  animation-duration: 0.8s;
}

@keyframes offer-live {
  0% { box-shadow: 0 0 0 0 rgb(255 122 152 / 70%); }
  100% { box-shadow: 0 0 0 9px rgb(255 122 152 / 0%); }
}

.offer-clock {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  margin: 10px 0 0;
}

.offer-clock-unit {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 1.15em;
  font-size: clamp(68px, 19vw, 104px);
}

.offer-clock-digits {
  display: block;
  font: 700 1em/0.86 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--offer-ink);
  transition: color 0.4s;
}

.offer-sheet.is-urgent .offer-clock-digits {
  color: var(--offer-hot);
}

.offer-clock-name {
  color: var(--offer-muted);
  font: 600 12px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.offer-clock-sep {
  font: 700 clamp(56px, 15vw, 84px)/0.9 var(--font-display);
  color: rgb(204 178 255 / 45%);
}

.offer-sheet.is-sub-hour [data-offer-hours] {
  display: none;
}

.offer-body {
  padding: 28px 28px 24px;
}

.offer-heading {
  margin: 0 0 20px;
  font: 700 22px/1.25 var(--font-body);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.offer-price {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 14px;
}

.offer-tags {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.offer-tag {
  display: inline-block;
  padding: 6px 10px 5px;
  border-radius: 8px;
  background: var(--offer-lilac);
  color: var(--offer-surface);
  font: 700 26px/1 var(--font-display);
  transform: rotate(-4deg);
  box-shadow: 0 8px 18px -8px rgb(8 2 20 / 70%);
}

.offer-tag-old {
  padding-inline: 4px;
  background: none;
  box-shadow: none;
  color: var(--offer-muted);
  font-size: 20px;
  text-decoration-color: var(--offer-hot);
  text-decoration-thickness: 2px;
  transform: none;
}

.offer-was {
  justify-self: start;
  color: var(--offer-muted);
  font-size: 18px;
  font-weight: 600;
  text-decoration-color: var(--offer-hot);
  text-decoration-thickness: 2px;
}

.offer-now {
  font: 700 clamp(64px, 17vw, 84px)/0.95 var(--font-display);
  color: var(--offer-lilac);
  letter-spacing: -0.01em;
}

.offer-per {
  align-self: end;
  padding-bottom: 10px;
  color: var(--offer-muted);
  font-size: 15px;
}

.offer-then {
  margin: 10px 0 0;
  color: var(--offer-muted);
  font-size: 14px;
}

.offer-features {
  display: grid;
  gap: 8px;
  margin: 20px 0 24px;
  padding: 16px 0 0;
  border-top: 1px solid var(--offer-line);
  list-style: none;
  font-size: 15px;
}

.offer-features li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.offer-features svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--offer-lilac);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.offer-checkout,
.offer-decline {
  margin: 0;
}

.offer-cta {
  width: 100%;
  min-height: 58px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--offer-lilac);
  color: var(--offer-surface);
  font: 700 18px/1.2 var(--font-body);
  box-shadow: 0 14px 28px -12px rgb(204 178 255 / 55%);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s var(--offer-ease), box-shadow 0.2s;
}

.offer-cta:hover:not(:disabled) {
  background: var(--brand-lilac-hover);
  transform: translateY(-1px);
  box-shadow: 0 18px 32px -12px rgb(204 178 255 / 65%);
}

.offer-cta:active:not(:disabled) {
  transform: translateY(1px);
}

.offer-decline button,
.offer-later {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 0;
  background: none;
  color: var(--offer-muted);
  font: 600 14px/1.3 var(--font-body);
  text-decoration: underline;
  text-decoration-color: rgb(212 197 232 / 40%);
  text-underline-offset: 4px;
  cursor: pointer;
}

.offer-decline button:hover:not(:disabled),
.offer-later:hover {
  color: var(--offer-ink);
  text-decoration-color: currentColor;
}

.offer-cta:disabled,
.offer-decline button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.offer-cta:focus-visible,
.offer-decline button:focus-visible,
.offer-later:focus-visible,
.offer-close:focus-visible {
  outline: 2px solid var(--offer-ink);
  outline-offset: 3px;
}

.offer-fine {
  margin: 14px 0 0;
  color: var(--offer-muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.offer-fine code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--offer-deep);
  color: var(--offer-lilac);
  font: 600 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
}

/* ─── Small screens ──────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .offer-banner-wide {
    display: none;
  }

  .offer-banner-button {
    gap: 12px;
    justify-content: space-between;
    padding-inline: 12px;
  }

  .offer-banner-price {
    margin-right: auto;
  }

  .offer-banner-cta {
    padding: 0 10px;
  }
}

@media (max-width: 380px) {
  .offer-banner-price s {
    display: none;
  }
}

@media (max-width: 600px) {
  .offer-sheet {
    width: 100%;
    max-height: 94dvh;
    margin: auto 0 0;
    border-width: 1px 0 0;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }

  @starting-style {
    .offer-sheet[open] {
      transform: translateY(100%);
    }
  }

  .offer-clock-band {
    padding: 24px 16px 26px;
  }

  .offer-body {
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
  }

  .offer-heading {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .offer-live {
    animation: none;
  }

  .offer-banner.is-glowing {
    animation: none;
    box-shadow: 0 10px 40px -2px rgb(204 178 255 / 60%), inset 0 0 0 2px rgb(204 178 255 / 85%);
  }

  .offer-banner.is-glowing::after {
    content: none;
  }
}
