/* Self-hosted, so the page looks the same on every device and loads nothing from a
   third party. Montserrat carries everything functional, as in the brand guidelines;
   Newsreader (always 400) stands in for the display face until Bastion Serif is
   licensed. Licences in fonts/OFL.txt. */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/newsreader-latin-opsz-normal.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/newsreader-latin-wght-italic.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/montserrat-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  /* Official palette (TABLESSE_branding.pdf, "Brand logo colors"): the logo gold is a
     gradient from --gold-light to --gold-deep. The navy is not a swatch there; it is
     sampled from the kit's navy logo files (top and bottom of the same fade).
     --gold-deep is ~4.8:1 on this navy, so it is for rules and accents, not text. */
  --navy-top: #0c1e34;
  --navy-bottom: #08192d;
  --gold-light: #e5d3b2;
  --gold-deep: #a3805f;
  --gold-gradient: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --danger: #efc3bd;
  /* The brand's display face is Bastion Serif; until its web license is in hand the
     display role is Newsreader. Swapping is one @font-face plus this variable. */
  --display: Newsreader, Georgia, 'Times New Roman', serif;
  --sans: Montserrat, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(30, 58, 92, 0.2) 0, rgba(12, 30, 52, 0) 45%),
    linear-gradient(180deg, var(--navy-top) 0%, var(--navy-bottom) 100%);
  color: var(--white);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}
button {
  color: inherit;
}
a {
  color: inherit;
}

.page {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  padding: clamp(24px, 4vw, 56px);
  isolation: isolate;
}

.footer {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

main {
  width: min(980px, 100%);
  margin: auto;
  text-align: center;
  padding: clamp(44px, 7vh, 82px) 0 clamp(36px, 5vh, 58px);
}

.eyebrow {
  margin: 0 0 28px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0;
  transform: translateY(8px);
  animation: reveal 0.9s cubic-bezier(0.2, 0.75, 0.2, 1) 0.25s forwards;
}

/* The primary logo (kit file -02) is ~2.06:1 wide. Sized by the viewport's HEIGHT as
   well as its width, so the invitation button stays on the first screen. */
.logo-wrap {
  width: min(520px, 84vw, max(300px, calc(2.06 * 26svh)));
  margin: 0 auto;
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  animation: logoIn 1.35s cubic-bezier(0.16, 0.84, 0.25, 1) 0.4s forwards;
}

.logo-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.divider {
  width: 40px;
  height: 1px;
  margin: clamp(28px, 4vh, 40px) auto clamp(24px, 3.2vh, 32px);
  background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold-deep), transparent);
  transform: scaleX(0);
  animation: lineIn 0.9s ease 1.05s forwards;
}

h1 {
  margin: 0 auto;
  max-width: 720px;
  font-family: var(--display);
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--white);
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 1s cubic-bezier(0.2, 0.75, 0.2, 1) 1.1s forwards;
}

.subhead {
  max-width: 500px;
  margin: 18px auto 0;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--muted);
  opacity: 0;
  transform: translateY(10px);
  animation: reveal 0.9s cubic-bezier(0.2, 0.75, 0.2, 1) 1.28s forwards;
}

.coming {
  margin: 28px 0 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0;
  animation: fadeIn 1s ease 1.5s forwards;
}

.waitlist {
  width: min(460px, 100%);
  margin: 24px auto 0;
  min-height: 112px;
  opacity: 0;
  transform: translateY(8px);
  animation: reveal 0.9s cubic-bezier(0.2, 0.75, 0.2, 1) 1.68s forwards;
}

.waitlist-trigger {
  appearance: none;
  border: 1px solid rgba(229, 211, 178, 0.6);
  border-radius: 999px;
  background: transparent;
  padding: 14px 28px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    opacity 0.25s ease;
}

.waitlist-trigger:hover,
.waitlist-trigger:focus-visible {
  color: var(--navy-top);
  background-color: var(--gold-light);
  border-color: var(--gold-light);
}

.waitlist-trigger:focus-visible {
  outline: 1px solid rgba(229, 211, 178, 0.8);
  outline-offset: 4px;
}

.waitlist-trigger__arrow {
  display: inline-block;
  margin-left: 9px;
  letter-spacing: 0;
  transition: transform 0.25s ease;
}

.waitlist-trigger:hover .waitlist-trigger__arrow {
  transform: translateX(4px);
}

.signup-form {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  transition:
    grid-template-rows 0.45s cubic-bezier(0.2, 0.75, 0.2, 1),
    opacity 0.32s ease,
    transform 0.45s ease;
}

.signup-form__inner {
  overflow: hidden;
  min-height: 0;
  padding: 1px 8px;
}

.waitlist.is-open .waitlist-trigger {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.waitlist.is-open .signup-form {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.field-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding: 4px;
  border: 1px solid rgba(229, 211, 178, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.25s ease;
}

.field-shell:focus-within {
  border-color: var(--gold-light);
}

.email-input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--white);
  padding: 10px 12px 10px 18px;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.email-input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.join-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--gold-light);
  cursor: pointer;
  padding: 11px 20px;
  color: var(--navy-top);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    opacity 0.2s ease;
}

.join-button:hover,
.join-button:focus-visible {
  background: var(--white);
}
.join-button:focus-visible {
  outline: 1px solid rgba(229, 211, 178, 0.8);
  outline-offset: 3px;
}
.join-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.microcopy {
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.microcopy a {
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.microcopy a:hover,
.microcopy a:focus-visible {
  color: var(--gold-light);
  border-color: var(--gold-light);
}

.form-message {
  min-height: 18px;
  margin: 9px auto 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--danger);
}

.success-state {
  display: none;
  margin: 0 auto;
  padding-top: 2px;
  opacity: 0;
  transform: translateY(6px);
}

.waitlist.is-success .waitlist-trigger,
.waitlist.is-success .signup-form {
  display: none;
}
.waitlist.is-success .success-state {
  display: block;
  animation: reveal 0.55s cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
}

.success-state:focus {
  outline: none;
}

.success-state strong {
  display: block;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  color: var(--white);
}

.success-state span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 300;
}

.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.footer {
  padding-top: 20px;
  opacity: 0;
  animation: fadeIn 1s ease 1.9s forwards;
}

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

.footer__phrase {
  text-align: center;
}

.footer__privacy {
  color: rgba(255, 255, 255, 0.66);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer__privacy:hover,
.footer__privacy:focus-visible {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
}

.ambient {
  position: fixed;
  left: 50%;
  top: 43%;
  width: min(920px, 88vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    circle,
    rgba(163, 128, 95, 0.055) 0%,
    rgba(163, 128, 95, 0.022) 30%,
    transparent 68%
  );
  filter: blur(6px);
}

.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;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes logoIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
@keyframes lineIn {
  to {
    transform: scaleX(1);
  }
}
@media (max-width: 700px) {
  .page {
    padding: 22px 20px 24px;
  }
  main {
    padding: 40px 0 36px;
  }
  h1 {
    font-size: clamp(28px, 8vw, 36px);
  }
  .subhead {
    font-size: 14px;
    padding: 0 8px;
  }
  .waitlist {
    min-height: 132px;
  }
  .field-shell {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .email-input {
    text-align: center;
    border: 1px solid rgba(229, 211, 178, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    padding: 13px 16px;
  }
  .join-button {
    padding: 14px 20px;
  }
  .footer__center {
    gap: 12px;
  }
}

/* Short screens (13-inch laptops, iPhone SE): the same page with tighter vertical
   rhythm, so the invitation button still lands on the first screen. */
@media (max-height: 800px) {
  main {
    padding-top: 24px;
  }
  .eyebrow {
    margin-bottom: 18px;
  }
  .divider {
    margin: 20px auto 18px;
  }
  .subhead {
    margin-top: 16px;
  }
  .coming {
    margin-top: 20px;
  }
}

/* The reveals start hidden (opacity: 0) and wait up to 1.9s before playing; shortening
   the duration alone left a blank page for that long. Zero the delays too. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-delay: 0s !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
