/* The funhouse mirror: one gilded mirror in the middle of a night at the fair */
:root {
  --night: #120e29;
  --night-glow: #2c1d55;
  --gold: #e3b14a;
  --gold-light: #fbe5a6;
  --gold-deep: #8f5f17;
  --cream: #fff2d8;
  --red: #d23a43;
  --red-deep: #7a1d2c;
  --teal: #2c9e93;
  --sky-top: #191343;
  --sky-low: #c2487a;
  --bulb: #ffd877;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--night);
  color: var(--cream);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background:
    radial-gradient(60% 50% at 50% 46%, var(--night-glow), transparent 72%),
    var(--night);
  overflow: hidden;
}

/* the floor under the mirror */
.stage::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 140vw;
  height: 22vh;
  transform: translateX(-50%);
  background: radial-gradient(50% 45% at 50% 55%, rgba(255, 216, 119, 0.07), transparent 100%);
  pointer-events: none;
}

.sign {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(15px, 2.2vh, 19px);
  font-weight: 760;
  font-stretch: 118%;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  white-space: nowrap;
}

.sign__char {
  display: inline-block;
  will-change: transform;
}

.mirror {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  perspective: 900px;
  outline: none;
}

/* everything inside belongs to the button: the pointer only ever meets the button */
.mirror * {
  pointer-events: none;
}

.mirror__drop,
.mirror__tilt {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
}

.glass {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #2a2350;
}

.glass__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* a silvery band of light across the glass, moved a little by the pointer */
.glass__sheen {
  position: absolute;
  inset: -30%;
  display: block;
  background: linear-gradient(118deg, transparent 38%, rgba(255, 255, 255, 0.16) 46%, rgba(255, 255, 255, 0.05) 52%, transparent 60%);
  mix-blend-mode: screen;
}

.glass__shade {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 0 38px rgba(10, 6, 30, 0.55);
  background: linear-gradient(180deg, rgba(210, 225, 255, 0.07), transparent 40%, rgba(10, 6, 30, 0.18));
}

.frame {
  position: absolute;
  overflow: visible;
  display: block;
}

.frame__plaque-text {
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  font-weight: 760;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mirror:focus-visible .frame__ring {
  stroke: var(--cream);
  stroke-width: 3;
}

.hint {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(13px, 1.8vh, 15px);
  font-weight: 520;
  letter-spacing: 0.02em;
  color: rgba(255, 242, 216, 0.68);
  text-align: center;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
