/* The background of three lights that merge into white: the hero of an AI app on a near black page. The WebGL canvas
   fills the stage and draws the three lights, the grid that catches them and the grain; the words sit on top.
   Without WebGL three CSS pools with mix-blend-mode: screen take its place, moved by the same springs. */
:root {
  --page: #07070a;          /* the page */
  --ink: #f3f3f6;           /* the heading and the button */
  --muted: #9a9aa6;         /* the small words */
  --lede: #b9b9c4;          /* the line under the heading */
  --line: rgba(255, 255, 255, 0.09); /* thin edges */
  --light-a: #ff4f6a;       /* the first light (Reason): coral */
  --light-b: #3dffa2;       /* the second light (Vision): mint */
  --light-c: #4a6bff;       /* the third light (Code): blue */
  --button-ink: #07070a;    /* the words on the button */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  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%);
  white-space: nowrap;
}

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 320px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
  background: var(--page);
}

.light {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* the lights without WebGL */
.pools {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
}

.no-gl .pools {
  display: block;
}

.pool {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  mix-blend-mode: screen;
}

.pool::before {
  content: '';
  position: absolute;
  left: -36vmin;
  top: -36vmin;
  width: 72vmin;
  height: 72vmin;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c) 0%, color-mix(in srgb, var(--c) 40%, transparent) 45%, transparent 100%);
}

.pool--a { --c: var(--light-a); }
.pool--b { --c: var(--light-b); }
.pool--c { --c: var(--light-c); }

/* the three small names that ride with the lights while they are apart */
.tags {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.tag {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 10.5px;
  font-weight: 560;
  font-variation-settings: 'wdth' 112;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
}

.tag--a { color: color-mix(in srgb, var(--light-a) 55%, #fff); }
.tag--b { color: color-mix(in srgb, var(--light-b) 50%, #fff); }
.tag--c { color: color-mix(in srgb, var(--light-c) 45%, #fff); }

.bar,
.hero,
.hint {
  position: relative;
  z-index: 2;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(12px, 3vh, 22px) clamp(16px, 4vw, 40px) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 620;
  font-variation-settings: 'wdth' 104;
  letter-spacing: -0.005em;
}

.brand__mark {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  opacity: 0.92;
}

.bar__link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color 0.3s, box-shadow 0.3s, background-color 0.3s;
}

@media (hover: hover) {
  .bar__link:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  }
}

.hero {
  align-self: center;
  justify-self: center;
  width: min(100%, 720px);
  padding: 0 clamp(16px, 5vw, 40px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  background: rgba(14, 14, 20, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: color 0.3s;
}

.chip__new {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 620;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: linear-gradient(100deg, color-mix(in srgb, var(--light-a) 38%, #15151c), color-mix(in srgb, var(--light-b) 30%, #15151c) 50%, color-mix(in srgb, var(--light-c) 42%, #15151c));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.chip__arrow {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .chip:hover {
    color: var(--ink);
  }
  .chip:hover .chip__arrow {
    transform: translateX(2px);
  }
}

.title {
  margin: clamp(12px, 3vh, 22px) 0 0;
  font-size: clamp(28px, min(8.6vw, 9.2vh), 76px);
  line-height: 1.02;
  font-weight: 560;
  font-variation-settings: 'wdth' 100;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.title__line {
  display: inline-block;
}

.lede {
  margin: clamp(10px, 2.4vh, 18px) 0 0;
  max-width: 44ch;
  font-size: clamp(13px, min(3.6vw, 2.2vh), 16.5px);
  line-height: 1.5;
  color: var(--lede);
  text-shadow: 0 1px 14px rgba(7, 7, 10, 0.55);
}

.actions {
  margin-top: clamp(14px, 3.6vh, 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  height: clamp(38px, 6vh, 44px);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--button-ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* the rim takes the three colours when the lights split over the button (--split from 0 to 1) */
.btn__rim {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(from var(--spin, 0deg), var(--light-a), var(--light-b), var(--light-c), var(--light-a));
  opacity: var(--split, 0);
  filter: blur(0.4px);
}

.btn__face {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 clamp(16px, 4vw, 20px);
  border-radius: inherit;
  background: linear-gradient(180deg, #ffffff, #e9e9ee);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 30px -10px rgba(255, 255, 255, var(--halo, 0.18));
}

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

.btn__words {
  font-size: 14px;
  font-weight: 620;
  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: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.btn__check {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.ghost {
  height: clamp(38px, 6vh, 44px);
  display: inline-flex;
  align-items: center;
  padding: 0 clamp(14px, 4vw, 18px);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 540;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s, box-shadow 0.3s;
}

@media (hover: hover) {
  .ghost:hover {
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

.hint {
  margin: 0;
  padding: 0 16px clamp(10px, 3vh, 22px);
  text-align: center;
  font-size: 11.5px;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  letter-spacing: 0.01em;
}

@media (max-height: 460px) {
  .hint {
    display: none;
  }
}

[data-in],
.title__line {
  opacity: 0;
}
