/* The join the drop button with the holographic countdown. A near black room with a soft cool glow and a fine grain,
   and in the middle one pill of black glass with a holographic foil edge. Inside one rounded box (.dr__body, moved only
   by GSAP): the glass fill, the light under the pointer, the reflection that crosses at the end, the foil edge (its
   hue turns with the pointer), the beam that runs round while the spot is reserved, and the glass edges on top. Then
   the row: the date tile (that becomes a foil seal with a check), two lines of words and the countdown. */
:root {
  --page: #09090b;            /* the room */
  --glow: #1a1830;            /* the soft glow behind the button */
  --glass: #111114;           /* the button's black glass */
  --ink: #f3f3f6;             /* the words */
  --muted: rgba(243, 243, 246, 0.52); /* the small words */
  --holo-a: #7ef0dc;          /* the foil, first colour (mint) */
  --holo-b: #a78bff;          /* the foil, second colour (violet) */
  --holo-c: #ffc2a1;          /* the foil, third colour (peach) */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* the room: a cool glow behind the button, a faint foil haze under it, and a fine grain */
.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
  background:
    radial-gradient(min(72vw, 540px) min(44vh, 300px) at 50% 46%, color-mix(in srgb, var(--glow) 90%, transparent), transparent 72%),
    radial-gradient(min(110vw, 860px) min(70vh, 520px) at 50% 125%, color-mix(in srgb, var(--holo-b) 10%, transparent), transparent 70%),
    var(--page);
}

.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.9 0 0 0 0 1 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.dr {
  --ha: 200deg;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

/* the foil light the button throws on the floor under it */
.dr__spill {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 104%;
  height: 40px;
  margin: -16px 0 0 -52%;
  border-radius: 50%;
  background: conic-gradient(from var(--ha), var(--holo-a), var(--holo-b), var(--holo-c), var(--holo-a));
  filter: blur(18px);
  opacity: 0.16;
  pointer-events: none;
}

.dr__btn {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}

.dr__btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--holo-a) 70%, white);
  outline-offset: 5px;
}

.dr__body {
  --mx: 30%;
  --my: 50%;
  --ba: 0deg;
  position: relative;
  display: block;
  width: min(88vw, 320px);
  height: 60px;
  border-radius: 999px;
  isolation: isolate;
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.8),
    0 8px 18px -10px rgba(0, 0, 0, 0.95),
    0 26px 50px -26px rgba(0, 0, 0, 1),
    0 14px 34px -22px color-mix(in srgb, var(--holo-b) 45%, transparent);
}

.dr__fill,
.dr__shine,
.dr__sweep,
.dr__foil,
.dr__beam,
.dr__beam-glow,
.dr__glass {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.dr__fill,
.dr__shine,
.dr__sweep {
  overflow: hidden;
}

/* black glass: a deep fill, a little lighter at the top, a faint foil tint inside the edge */
.dr__fill {
  background:
    radial-gradient(120% 140% at 50% -30%, rgba(255, 255, 255, 0.075), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.3)),
    var(--glass);
}

/* the light under the pointer, tinted by the foil */
.dr__shine {
  background:
    radial-gradient(110px 70px at var(--mx) var(--my), color-mix(in srgb, var(--holo-a) 14%, transparent), transparent 70%),
    radial-gradient(70px 44px at var(--mx) var(--my), rgba(255, 255, 255, 0.08), transparent 70%);
  opacity: 0;
}

/* the reflection that crosses the glass when the spot is yours */
.dr__sweep-band {
  position: absolute;
  top: -30%;
  left: 0;
  width: 34%;
  height: 160%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.26) 50%, rgba(255, 255, 255, 0.04) 70%, transparent 100%);
  transform: translateX(-140%) skewX(-16deg);
}

/* the foil edge: a 1px ring cut out of a conic gradient whose angle (--ha) follows the pointer */
.dr__foil {
  padding: 1px;
  background: conic-gradient(from var(--ha), var(--holo-a), var(--holo-b) 22%, var(--holo-c) 40%, rgba(255, 255, 255, 0.85) 48%, var(--holo-a) 58%, var(--holo-b) 78%, var(--holo-a));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.42;
  z-index: 3;
}

/* the beam that runs round the edge while the spot is reserved (--ba turns) */
.dr__beam {
  padding: 1.5px;
  background: conic-gradient(from var(--ba), transparent 0deg, transparent 230deg, color-mix(in srgb, var(--holo-b) 60%, transparent) 280deg, var(--holo-a) 330deg, #ffffff 352deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  z-index: 4;
}

.dr__beam-glow {
  inset: -4px;
  filter: blur(5px);
  opacity: 0;
  z-index: 2;
}

.dr__beam--wide {
  padding: 4px;
  opacity: 1;
}

/* the glass edges: light at the top, dark at the bottom, a wet highlight */
.dr__glass {
  z-index: 5;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6),
    inset 0 -12px 18px -12px rgba(0, 0, 0, 0.75);
}

.dr__glass::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: 1px;
  height: 42%;
  border-radius: 999px 999px 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0));
}

.dr__row {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 9px 0 11px;
  gap: 11px;
}

/* the date tile on the left, and the foil seal that takes its place */
.dr__tile {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.dr__tile > * {
  grid-area: 1 / 1;
  position: relative;
}

.dr__tile-card {
  width: 38px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  grid-template-rows: 14px 1fr;
  overflow: hidden;
  background: linear-gradient(180deg, #232329, #141418);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 3px 8px rgba(0, 0, 0, 0.6),
    0 1px 2px rgba(0, 0, 0, 0.6);
}

.dr__month {
  display: grid;
  place-items: center;
  font-size: 8.5px;
  font-weight: 700;
  font-variation-settings: 'wdth' 112;
  letter-spacing: 0.14em;
  padding-left: 0.14em;
  color: #121216;
  background: linear-gradient(100deg, var(--holo-a), var(--holo-b) 50%, var(--holo-c));
  background-size: 200% 100%;
  background-position: var(--fp, 30%) 0;
}

.dr__day {
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 640;
  font-variation-settings: 'wdth' 100;
  letter-spacing: -0.02em;
  line-height: 1;
  padding-bottom: 1px;
  color: var(--ink);
}

.dr__tile-sheen {
  position: absolute;
  inset: -20% auto -20% 0;
  width: 60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-140%) skewX(-14deg);
  pointer-events: none;
  z-index: 2;
}

.dr__seal {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.75), transparent 46%),
    conic-gradient(from var(--ha), var(--holo-a), var(--holo-b), var(--holo-c), var(--holo-a));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 0 18px -4px color-mix(in srgb, var(--holo-a) 60%, transparent),
    0 2px 6px rgba(0, 0, 0, 0.55);
  opacity: 0;
}

.dr__check {
  width: 22px;
  height: 22px;
  overflow: visible;
}

.dr__check path {
  fill: none;
  stroke: #101014;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.dr__text {
  flex: 1;
  display: grid;
  min-width: 0;
  text-align: left;
}

.dr__state {
  grid-area: 1 / 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dr__state + .dr__state {
  opacity: 0;
}

.dr__title {
  font-size: 15.5px;
  font-weight: 580;
  font-variation-settings: 'wdth' 102;
  letter-spacing: 0.002em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

/* Reserving spot shimmers: a foil band runs through the letters (GSAP moves background-position) */
.dr__title--busy {
  background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 36%, var(--holo-a) 44%, #ffffff 50%, var(--holo-b) 56%, var(--ink) 64%, var(--ink) 100%);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.dr__sub {
  font-size: 11.5px;
  font-weight: 460;
  font-variation-settings: 'wdth' 96;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dr__spot {
  color: var(--ink);
  font-weight: 560;
}

/* the countdown on the right: a small label over six rolling digits */
.dr__clock {
  flex: none;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  width: 78px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.5);
}

.dr__label {
  font-size: 8px;
  font-weight: 620;
  font-variation-settings: 'wdth' 110;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
  white-space: nowrap;
}

.dr__digits {
  display: flex;
  align-items: center;
  height: 15px;
  font-size: 12.5px;
  font-weight: 600;
  font-variation-settings: 'wdth' 96;
  line-height: 15px;
  color: var(--ink);
}

/* one digit: a fixed slot with two faces that take turns (GSAP rolls them) */
.dr__slot {
  position: relative;
  display: grid;
  width: 0.64em;
  height: 15px;
  overflow: hidden;
  text-align: center;
}

.dr__slot > span {
  grid-area: 1 / 1;
}

.dr__slot > span + span {
  opacity: 0;
}

.dr__colon {
  width: 0.34em;
  text-align: center;
  color: var(--muted);
  transform: translateY(-0.5px);
}

/* narrow screens: a slightly tighter row so the product line fits */
@media (max-width: 380px) {
  .dr__row {
    gap: 9px;
    padding: 0 8px 0 10px;
  }

  .dr__clock {
    width: 72px;
  }

  .dr__digits {
    font-size: 12px;
  }

  .dr__sub {
    font-size: 11px;
  }
}
