/* The time to leave reminder with the rolling minutes: the reminder of Quaybell, a calendar app, on pure black.
   GSAP moves .note (y, scale, width) and the height of .note__more; the look lives in the children (.note__skin, the
   edge, the sheen), so GSAP's inline transform never fights the CSS. */
:root {
  --page: #000000;            /* the page */
  --glass-top: #1e1f23;       /* the glass, at the top */
  --glass-bottom: #101113;    /* the glass, at the bottom */
  --rim: rgba(255, 255, 255, 0.09); /* the edge at rest */
  --ink: #f3f3f1;             /* the words */
  --muted: #8d9097;           /* the small words */
  --faint: #34363c;           /* the ring track and the route at rest */
  --accent: #ffb03a;          /* the reminder: ring, icon, traffic */
  --accent-deep: #3a2406;     /* the icon tile */
  --button: #f3f3f1;          /* the main button */
  --button-ink: #0b0b0c;      /* the words on it */
}

* { 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%);
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: min(6vh, 40px) 16px;
}

/* ---- the notification ---- */
.note {
  position: relative;
  width: min(360px, calc(100vw - 32px));
  border-radius: 26px;
  will-change: transform;
}

.note__skin {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 18% -10%, rgba(255, 176, 58, 0.07), transparent 60%),
    linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 1px 1px rgba(0, 0, 0, 0.6),
    0 10px 24px -8px rgba(0, 0, 0, 0.9),
    0 30px 60px -20px rgba(0, 0, 0, 0.8);
}

/* the 1px rim: a static hairline plus a conic light that runs once around it when something happens */
.note__skin::before,
.note__edge {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  -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 exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.note__skin::before {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.2), var(--rim) 30%, rgba(255, 255, 255, 0.03) 70%, rgba(255, 255, 255, 0.07));
}

.note__edge {
  --a: 0deg;
  --o: 0;
  opacity: var(--o);
  background: conic-gradient(from var(--a), transparent 0deg, transparent 250deg, color-mix(in srgb, var(--accent) 70%, #fff) 320deg, #fff 340deg, transparent 360deg);
}

.note__sheen {
  position: absolute;
  inset: -20% auto -20% 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.07) 45%, rgba(255, 255, 255, 0.11) 50%, transparent 60%);
  pointer-events: none;
}

/* the face: always visible, 70 tall like the other notifications */
.note__face {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 70px;
  padding: 0 14px 0 14px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 26px;
  -webkit-tap-highlight-color: transparent;
}

.note__face:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.note__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 30%, var(--accent-deep)), var(--accent-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.note__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.icon__door { opacity: 0.55; }

.note__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.note__title {
  display: flex;
  align-items: center;
  gap: 0.28em;
  font-size: 15.5px;
  font-weight: 620;
  font-variation-settings: 'wdth' 100;
  letter-spacing: -0.012em;
  line-height: 1.2;
  white-space: nowrap;
}

.note__meta {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note__ring {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
}

.note__ring svg:first-child {
  width: 30px;
  height: 30px;
  transform: rotate(-90deg);
  fill: none;
  stroke-width: 2.2;
}

.ring__track { stroke: var(--faint); }

.ring__fill {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 100 100;
}

.ring__chev {
  position: absolute;
  inset: 9px;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* the rolling digits: a strip of 20 cells (0 to 9 twice) inside a window one cell tall */
.roll {
  display: inline-flex;
  font-variant-numeric: tabular-nums;
  height: 1.2em;
  line-height: 1.2em;
}

.roll__ch,
.roll__dg {
  display: inline-block;
  height: 1.2em;
}

.roll__dg {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 24%, #000 76%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 24%, #000 76%, transparent);
}

.roll__strip {
  display: flex;
  flex-direction: column;
}

.roll__strip > span {
  display: block;
  height: 1.2em;
  text-align: center;
}

.note__title .roll { color: var(--accent); }

/* ---- the part that opens ---- */
.note__more {
  position: relative;
  height: 0;
  overflow: hidden;
}

.more__in {
  padding: 0 16px 16px;
}

.route__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  font-size: 13px;
}

.route__time {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  font-weight: 600;
}

.route__traffic {
  color: var(--accent);
  font-size: 12px;
  font-variation-settings: 'wdth' 92;
}

.route {
  position: relative;
  height: 24px;
  margin: 10px 4px 6px;
}

.route__line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke-linecap: round;
}

.route__base {
  stroke: var(--faint);
  stroke-width: 2;
  stroke-dasharray: 2 5;
}

.route__draw {
  stroke: var(--ink);
  stroke-width: 2.2;
}

.route__slow {
  stroke: var(--accent);
  stroke-width: 2.4;
}

.route__pin {
  position: absolute;
  fill: var(--ink);
}

.route__pin--a {
  left: -6px;
  top: 10px;
  width: 12px;
  height: 12px;
  fill: var(--glass-bottom);
  stroke: var(--ink);
  stroke-width: 1.6;
}

.route__pin--b {
  right: -7px;
  top: -9px;
  width: 14px;
  height: 18px;
  transform-origin: 50% 100%;
}

.pin__hole { fill: var(--glass-bottom); }

.route__ends {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.route__ends .roll { color: var(--ink); }

.route__ends > span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
}

.note__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.act {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  font-variation-settings: 'wdth' 100;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: font-variation-settings 0.3s ease;
}

.act:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.act--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.act--main {
  color: var(--button-ink);
  background: linear-gradient(180deg, #ffffff, var(--button));
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 6px 16px -8px rgba(255, 255, 255, 0.35);
}

.act__fill {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  clip-path: circle(0% at 50% 50%);
}

.act__label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.act__label--b {
  position: absolute;
  inset: 0;
  justify-content: center;
  color: var(--accent);
  opacity: 0;
}

.act__label--b svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
}

.act__arrow {
  position: relative;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .note__face:hover .ring__chev { stroke: var(--ink); }
  .act--ghost:hover { background: rgba(255, 255, 255, 0.1); }
  .act:hover { font-variation-settings: 'wdth' 112; }
}

