:root {
  color-scheme: light dark;
  --light-page-bg: #f4f5f7;
  --light-text: #17191d;
  --light-muted: #5c626c;
  --light-surface: #fff;
  --light-border: #d7d9de;
  --light-inverse: #17191d;
  --light-on-inverse: #fff;
  --light-inverse-muted: #c9cdd3;
  --light-focus: #6c63ff;
  --dark-page-bg: #0c0d10;
  --dark-text: #eceef1;
  --dark-muted: #a5abb4;
  --dark-surface: #14161a;
  --dark-border: #2a2e35;
  --dark-inverse: #eceef1;
  --dark-on-inverse: #0c0d10;
  --dark-inverse-muted: #5c626c;
  --dark-focus: #e6e8eb;
  --page-bg: light-dark(var(--light-page-bg), var(--dark-page-bg));
  --text: light-dark(var(--light-text), var(--dark-text));
  --muted: light-dark(var(--light-muted), var(--dark-muted));
  --surface: light-dark(var(--light-surface), var(--dark-surface));
  --border: light-dark(var(--light-border), var(--dark-border));
  --inverse: light-dark(var(--light-inverse), var(--dark-inverse));
  --on-inverse: light-dark(var(--light-on-inverse), var(--dark-on-inverse));
  --inverse-muted: light-dark(var(--light-inverse-muted), var(--dark-inverse-muted));
  --focus: light-dark(var(--light-focus), var(--dark-focus));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--page-bg);
  font-synthesis: none;
}

@media (prefers-color-scheme: light) {
  :root:has(#landing-theme:checked) {
    color-scheme: dark;
  }
}

@media (prefers-color-scheme: dark) {
  :root:has(#landing-theme:checked) {
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page-bg);
}

a {
  color: inherit;
}

main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 3rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.nav-actions {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font: 800 0.9rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.16em;
}

.brand img {
  display: block;
}

.theme-toggle {
  position: relative;
  width: 2.75rem;
  min-height: 2.75rem;
}

.theme-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.theme-toggle span {
  font-size: 1.25rem;
  line-height: 1;
}

:root:has(#landing-theme:checked) .theme-toggle span {
  transform: rotate(180deg);
}

.button {
  display: inline-block;
  padding: 0.75rem 1rem;
  border: 1px solid var(--text);
  color: inherit;
  background: transparent;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button.primary {
  color: var(--on-inverse);
  background: var(--inverse);
}

.button.theme-toggle {
  display: grid;
  padding: 0;
  place-items: center;
  color: var(--text);
  background: var(--surface);
}

.hero {
  min-height: 68vh;
  display: grid;
  align-content: center;
  padding: clamp(4rem, 12vw, 9rem) 0;
}

.eyebrow,
.tag {
  font: 700 0.72rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.13em;
}

.hero h1 {
  max-width: 900px;
  margin: 0.7rem 0 1rem;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.lede {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.6;
}

.waitlist {
  margin-top: 1.5rem;
}

.waitlist-modal {
  width: min(680px, calc(100% - 2rem));
  max-width: none;
  border: 1px solid var(--text);
  padding: clamp(1.25rem, 4vw, 2rem);
  color: var(--text);
  background: var(--page-bg);
  box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 35%);
}

.waitlist-modal::backdrop {
  background: rgb(12 13 16 / 72%);
}

.waitlist-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.waitlist-modal-header .eyebrow {
  margin: 0 0 0.5rem;
}

.waitlist-modal h2 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  letter-spacing: -0.04em;
}

.waitlist-intro {
  margin: 0.75rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.modal-close {
  min-width: 2.75rem;
  padding: 0.5rem;
  font-size: 1.5rem;
  line-height: 1;
}

.waitlist form > label:first-of-type {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.waitlist-fields {
  display: flex;
}

.waitlist-fields input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--text);
  border-right: 0;
  border-radius: 0;
  padding: 0.75rem 1rem;
  color: var(--text);
  background: var(--surface);
  font: inherit;
}

.waitlist-fields input:focus-visible,
.button:focus-visible,
.theme-toggle:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.consent input {
  margin-top: 0.2rem;
}

.website-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.waitlist-success,
.waitlist-error {
  display: none;
  border: 1px solid var(--text);
  padding: 1rem;
  color: var(--text);
  background: var(--surface);
  font-weight: 700;
}

.waitlist-success.visible,
.waitlist-error.visible {
  display: block;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.features article,
.statement {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.features h2,
.statement h2 {
  margin: 0.65rem 0;
  font-size: 1.35rem;
}

.features article > p:last-child,
.statement > p {
  color: var(--muted);
  line-height: 1.6;
}

.tag {
  margin: 0;
  color: var(--muted);
}

.statement {
  margin-top: 1rem;
  color: var(--on-inverse);
  background: var(--inverse);
}

.statement h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.04em;
}

.statement > p {
  max-width: 640px;
  color: var(--inverse-muted);
}

footer {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .nav .button {
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
  }

  .waitlist-fields {
    align-items: stretch;
    flex-direction: column;
    gap: 0.5rem;
  }

  .waitlist-fields input {
    border-right: 1px solid var(--text);
  }

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

  footer {
    flex-direction: column;
  }
}

@media (max-width: 400px) {
  .brand span {
    display: none;
  }
}
