/* bellboard.ai: one centered column on pure black. A light-brass bell, lit by
   a light that follows the pointer, rings over the headline and rings hard
   when someone joins. */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --gold: #c9a66b;
  --gold-soft: #e6d2a4;
  --champagne: #e0c48f;
  --shine: #efe2c2;
  --ink: #17120b;
  --fg: #ffffff;
  --fg-dim: #808080;
  --fg-mid: #b3b3b3;
  --bg: #000000;
  --warn: #f0a58a;

  --metal: linear-gradient(100deg, var(--gold) 0%, var(--champagne) 28%, var(--shine) 50%, var(--champagne) 72%, var(--gold) 100%);
  --metal-brush: repeating-linear-gradient(90deg, rgb(255 255 255 / 0.035) 0 1px, transparent 1px 3px);
  --metal-sheen: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.38) 50%, transparent 65%);
  --metal-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), inset 0 -1px 0 rgb(0 0 0 / 0.2), 0 8px 24px -10px rgb(201 166 107 / 0.55);
  --glass-fill: linear-gradient(160deg, rgb(255 255 255 / 0.1) 0%, rgb(255 255 255 / 0.03) 42%, rgb(255 255 255 / 0.05) 100%);
  --glass-border: rgb(255 255 255 / 0.12);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --pill-x: 1.75rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.page {
  min-height: 100%;
  display: flex; flex-direction: column;
  text-align: center;
  background: var(--bg);
}
.wrap {
  width: 100%; max-width: 1120px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main { flex: 1; display: grid; place-items: center; padding-block: 48px 24px; }
.stack { display: flex; flex-direction: column; align-items: center; gap: 26px; }

/* Pointer light. app.js writes --mx/--my (px) on #fx, --near/--dx/--dy/--lean on
   #bell and --gx/--gy on each .lit box; with no pointer the light drifts on its own.
   Defaults keep a still, centered glow when the script never runs. */
.page { position: relative; isolation: isolate; }
.page > main, .page > .foot { position: relative; z-index: 1; }
.fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; --mx: 50vw; --my: 22vh; }
.fx-light {
  position: absolute; inset: 0;
  background: radial-gradient(34rem circle at var(--mx) var(--my), rgb(224 196 143 / 0.13), rgb(201 166 107 / 0.04) 40%, transparent 68%);
}
.fx-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgb(239 226 194 / 0.22) 1px, transparent 1.4px);
  background-size: 26px 26px; background-position: 50% 0;
  -webkit-mask-image: radial-gradient(19rem circle at var(--mx) var(--my), #000, transparent 72%), radial-gradient(44rem 28rem at 50% 20%, rgb(0 0 0 / 0.28), transparent 72%);
  mask-image: radial-gradient(19rem circle at var(--mx) var(--my), #000, transparent 72%), radial-gradient(44rem 28rem at 50% 20%, rgb(0 0 0 / 0.28), transparent 72%);
}

/* The bell */
.bell { --near: .35; --dx: 0px; --dy: 0px; --lean: 0deg; position: relative; width: 236px; height: 236px; display: grid; place-items: center; }
.bell .halo {
  position: absolute; inset: 8px; border-radius: 50%;
  translate: var(--dx) var(--dy);
  background: radial-gradient(closest-side, rgb(239 226 194 / 0.3), rgb(224 196 143 / 0.16) 42%, rgb(201 166 107 / 0.05) 68%, transparent);
  opacity: calc(0.35 + var(--near) * 0.65);
  filter: blur(6px);
}
.bell .ring {
  position: absolute; inset: 70px; border-radius: 50%;
  border: 1px solid var(--gold-soft); opacity: 0;
  animation: ring 4.4s var(--ease-out) infinite;
}
.bell .ring:nth-of-type(3) { animation-delay: 1.45s; }
.bell .ring:nth-of-type(4) { animation-delay: 2.9s; }
@keyframes ring { 0% { transform: scale(.72); opacity: .5; } 100% { transform: scale(2.1); opacity: 0; } }
.bell .tilt { position: relative; display: block; translate: calc(var(--dx) * 0.3) calc(var(--dy) * 0.3); rotate: var(--lean); }
/* Light inside the bell, seen through the crack: it sits under the bell, never over it. */
.bell .tilt::before {
  content: ""; position: absolute; left: 38%; top: 36%; width: 24%; height: 40%; border-radius: 50%;
  background: radial-gradient(closest-side, #fff4d6 0 58%, rgb(239 226 194 / 0.5) 80%, transparent);
  opacity: calc(0.45 + var(--near) * 0.55);
}
.bell svg {
  position: relative; display: block; width: 112px; height: 112px; transform-origin: 39% 12%;
  filter: drop-shadow(0 0 1.5px rgb(0 0 0 / 0.7)) drop-shadow(0 12px 26px rgb(201 166 107 / 0.34));
}
.bell .shine { mix-blend-mode: soft-light; opacity: calc(0.1 + var(--near) * 0.4); }
.bell.rung svg { animation: swing 1s var(--ease-out); }
.bell.rung .ring { animation: burst 1.1s var(--ease-out) 3; }
.bell.rung .halo, .bell.rung .tilt::before { animation: flare 1.4s var(--ease-out); }
@keyframes swing { 0% { transform: rotate(0); } 14% { transform: rotate(17deg); } 34% { transform: rotate(-13deg); } 54% { transform: rotate(8deg); } 74% { transform: rotate(-4deg); } 100% { transform: rotate(0); } }
@keyframes burst { 0% { transform: scale(.72); opacity: .95; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes flare { 0% { opacity: 1; scale: 1.25; } 100% { scale: 1; } }
.bell-sm { width: 150px; height: 150px; }
.bell-sm .ring { inset: 44px; }
.bell-sm svg { width: 72px; height: 72px; }

/* A box edged with light where the pointer is near. */
.lit { position: relative; --gx: -999px; --gy: -999px; }
.lit::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: radial-gradient(13rem circle at var(--gx) var(--gy), rgb(255 244 214 / 1), rgb(224 196 143 / 0.45) 40%, transparent 72%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.metal-text {
  background: var(--metal);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.wordmark { font: 700 13px var(--font-sans); letter-spacing: .34em; text-transform: uppercase; margin-right: -.34em; }
h1 {
  margin: 0; max-width: 15ch;
  font: 800 clamp(2.5rem, 7.4vw, 4.75rem)/1.02 var(--font-sans);
  letter-spacing: -0.035em; text-wrap: balance;
}
h1 .metal-text { display: inline-block; padding-bottom: .06em; }
/* This face sets a wide gap before a heavy period; pull it in. */
h1 .stop { margin-left: -0.09em; }
.lede { margin: 0; max-width: 36ch; color: var(--fg-mid); font-size: 18px; text-wrap: balance; }

/* Form */
.form-zone { width: 100%; display: flex; flex-direction: column; align-items: center; margin-top: 6px; }
.join {
  display: flex; gap: 6px; width: 100%; max-width: 460px;
  padding: 6px; border-radius: 999px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.join:focus-within { border-color: rgb(230 210 164 / 0.55); box-shadow: 0 0 0 4px rgb(230 210 164 / 0.10); }
.join input[type="email"] {
  flex: 1; min-width: 0; height: 48px;
  padding: 0 0 0 1.25rem;
  background: transparent; border: 0; outline: none;
  color: var(--fg); font: 500 16px var(--font-sans);
}
.join input::placeholder { color: var(--fg-dim); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--pill-x); border-radius: 999px;
  font: 700 1rem/1 var(--font-sans); letter-spacing: 0.005em; white-space: nowrap;
  cursor: pointer;
  transition: transform 150ms var(--ease-out), opacity 150ms var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.btn[disabled] { cursor: progress; opacity: .7; }
.btn-primary {
  background-color: var(--gold);
  background-image: var(--metal-brush), var(--metal);
  box-shadow: var(--metal-shadow);
  border: 0; color: var(--ink);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: var(--metal-sheen) 200% 0 / 250% 100% no-repeat;
  mix-blend-mode: soft-light;
  transition: background-position 700ms var(--ease-out);
}
.btn-primary:hover::after { background-position: -50% 0; }
.ts:not(:empty) { margin-top: 14px; }
.err { min-height: 1.5em; margin-top: 10px; font-size: 14px; color: var(--warn); }
.done-msg {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 62px; max-width: 100%; padding: 8px var(--pill-x) 8px 8px; border-radius: 999px;
  background: var(--glass-fill); border: 1px solid var(--glass-border);
  font-weight: 600; text-align: left;
}
.done-msg .tick {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: var(--ink);
  background-image: var(--metal-brush), var(--metal); box-shadow: var(--metal-shadow);
}

/* Footer */
.foot { padding-block: 28px; }
.foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.foot span, .foot a { color: var(--fg-dim); font: 600 0.8125rem var(--font-sans); letter-spacing: 0.02em; }
.foot a { min-height: 44px; display: inline-flex; align-items: center; }
.foot a:hover { color: var(--fg); }

/* Text pages (privacy, 404) */
.doc { text-align: left; }
.doc main { display: block; padding-block: 56px 24px; }
.doc .wrap { max-width: 720px; }
.doc .back { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg-dim); font-weight: 600; font-size: 14px; }
.doc .back:hover { color: var(--fg); }
.doc h1 { max-width: none; font-size: clamp(2.25rem, 6vw, 3.25rem); margin-top: 12px; }
.doc .meta { margin: 14px 0 0; color: var(--fg-dim); font-size: 14px; }
.doc h2 { margin: 40px 0 8px; font-size: 1.125rem; font-weight: 700; color: var(--gold-soft); letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--fg-mid); }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 1.25rem; }
.doc strong { color: var(--fg); font-weight: 600; }
.doc a.inline { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; }
.doc .form-zone { align-items: flex-start; margin-top: 16px; }
.doc .err { text-align: left; }
.center { text-align: center; }
.center main { display: grid; }

@media (max-width: 480px) {
  .bell { width: 200px; height: 200px; }
  .bell .ring { inset: 60px; }
  .bell svg { width: 96px; height: 96px; }
  .join { flex-direction: column; border-radius: 28px; gap: 6px; }
  .join input[type="email"] { flex: none; padding: 0 1rem; text-align: center; }
  .btn { width: 100%; }
  .done-msg { border-radius: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bell .ring { opacity: .28; }
  .bell .ring:nth-of-type(3) { transform: scale(1.45); opacity: .16; }
  .bell .ring:nth-of-type(4) { transform: scale(1.9); opacity: .08; }
}
