/* The meeting recording that turns into a summary on scroll. Colours in :root (the Playground palette): violet is the
   recording and the light that reads, amber marks the key phrases, everything else is a cool near black neutral.
   GSAP moves .frame, the CSS styles .card inside it; GSAP moves .wave and the panes, the CSS styles their children.
   The script writes --play (0 to 1, how much of the recording has played), --ang (the turn of the light on the edge)
   and --beam (how bright it is). */
:root {
  --page: #0b0b0f;          /* the page */
  --card: #141419;          /* the card */
  --ink: #f1f0f5;           /* the words */
  --muted: #8b8997;         /* the small words */
  --line: rgba(255, 255, 255, 0.07); /* the hairlines */
  --violet: #8f7cff;        /* the recording and the reading light */
  --amber: #ffc46b;         /* the key phrases */
  --button: #f1f0f5;        /* the button */
  --button-ink: #0b0b0f;    /* the words on the button */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--page); }
html, body { overflow-x: clip; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }

.meet { position: relative; height: 420vh; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2.4vh, 40px) 12px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(110% 80% at 50% 38%, #15141c, var(--page) 72%);
}
@supports (height: 100lvh) {
  .stage { height: 100lvh; }
}

/* two soft lights behind the card, violet high on the left and amber low on the right; they drift with the meeting */
.light {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(70vw, 70vh, 520px);
  height: min(70vw, 70vh, 520px);
  margin: calc(min(70vw, 70vh, 520px) / -2) 0 0 calc(min(70vw, 70vh, 520px) / -2);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(46px);
}
.light--a { background: radial-gradient(closest-side, color-mix(in srgb, var(--violet) 34%, transparent), color-mix(in srgb, var(--violet) 8%, transparent) 60%, transparent); }
.light--b { background: radial-gradient(closest-side, color-mix(in srgb, var(--amber) 22%, transparent), color-mix(in srgb, var(--amber) 5%, transparent) 60%, transparent); }
.grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- the card */
.frame { width: min(100%, 400px); }
.card {
  --ang: 0;
  --beam: 0;
  position: relative;
  border-radius: clamp(18px, 4.4vh, 24px);
  padding: clamp(11px, 3vh, 20px) clamp(12px, 3.6vw, 20px) clamp(11px, 2.8vh, 18px);
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(143, 124, 255, 0.09), transparent 60%),
    linear-gradient(180deg, #18181e, var(--card));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 10px 24px -10px rgba(0, 0, 0, 0.7),
    0 40px 80px -30px rgba(40, 24, 120, 0.45);
}
/* the light that runs along the edge while the AI works: a conic gradient seen only through a 1px ring */
.card__beam {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  pointer-events: none;
  opacity: var(--beam);
  background: conic-gradient(from calc(var(--ang) * 1deg), transparent 0deg 230deg, color-mix(in srgb, var(--violet) 60%, transparent) 290deg, #ffffff 338deg, var(--amber) 350deg, 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 exclude, linear-gradient(#000 0 0);
}
/* the light under the pointer */
.card__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, -30%), color-mix(in srgb, var(--violet) 9%, transparent), transparent 70%);
}
@media (hover: hover) {
  .card:hover .card__glow { opacity: 1; }
}

.head { position: relative; display: flex; align-items: center; gap: 10px; }
.head__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(26px, 7vh, 32px);
  height: clamp(26px, 7vh, 32px);
  border-radius: 9px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--violet) 80%, white), var(--violet) 60%, color-mix(in srgb, var(--violet) 70%, black));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 6px 14px -6px color-mix(in srgb, var(--violet) 80%, transparent);
}
.head__mark svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.head__text { flex: 1; min-width: 0; }
.head__title { font-size: clamp(13px, 3.4vh, 15px); font-weight: 620; font-variation-settings: 'wdth' 104; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head__text .muted { font-size: clamp(10.5px, 2.8vh, 12px); margin-top: 1px; white-space: nowrap; }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 560;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.chip__icon { width: 13px; height: 13px; fill: none; stroke: var(--violet); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.chip__icon [data-ic="spark"] path { fill: var(--amber); stroke: none; }
.chip__words { white-space: nowrap; }

/* ---------------------------------------------------------------- the screen: three panes on top of each other */
.screen {
  position: relative;
  height: clamp(176px, 54vh, 280px);
  margin-top: clamp(10px, 2.6vh, 18px);
}

/* the waveform: a base layer of bars and the played layer over it, cut at --play */
.wave {
  position: absolute;
  left: 0;
  right: 0;
  top: 2%;
  height: 40%;
  transform-origin: 50% 0%;
}
.wave__in { --play: 0; position: absolute; inset: 0; }
.bars { position: absolute; inset: 0; display: flex; align-items: center; gap: clamp(1.5px, 0.6vw, 3px); }
.bars i {
  flex: 1;
  height: 100%;
  border-radius: 3px;
  transform: scaleY(calc(var(--h) * var(--k, 1)));
}
.bars--base i { background: rgba(255, 255, 255, 0.13); }
.bars--played i { background: linear-gradient(180deg, color-mix(in srgb, var(--violet) 60%, white), var(--violet) 50%, color-mix(in srgb, var(--violet) 60%, white)); }
.bars--played { clip-path: inset(-10% calc((1 - var(--play)) * 100%) -10% 0); }
/* the playhead: a hairline with a small cap */
.head-line {
  position: absolute;
  top: -8%;
  bottom: -8%;
  left: calc(var(--play) * 100%);
  width: 1px;
  margin-left: -0.5px;
  background: linear-gradient(180deg, transparent, #ffffff 18%, #ffffff 82%, transparent);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--violet) 70%, transparent);
}
.head-line i {
  position: absolute;
  top: -3px;
  left: -3px;
  width: 7px;
  height: 3px;
  border-radius: 2px;
  background: #ffffff;
}

.rec {
  position: absolute;
  left: 0;
  right: 0;
  top: 52%;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.rec__time { display: flex; align-items: baseline; font-variant-numeric: tabular-nums; }
.rec__time b {
  font-size: clamp(28px, 9vh, 42px);
  font-weight: 560;
  font-variation-settings: 'wdth' 92;
  letter-spacing: -0.03em;
  line-height: 1;
}
.rec__time span { font-size: clamp(12px, 3vh, 14px); }

.people { list-style: none; display: flex; gap: clamp(10px, 3vw, 16px); padding-top: 6px; border-top: 1px solid var(--line); padding-top: clamp(8px, 2.2vh, 12px); }
.person { display: flex; align-items: center; gap: 6px; font-size: clamp(11px, 2.8vh, 12.5px); color: var(--muted); transition: color 0.35s ease; }
.person .av { transition: transform 0.5s cubic-bezier(0.34, 1.7, 0.64, 1), box-shadow 0.35s ease, opacity 0.35s ease; opacity: 0.55; }
.person.is-on { color: var(--ink); }
.person.is-on .av { opacity: 1; transform: translateY(-2px) scale(1.06); box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3px var(--violet), 0 6px 12px -4px color-mix(in srgb, var(--violet) 70%, transparent); }

.av {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(20px, 5.6vh, 24px);
  height: clamp(20px, 5.6vh, 24px);
  border-radius: 50%;
  font-style: normal;
  font-size: clamp(8px, 2.2vh, 9.5px);
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #0b0b0f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.av--1 { background: linear-gradient(160deg, #c7bdff, var(--violet)); }
.av--2 { background: linear-gradient(160deg, #ffe0ad, var(--amber)); }
.av--3 { background: linear-gradient(160deg, #e9e7f0, #a9a6b6); }
.av--4 { background: linear-gradient(160deg, #a99bff, #5b4bd6); color: #ffffff; }

/* the transcript */
.script {
  list-style: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 22%;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 9px;
  font-size: clamp(11px, 3vh, 13px);
  line-height: 1.35;
  color: rgba(241, 240, 245, 0.78);
}
.line small { font-size: clamp(9.5px, 2.4vh, 10.5px); color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.line .av { margin-top: -2px; }
.hl { position: relative; z-index: 0; color: var(--ink); white-space: nowrap; }
.hl i {
  position: absolute;
  z-index: -1;
  inset: -1px -3px;
  border-radius: 4px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--amber) 30%, transparent), color-mix(in srgb, var(--amber) 18%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 22%, transparent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
/* the light that reads the transcript, a soft violet band */
.reader {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 34%;
  margin-left: -17%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--violet) 16%, transparent) 45%, rgba(255, 255, 255, 0.1) 50%, color-mix(in srgb, var(--violet) 16%, transparent) 55%, transparent);
  mix-blend-mode: screen;
}

/* the summary */
.sum { position: absolute; inset: 0; display: flex; flex-direction: column; }
.sum__head { display: flex; align-items: center; gap: 7px; font-size: clamp(12px, 3.2vh, 14px); }
.sum__head svg { width: 14px; height: 14px; fill: var(--amber); }
.sum__head b { font-weight: 620; }
.sum__head .muted { margin-left: auto; font-size: clamp(10px, 2.6vh, 11.5px); }
.sum__text {
  margin-top: clamp(6px, 1.8vh, 10px);
  font-size: clamp(12px, 3.3vh, 14.5px);
  line-height: 1.42;
  font-weight: 460;
  letter-spacing: -0.003em;
}
.sum__text .w { display: inline-block; white-space: pre; }
.sum__label { margin-top: auto; font-size: clamp(10px, 2.6vh, 11.5px); font-weight: 560; letter-spacing: 0.01em; padding-bottom: clamp(4px, 1.2vh, 8px); }
.todo { list-style: none; display: flex; flex-direction: column; gap: clamp(4px, 1.2vh, 7px); }
.task {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 9px;
  height: clamp(28px, 7.6vh, 36px);
  padding: 0 9px 0 8px;
  border-radius: 10px;
  font-size: clamp(11.5px, 3vh, 13px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background-color 0.3s ease;
}
.task span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.3s ease; }
.task small { font-size: clamp(10px, 2.6vh, 11px); color: var(--muted); font-variant-numeric: tabular-nums; }
.task .av { width: 20px; height: 20px; font-size: 8px; }
@media (hover: hover) {
  .task:hover { background-color: rgba(255, 255, 255, 0.03); }
}
.box {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  box-shadow: inset 0 0 0 1.2px rgba(255, 255, 255, 0.24);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.45s cubic-bezier(0.34, 1.8, 0.64, 1);
}
.box svg { width: 12px; height: 12px; fill: none; stroke: #0b0b0f; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.box path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.35s cubic-bezier(0.65, 0, 0.35, 1) 0.06s; }
.box:active { transform: scale(0.86); }
.box:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.box[aria-pressed="true"] { background: var(--violet); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 4px 10px -4px var(--violet); }
.box[aria-pressed="true"] path { stroke-dashoffset: 0; }
.task.is-done span { color: var(--muted); }

/* ---------------------------------------------------------------- the foot */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(10px, 2.6vh, 18px);
  padding-top: clamp(9px, 2.4vh, 14px);
  border-top: 1px solid var(--line);
}
.foot__note { display: flex; flex-direction: column; min-width: 0; }
.foot__note b {
  display: inline-block;
  font-size: clamp(15px, 4.4vh, 19px);
  font-weight: 640;
  font-variation-settings: 'wdth' 96;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}
.foot__note span { display: inline-block; font-size: clamp(10px, 2.6vh, 11.5px); white-space: nowrap; }

.btn {
  position: relative;
  flex: none;
  height: clamp(36px, 10vh, 46px);
  padding: 0 clamp(14px, 4vw, 18px);
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--button);
  color: var(--button-ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 22px -10px rgba(143, 124, 255, 0.5);
}
.btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.btn__fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--violet) 80%, white), var(--violet));
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.btn__face { position: relative; display: flex; align-items: center; gap: 8px; height: 100%; transition: color 0.3s ease; }
.btn[aria-pressed="true"] .btn__face { color: #ffffff; }
.btn__words {
  font-size: clamp(12.5px, 3.3vh, 14px);
  font-weight: 600;
  font-variation-settings: 'wdth' 100;
  white-space: nowrap;
  transition: font-variation-settings 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (hover: hover) {
  .btn:hover .btn__words { font-variation-settings: 'wdth' 112; }
}
.btn__icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.btn__check { stroke-dasharray: 1; stroke-dashoffset: 1; stroke-width: 1.8; }

@media (max-width: 360px) {
  .foot__note span { display: none; }
  .line small { display: none; }
}
