/* The meeting card with the transcript that folds into a summary: the card of a meeting assistant on a black page,
   dark glass with a grain, a 1px edge and a liquid light that runs along it. At the top the meeting, three avatars and
   the voice wave; in the middle the live transcript; at the bottom the word count and Summarize. GSAP moves the outer
   elements (.line, .line__fold, .shell), CSS styles their children. */
:root {
  --page: #000000;          /* the page */
  --glass: #13110f;         /* the card */
  --glass-top: #1d1a17;     /* the light at the top of the card */
  --ink: #f2eee7;           /* the words */
  --muted: #8e877d;         /* the small words */
  --faint: #5b554e;         /* times and hairlines */
  --accent: #ffb54a;        /* the one accent: the wave, the band of light, the edge, the checks */
  --button: #f4efe6;        /* the Summarize button */
  --button-ink: #15120e;    /* 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;
}

p,
h1,
ol,
ul {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

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

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: min(10px, 2vh) min(12px, 3vw);
  overflow: hidden;
}

/* ------------------------------------------------------------------ the card */
.shell {
  position: relative;
  width: min(430px, 94vw);
  height: min(540px, 95vh);
  opacity: 0;
}

/* a warm glow under the card, lit by the same light that runs on the edge */
.glow {
  position: absolute;
  inset: 8% 6% -2%;
  border-radius: 40px;
  background: radial-gradient(60% 55% at 50% 60%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%);
  filter: blur(34px);
  opacity: calc(0.22 + var(--beam, 0) * 0.4);
  pointer-events: none;
}

.card {
  --pad: clamp(14px, 3.6vh, 22px);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: clamp(18px, 4.4vh, 26px);
  background:
    radial-gradient(120% 60% at 50% -12%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    linear-gradient(180deg, var(--glass-top), var(--glass) 46%);
  isolation: isolate;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    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.8),
    0 40px 80px -30px rgba(0, 0, 0, 0.9),
    0 30px 90px -50px color-mix(in srgb, var(--accent) 40%, transparent);
}

/* the liquid light on the 1px edge: two arcs of light at their own speeds, masked to the border */
.card__edge {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  padding: 1px;
  background:
    conic-gradient(from var(--a1, 0deg), transparent 0 62%, color-mix(in srgb, var(--accent) 70%, transparent) 74%, #fff6e6 78%, color-mix(in srgb, var(--accent) 70%, transparent) 82%, transparent 94%),
    conic-gradient(from var(--a2, 180deg), transparent 0 80%, color-mix(in srgb, var(--accent) 45%, transparent) 88%, transparent 96%);
  -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);
  opacity: calc(0.45 + var(--beam, 0) * 0.55);
  pointer-events: none;
}

.card__grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  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='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.07;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* a soft reflection across the top of the glass */
.card__sheen {
  position: absolute;
  inset: 0 0 auto;
  height: 40%;
  z-index: 2;
  background: linear-gradient(172deg, rgba(255, 255, 255, 0.05), transparent 46%);
  pointer-events: none;
}

/* ------------------------------------------------------------------ the head */
.head {
  position: relative;
  z-index: 1;
  padding: var(--pad) var(--pad) 0;
}

.head__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(11px, 2.7vh, 12.5px);
  font-weight: 560;
  font-stretch: 108%;
  letter-spacing: 0.01em;
}

.mark {
  display: grid;
  place-items: center;
  width: clamp(18px, 4.4vh, 22px);
  aspect-ratio: 1;
  border-radius: 7px;
  color: var(--button-ink);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 60%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 70%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px -2px color-mix(in srgb, var(--accent) 60%, transparent);
}

.mark svg {
  width: 70%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.head__state {
  margin-left: auto;
  display: inline-block;
  overflow: hidden;
  height: 1.5em;
  line-height: 1.5em;
  padding: 0 9px;
  border-radius: 99px;
  color: var(--muted);
  font-weight: 500;
  font-stretch: 100%;
  font-size: 0.92em;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.head__state-in {
  display: block;
}

.head__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(10px, 2.8vh, 18px);
}

.head__title {
  font-size: clamp(16px, 4.6vh, 21px);
  font-weight: 620;
  font-stretch: 104%;
  letter-spacing: -0.012em;
  line-height: 1.1;
  white-space: nowrap;
}

.head__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: clamp(11px, 2.7vh, 12.5px);
  white-space: nowrap;
}

.people {
  display: flex;
  flex: none;
  padding-bottom: 2px;
}

.ava {
  display: block;
  margin-left: -4px;
  border-radius: 50%;
}

.ava__in,
.line__ava,
.todo__ava {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.02em;
  background: radial-gradient(120% 120% at 30% 18%, color-mix(in srgb, var(--tone) 70%, #fff 18%), var(--tone) 60%, color-mix(in srgb, var(--tone) 70%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.ava__in {
  width: clamp(26px, 6.6vh, 32px);
  aspect-ratio: 1;
  font-size: clamp(9px, 2.2vh, 10.5px);
  /* the ring against the card, and the accent ring of whoever speaks */
  box-shadow:
    0 0 0 2px var(--glass-top),
    0 0 0 calc(2px + var(--talk, 0) * 1.5px) color-mix(in srgb, var(--accent) calc(var(--talk, 0) * 100%), var(--glass-top)),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.wave {
  position: relative;
  height: clamp(22px, 6vh, 34px);
  margin-top: clamp(8px, 2.4vh, 14px);
  border-radius: 10px;
}

.wave__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ------------------------------------------------------------------ the body */
.body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  margin: clamp(8px, 2.2vh, 14px) var(--pad) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  perspective: 600px;
}

.tx {
  padding-top: clamp(8px, 2vh, 12px);
}

.line {
  overflow: hidden;
}

.line__fold {
  position: relative;
  transform-origin: 50% 0;
}

/* the shadow inside a fold: darker as the line turns away */
.line__fold::after {
  content: '';
  position: absolute;
  inset: -2px -4px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), #000);
  opacity: var(--shade, 0);
  pointer-events: none;
}

/* the crease: a warm hairline that catches the band of light */
.line__fold::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 80%, #fff), transparent);
  opacity: var(--crease, 0);
  pointer-events: none;
}

.line__in {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: clamp(5px, 1.3vh, 8px) 0;
}

.line__ava {
  width: clamp(20px, 5vh, 24px);
  aspect-ratio: 1;
  font-size: clamp(7.5px, 1.9vh, 8.5px);
  margin-top: 1px;
}

.line__text {
  font-size: clamp(12px, 3vh, 13.5px);
  line-height: 1.38;
  color: color-mix(in srgb, var(--ink) 88%, transparent);
  text-wrap: pretty;
}

.line__who {
  display: block;
  margin-bottom: 1px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.86em;
  font-stretch: 106%;
}

.line__who time {
  margin-left: 5px;
  color: var(--faint);
  font-weight: 500;
}

.line.is-speaking .line__text {
  color: var(--ink);
}

/* the band of light that reads the transcript */
.band {
  position: absolute;
  left: -10%;
  right: -10%;
  top: 0;
  height: 70px;
  margin-top: -35px;
  background:
    linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 16%, transparent) 38%, color-mix(in srgb, var(--accent) 50%, #fff 20%) 50%, color-mix(in srgb, var(--accent) 16%, transparent) 62%, transparent);
  mix-blend-mode: plus-lighter;
  opacity: 0;
  pointer-events: none;
}

.band::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #fff8ec 30%, #fff8ec 70%, transparent);
  opacity: 0.8;
}

/* ------------------------------------------------------------------ the summary */
.sum {
  position: absolute;
  inset: 0;
  padding-top: clamp(10px, 2.4vh, 14px);
  visibility: hidden;
}

.sum__label {
  color: var(--muted);
  font-size: clamp(10px, 2.4vh, 11px);
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.points {
  position: relative;
  display: grid;
  gap: clamp(4px, 1.2vh, 7px);
  margin: clamp(6px, 1.6vh, 10px) 0 clamp(12px, 3vh, 18px);
  padding-left: 14px;
}

.points__rule {
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 2px;
  height: calc(100% - 6px);
  overflow: visible;
}

.points__rule path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.point {
  font-size: clamp(12.5px, 3.2vh, 14.5px);
  font-weight: 520;
  line-height: 1.3;
  letter-spacing: -0.003em;
  white-space: nowrap;
}

.ch {
  display: inline-block;
  white-space: pre;
}

.todos {
  display: grid;
  gap: clamp(4px, 1.1vh, 6px);
  margin-top: clamp(6px, 1.6vh, 10px);
}

.todo {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: clamp(5px, 1.3vh, 8px) 8px clamp(5px, 1.3vh, 8px) 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.todo__ava {
  width: clamp(20px, 5vh, 24px);
  aspect-ratio: 1;
  font-size: clamp(7.5px, 1.9vh, 8.5px);
}

.todo__text {
  position: relative;
  min-width: 0;
  font-size: clamp(12px, 3vh, 13.5px);
  font-weight: 520;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.4s;
}

.todo__strike {
  position: absolute;
  left: 0;
  top: 54%;
  height: 1px;
  width: var(--strike-w, 0px);
  background: currentColor;
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.todo.is-done .todo__text {
  color: var(--muted);
}

.todo__due {
  color: var(--muted);
  font-size: clamp(10.5px, 2.6vh, 11.5px);
  font-weight: 500;
}

.check {
  display: grid;
  place-items: center;
  width: clamp(20px, 5vh, 22px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--button-ink);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background-color 0.25s, box-shadow 0.25s;
}

.check svg {
  width: 78%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.todo.is-done .check {
  background: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, #fff), 0 2px 10px -2px color-mix(in srgb, var(--accent) 70%, transparent);
}

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

/* ------------------------------------------------------------------ the foot */
.foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(10px, 2.6vh, 16px) var(--pad) var(--pad);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.18));
}

.foot__count {
  color: var(--muted);
  font-size: clamp(11px, 2.7vh, 12.5px);
  white-space: nowrap;
}

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

.go {
  position: relative;
  display: inline-flex;
  height: clamp(34px, 8.6vh, 40px);
  padding: 0 clamp(14px, 3.6vh, 18px);
  border: 0;
  border-radius: 99px;
  color: var(--button-ink);
  background: linear-gradient(180deg, #fffaf2, var(--button));
  font: inherit;
  font-size: clamp(12px, 3vh, 13.5px);
  font-weight: 600;
  font-stretch: var(--stretch, 104%);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 8px 20px -8px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: box-shadow 0.3s;
}

/* the light that runs over the button while it summarizes, and sits still on hover */
.go__light {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--accent) 55%, #fff) 50%, transparent 70%);
  background-size: 250% 100%;
  background-position: var(--sweep, 120%) 0;
  opacity: var(--lit, 0);
}

.go__face {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.go__icons {
  display: grid;
  width: 15px;
  height: 15px;
}

.go__icon {
  grid-area: 1 / 1;
  width: 15px;
  height: 15px;
  overflow: visible;
}

.go__icon--lines {
  opacity: 0;
}

.go__icon--lines path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.go__spark {
  fill: currentColor;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.go__spark--small {
  opacity: 0.7;
}

.go__words {
  display: inline-block;
  white-space: nowrap;
}

.go.is-hover {
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 10px 28px -6px color-mix(in srgb, var(--accent) 80%, transparent);
}

@media (hover: hover) {
  .go:hover {
    box-shadow:
      inset 0 1px 0 #fff,
      inset 0 -1px 0 rgba(0, 0, 0, 0.12),
      0 1px 2px rgba(0, 0, 0, 0.5),
      0 10px 28px -6px color-mix(in srgb, var(--accent) 80%, transparent);
  }

  .check:hover {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent);
  }
}

.go:disabled {
  cursor: default;
}

/* on very narrow cards the meta line stays one line */
@media (max-width: 360px) {
  .head__title {
    font-size: 15.5px;
  }

  .todo {
    gap: 8px;
  }
}
