@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #15112B;
  --ink-deep: #0D0A1E;
  --ink-raise: #1E1940;
  --star: #F2C46D;
  --star-soft: #F7DDA4;
  --chart: #B9B3D9;
  --text: #EEEAF8;
  --muted: #A49FC4;
  --line: rgba(185, 179, 217, .22);
  --p1: #5FA8A0;
  --p2: #C8735B;
  --p3: #8E7FD8;
  --danger: #F29A8A;

  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --measure: 34rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 500; }
h1, h2 { font-family: var(--display); letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--star-soft); text-underline-offset: .2em; }

:focus-visible {
  outline: 2px solid var(--star);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: .6rem 1rem;
  background: var(--star);
  color: var(--ink);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Translations: all languages share one grid cell, only the active one shows. */
.i18n[data-i18n] { display: inline-grid; }
:is(p, div, label, strong, h2, h3, h1 span).i18n[data-i18n] { display: grid; }
.btn.i18n { place-content: center; }
.i18n > .i18n-v { grid-area: 1 / 1; }
.i18n > .is-off { visibility: hidden; }

/* Top bar */

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.brand-mark { width: 36px; height: 36px; color: var(--chart); }

.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang button {
  min-width: 40px;
  padding: .3rem .6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 .8125rem/1 var(--body);
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink-raise); color: var(--text); }

/* Hero */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px var(--gutter) 96px;
  overflow: hidden;
  isolation: isolate;
}

.orrery {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

/* Blend the sky into the page below. */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(21, 17, 43, 0), var(--ink));
  pointer-events: none;
}

.hero-copy { max-width: 42rem; }

.wip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
  padding: .3rem .8rem .3rem .65rem;
  border: 1px solid rgba(242, 196, 109, .45);
  border-radius: 999px;
  font-size: .8125rem;
  color: var(--star-soft);
}
.wip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--star);
  box-shadow: 0 0 8px var(--star);
}

h1 {
  font-size: clamp(2.75rem, 6.4vw, 5.5rem);
  line-height: 1;
  margin-bottom: 1.5rem;
}
h1 span { display: block; }
.h1-offset { padding-left: .9em; color: var(--star-soft); }

.lede {
  color: var(--text);
  opacity: .88;
  max-width: 30rem;
  margin-bottom: 2rem;
  text-wrap: pretty;
}

.hero-foot {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem 1.5rem;
  font-size: .8125rem;
  color: var(--muted);
}

/* Waitlist form */

.waitlist { max-width: 32rem; }

.field-label { display: block; font-size: .875rem; color: var(--muted); margin-bottom: .45rem; }

.field-row { display: flex; gap: .5rem; }

.waitlist input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  padding: 0 1rem;
  border: 1px solid rgba(185, 179, 217, .4);
  border-radius: 10px;
  background: rgba(13, 10, 30, .72);
  color: var(--text);
  font: 400 1rem var(--body);
}
.waitlist input[type="email"]::placeholder { color: #7B7699; }
.waitlist input[type="email"]:focus-visible { outline-offset: 1px; border-color: var(--star); }
.waitlist input[aria-invalid="true"] { border-color: var(--danger); }

.btn {
  flex: none;
  height: 52px;
  padding: 0 1.3rem;
  border: 0;
  border-radius: 10px;
  background: var(--star);
  color: var(--ink);
  font: 600 1rem var(--body);
  cursor: pointer;
  transition: background-color .15s;
}
.btn:hover { background: var(--star-soft); }
.btn[disabled] { opacity: .6; cursor: progress; }

.consent {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin-top: .9rem;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: .1rem 0 0;
  accent-color: var(--star);
}

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { min-height: 1.5em; margin-top: .8rem; font-size: .9375rem; }
.form-status.is-error { color: var(--danger); }
.form-status.is-ok { color: var(--star-soft); }

.waitlist.is-done .field-row,
.waitlist.is-done .consent,
.waitlist.is-done .field-label { display: none; }
.waitlist.is-done .form-status {
  margin-top: 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(242, 196, 109, .45);
  border-radius: 10px;
  background: rgba(242, 196, 109, .08);
}

/* Footer (legal page) */

h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; margin-bottom: 1.25rem; text-wrap: balance; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding: 28px var(--gutter) 36px;
  border-top: 1px solid var(--line);
  font-size: .875rem;
  color: var(--muted);
}
.footer a, .hero-foot a { color: var(--muted); }
.footer a:hover, .hero-foot a:hover { color: var(--text); }

/* Legal page */

.legal { max-width: 44rem; margin: 0 auto; padding: 120px var(--gutter) 80px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.legal h2 { font-size: 1.7rem; margin: 2.5rem 0 .75rem; }
.legal p, .legal li { color: var(--text); opacity: .88; }
.legal p + p { margin-top: .8rem; }
.legal .todo { color: var(--danger); }

/* Responsive */

@media (max-width: 720px) {
  .hero { align-items: flex-end; padding-top: min(58vh, 480px); padding-top: min(52svh, 480px); padding-bottom: 72px; }
  .h1-offset { padding-left: .5em; }
  .field-row { flex-direction: column; }
  .btn { width: 100%; }
  .brand { font-size: 1.15rem; }
  .brand-mark { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
