/* The remind me button with the lead time to pick: a live session card of Duskline, an invented photography school, on
   a black page. The pill is one element that GSAP widens and narrows between three layers (the idle label, the row of
   lead times, the set reminder); the small clock on its left stays put and keeps the story. */
:root {
  --page: #000000;          /* the page */
  --card: #0e0f13;          /* the session card */
  --card-edge: rgba(255, 255, 255, 0.08); /* the card's 1px edge */
  --ink: #f4f1ea;           /* the big words */
  --muted: #8d8f99;         /* the small words */
  --pill: #f4efe6;          /* the cream pill, idle and set */
  --pill-ink: #16130f;      /* the words on the cream pill */
  --open: #1a1b21;          /* the pill while the lead times are open */
  --chip: #f4efe6;          /* the mark under the chosen lead time */
  --accent: #ffad3b;        /* the dusk amber of the arc, the glow and the note */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
  background: var(--page);
}

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

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vmin, 40px);
  overflow: hidden;
}

/* ---------------------------------------------------------------- the card */
.event {
  position: relative;
  width: min(380px, 92vw);
  padding: clamp(18px, 4.2vmin, 26px);
  border-radius: clamp(20px, 4.5vmin, 26px);
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, 0.05), transparent 60%),
    var(--card);
  border: 1px solid var(--card-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 12px 30px rgba(0, 0, 0, 0.55),
    0 40px 80px rgba(0, 0, 0, 0.5);
  isolation: isolate;
}

/* the dusk glow that wakes up when a reminder is set */
.event__glow {
  position: absolute;
  inset: auto 10% -1px;
  height: 60%;
  border-radius: 50%;
  background: radial-gradient(50% 60% at 50% 100%, rgba(255, 173, 59, 0.22), transparent 70%);
  opacity: 0;
  z-index: -1;
  pointer-events: none;
}

.event__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.event__tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--ink);
}

.event__tag svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.event__title {
  margin: clamp(14px, 3.2vmin, 20px) 0 6px;
  font-size: clamp(21px, min(6vw, 5.4vh), 27px);
  line-height: 1.12;
  font-weight: 640;
  font-stretch: 92%;
  letter-spacing: -0.012em;
}

.event__meta {
  margin: 0 0 clamp(16px, 4vmin, 24px);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}

.event__note {
  margin: 12px 0 0;
  min-height: 1.4em;
  font-size: 13px;
  color: var(--accent);
}

.event__note span {
  display: inline-block;
  opacity: 0;
}

/* ---------------------------------------------------------------- the pill */
.remind {
  --h: 46px;
  position: relative;
  height: var(--h);
  width: 158px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pill-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 1px 1px rgba(0, 0, 0, 0.4),
    0 8px 22px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.remind__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.75) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.remind__clock {
  position: absolute;
  left: 9px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  pointer-events: none;
  z-index: 2;
}

.remind__clock svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.remind__dial {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.22;
  stroke-width: 1.4;
}

.remind__arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 0 1;
  transform: rotate(-90deg);
  transform-origin: 14px 14px;
}

.remind__ticks {
  stroke: currentColor;
  stroke-opacity: 0.35;
  stroke-width: 1.2;
  stroke-linecap: round;
}

.remind__hand {
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.remind__hand--hour {
  stroke-width: 2;
}

.remind__pin {
  fill: currentColor;
}

/* the three layers sit on top of each other, left aligned after the clock */
.remind__layer {
  position: absolute;
  top: 0;
  left: 40px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
}

button.remind__layer {
  padding-right: 18px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.005em;
  outline: none;
}

.remind__set {
  visibility: hidden;
}

.remind__set-word {
  font-weight: 500;
  opacity: 0.6;
}

.remind__set-in,
.remind__set-out {
  display: inline-block;
}

.remind__set-out {
  position: absolute;
  left: 0;
  opacity: 0;
}

.remind__choices {
  gap: 2px;
  padding-right: 6px;
  visibility: hidden;
  color: var(--ink);
}

.remind__mark {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 60px;
  border-radius: 999px;
  background: var(--chip);
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 6px rgba(0, 0, 0, 0.35);
  opacity: 0;
}

.remind__chip {
  position: relative;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 560;
  cursor: pointer;
  outline: none;
  transition: color 0.25s ease;
}

.remind__chip.is-on {
  color: var(--pill-ink);
}

.remind__close {
  position: relative;
  width: 34px;
  height: 34px;
  margin-left: 2px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  outline: none;
}

.remind__close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.remind button:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
  border-radius: 999px;
}

@media (hover: hover) {
  .remind__close:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.12);
  }
}

/* ---------------------------------------------------------------- the drawn pointer of the pilot */
.pointer {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  fill: #ffffff;
  stroke: #000000;
  stroke-width: 1.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  opacity: 0;
  z-index: 10;
}

@media (max-width: 420px) {
  .remind { --h: 44px; }
  .remind__chip { padding: 0 10px; font-size: 13.5px; }
  button.remind__layer { font-size: 14.5px; }
}
