/* The filament bulb button: a graphite pill on black, a bulb drawn with hairlines, one amber for the light. The words
   are Archivo, whose width and weight move under the pointer and when the light comes on. */
:root {
  --page: #000000;          /* the page */
  --pill: #121212;          /* the pill at rest */
  --pill-on: #1b140d;       /* the pill with the light on */
  --edge: #2b2b2b;          /* the pill outline */
  --ink: #ecebe8;           /* the words */
  --muted: #6f6d69;         /* the small line under the pill and the cold glass */
  --cold: #57554f;          /* the filament when cold */
  --amber: #ffb35c;         /* the light */
  --focus: #ecebe8;         /* the ring of the keyboard's focus */
}

* {
  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: 'Archivo Variable', 'Archivo', 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 {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.lamp {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
}

/* the warm light that spills round the pill, behind it */
.lamp__halo {
  position: absolute;
  left: 50%;
  top: 32px;
  width: 300px;
  height: 130px;
  margin: -65px 0 0 -150px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 170, 80, 0.26), rgba(255, 150, 60, 0.08) 60%, transparent);
  filter: blur(10px);
  opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------- the pill */
.lamp__btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 30px 0 20px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--pill);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
}

.lamp__btn:focus {
  outline: none;
}

[data-using='keys'] .lamp__btn:focus-visible {
  outline: 1.5px solid var(--focus);
  outline-offset: 4px;
}

/* a hairline of light along the top edge of the pill, like a lacquer */
.lamp__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 38%);
  pointer-events: none;
  z-index: 1;
}

/* the glow inside the pill, centred on the bulb */
.lamp__glow {
  position: absolute;
  left: 37px;
  top: 50%;
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 214, 150, 0.72), rgba(255, 170, 80, 0.3) 18%, rgba(255, 145, 55, 0.1) 44%, rgba(255, 140, 50, 0.03) 66%, transparent);
  opacity: 0;
  transform: scale(0.2);
  pointer-events: none;
  z-index: 0;
}

.lamp__bulb {
  position: relative;
  z-index: 2;
  flex: none;
  width: 29px;
  height: 41px;
  margin: -2px 0 0;
  overflow: visible;
}

.lamp__bulb path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.lamp__glass {
  stroke: var(--muted);
  stroke-width: 1;
}

.lamp__fill {
  stroke: none;
  fill: var(--amber);
  opacity: 0;
}

.lamp__wire {
  stroke: var(--muted);
  stroke-width: 0.8;
}

.lamp__coil {
  stroke: var(--cold);
  stroke-width: 0.7;
}

.lamp__base {
  stroke: var(--muted);
  stroke-width: 1;
}

.lamp__spec {
  stroke: #ffffff;
  stroke-width: 1;
  opacity: 0.18;
}

/* the words: one element for GSAP, its child for the text */
.lamp__words {
  position: relative;
  z-index: 2;
  display: block;
  white-space: nowrap;
}

.lamp__word {
  display: inline-block;
  font-size: 19px;
  letter-spacing: 0.01em;
  font-variation-settings: 'wdth' 100, 'wght' 500;
  font-weight: 500;
}

.lamp__note {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-variation-settings: 'wdth' 100, 'wght' 450;
}
