html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background 0.15s, color 0.15s;
}

a { color: inherit; }

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  padding-bottom: 120px;
  text-align: center;
}

@media (max-width: 640px) {
  .landing {
    justify-content: flex-start;
    padding-top: 140px;
  }
}

.landing-inner {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.landing-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.landing-wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
}

.landing-wordmark img { width: 32px; height: 32px; object-fit: contain; }
.landing-wordmark span { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; color: var(--accent); }

.landing-tagline { font-size: 15px; color: var(--muted); }

.landing-body { display: flex; flex-direction: column; align-items: center; gap: 0; width: 100%; }

#waitlist-panel, #signin-panel { width: 100%; display: flex; flex-direction: column; gap: 8px; }

.landing-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }

#waitlist-panel, #signin-panel { width: 100%; }

.landing-form input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  text-align: left;
  transition: border-color 0.15s;
}

.landing-form input[type="email"]::placeholder { color: var(--muted); }
.landing-form input[type="email"]:focus { border-color: var(--muted); }
/* iOS zooms into a focused field whose font-size is under 16px. Hold the
   email inputs at 16px on phones to suppress that; desktop keeps the 14px design. */
@media (max-width: 768px) {
  .landing-form input[type="email"] { font-size: 16px; }
}

.btn-accent {
  width: 100%;
  padding: 10px;
  background: #2563eb;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-accent:hover { opacity: 0.85; }
.btn-accent:disabled { opacity: 0.5; cursor: default; }

.btn-secondary {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-secondary:hover { border-color: var(--muted); color: var(--text); }

.landing-msg { font-size: 13px; color: var(--muted); }
.landing-msg.success { color: #16a34a; }
.landing-msg.error { color: #dc2626; }

.landing-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.landing-divider::before, .landing-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  width: 100%;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.15s;
}

.btn-google:hover { border-color: var(--muted); }
.btn-google:disabled { opacity: 0.5; cursor: default; }

.landing-text-link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 0;
  text-align: center;
}

.landing-text-link:hover { color: var(--text); }

/* Setup modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.modal h2 { font-size: 17px; margin-bottom: 4px; }
.modal p { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--muted); }

.field input, .field textarea {
  padding: 9px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.field input:focus, .field textarea:focus { border-color: var(--muted); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.6; }
.field textarea { resize: vertical; min-height: 68px; }

.btn-primary {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.85; }

.landing-theme-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  padding: 4px;
}

.landing-theme-btn:hover { color: var(--text); }

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.terms-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
}
.terms-check a { color: var(--accent); }

.landing-footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.landing-footer a { color: var(--muted); text-decoration: underline; }
.landing-footer a:hover { color: var(--text); }
