:root {
  --paper: #f3efe7;
  --shade: #8f877b;
  --lamp: #fffaf0;
  --ink: #1a1813;
  --ink-soft: #6f695f;
  --accent: #c8452a;
  --cta: #1a1813;
  --cta-ink: #f7f3ec;
  --serif: "Fraunces Variable", "Fraunces", Georgia, serif;
  --sans: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
}

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

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  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 crumpled paper in CSS, a few soft facets under a raking light */
  background:
    linear-gradient(128deg, rgba(255, 250, 240, 0.55) 0 18%, transparent 18% 100%),
    linear-gradient(212deg, transparent 0 52%, rgba(143, 135, 123, 0.18) 52% 64%, transparent 64%),
    linear-gradient(161deg, transparent 0 30%, rgba(143, 135, 123, 0.14) 30% 41%, transparent 41%),
    linear-gradient(64deg, transparent 0 66%, rgba(255, 250, 240, 0.4) 66% 80%, transparent 80%),
    radial-gradient(ellipse 80% 70% at 30% 20%, #fbf8f2, var(--paper) 60%, #e6e0d5);
}

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

/* a still grain of cotton fibres over the paper, so the soft gradients do not band */
.grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.42  0 0 0 0 0.37  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.72);
  box-shadow: 0 0 0 1px rgba(26, 24, 19, 0.09), 0 6px 14px -10px rgba(26, 24, 19, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: clamp(11px, min(1.6vw, 2.6vh), 13px);
  letter-spacing: 0.01em;
}
.pill__tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8f2;
  font-weight: 600;
}
.pill__text { color: var(--ink-soft); }

.title {
  font-family: var(--serif);
  font-weight: 420;
  font-variation-settings: "opsz" 96, "SOFT" 30;
  font-size: clamp(30px, min(8.4vw, 11.5vh), 92px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.title em {
  font-style: italic;
  font-weight: 380;
  color: var(--accent);
}

.lede {
  max-width: 30em;
  font-size: clamp(13px, min(2vw, 3vh), 17px);
  line-height: 1.5;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.cta {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  background: var(--cta);
  color: var(--cta-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 12px 22px -14px rgba(26, 24, 19, 0.8), 0 2px 4px rgba(26, 24, 19, 0.18);
  -webkit-tap-highlight-color: transparent;
}
.cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cta__face {
  position: relative;
  display: grid;
  height: clamp(40px, 6.4vh, 48px);
  padding: 0 clamp(16px, 2.4vw, 22px);
  min-width: 12.5em;
  overflow: hidden;
  border-radius: 999px;
}
.cta__row {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: clamp(13px, min(1.9vw, 2.8vh), 15px);
  font-weight: 560;
  white-space: nowrap;
}
.cta__row--busy, .cta__row--done { opacity: 0; }
.cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cta__tick { stroke: #f2b49f; stroke-dasharray: 14; stroke-dashoffset: 14; }

.note {
  font-size: clamp(12px, min(1.7vw, 2.6vh), 14px);
  color: var(--ink-soft);
}

.ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 1.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(26, 24, 19, 0.3));
}
