:root {
  color-scheme: light;
  --bg-start: #f5f5f7;
  --bg-end: #ffffff;
  --panel: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #4a4a4f;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --focus: #005fcc;
  --button-bg: #1d1d1f;
  --button-fg: #ffffff;
  --button-disabled-bg: #8e8e93;
  --button-disabled-fg: #ffffff;
  --error: #c42828;
  --input-bg: #ffffff;
  --skip-link-bg: #000000;
  --skip-link-fg: #ffffff;
  --toggle-bg: #ffffff;
  --toggle-fg: #1d1d1f;
  --toggle-hover-bg: #f2f2f5;
  --radius-large: 24px;
  --radius-medium: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-start: #0a0b0e;
  --bg-end: #121419;
  --panel: #171a21;
  --text-primary: #f5f5f7;
  --text-secondary: #c6cad2;
  --line: #3c4450;
  --line-soft: #2a313d;
  --focus: #6ea8ff;
  --button-bg: #f5f5f7;
  --button-fg: #0f1115;
  --button-disabled-bg: #5f6672;
  --button-disabled-fg: #eef2f7;
  --error: #ff8a8a;
  --input-bg: #10141c;
  --skip-link-bg: #f5f5f7;
  --skip-link-fg: #11131a;
  --toggle-bg: #10141c;
  --toggle-fg: #f5f5f7;
  --toggle-hover-bg: #1b212d;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: linear-gradient(180deg, var(--bg-start), var(--bg-end));
  line-height: 1.45;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: var(--skip-link-bg);
  color: var(--skip-link-fg);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  z-index: 10;
}

.skip-link:focus-visible {
  top: 1rem;
}

.page-shell {
  width: min(680px, 94vw);
  margin: 1rem auto 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.hero-panel,
.form-panel {
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  padding: 1.2rem 1rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.hero-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--toggle-bg);
  color: var(--toggle-fg);
  border-radius: 999px;
  min-height: 2rem;
  padding: 0.25rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.theme-toggle:hover {
  background: var(--toggle-hover-bg);
}

h1,
h2 {
  margin: 0.4rem 0 0.7rem;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -0.01em;
}

.hero-image {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0.3rem 0 1rem;
  border-radius: var(--radius-medium);
  border: 1px solid var(--line-soft);
}

.twitter-tweet {
  width: 100% !important;
  max-width: 560px !important;
  margin: 0.35rem 0 1rem !important;
}

.twitter-tweet iframe {
  max-width: 100% !important;
}

.hero-copy {
  margin: 0;
  max-width: 60ch;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.hero-list {
  margin: 1.2rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
}

.hero-list li + li {
  margin-top: 0.4rem;
}

.form-intro {
  margin: 0 0 1.3rem;
  color: var(--text-secondary);
}

#beta-form {
  display: grid;
  gap: 1rem;
}

.field label,
.field-group legend {
  display: block;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  min-height: 2.8rem;
  padding: 0.6rem 0.8rem;
  font: inherit;
  color: var(--text-primary);
  background: var(--input-bg);
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  margin: 0.5rem 0 0;
  color: var(--error);
  font-size: 0.86rem;
  font-weight: 500;
}

.field-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  padding: 0.8rem 0.85rem 0.95rem;
  margin: 0;
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.55rem;
  color: var(--text-primary);
  font-weight: 500;
}

.choice-row input {
  width: 1rem;
  height: 1rem;
  accent-color: #1d1d1f;
}

.requirements,
.status-message {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.status-message {
  min-height: 1.25rem;
}

button[type="submit"] {
  width: 100%;
  border: 0;
  border-radius: 999px;
  min-height: 2.9rem;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--button-bg);
  color: var(--button-fg);
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

button[type="submit"]:hover:enabled {
  transform: translateY(-1px);
}

button[type="submit"]:disabled {
  background: var(--button-disabled-bg);
  color: var(--button-disabled-fg);
  opacity: 1;
  cursor: not-allowed;
}

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

.site-footer {
  margin: 0 0 1.5rem;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.site-footer p {
  width: fit-content;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 430px) {
  .page-shell {
    width: 95vw;
    margin: 0.75rem auto 1.5rem;
  }

  .hero-panel,
  .form-panel {
    border-radius: 20px;
    padding: 1rem 0.9rem;
  }

  .hero-topbar {
    align-items: flex-start;
  }

  .site-footer {
    margin-bottom: 1.25rem;
    font-size: 0.82rem;
  }
}

@media (min-width: 768px) {
  .page-shell {
    width: min(1220px, 92vw);
    margin-top: 1.75rem;
    margin-bottom: 2.5rem;
    gap: 1.1rem;
  }

  .hero-panel,
  .form-panel {
    padding: 1.85rem 1.6rem;
  }

  .site-footer {
    margin-bottom: 1.75rem;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .page-shell {
    width: min(1320px, 94vw);
    gap: 1.25rem;
  }

  .hero-panel,
  .form-panel {
    padding: 2rem 1.85rem;
  }
}

@media (min-width: 1440px) {
  .page-shell {
    width: min(1520px, 92vw);
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 1.5rem;
  }

  .hero-panel,
  .form-panel {
    min-height: 100%;
    padding: 2.15rem 2rem;
  }

  .hero-panel {
    position: sticky;
    top: 1.2rem;
  }

  .site-footer {
    margin-bottom: 2rem;
  }
}
