/* The agenda to appointment transition: the day of an invented calendar app on a soft light page with two coloured
   lights behind it. The app is a size container, so everything inside is measured on its height (cqh) and width
   (cqw) and the whole screen fits any box. The list lies at the bottom; over it the plate (the white surface that
   grows from the card) and the hero background (the coloured header that grows from the card's bar); on top the
   detail's words, which fly from the card's words (FLIP). */
:root {
  --page: #eceef3;          /* the page */
  --screen: #f6f6f9;        /* the app's day view */
  --card: #ffffff;          /* the cards and the appointment page */
  --ink: #15151c;           /* the words */
  --muted: #7b7d8c;         /* the small words */
  --line: rgba(21, 21, 28, 0.07); /* thin rules and edges */
  --accent: #5b5bf0;        /* the appointment's colour */
  --accent-2: #9a6bff;      /* the second colour of its header */
  --warm: #ffae8a;          /* the warm light */
  --mint: #3cc6a4;          /* the standup's bar */
  --button: #15151c;        /* the Join call button */
}

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

/* a fine grain over the whole page */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

/* two soft lights behind the screen */
.aura {
  position: absolute;
  width: min(70vw, 70vh, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(min(9vw, 9vh, 70px));
  pointer-events: none;
}

.aura--a {
  background: var(--accent-2);
  opacity: 0.32;
  translate: -38% -22%;
}

.aura--b {
  background: var(--warm);
  opacity: 0.38;
  translate: 40% 26%;
}

/* ------------------------------------------------------------------ the app */
.app {
  --h: min(88vh, 560px);
  position: relative;
  height: var(--h);
  width: min(92vw, 380px, calc(var(--h) * 0.7));
  border-radius: min(5.4vh, 30px);
  background: var(--screen);
  overflow: hidden;
  container-type: size;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(21, 21, 28, 0.06),
    0 2px 4px rgba(21, 21, 28, 0.04),
    0 18px 40px -14px rgba(40, 30, 90, 0.22),
    0 50px 90px -40px rgba(40, 30, 90, 0.35);
  opacity: 0;
  isolation: isolate;
}

.list {
  position: absolute;
  inset: 0;
  padding: 5.4cqh 6.4cqw 4cqh;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.list__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.list__day {
  margin: 0;
  font-size: 2.4cqh;
  font-weight: 520;
  color: var(--muted);
}

.list__date {
  margin: 0.3cqh 0 0;
  font-size: 4.5cqh;
  line-height: 1.05;
  font-weight: 660;
  font-variation-settings: 'wdth' 104;
  letter-spacing: -0.02em;
}

.list__count {
  font-size: 2.1cqh;
  color: var(--muted);
  padding: 0.7cqh 2.4cqw;
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line);
  white-space: nowrap;
}

.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1cqw;
  margin-top: 3cqh;
}

.week__d {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4cqh;
  padding: 0.9cqh 0;
  border-radius: 1.8cqh;
  font-size: 2.3cqh;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.week__d i {
  font-style: normal;
  font-size: 1.6cqh;
  font-weight: 500;
  color: var(--muted);
}

.week__d.is-on {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 14px -6px rgba(21, 21, 28, 0.5);
}

.week__d.is-on i {
  color: rgba(255, 255, 255, 0.6);
}

.events {
  display: flex;
  flex-direction: column;
  gap: 1.6cqh;
  margin-top: 3cqh;
}

/* ------------------------------------------------------------------ the cards */
.ev {
  position: relative;
  display: grid;
  text-align: left;
  border: 0;
  margin: 0;
  width: 100%;
  background: var(--card);
  border-radius: 2.8cqh;
  padding: 1.8cqh 3.6cqw 1.8cqh calc(3.6cqw + 9px);
  cursor: pointer;
  box-shadow:
    0 0 0 1px var(--line),
    0 1px 2px rgba(21, 21, 28, 0.04),
    0 8px 18px -12px rgba(40, 30, 90, 0.18);
  transition: box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ev:focus-visible,
.back:focus-visible,
.join:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.ev__bar {
  position: absolute;
  left: 2.2cqw;
  top: 1.6cqh;
  bottom: 1.6cqh;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.ev__bar--mint {
  background: var(--mint);
}

.ev__bar--peach {
  background: var(--warm);
}

.ev__bar--grey {
  background: #c9cad4;
}

.ev--small {
  grid-template-columns: auto 1fr;
  column-gap: 3cqw;
  align-items: baseline;
}

.ev--small .ev__time {
  grid-row: span 2;
}

.ev__time {
  font-size: 2.1cqh;
  font-weight: 560;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ev__title {
  font-size: 2.6cqh;
  font-weight: 620;
  white-space: nowrap;
}

.ev__sub {
  font-size: 2cqh;
  color: var(--muted);
  margin-top: 0.2cqh;
  white-space: nowrap;
}

.ev--main {
  padding-top: 2.2cqh;
  padding-bottom: 2.2cqh;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(91, 91, 240, 0.14),
    0 1px 2px rgba(21, 21, 28, 0.05),
    0 14px 28px -14px rgba(70, 60, 200, 0.35);
}

/* a soft light inside the card, from the colour of its bar */
.ev__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 90% at 0% 0%, rgba(154, 107, 255, 0.11), transparent 55%);
  pointer-events: none;
}

.ev__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ev__chip {
  font-size: 1.8cqh;
  font-weight: 600;
  color: var(--accent);
  background: rgba(91, 91, 240, 0.09);
  padding: 0.5cqh 2cqw;
  border-radius: 999px;
  white-space: nowrap;
}

.ev__title--main {
  font-size: 3.1cqh;
  font-weight: 660;
  font-variation-settings: 'wdth' 102;
  letter-spacing: -0.01em;
  margin-top: 0.9cqh;
  justify-self: start;
}

.ev__place,
.info__place {
  display: inline-flex;
  align-items: center;
  gap: 1.2cqw;
  font-size: 2cqh;
  color: var(--muted);
  white-space: nowrap;
  justify-self: start;
}

.ev__place {
  margin-top: 0.5cqh;
}

.ev__place svg,
.info__place svg {
  width: 2.2cqh;
  height: 2.2cqh;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.ev__avs {
  display: flex;
  margin-top: 1.4cqh;
}

.av {
  display: grid;
  place-items: center;
  width: 3.6cqh;
  height: 3.6cqh;
  border-radius: 50%;
  font-size: 1.35cqh;
  font-weight: 650;
  color: #fff;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px var(--card);
}

.ev__avs .av + .av {
  margin-left: 0.5cqh;
}

.av--a { background: linear-gradient(140deg, #8b7bff, #5b5bf0); }
.av--b { background: linear-gradient(140deg, #ffbe9a, #f07f5a); }
.av--c { background: linear-gradient(140deg, #6fd8bd, #2fa98a); }
.av--d { background: linear-gradient(140deg, #2b2b36, #4a4a5a); }

@media (hover: hover) {
  .ev--main:hover,
  .ev--main.is-hover {
    box-shadow:
      0 0 0 1px rgba(91, 91, 240, 0.24),
      0 1px 2px rgba(21, 21, 28, 0.05),
      0 20px 34px -14px rgba(70, 60, 200, 0.45);
  }
}

.ev--main.is-hover {
  box-shadow:
    0 0 0 1px rgba(91, 91, 240, 0.24),
    0 1px 2px rgba(21, 21, 28, 0.05),
    0 20px 34px -14px rgba(70, 60, 200, 0.45);
}

/* the line of the present moment */
.now {
  display: flex;
  align-items: center;
  gap: 2cqw;
  margin: -0.4cqh 0;
}

.now__t {
  font-size: 1.7cqh;
  font-weight: 650;
  color: #f0794e;
  font-variant-numeric: tabular-nums;
}

.now__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #f0794e, rgba(240, 121, 78, 0));
}

/* ------------------------------------------------------------------ the shared surfaces */
.plate,
.hero-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  visibility: hidden;
  pointer-events: none;
}

.plate {
  z-index: 2;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 24px 50px -20px rgba(40, 30, 90, 0.3);
}

.hero-bg {
  z-index: 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent) 0%, #7563f7 48%, var(--accent-2) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 16px 30px -16px rgba(70, 60, 200, 0.6);
}

.hero-bg__glow {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(45% 55% at 92% 100%, rgba(255, 174, 138, 0.75), transparent 70%),
    radial-gradient(40% 40% at 10% 0%, rgba(255, 255, 255, 0.28), transparent 70%);
}

.hero-bg__grain {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-bg__sheen {
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.32) 50%, transparent);
  transform: translateX(-160%) skewX(-14deg);
}

/* ------------------------------------------------------------------ the appointment's page */
.detail {
  position: absolute;
  inset: 0;
  z-index: 4;
  padding: 4.6cqh 5.4cqw 4.6cqh;
  display: flex;
  flex-direction: column;
  visibility: hidden;
}

.detail.is-open {
  visibility: visible;
}

.detail__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5.6cqh;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.6cqw;
  height: 100%;
  padding: 0 3cqw 0 1.4cqw;
  margin-left: -1.4cqw;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 2.3cqh;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.back svg,
.edit svg {
  width: 2.6cqh;
  height: 2.6cqh;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .back:hover {
    background: rgba(21, 21, 28, 0.05);
  }
}

.back.is-hover {
  background: rgba(21, 21, 28, 0.06);
}

.edit {
  display: grid;
  place-items: center;
  width: 5.6cqh;
  height: 5.6cqh;
  border-radius: 50%;
  color: var(--muted);
  box-shadow: 0 0 0 1px var(--line);
}

.hero {
  position: relative;
  margin-top: 1.8cqh;
  height: 30cqh;
  border-radius: 3.6cqh;
  padding: 2.6cqh 4.4cqw 2.6cqh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

.hero__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.hero__time {
  font-size: 2.3cqh;
  font-weight: 560;
  color: rgba(255, 255, 255, 0.86);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero__chip {
  font-size: 1.9cqh;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  padding: 0.55cqh 2.2cqw;
  border-radius: 999px;
  white-space: nowrap;
}

.hero__bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4cqh;
  margin-bottom: 1.8cqh;
}

.hero__kicker {
  font-size: 2cqh;
  font-weight: 520;
  color: rgba(255, 255, 255, 0.72);
}

.hero__title {
  font-size: 4.8cqh;
  line-height: 1.04;
  font-weight: 680;
  font-variation-settings: 'wdth' 102;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* how much of the wait is gone: a thin bar at the bottom of the header */
.hero__track {
  position: absolute;
  left: 4.4cqw;
  right: 4.4cqw;
  bottom: 2.2cqh;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.hero__fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: #fff;
  transform-origin: left center;
  transform: scaleX(0.44);
}

.info {
  margin-top: 2.6cqh;
  display: flex;
  flex-direction: column;
  gap: 2cqh;
}

.info__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.info__place {
  font-size: 2.3cqh;
  color: var(--ink);
  font-weight: 540;
}

.info__place svg {
  color: var(--accent);
}

.info__map {
  font-size: 2cqh;
  font-weight: 600;
  color: var(--accent);
}

.info__row--guests {
  justify-content: flex-start;
  gap: 3cqw;
}

.guests {
  display: flex;
  gap: 1.2cqw;
}

.guests .av {
  width: 4.8cqh;
  height: 4.8cqh;
  font-size: 1.8cqh;
}

.info__who {
  display: flex;
  flex-direction: column;
  font-size: 1.9cqh;
  color: var(--muted);
  line-height: 1.25;
}

.info__who b {
  font-weight: 620;
  color: var(--ink);
}

.agenda {
  list-style: none;
  margin: 0;
  padding: 1.6cqh 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.2cqh;
}

.agenda li {
  display: flex;
  align-items: center;
  gap: 2.4cqw;
  font-size: 2.2cqh;
  white-space: nowrap;
}

.agenda svg {
  width: 2.6cqh;
  height: 2.6cqh;
  flex: none;
  fill: none;
  stroke: rgba(21, 21, 28, 0.22);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agenda li.is-done {
  color: var(--muted);
}

.agenda li.is-done svg circle {
  fill: var(--accent);
  stroke: var(--accent);
}

.agenda li.agenda__label {
  justify-content: space-between;
  font-size: 1.8cqh;
  font-weight: 620;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.agenda__label span {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

/* the file shared for the meeting */
.file {
  display: flex;
  align-items: center;
  gap: 2.6cqw;
  padding: 1.2cqh 3cqw;
  border-radius: 2.2cqh;
  background: var(--screen);
  box-shadow: inset 0 0 0 1px var(--line);
}

.file__icon {
  display: grid;
  place-items: center;
  width: 4.4cqh;
  height: 4.4cqh;
  border-radius: 1.2cqh;
  background: #fff;
  color: #f0794e;
  box-shadow: 0 0 0 1px var(--line), 0 2px 6px -2px rgba(21, 21, 28, 0.12);
}

.file__icon svg {
  width: 2.4cqh;
  height: 2.4cqh;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linejoin: round;
}

.file__name {
  display: flex;
  flex-direction: column;
  font-size: 1.8cqh;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
}

.file__name b {
  font-size: 2.1cqh;
  font-weight: 600;
  color: var(--ink);
}

.agenda__tick {
  stroke: #fff;
  stroke-width: 1.6;
}

.join {
  position: relative;
  margin-top: auto;
  height: clamp(40px, 9cqh, 52px);
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2cqw;
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 12px 24px -12px rgba(21, 21, 28, 0.6);
}

.join svg {
  width: 2.8cqh;
  height: 2.8cqh;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.join__w {
  font-size: 2.4cqh;
  font-weight: 620;
  font-variation-settings: 'wdth' 100;
  transition: font-variation-settings 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.join__sheen {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.2) 50%, transparent);
  transform: translateX(-130%) skewX(-16deg);
  pointer-events: none;
}

@media (hover: hover) {
  .join:hover .join__w {
    font-variation-settings: 'wdth' 112;
  }
  .join:hover .join__sheen {
    transform: translateX(260%) skewX(-16deg);
    transition: transform 0.9s cubic-bezier(0.3, 0.7, 0.2, 1);
  }
}

.join.is-hover .join__w {
  font-variation-settings: 'wdth' 112;
}

.join.is-hover .join__sheen {
  transform: translateX(260%) skewX(-16deg);
  transition: transform 0.9s cubic-bezier(0.3, 0.7, 0.2, 1);
}

/* ------------------------------------------------------------------ the pointer of the walk on its own */
.cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  width: 22px;
  height: 22px;
  margin: -3px 0 0 -5px;
  pointer-events: none;
  opacity: 0;
  overflow: visible;
  filter: drop-shadow(0 3px 5px rgba(21, 21, 28, 0.3));
}

.cursor path {
  fill: var(--ink);
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

/* short boxes: the week strip leaves room for the cards */
@container (max-height: 330px) {
  .week,
  .ev--late,
  .file {
    display: none;
  }
}
