:root {
  --bg: #ffffff;
  --elevated: #ffffff;
  --elevated-muted: #ffffff;
  --text: #000000;
  --text-muted: #ffffff;
  --border: #dddddd;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  --link: #ffffff;
  --cta-bg: #000000;
  --cta-fg: #ffffff;
  --cta-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
  --success: #166534;
  --error: #b91c1c;
  --pending: #ffffff;
  --legal-text: #6b7280;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --elevated: #121212;
    --elevated-muted: #1a1a1a;
    --text: #ffffff;
    --text-muted: #ffffff;
    --border: #2a2a2a;
    --shadow: 0 16px 42px rgba(0, 0, 0, 0.45);
    --link: #ffffff;
    --cta-bg: #ffffff;
    --cta-fg: #000000;
    --cta-shadow: 0 16px 38px rgba(255, 255, 255, 0.17);
    --success: #4ade80;
    --error: #f87171;
    --pending: #ffffff;
    --legal-text: #d1d5db;
  }
}

body, .landing-body, .landing-wrapper {
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, .page-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh; /* full viewport height */
  margin: 0;
  padding: 0;
}

.landing-body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(2.5rem, 4vw, 4rem) 1.5rem;
}

.landing-wrapper {
  width: 100%;
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 3vw, 2.5rem);
}

.landing-header {
  text-align: center;
}

.landing-header h1 {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.landing-tagline {
  margin-top: 0.75rem;
  font-size: 1.12rem;
}

.landing-main {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.landing-main--centered {
  grid-template-columns: minmax(320px, 640px);
  justify-content: center;
  justify-items: center;
}

.hero {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(1.75rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: var(--shadow);
}

.hero--narrow {
  background: var(--elevated);
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
}

.hero-lede {
  font-size: 1.12rem;
  line-height: 1.6;
}

.hero-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-left: 1.2rem;
}

.hero-list li {
  list-style: disc;
  line-height: 1.5;
}

.secondary-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.secondary-cta:hover,
.secondary-cta:focus-visible {
  color: var(--text);
  outline: none;
}

.signup-card {
  display: flex;
  flex-direction: column;
  background: var(--elevated);
  color: var(--text);
  border-radius: 20px;
  padding: clamp(2rem, 3.5vw, 2.5rem) clamp(1.75rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
}

.signup-card h2 {
  font-size: 1.6rem;
  font-weight: 600;
}

.signup-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-grid {
  display: flex;
  align-items: center;
  flex-direction: column;
  display: grid;
  gap: 1rem 1.2rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 1.12rem;
  color: var(--text);
}

.field span {
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
  .field input:focus,
  .field select:focus {
    border-color: var(--link);
    box-shadow: 0 0 0 3px rgba(155, 184, 255, 0.25);
  }
}

.field--full {
  grid-column: 1 / -1;
}

button[type="submit"] {
  align-self: center;
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.9rem;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: var(--cta-shadow);
}

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

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  font-size: 1rem;
  color: var(--legal-text);
  flex-wrap: wrap;
  text-align: center;
}

.legal-links a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.legal-links a:hover,
.legal-links a:focus-visible {
  color: var(--text);
  outline: none;
}

.legal-links span {
  color: inherit;
  font-size: 0.8rem;
}

.feedback {
  min-height: 1.2em;
  font-size: 0.95rem;
}

.feedback[data-state="pending"] {
  color: var(--pending);
}

.feedback[data-state="success"] {
  color: var(--success);
}

.feedback[data-state="error"] {
  color: var(--error);
}

.landing-footer {
  display: flex;
  align-self: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 1rem;
}

.landing-footer a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.landing-footer a:hover,
.landing-footer a:focus-visible {
  color: var(--text);
  outline: none;
}

@media (max-width: 720px) {
  .landing-body {
    padding: 2.5rem 1rem;
  }

  .landing-wrapper {
    gap: 2rem;
  }

  .signup-card {
    padding: 1.85rem 1.4rem;
  }
}
