:root {
  --midnight: #071b32;
  --warm: #e7c69b;
  --white: #ffffff;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --mx: 0;
  --my: 0;
}
* { box-sizing: border-box; }
/* Sizes below are tied to the screen height (vh) as well as its width, so the whole page,
   including the ticker, fits on a laptop at 100% zoom. If a screen is still too short,
   the page scrolls instead of cutting anything off. */
body {
  margin: 0; min-height: 100vh; min-height: 100svh; overflow-x: clip;
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr);
  font-family: var(--sans); color: var(--white); background: var(--midnight);
  -webkit-font-smoothing: antialiased;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--warm); outline-offset: 4px; }

/* The sky fills the screen behind everything */
.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; opacity: 0; transition: opacity 2.2s ease; }
.ready .sky { opacity: 1; }
.veil {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 62% 52% at 50% 52%, rgba(7, 27, 50, .5) 0%, rgba(7, 27, 50, .18) 62%, rgba(7, 27, 50, 0) 100%),
    linear-gradient(0deg, rgba(7, 27, 50, .45) 0%, rgba(7, 27, 50, 0) 22%);
  transition: background 3s ease;
}
[data-sky="night"] .veil { background: radial-gradient(ellipse 70% 55% at 50% 46%, rgba(7, 27, 50, .2) 0%, rgba(7, 27, 50, 0) 70%); }

/* Without WebGL: a slow gradient sky */
.no-webgl .sky { display: none; }
.no-webgl {
  background: linear-gradient(180deg, #18204a 0%, #355589 45%, #eeb27c 100%);
  background-size: 100% 200%;
  background-attachment: fixed;
  animation: fallback-sky 40s ease-in-out infinite alternate;
}
@keyframes fallback-sky { to { background-position: 0 100%; } }

/* ---------- Top bar ---------- */

.cs-top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: clamp(14px, 2.6vh, 28px) var(--gutter);
  opacity: 0; transform: translateY(-12px); transition: opacity 1.4s var(--ease) .3s, transform 1.4s var(--ease) .3s;
}
.ready .cs-top { opacity: 1; transform: none; }
.wordmark { margin: 0; font-family: var(--serif); font-size: clamp(1.2rem, min(2vw, 3vh), 1.6rem); letter-spacing: -.01em; }
.issue { margin: 0; font-size: .74rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; opacity: .85; }

/* ---------- Centre ---------- */

.cs-main {
  align-self: center; justify-self: center; text-align: center;
  width: min(980px, 100%); padding: clamp(4px, 1vh, 12px) var(--gutter);
  transform: translate3d(calc(var(--mx) * -10px), calc(var(--my) * 6px), 0);
  text-shadow: 0 2px 30px rgba(7, 27, 50, .35);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px; margin: 0 0 clamp(10px, 2vh, 22px);
  font-size: .76rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--warm);
  opacity: 0; transition: opacity 1.4s var(--ease) .5s;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 32px; height: 1px; background: currentColor; }
.ready .eyebrow { opacity: 1; }

.cs-title {
  margin: 0; font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem, min(8.5vw, 10vh), 7.6rem); line-height: .95; letter-spacing: -.04em;
  font-variation-settings: "opsz" 144;
}
.cs-title .row { display: block; }
.cs-title em { font-style: italic; color: #fff4e3; }
/* Each letter condenses out of a blur, like vapour becoming cloud */
.word { display: inline-block; white-space: nowrap; }
.ch { display: inline-block; }
.ch { opacity: 0; filter: blur(18px); transform: translateY(.25em) scale(1.08); transition: opacity 1.6s var(--ease), filter 1.8s var(--ease), transform 1.8s var(--ease); transition-delay: calc(.7s + var(--i) * 45ms); }
.ready .ch { opacity: 1; filter: blur(0); transform: none; }

.cs-lede {
  margin: clamp(12px, 2.2vh, 26px) auto 0; max-width: 48ch;
  font-size: clamp(.98rem, min(1.3vw, 2vh), 1.18rem); line-height: 1.5; color: rgba(255, 255, 255, .94);
  opacity: 0; transform: translateY(14px); transition: opacity 1.4s var(--ease) 2s, transform 1.4s var(--ease) 2s;
}
.ready .cs-lede { opacity: 1; transform: none; }
.cs-lede-2 { margin-top: clamp(6px, 1vh, 12px); max-width: 60ch; font-size: clamp(.9rem, min(1.05vw, 1.7vh), 1rem); color: rgba(255, 255, 255, .84); transition-delay: 2.2s; }
.cs-invite { flex-basis: 100%; margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1rem, min(1.6vw, 2.2vh), 1.25rem); }

.cs-form {
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 1.2vh, 10px);
  margin: clamp(14px, 2.6vh, 32px) auto 0; max-width: 560px;
  opacity: 0; transform: translateY(14px); transition: opacity 1.4s var(--ease) 2.3s, transform 1.4s var(--ease) 2.3s;
}
.ready .cs-form { opacity: 1; transform: none; }
.cs-form input {
  flex: 1 1 240px; min-width: 0; min-height: clamp(44px, 6vh, 54px); padding: 0 22px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); color: var(--white);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font: inherit; font-size: 1rem; outline: none; transition: border-color .3s, background-color .3s;
}
.cs-form input::placeholder { color: rgba(255, 255, 255, .72); }
.cs-form input:focus { border-color: var(--white); background: rgba(255, 255, 255, .2); }
.cs-form input[aria-invalid="true"] { border-color: #ffb3b3; }
.cs-form button {
  min-height: clamp(44px, 6vh, 54px); padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--white); color: var(--midnight);
  font: inherit; font-size: .82rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
  transition: background-color .3s, transform .3s var(--ease);
}
.cs-form button:hover { background: var(--warm); transform: translateY(-1px); }
.cs-form button:disabled { opacity: .6; cursor: progress; }
.cs-msg { flex-basis: 100%; margin: 2px 0 0; font-size: .94rem; text-shadow: 0 1px 12px rgba(7, 27, 50, .6); }
.cs-msg:empty { margin: 0; }
.cs-msg.ok { color: #fff4e3; }
.cs-msg.error { color: #ffd0d0; }
.cs-privacy { flex-basis: 100%; margin: 0; font-size: .78rem; color: rgba(255, 255, 255, .72); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Bottom: sky phases and a drifting ticker ---------- */

.cs-bottom { opacity: 0; transition: opacity 1.6s ease 2.6s; }
.ready .cs-bottom { opacity: 1; }
.phases { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 6px; padding: clamp(6px, 1vh, 10px) var(--gutter) clamp(6px, 1.4vh, 14px); }
.phases-label { margin-right: 8px; font-size: .7rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; opacity: .75; }
.phases button {
  min-height: clamp(36px, 4.6vh, 40px); padding: 0 14px; border: 1px solid transparent; border-radius: 999px; background: none; color: rgba(255, 255, 255, .8);
  font: inherit; font-size: .86rem; cursor: pointer; transition: color .3s, border-color .3s, background-color .3s;
}
.phases button:hover { color: var(--white); border-color: rgba(255, 255, 255, .35); }
.phases button[aria-pressed="true"] { color: var(--midnight); background: rgba(255, 255, 255, .9); }

.ticker { overflow: hidden; padding: clamp(8px, 1.4vh, 14px) 0; border-top: 1px solid rgba(255, 255, 255, .16); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ticker-track { display: flex; width: max-content; animation: drift 60s linear infinite; }
.ticker span { padding: 0 clamp(16px, 2.6vw, 34px); font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(1rem, min(1.6vw, 2.4vh), 1.45rem); line-height: 1.4; color: rgba(255, 255, 255, .72); white-space: nowrap; }
.ticker span::after { content: "·"; margin-left: clamp(16px, 2.6vw, 34px); font-style: normal; opacity: .5; }
@keyframes drift { to { transform: translateX(-50%); } }

/* ---------- Tablets ---------- */

@media (max-width: 900px) {
  .cs-title { font-size: clamp(2.4rem, min(10vw, 9vh), 5.6rem); }
}

/* ---------- Phones ---------- */

@media (max-width: 640px) {
  .issue { display: none; }
  .cs-title { font-size: clamp(2.3rem, 11.5vw, 3.6rem); }
  .cs-lede { font-size: 1rem; }
  .cs-lede-2 { font-size: .92rem; }
  .cs-form input { flex-basis: 100%; }
  .cs-form button { flex: 1 1 100%; }
  .phases-label { display: none; }
  .phases button { padding: 0 10px; font-size: .8rem; }
  .eyebrow::before, .eyebrow::after { width: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  .cs-main { transform: none; }
}
