/* Policy Selections – professional theme: navy, cream, gold */

:root {
  --navy: #0f172a;
  --navy-mid: #1e293b;
  --cream: #f8f6f3;
  --cream-card: #fffefb;
  --gold: #b8860b;
  --gold-hover: #9a7209;
  --gold-muted: rgba(184, 134, 11, 0.15);
  --slate: #334155;
  --slate-light: #64748b;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.18);
  --min-font: 18px;
}

html {
  font-size: var(--min-font);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 1rem;
}

/* Page background & layout: footer pinned to bottom of viewport */
.theme-body {
  background-color: var(--navy);
  color: var(--cream);
}

.page-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page-layout > * {
  width: 100%;
}

/* Header */
.theme-header {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(248, 246, 243, 0.08);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-name {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.brand-name-accent {
  color: var(--gold);
}

.brand-tagline {
  font-size: 1rem;
  font-weight: 400;
  color: var(--slate-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.header-phone {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-decoration: none;
  color: var(--cream);
  font-weight: 600;
  transition: color 0.2s;
}

.header-phone:hover {
  color: var(--gold);
}

.header-phone-num {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.header-phone-hours {
  font-size: 1rem;
  font-weight: 500;
  color: var(--slate-light);
}

/* Navbar on mobile: hide phone, center title + subtitle only */
@media (max-width: 640px) {
  .theme-header {
    padding: 1rem 1rem;
  }

  .header-inner {
    justify-content: center;
    gap: 0.5rem;
  }

  .header-phone {
    display: none;
  }

  .brand {
    align-items: center;
    text-align: center;
  }

  .brand-name {
    font-size: 1.85rem;
    font-weight: 700;
  }

  .brand-tagline {
    font-size: 1rem;
    font-weight: 400;
  }

  .hero-title {
    font-size: 1.75rem !important;
  }

  .hero-section {
    padding-top: 1rem;
  }

  .hero-content {
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  .hero-disclaimer {
    margin-top: 0.75rem;
    margin-bottom: 2rem;
  }
}

/* Hero: grows to push footer to bottom of viewport */
.hero-section {
  padding: 3.5rem 1.25rem 1rem;
  flex: 1 0 auto;
}

.hero-content {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(1rem, 4vw, 1.6rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--cream);
  text-align: center;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--slate-light);
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.45;
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

/* Form card – cream, stands out on navy */
.form-card {
  background: var(--cream-card);
  color: var(--navy);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.form-question {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin: 0 0 1.25rem;
  line-height: 1.35;
}

.step-badge {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 1rem;
  padding: 0.25rem 0.6rem;
  background: var(--gold-muted);
  border-radius: 999px;
  width: fit-content;
}

.form-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.65rem;
}

.form-btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 0.75rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-btn:active {
  transform: scale(0.98);
}

.form-btn-primary {
  background: var(--gold);
  color: var(--white);
}

.form-btn-primary:hover {
  background: var(--gold-hover);
}

.form-btn-secondary {
  background: var(--navy-mid);
  color: var(--cream);
}

.form-btn-secondary:hover {
  background: var(--navy);
}

/* Congrats state */
.congrats-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 0.5rem;
}

.congrats-text {
  font-size: 1rem;
  color: var(--slate);
  text-align: center;
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

.cta-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--gold);
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
}

.cta-phone:hover {
  background: var(--gold-hover);
}

.cta-phone-num {
  letter-spacing: 0.02em;
}

.cta-phone-tty {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.95;
}

.hero-disclaimer {
  font-size: 1rem;
  color: var(--slate-light);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* Legal pages (Terms, Privacy) */
.legal-page {
  flex: 1 0 auto;
  padding: 2rem 1.25rem 3rem;
}
.legal-page-inner {
  max-width: 720px;
  margin: 0 auto;
}
.legal-page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--cream);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.legal-page-content {
  background: var(--cream-card);
  color: var(--navy);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  font-size: 1rem;
  line-height: 1.65;
}
.legal-page-content p {
  margin-bottom: 1rem;
}
.legal-page-content p:last-child {
  margin-bottom: 0;
}
.legal-page-content strong {
  color: var(--navy);
}
.legal-page-content a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-page-content a:hover {
  color: var(--gold-hover);
}
.legal-page-content ul,
.legal-page-content ol {
  margin: 0 0 1rem 1.25rem;
  padding-left: 1.25rem;
}
.legal-page-content li {
  margin-bottom: 0.5rem;
}
.legal-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.legal-table th,
.legal-table td {
  border: 1px solid rgba(15, 23, 42, 0.15);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}
.legal-table th {
  background: var(--navy-mid);
  color: var(--cream);
  font-weight: 600;
}
.legal-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.04);
}
a.brand {
  text-decoration: none;
  color: inherit;
}

/* Footer: directly below content, no extra gap; visible without scrolling */
.theme-footer {
  padding: 1rem 1.25rem;
  margin-top: 0;
  border-top: 1px solid rgba(248, 246, 243, 0.08);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.footer-inner {
  padding-top: 2rem;
  margin: 0 auto;
  text-align: center;
}

.footer-tpmo {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--slate-light);
  margin-bottom: 0.75rem;
}

.footer-code {
  font-size: 1rem;
  color: var(--slate-light);
  opacity: 0.8;
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  padding-top: 2rem;
}

.footer-link {
  font-size: 1rem;
  color: var(--slate-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a.footer-link {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.footer-link:hover {
  color: var(--gold);
}

.footer-sep {
  color: var(--slate-light);
  font-size: 1rem;
}

.footer-copy {
  font-size: 1rem;
  color: var(--slate-light);
  opacity: 0.9;
  padding-top: 2rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.modal-overlay.hidden {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  cursor: pointer;
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 36rem;
  max-height: 85vh;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.theme-card {
  background: var(--cream-card);
  color: var(--navy);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-mid);
  color: var(--cream);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s;
  z-index: 2;
}

.modal-close:hover {
  background: var(--navy);
}

.modal-body {
  padding: 1.5rem 1.5rem 2rem;
  padding-top: 2.5rem;
  overflow-y: auto;
  max-height: 85vh;
}

.modal-body.markdown p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  color: var(--slate);
}

.modal-body.markdown a {
  color: var(--gold);
}

.modal-body.markdown strong {
  color: var(--navy);
}

/* Utility */
.hidden {
  display: none !important;
}
