:root {
  --bg: #060607;
  --ink: #eef1f6;
  --muted: rgba(196, 202, 212, 0.62);
  --faint: rgba(196, 202, 212, 0.32);
  --glow: 200, 212, 232;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --lw: min(1000px, 104vw);              /* the logo canvas; the word itself is ~84% of it */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh; min-height: 100svh; overflow-x: hidden;
  font-family: var(--serif); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the wall ---------- */
.wall {
  position: fixed; inset: 0; z-index: 0;
  background: #08080a url(/img/bg.webp) center / cover no-repeat;
}
.wall::after {                            /* a cool light on the wall behind the logo, dark corners */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 46% 30% at 50% var(--spot, 34%), rgba(var(--glow), 0.13), rgba(var(--glow), 0) 70%),
    radial-gradient(ellipse 90% 80% at 50% 45%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.78) 100%);
}
.grain {
  position: fixed; inset: -60px; z-index: 3; pointer-events: none;
  background: url(/img/grain.png) repeat; opacity: 0.075;
  animation: grain 0.9s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-37px, 21px); } 40% { transform: translate(23px, -44px); }
  60% { transform: translate(-12px, 39px); } 80% { transform: translate(41px, 9px); } 100% { transform: translate(0, 0); }
}

/* ---------- layout ---------- */
.stage {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: max(28px, env(safe-area-inset-top)) 20px max(40px, env(safe-area-inset-bottom));
  text-align: center;
}

/* ---------- logo ---------- */
.logo { display: flex; justify-content: center; width: 100%; perspective: 1100px; }
.logo-tilt {
  flex: none; width: var(--lw); aspect-ratio: 2694 / 895; position: relative;
  transform-style: preserve-3d; will-change: transform;
  margin: calc(var(--lw) * -0.085) 0 calc(var(--lw) * -0.075);   /* the canvas has room for depth + shadow */
  opacity: 0; filter: blur(14px); transform: scale(0.96);
  transition: opacity 1.4s ease, filter 1.4s ease;
}
.logo-ready .logo-tilt { opacity: 1; filter: none; }
.logo-tilt canvas, .logo-tilt img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.logo-tilt img[hidden] { display: none; }

/* ---------- small spaced capitals with hairlines ---------- */
.kicker {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font: 600 12.5px/1 var(--serif); letter-spacing: 0.42em; text-indent: 0.42em; text-transform: uppercase;
  font-variant-numeric: lining-nums;
  color: var(--muted); margin-top: 6px;
  opacity: 0; animation: up 1s 0.7s ease forwards;
}
.kicker::before, .kicker::after { content: ""; width: 54px; height: 1px; }
.kicker::before { background: linear-gradient(90deg, transparent, var(--faint)); }
.kicker::after { background: linear-gradient(270deg, transparent, var(--faint)); }

/* ---------- the form ---------- */
#join { width: min(440px, 86vw); margin-top: 34px; opacity: 0; animation: up 1s 0.95s ease forwards; }
.field { position: relative; }
.field[hidden] { display: none; }
.field.enter { animation: swap-in 0.6s cubic-bezier(.2, .8, .2, 1) both; }
.hello {
  font: italic 400 17px/1.3 var(--serif); color: var(--muted); margin-bottom: 4px; min-height: 22px;
}
.field input {
  display: block; width: 100%; padding: 6px 52px 10px; border: 0; border-radius: 0; outline: 0;
  background: transparent; color: var(--ink); caret-color: rgb(var(--glow));
  font: italic 500 clamp(32px, 8.6vw, 44px)/1.2 var(--serif); text-align: center; letter-spacing: 0.01em;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder { color: var(--faint); opacity: 1; transition: color 0.3s ease; }
.field input:focus::placeholder { color: rgba(196, 202, 212, 0.2); }
.field input:-webkit-autofill, .field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink); transition: background-color 99999s 0s;   /* keep autofill transparent */
}
.line { position: relative; display: block; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--glow), 0.34), transparent); }
.line::after {
  content: ""; position: absolute; inset: -1px 8%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(244, 247, 252, 0.95), transparent);
  box-shadow: 0 0 14px rgba(var(--glow), 0.55);
  transform: scaleX(0); opacity: 0; transition: transform 0.7s cubic-bezier(.2, .8, .2, 1), opacity 0.5s ease;
}
.field:focus-within .line::after { transform: scaleX(1); opacity: 1; }

.next, .back {
  position: absolute; top: 50%; width: 42px; height: 42px; margin-top: -26px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
  border: 1px solid rgba(var(--glow), 0.34); background: rgba(10, 11, 14, 0.4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.next { right: 0; opacity: 0; transform: translateX(-8px); pointer-events: none; }
.next.on { opacity: 1; transform: none; pointer-events: auto; }
.back { left: 0; border-color: transparent; background: none; color: var(--muted); }
.next:hover, .next:focus-visible { border-color: rgba(var(--glow), 0.8); box-shadow: 0 0 18px rgba(var(--glow), 0.3); outline: 0; }
.back:hover, .back:focus-visible { color: var(--ink); outline: 0; }
.next svg, .back svg { width: 18px; height: 18px; }

/* the chrome button */
.chrome {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 56px; padding: 0 44px; border: 0; border-radius: 999px; cursor: pointer; overflow: hidden;
  font: 700 13.5px/1 var(--serif); letter-spacing: 0.34em; text-indent: 0.34em; text-transform: uppercase;
  color: #0b0c0f; text-decoration: none;
  background: linear-gradient(180deg, #fbfcfe 0%, #e3e7ee 34%, #a7afbb 50%, #7d8592 53%, #c3c9d2 70%, #f4f6fa 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 34px rgba(var(--glow), 0.22);
  transition: transform 0.25s ease, box-shadow 0.3s ease, filter 0.3s ease;
}
.chrome::after {                          /* a light that runs across the metal */
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -40%; width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  transform: skewX(-18deg); animation: sheen 4.2s 1.5s ease-in-out infinite;
}
@keyframes sheen { 0% { left: -40%; } 38%, 100% { left: 130%; } }
.chrome:hover, .chrome:focus-visible {
  transform: translateY(-1px); outline: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.6), 0 14px 36px rgba(0, 0, 0, 0.6), 0 0 48px rgba(var(--glow), 0.38);
}
.chrome:active { transform: translateY(1px); filter: brightness(0.94); }
.chrome[disabled] { cursor: default; filter: saturate(0.6) brightness(0.8); }
.submit { margin-top: 30px; visibility: hidden; opacity: 0; transform: translateY(12px); }
.submit.on {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity 0.5s ease, transform 0.45s cubic-bezier(.2, .8, .2, 1), box-shadow 0.3s ease, filter 0.3s ease;
}
.submit.on:hover, .submit.on:focus-visible { transform: translateY(-1px); }
.submit.on:active { transform: translateY(1px); }

.msg { min-height: 22px; margin-top: 16px; font: italic 400 17px/1.3 var(--serif); color: #e4b9b9; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes swap-in { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- welcome page ---------- */
.welcome { --lw: min(760px, 96vw); }
.welcome .lead {
  margin-top: 26px; font: italic 500 clamp(30px, 7.6vw, 42px)/1.15 var(--serif); color: var(--ink);
  opacity: 0; animation: up 1s 0.9s ease forwards;
}
.welcome .sub { margin-top: 10px; font: italic 400 18px/1.4 var(--serif); color: var(--muted); opacity: 0; animation: up 1s 1.05s ease forwards; }
.tg { margin-top: 34px; height: 62px; padding: 0 40px 0 34px; font-size: 14px; opacity: 0; animation: up 1s 1.25s ease forwards; }
.tg svg { width: 22px; height: 22px; flex: none; }

@media (max-width: 560px) {
  .kicker { font-size: 11px; gap: 12px; }
  .kicker::before, .kicker::after { width: 30px; }
  #join { margin-top: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .chrome::after { animation: none; }
  .logo-tilt { transition: none; }
}
