/* ==========================================================================
   Veevia Lab · lab.veevia.com

   The coming-soon page for Wei Wei's applied AI lab, set in veevia.com's own system: one typeface
   (Google Sans Flex) in medium weights with tight tracking, cool greys from near-black to near-white,
   and Google blue only where something is pressed. Composition is the split stage: a paper sheet that
   scrolls beside the lab's live stage, then the test and its verdict, then a split close.

   Breakpoints: phones to 699px, tablets to 1099px, computers from 1100px.
   ========================================================================== */

:root {
  --font: "Google Sans Flex", "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* veevia.com greys, ink to white; Google blue for the action; Gemini blue only in the stage's particles */
  --ink: #121317;
  --graphite: #212226;
  --soft: #45474d;
  --stone: #5f6368;
  --ash: #c6cad1;
  --line: #e1e6ec;
  --panel: #eff2f7;
  --paper: #f8f9fc;
  --white: #fff;
  --blue: #0b57d0;
  --blue-strong: #0842a0;
  --focus-dark: #8ab4f8;

  /* Five steps, far apart: display, title, lede, body, small (plus the label step for data) */
  --t-display: clamp(2.75rem, 1.3rem + 4.6vw, 5.25rem);
  --t-title: clamp(2rem, 1.6rem + 1.2vw, 2.625rem);
  --t-lede: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
  --t-body: 1.0625rem;
  --t-small: .9375rem;
  --t-label: .875rem;

  --radius: 24px;
  --radius-sm: 16px;
  --pill: 9999px;
  --gap: 12px;
  --pad: clamp(28px, 5vw, 72px);
  --bar: 56px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --stagger-line: 90ms;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,
h2,
p,
dl,
dd,
ul,
figure {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
}
img,
svg,
video,
canvas {
  display: block;
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
::selection {
  background: var(--ink);
  color: var(--white);
}
.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--white);
  font-size: var(--t-small);
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus {
  transform: none;
}

/* --------------------------------------------------------------------------
   The split stage: the sheet scrolls, the stage holds
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--gap);
  padding: var(--gap);
}
.sheet {
  min-height: calc(100svh - 2 * var(--gap));
  padding: 0 var(--pad) clamp(96px, 10vw, 144px);
  border-radius: var(--radius);
  background: var(--paper);
}

/* The top row of the sheet: a link either side of Wei's mark, as on a menu card. */
.top__nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  height: 104px;
}
.top__link {
  justify-self: start;
  padding: 10px 0;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: .25em;
  text-decoration-thickness: 1px;
}
.top__link:last-child {
  justify-self: end;
}
.top__mark {
  display: block;
  border-radius: var(--radius-sm);
}

/* Wei's mark from veevia.com: a square and a triangle in ink, his portrait in the circle between them. */
.mark {
  position: relative;
  display: block;
  width: 200px;
  height: 70px;
  color: var(--ink);
}
.mark svg {
  position: absolute;
  fill: currentColor;
}
.mark__square,
.mark__triangle {
  top: 18px;
}
.mark__square {
  left: 12px;
}
.mark__circle {
  top: 15px;
  left: 80px;
}
.mark__triangle {
  left: 152px;
}

/* The first screen of the sheet: the title at about a third of the way down, the lower quarter left as rest. */
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100svh - 2 * var(--gap) - 104px);
  padding-top: clamp(40px, 20svh, 220px);
  text-align: center;
}
.intro__title {
  font-size: var(--t-display);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
}
.lines .line {
  display: block;
  overflow: hidden;
  padding-bottom: .1em;
  margin-bottom: -.1em;
}
.lines [data-line] {
  display: block;
}
.intro__lede {
  max-width: 32ch;
  margin-top: 28px;
  font-size: var(--t-lede);
  line-height: 1.45;
  text-wrap: pretty;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 36px;
  padding: 0 28px;
  border-radius: var(--pill);
  background: var(--blue);
  color: var(--white);
  font-size: var(--t-body);
  font-weight: 500;
  text-decoration: none;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button:active {
  transform: scale(.97);
}

/* How the lab runs: one reading column of run-in paragraphs, each followed by its evidence. */
.runs {
  max-width: 600px;
  padding-top: 24px;
}
.runs__title {
  margin-bottom: 48px;
  font-size: var(--t-title);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.runs__step {
  max-width: 60ch;
  margin-top: 72px;
  color: var(--soft);
  line-height: 1.6;
  text-wrap: pretty;
}
.runs__title + .runs__step {
  margin-top: 0;
}
.runs__step strong {
  color: var(--ink);
  font-weight: 500;
}

/* The evidence: cropped pieces of the lab's own interface (data-ui), on white, one tone up from the sheet. */
.panel {
  margin-top: 20px;
  padding: 20px 24px 24px;
  border-radius: var(--radius-sm);
  background: var(--white);
}
.panel__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--stone);
  font-size: var(--t-label);
  line-height: 1.4;
}
.panel__title {
  color: var(--ink);
  font-weight: 500;
}
.chart__figure {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-bottom: 22px;
}
.chart__value {
  font-size: var(--t-title);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.chart__label {
  color: var(--soft);
  font-size: var(--t-small);
}
.chart__body {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 12px;
}
.chart__days {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 76px;
  color: var(--stone);
  font-size: var(--t-label);
  line-height: 29px;
}
.chart__plot {
  width: 100%;
  height: 76px;
}
.chart__track {
  fill: var(--panel);
}
.chart__awake {
  fill: var(--blue);
}
.chart__ticks {
  display: flex;
  grid-column: 2;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--stone);
  font-size: var(--t-label);
  font-variant-numeric: tabular-nums;
}
.readout__rows {
  display: grid;
  gap: 4px;
}
.readout__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: var(--t-small);
}
.readout__row:nth-child(odd) {
  background: var(--paper);
}
.readout__row dt {
  color: var(--soft);
}
.readout__row dd {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.code {
  background: var(--ink);
  color: var(--paper);
}
.code .panel__head {
  color: var(--ash);
}
.code .panel__title {
  color: var(--paper);
}
/* Literal code: the status response as the server sends it. */
[data-ui] pre.code__body {
  margin: 0;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; /* taste-skill-ignore: literal JSON in pre/code */
  font-size: var(--t-label);
  line-height: 1.65;
}

/* The stage: the lab itself, held beside the sheet. Particles gather into the mark's primitives
   when the server answers; the bar carries its live state and its address. */
.stage {
  position: sticky;
  top: var(--gap);
  height: calc(100svh - 2 * var(--gap));
  overflow: clip;
  border-radius: var(--radius);
  background: var(--ink);
}
.stage__canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - var(--bar));
  cursor: pointer;
}
.stage__still {
  position: absolute;
  top: calc(50% - var(--bar) / 2);
  left: 50%;
  width: min(64%, 420px);
  fill: var(--graphite);
  transform: translate(-50%, -50%);
}
.js .stage__still {
  display: none;
}
.stage__bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--bar);
  padding: 0 24px;
  background: var(--paper);
  font-size: var(--t-small);
}
.stage__status {
  font-weight: 500;
}
.stage__place {
  flex-shrink: 0;
  color: var(--stone);
}

/* --------------------------------------------------------------------------
   The test, the verdict: what the lab is handed, and what it says back
   -------------------------------------------------------------------------- */
.io {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  min-height: 84svh;
  margin: 0 var(--gap);
  overflow: clip;
  border-radius: var(--radius);
}
.io__field {
  grid-row: 1 / 3;
  padding: clamp(56px, 7vw, 104px) var(--pad) calc(var(--t-display) + 80px);
}
.io__field--in {
  grid-column: 1;
  background: var(--ink);
  color: var(--paper);
}
.io__field--out {
  grid-column: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--paper);
}
.io__lede {
  max-width: 40ch;
  color: var(--ash);
  font-size: var(--t-body);
}
.io__picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.io__pick {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--pill);
  background: var(--graphite);
  color: var(--paper);
  font: inherit;
  font-size: var(--t-small);
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.io__pick[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
}
.io__pick:active {
  transform: scale(.96);
}
.io__question {
  max-width: 34ch;
  margin-top: 40px;
  font-size: var(--t-lede);
  font-weight: 500;
  line-height: 1.4;
}
.io__label {
  display: block;
  margin-top: 28px;
  color: var(--ash);
  font-size: var(--t-small);
}
.io__input {
  display: block;
  width: 100%;
  max-width: 34ch;
  min-height: 9.5em;
  margin-top: 10px;
  padding: 16px 20px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--graphite);
  color: var(--paper);
  font: inherit;
  font-size: var(--t-lede);
  line-height: 1.5;
  resize: vertical;
}
.io__input:focus-visible,
.io__pick:focus-visible {
  outline-color: var(--focus-dark);
}
.io__title {
  display: grid;
  grid-column: 1 / 3;
  grid-row: 2;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  padding-bottom: 32px;
  font-size: var(--t-display);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
  pointer-events: none;
}
.io__title > span {
  padding: 0 var(--pad);
}
.io__title-in {
  background: var(--ink);
  color: var(--paper);
}
.io__title-out {
  background: var(--paper);
  color: var(--ink);
  text-align: right;
}

/* The verdict side: a true-size piece of the lab's thread, in veevia.com's chat bubbles. */
.thread {
  width: min(100%, 520px);
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
}
.thread__sent {
  width: fit-content;
  max-width: 88%;
  margin-left: auto;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--white);
  font-size: var(--t-small);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.thread__reply {
  max-width: 94%;
  margin-top: 16px;
  transition: opacity var(--t-ui) ease;
}
.thread__text {
  padding: 14px 18px;
  border-radius: var(--radius-sm) var(--radius-sm) var(--radius-sm) 4px;
  background: var(--panel);
  line-height: 1.5;
}
.thread__meta {
  margin-top: 10px;
  padding-left: 2px;
  color: var(--stone);
  font-size: var(--t-label);
}
.thread__reply.is-stale .thread__text {
  color: var(--stone);
}
.thread__reply.is-busy .thread__text {
  color: var(--stone);
}
.thread__run {
  display: flex;
  gap: 8px;
  margin-top: 28px;
}
[data-ui] .thread__key {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--pill);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-small);
}
[data-ui] .thread__key::placeholder {
  color: var(--stone);
}
[data-ui] .thread__key:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 0;
}
[data-ui] .thread__go {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
[data-ui] .thread__go:active {
  transform: scale(.94);
}
[data-ui] .thread__go[disabled] {
  background: var(--stone);
  cursor: progress;
}
.thread__note {
  margin-top: 12px;
  color: var(--stone);
  font-size: var(--t-label);
}

/* --------------------------------------------------------------------------
   The close: the first runs on film, beside the way out
   -------------------------------------------------------------------------- */
.close {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  min-height: calc(100svh - 2 * var(--gap));
  margin: var(--gap);
}
.close__film {
  position: relative;
  min-height: 560px;
  overflow: clip;
  border-radius: var(--radius);
  background: var(--paper);
}
.close__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - var(--bar));
  object-fit: cover;
  object-position: 50% 30%;
}
.close__caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--bar);
  padding: 0 24px;
  background: var(--paper);
  font-size: var(--t-small);
}
.close__caption span:last-child {
  color: var(--stone);
}
.close__menu {
  display: flex;
  flex-direction: column;
  padding: var(--pad);
  border-radius: var(--radius);
  background: var(--paper);
}
.close__brand {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mark--small {
  width: 140px;
  height: 49px;
}
.mark--small svg {
  transform: scale(.7);
  transform-origin: 0 0;
}
.mark--small .mark__square {
  top: 12px;
  left: 8px;
}
.mark--small .mark__circle {
  top: 10px;
  left: 56px;
}
.mark--small .mark__triangle {
  top: 12px;
  left: 106px;
}
.close__name {
  font-weight: 500;
}
.close__title {
  margin-top: clamp(56px, 8vw, 96px);
  font-size: var(--t-title);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.close__links {
  margin-top: 24px;
}
.close__links li + li {
  margin-top: 6px;
}
.close__links a {
  display: inline-block;
  padding: 4px 0;
  color: var(--soft);
  font-size: var(--t-title);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.025em;
  text-decoration: none;
  transition: transform var(--t-ui) var(--ease-out), color var(--t-hover) ease;
}
.close__about {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: auto;
  padding-top: 64px;
}
.close__portrait {
  width: 144px;
  height: 144px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}
.close__about p {
  max-width: 40ch;
  font-size: var(--t-small);
  line-height: 1.5;
}
.close__legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  color: var(--stone);
  font-size: var(--t-small);
}

/* --------------------------------------------------------------------------
   Hover, only where a pointer can hover
   -------------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  .top__link:hover,
  .close__about a:hover {
    text-decoration-line: underline;
  }
  .button:hover {
    background: var(--blue-strong);
  }
  .io__pick:not([aria-pressed="true"]):hover {
    background: #2f3034;
  }
  [data-ui] .thread__go:hover {
    background: var(--graphite);
  }
  .close__links:hover a {
    color: var(--stone);
  }
  .close__links a:hover {
    color: var(--ink);
    transform: translateX(12px);
  }
}

/* --------------------------------------------------------------------------
   Tablet and phone: the stage comes first, and the sheet slides up over it
   -------------------------------------------------------------------------- */
@media (max-width: 1099px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .stage {
    order: -1;
    height: 44svh;
    min-height: 300px;
  }
  .sheet {
    position: relative;
    z-index: 1;
    min-height: 0;
  }
  .intro {
    min-height: 0;
    padding-top: 8px;
    padding-bottom: clamp(72px, 12vw, 120px);
  }
  .runs {
    max-width: 640px;
    margin: 0 auto;
  }
  .io {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    min-height: 0;
  }
  .io__field {
    grid-column: 1;
    padding: 56px var(--pad);
  }
  .io__field--in {
    grid-row: 1;
    padding-bottom: 24px;
  }
  .io__field--out {
    grid-row: 3;
    padding-top: 24px;
  }
  .io__title {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: 1fr;
    padding-bottom: 0;
  }
  .io__title > span {
    display: block;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .io__title-in {
    background: var(--ink);
  }
  .io__title-out {
    background: var(--paper);
    text-align: left;
  }
  .io__input {
    max-width: none;
  }
  .close {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .close__film {
    min-height: 0;
  }
  .close__video {
    position: static;
    width: calc(100% - 2 * var(--pad));
    height: auto;
    margin: 0 auto;
    aspect-ratio: 1080 / 1260;
  }
  .close__caption {
    position: static;
  }
}

@media (max-width: 699px) {
  :root {
    --gap: 10px;
    --pad: 20px;
  }
  .top__nav {
    height: 84px;
    column-gap: 8px;
  }
  .top__link {
    font-size: var(--t-small);
  }
  .top .mark {
    width: 132px;
    height: 48px;
  }
  .top .mark svg {
    transform: scale(.66);
    transform-origin: 0 0;
  }
  .top .mark__square {
    top: 12px;
    left: 8px;
  }
  .top .mark__circle {
    top: 10px;
    left: 53px;
  }
  .top .mark__triangle {
    top: 12px;
    left: 100px;
  }
  .stage {
    height: 34svh;
    min-height: 240px;
  }
  .stage__bar {
    padding: 0 18px;
  }
  .stage__place {
    display: none;
  }
  .intro__lede {
    margin-top: 20px;
  }
  .button {
    width: 100%;
    margin-top: 28px;
  }
  .runs__title {
    margin-bottom: 32px;
  }
  .runs__step {
    margin-top: 56px;
  }
  .panel {
    padding: 18px 16px 20px;
  }
  [data-ui] pre.code__body {
    font-size: .8125rem;
  }
  .panel.code {
    padding-right: 12px;
    padding-left: 12px;
  }
  .chart__body {
    grid-template-columns: 48px 1fr;
    column-gap: 8px;
  }
  .thread {
    padding: 16px;
  }
  .close__about {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .close__portrait {
    width: 120px;
    height: 120px;
  }
}

/* --------------------------------------------------------------------------
   Motion: arrival on load, an entrance for the parts of every section. Hidden starting states
   apply only under html.js and only when motion is welcome; the reduced page is the finished page.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .intro [data-line] {
    transform: translateY(105%);
    animation: load-line 820ms var(--ease-expo) forwards;
    animation-delay: calc(100ms + var(--i) * var(--stagger-line));
  }
  .js .intro [data-load] {
    opacity: 0;
    transform: translateY(14px);
    animation: load-rise 520ms var(--ease-out) forwards;
    animation-delay: var(--d);
  }
  .js .stage__bar {
    transform: translateY(100%);
    animation: load-line 700ms var(--ease-expo) 260ms forwards;
  }
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo);
    transition-delay: var(--stagger, 0ms);
  }
  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
  .js .io__title > [data-reveal] {
    transform: translateY(40%);
  }
  .js .io__title > [data-reveal].is-in {
    transform: none;
  }
  .thread__reply.is-fresh .thread__text {
    animation: reply-in 520ms var(--ease-out);
  }
  .thread__reply.is-busy .thread__text {
    animation: busy 1.4s ease-in-out infinite;
  }
}
@keyframes load-line {
  to {
    transform: none;
  }
}
@keyframes load-rise {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes reply-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes busy {
  50% {
    opacity: .45;
  }
}
