:root {
  --satin: #1f1724;
  --deep: #0d0a10;
  --sheen: #f5ddb8;
  --fill: #7a72b0;
  --accent: #ff7d52;
  --ink: #f7f0e7;
  --ink-soft: #b9adb4;
  --cta: #f5e6cf;
  --cta-ink: #1a1219;
  --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(--deep);
  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: still pleats in CSS, light faces and dark faces under a warm pool */
  background:
    radial-gradient(ellipse 60% 55% at 38% 34%, rgba(245, 221, 184, 0.22), transparent 70%),
    repeating-linear-gradient(90deg, #2a1f30 0 14px, #120d15 14px 28px),
    var(--satin);
}

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

/* a soft dark veil behind the words, so the light on the pleats never fights the headline */
.scrim {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(900px, 120vw);
  height: min(520px, 80vh);
  transform: translate(-50%, -50%);
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(13, 10, 16, 0.62), rgba(13, 10, 16, 0.28) 62%, transparent);
}

/* a still grain over the satin, so the soft light does not band */
.grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.1;
  mix-blend-mode: overlay;
  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.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.hero {
  width: min(680px, 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 12px 4px 4px;
  border-radius: 999px;
  background: rgba(30, 22, 34, 0.55);
  box-shadow: 0 0 0 1px rgba(245, 221, 184, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px -12px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  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: #26110a;
  font-weight: 640;
}
.pill__text { color: var(--ink-soft); font-variation-settings: "wdth" 108; }

.title {
  font-weight: 330;
  font-variation-settings: "wdth" 112;
  font-size: clamp(30px, min(7.4vw, 10.6vh), 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-shadow: 0 2px 24px rgba(13, 10, 16, 0.55);
}
.title em {
  font-style: normal;
  font-weight: 640;
  font-variation-settings: "wdth" 125;
  color: var(--sheen);
}

.date {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: clamp(13px, min(2vw, 2.9vh), 16px);
  color: var(--ink-soft);
  font-variation-settings: "wdth" 104;
}
.date__icon { width: 16px; height: 16px; fill: none; stroke: var(--sheen); stroke-width: 1.3; stroke-linecap: round; opacity: 0.85; }
.date__sep { width: 1px; height: 14px; background: rgba(245, 221, 184, 0.3); }

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

.cta {
  --ang: 210deg;
  --hot: 0.7;
  position: relative;
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 1px;
  border-radius: 999px;
  background: transparent;
  color: var(--cta-ink);
  box-shadow: 0 14px 28px -16px rgba(245, 221, 184, 0.55), 0 3px 8px rgba(0, 0, 0, 0.4);
  -webkit-tap-highlight-color: transparent;
}
.cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* the 1 px rim takes the light from the side the spot is on */
.cta__rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(from var(--ang), rgba(255, 255, 255, var(--hot)), rgba(255, 240, 220, 0.12) 22%, rgba(120, 90, 70, 0.35) 50%, rgba(255, 240, 220, 0.12) 78%, rgba(255, 255, 255, var(--hot)));
}
.cta__face {
  position: relative;
  display: grid;
  height: clamp(40px, 6.4vh, 50px);
  padding: 0 clamp(18px, 2.4vw, 24px);
  min-width: 12.5em;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, #fbf0de, var(--cta) 55%, #e8d2b2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(120, 80, 50, 0.18);
}
.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: 600;
  font-variation-settings: "wdth" 104;
  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__spin circle { stroke-dasharray: 22 40; }
.cta__tick { stroke: #b4502e; 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: #120d15;
  stroke-width: 1.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

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