:root {
  color-scheme: dark;
  --ink: #090713;
  --pearl: #f5e8df;
  --muted: #bcb1c8;
  --violet: #9f73ff;
  --teal: #66e3cf;
  --line: rgba(245, 232, 223, 0.17);
  --serif: 'Iowan Old Style', 'Baskerville', 'Times New Roman', serif;
  --sans: 'Avenir Next', 'Avenir', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--pearl);
  font-family: var(--sans);
  font-weight: 300;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--pearl);
  color: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.aurora {
  position: absolute;
  inset: 0 0 auto;
  height: 100svh;
  min-height: 760px;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(146, 76, 156, 0.2), transparent 20%),
    radial-gradient(circle at 50% 45%, #100c1b 0, var(--ink) 63%);
}

.aurora::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.23;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

#stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

.aurora__core {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 229, 198, 0.8), rgba(202, 108, 185, 0.14) 22%, transparent 68%);
  filter: blur(8px);
  animation: breathe 8s ease-in-out infinite;
}

.aurora__ribbon {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 128vw;
  height: 25vw;
  border: 2px solid transparent;
  border-top-color: rgba(180, 112, 255, 0.42);
  border-radius: 50%;
  filter: blur(11px) drop-shadow(0 -8px 13px rgba(132, 79, 214, 0.28));
  transform-origin: center;
}

.aurora__ribbon--one {
  transform: translate(-50%, -50%) rotate(7deg);
  animation: drift-one 18s ease-in-out infinite alternate;
}

.aurora__ribbon--two {
  border-top-color: rgba(79, 225, 198, 0.38);
  transform: translate(-50%, -42%) rotate(-9deg) scaleY(0.7);
  animation: drift-two 22s ease-in-out infinite alternate;
}

.aurora__ribbon--three {
  width: 95vw;
  border-top-color: rgba(255, 178, 208, 0.33);
  transform: translate(-50%, -34%) rotate(18deg) scaleY(0.55);
  animation: drift-one 26s ease-in-out infinite alternate-reverse;
}

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1440px, calc(100% - 7rem));
  margin: 0 auto;
  padding: 2.3rem 0;
}

.wordmark {
  font-size: 1.12rem;
  font-weight: 400;
  letter-spacing: 0.52em;
  text-decoration: none;
}

.header-link {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 180ms ease;
}

.header-link:hover,
.header-link:focus-visible {
  color: var(--pearl);
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: calc(100svh - 95px);
  min-height: 665px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem 6rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 1.3rem;
  color: #d2c0da;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 7.7vw, 8.2rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.025em;
}

h1 em {
  color: #f6d7cd;
  font-style: normal;
}

.hero__lede {
  width: min(700px, 100%);
  margin: 2rem auto 2.2rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.65;
}

.signup {
  display: grid;
  width: min(580px, 100%);
  grid-template-columns: 1fr auto;
  padding: 0.32rem;
  border: 1px solid rgba(245, 232, 223, 0.23);
  border-radius: 0.95rem;
  background: rgba(12, 9, 24, 0.58);
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.signup:focus-within {
  border-color: rgba(245, 232, 223, 0.55);
  box-shadow: 0 0 0 3px rgba(159, 115, 255, 0.12);
}

.signup input,
.signup button {
  min-height: 3.6rem;
  border: 0;
  font: inherit;
}

.signup input {
  min-width: 0;
  padding: 0 1.2rem;
  outline: none;
  background: transparent;
  color: var(--pearl);
}

.signup input::placeholder {
  color: #888094;
}

.signup button {
  display: flex;
  cursor: pointer;
  align-items: center;
  gap: 1.7rem;
  justify-content: space-between;
  padding: 0 1.2rem;
  border-radius: 0.68rem;
  background: linear-gradient(105deg, #f4dcd2, #c49af5 63%, #7fd3c7);
  color: #120d1b;
  font-weight: 500;
  transition: transform 180ms ease, filter 180ms ease;
}

.signup button:hover,
.signup button:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.signup button:disabled {
  cursor: wait;
  filter: saturate(0.5);
}

.signup-trap {
  display: none;
}

.form-status {
  min-height: 1.25rem;
  margin: 0.7rem 0 0;
  color: #bce8df;
  font-size: 0.8rem;
}

.form-status[data-error='true'] {
  color: #ffb6c4;
}

.signup-note {
  margin: 0.1rem 0 0.45rem;
  color: #91889c;
  font-size: 0.68rem;
}

.signup-note a {
  text-underline-offset: 0.18em;
}

.lineage {
  margin: 0.5rem 0 0;
  color: #8c8499;
  font-size: 0.74rem;
  letter-spacing: 0.015em;
}

.lineage a {
  text-decoration-color: rgba(196, 154, 245, 0.5);
  text-underline-offset: 0.2em;
}

.sovereignty {
  position: relative;
  display: grid;
  width: min(1340px, calc(100% - 5rem));
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
  gap: 7rem;
  margin: 0 auto;
  padding: 10rem 0;
  border-top: 1px solid var(--line);
}

.sovereignty::before {
  content: '';
  position: absolute;
  top: 6rem;
  right: -20%;
  width: 45rem;
  height: 45rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 179, 166, 0.08), transparent 65%);
  pointer-events: none;
}

.sovereignty h2,
.closing h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 5vw, 5.7rem);
  font-weight: 400;
  line-height: 0.98;
}

.sovereignty__intro > p:last-child {
  max-width: 31rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.principles {
  border-top: 1px solid var(--line);
}

.principle {
  display: grid;
  grid-template-columns: 3rem 0.7fr 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.principle__number {
  color: #8d8398;
  font-size: 0.7rem;
}

.principle h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
}

.principle p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.closing {
  display: flex;
  min-height: 68vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem;
  background:
    radial-gradient(circle at 50% 75%, rgba(139, 85, 184, 0.18), transparent 34%),
    linear-gradient(180deg, transparent, rgba(18, 11, 32, 0.9));
  text-align: center;
}

.closing__link {
  margin-top: 3rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(245, 232, 223, 0.5);
  text-decoration: none;
}

.closing__link span {
  display: inline-block;
  margin-left: 1rem;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1440px, calc(100% - 7rem));
  margin: 0 auto;
  padding: 2.2rem 0;
  border-top: 1px solid var(--line);
  color: #81798b;
  font-size: 0.72rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.footer-links a {
  text-underline-offset: 0.2em;
}

.legal-page {
  min-height: 100svh;
  background:
    radial-gradient(circle at 72% 15%, rgba(159, 115, 255, 0.15), transparent 27%),
    var(--ink);
}

.legal {
  width: min(760px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 8rem 0 10rem;
}

.legal h1 {
  font-size: clamp(3.5rem, 8vw, 6.6rem);
}

.legal > p:not(.eyebrow) {
  max-width: 42rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  text-wrap: pretty;
}

.legal .closing__link {
  display: inline-block;
}

.wordmark--small {
  color: var(--pearl);
  font-size: 0.75rem;
}

@keyframes breathe {
  50% { opacity: 0.72; transform: translate(-50%, -50%) scale(1.12); }
}

@keyframes drift-one {
  to { transform: translate(-50%, -44%) rotate(11deg) scaleX(1.05); }
}

@keyframes drift-two {
  to { transform: translate(-50%, -50%) rotate(-5deg) scale(1.03, 0.8); }
}

@media (max-width: 900px) {
  .site-header,
  footer {
    width: calc(100% - 3rem);
  }

  .hero {
    padding-bottom: 4rem;
  }

  .sovereignty {
    width: calc(100% - 3rem);
    grid-template-columns: 1fr;
    gap: 4rem;
    padding: 7rem 0;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding-top: 1.5rem;
  }

  .header-link {
    display: none;
  }

  .hero {
    min-height: calc(100svh - 73px);
    padding: 1rem 1.15rem 3rem;
  }

  h1 {
    font-size: clamp(3.6rem, 18vw, 5.3rem);
  }

  .hero__lede {
    margin-top: 1.6rem;
    font-size: 0.95rem;
  }

  .signup {
    grid-template-columns: 1fr;
  }

  .signup button {
    justify-content: center;
  }

  .lineage {
    max-width: 22rem;
    line-height: 1.5;
  }

  .principle {
    grid-template-columns: 2rem 1fr;
  }

  .principle p {
    grid-column: 2;
  }

  footer {
    flex-wrap: wrap;
    gap: 1rem;
  }

  footer > p {
    order: 3;
    width: 100%;
  }

  .footer-links {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
