:root {
  --night: #07080a;
  --fibre: #4a525e;
  --lamp: #eef2ff;
  --accent: #8b9cff;
  --ink: #f5f4f2;
  --ink-soft: #b4b3b0;
  --ink-lede: #d2d1ce;
  --line: rgba(255, 255, 255, 0.12);
  --cta: #f3f1ee;
  --cta-ink: #121315;
  --font: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  /* what is left without WebGL: a still sheet of carbon twill in CSS, a diagonal step pattern under a soft sheen */
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(7, 8, 10, 0.55), transparent 70%),
    linear-gradient(115deg, transparent 20%, rgba(238, 242, 255, 0.07) 45%, transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0 7px, rgba(0, 0, 0, 0.25) 7px 14px),
    repeating-conic-gradient(#1c1f24 0 25%, #0e0f12 0 50%) 0 0 / 10px 10px,
    var(--night);
}

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

/* a still grain over the lacquer, so the soft gradients do not band */
.grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.hero {
  width: min(640px, 100% - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(10px, 2.4vh, 22px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(11, 12, 14, 0.6);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: clamp(11px, 1.6vh, 13px);
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  max-width: 100%;
}

.pill__text { overflow: hidden; text-overflow: ellipsis; }

.pill__tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0d24;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pill__arrow {
  flex: none;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.title {
  font-size: clamp(30px, min(9vw, 10vh), 78px);
  line-height: 0.98;
  font-weight: 600;
  font-stretch: 108%;
  letter-spacing: -0.045em;
  /* the letters are lit from above like the lacquer: a warm white that greys a little towards the bottom */
  background: linear-gradient(180deg, #ffffff 0%, #f1efec 55%, #c9c7c3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 18px rgba(11, 12, 14, 0.7)) drop-shadow(0 0 1px rgba(11, 12, 14, 0.6));
}

.lede {
  max-width: 35ch;
  font-size: clamp(13px, min(3.6vw, 2.2vh), 17px);
  line-height: 1.5;
  color: var(--ink-lede);
  text-shadow: 0 1px 14px rgba(11, 12, 14, 0.95), 0 0 2px rgba(11, 12, 14, 0.7);
}

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

/* the button: GSAP scales the button, the face inside carries the CSS look */
.cta {
  border: 0;
  padding: 0;
  background: none;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cta__face {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(38px, 6vh, 46px);
  padding: 0 clamp(16px, 2.2vh, 20px);
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  color: var(--cta-ink);
  font-size: clamp(13px, 1.9vh, 15px);
  font-weight: 600;
  /* a face of pale lacquer, lighter than the sheet: a top light, a soft band, a dark lip below */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #f6f4f1, #dcd9d4);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 1px 1px rgba(0, 0, 0, 0.4),
    0 8px 18px -6px rgba(0, 0, 0, 0.7),
    0 14px 34px -12px rgba(139, 156, 255, 0.45);
  transition: box-shadow 0.4s ease;
}

.cta.is-lit .cta__face {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 1px 1px rgba(0, 0, 0, 0.4),
    0 10px 22px -6px rgba(0, 0, 0, 0.7),
    0 16px 44px -10px rgba(139, 156, 255, 0.75);
}

.cta__row {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.cta__row--busy,
.cta__row--done { opacity: 0; }

.cta__arrow,
.cta__spin,
.cta__tick {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cta__spin circle { stroke-dasharray: 22 40; }
.cta__tick path { stroke: #4b5bd6; stroke-width: 2; stroke-dasharray: 14; stroke-dashoffset: 14; }

/* a narrow band of light that crosses the button when the lamp reaches it */
.cta__shine {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgba(139, 156, 255, 0.22) 47%, rgba(255, 255, 255, 0.95) 50%, rgba(139, 156, 255, 0.22) 53%, transparent 70%);
  transform: translateX(-110%);
}

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

.note {
  font-size: clamp(11px, 1.6vh, 13px);
  color: var(--ink-lede);
  text-shadow: 0 1px 10px rgba(11, 12, 14, 0.95);
}

.ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  pointer-events: none;
  opacity: 0;
  fill: #fff;
  stroke: #000;
  stroke-width: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
  z-index: 5;
}
