/* CVHS text-alert sign-up — matches estimate-form warm cream + orange */
:root {
  --accent: #c56e21;
  --accent-hover: #a85a18;
  --accent-soft: #f5e6d8;
  --bg: #f7f3ef;
  --card: #ffffff;
  --text: #2c2419;
  --muted: #6b5e52;
  --border: #e0d5c8;
  --error: #b33a3a;
  --success: #2d6a4f;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(44, 36, 25, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.logo-link {
  display: inline-block;
}

.logo {
  display: block;
  max-height: 64px;
  max-width: 200px;
  margin: 0 auto 0.75rem;
  object-fit: contain;
}

.header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1.5rem 1.35rem 1.75rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.field-group label {
  font-weight: 600;
  font-size: 0.95rem;
}

.field-group .optional {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
}

.field-group input[type="text"],
.field-group input[type="tel"],
.field-group input[type="email"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-group .error-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--error);
}

.field-group.has-error input[type="text"],
.field-group.has-error input[type="tel"],
.field-group.has-error input[type="email"] {
  border-color: var(--error);
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.consent-row input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.consent-row label {
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.45;
  cursor: pointer;
}

.fine-print {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #6b7280;
  margin: 0.35rem 0 0;
}

.fine-print a {
  color: inherit;
  text-decoration: underline;
}

.fine-print a:hover {
  color: var(--text);
}

.nav-buttons {
  display: flex;
  margin-top: 0.5rem;
}

.btn {
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.8rem 1.25rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.success-panel {
  text-align: center;
  padding: 1rem 0;
}

.success-panel h2 {
  margin: 0 0 0.5rem;
  color: var(--success);
  font-size: 1.45rem;
}

.success-panel p {
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.success-digits {
  font-weight: 600;
  color: var(--text) !important;
}

.footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--muted);
  text-decoration: underline;
}

.footer a:hover {
  color: var(--text);
}

@media (max-width: 480px) {
  .page {
    padding: 1rem 0.75rem 2rem;
  }

  .header h1 {
    font-size: 1.45rem;
  }

  .card {
    padding: 1.25rem 1rem 1.5rem;
  }
}
