/* =============================================
   ANNUITY MATCHMAKER — Global Styles
   Mobile-first, accessible, trust-building
   ============================================= */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a3a5c;
  --primary-light: #2a5a8c;
  --accent: #c8a44e;
  --accent-hover: #b8943e;
  --text: #2d2d2d;
  --text-light: #555;
  --bg: #ffffff;
  --bg-light: #f8f9fa;
  --bg-warm: #faf8f5;
  --border: #ddd;
  --success: #28a745;
  --error: #dc3545;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --font-main: 'Georgia', 'Times New Roman', serif;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* === Typography === */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 0.5em;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }
p { margin-bottom: 1em; color: var(--text-light); }
a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--accent); }

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section {
  padding: 4rem 0;
}
.section--alt {
  background: var(--bg-light);
}
.section--warm {
  background: var(--bg-warm);
}
.text-center { text-align: center; }

/* === Header === */
.header {
  background: var(--primary);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header__logo {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: bold;
}
.header__logo span { color: var(--accent); }
.header__nav { display: flex; gap: 1.5rem; align-items: center; }
.header__nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.header__nav a:hover { color: #fff; }

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  text-align: center;
}
.hero h1 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: #fff;
}
.btn--outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}
.btn--outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.btn--large {
  padding: 1.2rem 3rem;
  font-size: 1.15rem;
}

/* === Cards === */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.card__title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* === Trust Bar === */
.trust-bar {
  background: var(--bg-warm);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-bar__items {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.trust-bar__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* === Calculator === */
.calculator {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  margin: 0 auto;
}
.calculator__title {
  text-align: center;
  margin-bottom: 1.5rem;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 1rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color 0.2s;
  background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42,90,140,0.1);
}
.form-group .helper {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

/* === Results === */
.results {
  display: none;
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 1.5rem;
  border: 2px solid var(--accent);
}
.results.visible { display: block; }
.results__title {
  text-align: center;
  color: var(--primary);
  margin-bottom: 1rem;
}
.results__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.result-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.result-card__type {
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
.result-card__amount {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary);
  font-family: var(--font-heading);
}
.result-card__period {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* === Lead Form === */
.lead-form {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  margin: 2rem auto 0;
}
.lead-form__title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.lead-form__subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-disclaimer {
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.5;
}

/* === Advisor Profile === */
.advisor-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0;
}
.advisor-hero__photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
}
.advisor-hero__info h2 {
  margin-bottom: 0.3rem;
}
.advisor-hero__credentials {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* === Testimonials === */
.testimonial {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
  margin-bottom: 1.5rem;
}
.testimonial__text {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.testimonial__author {
  font-weight: 600;
  color: var(--primary);
}

/* === Footer === */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer__title {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.footer a { color: rgba(255,255,255,0.7); }
.footer a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}
.footer__disclaimer {
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
}

/* === Alerts === */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.alert--success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.alert--error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* === Loading Spinner === */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Responsive === */
@media (max-width: 768px) {
  html { font-size: 16px; }
  h1 { font-size: 1.8rem; }
  .hero { padding: 3rem 0; }
  .hero h1 { font-size: 2rem; }
  .form-row { grid-template-columns: 1fr; }
  .advisor-hero { flex-direction: column; text-align: center; }
  .header__nav { display: none; }
  .trust-bar__items { gap: 1.5rem; }
  .calculator, .lead-form { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .section { padding: 2.5rem 0; }
  .btn { padding: 0.9rem 2rem; width: 100%; }
  .results__grid { grid-template-columns: 1fr; }
}

/* === Accessibility === */
:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* === Print === */
@media print {
  .header, .footer, .btn { display: none; }
  body { font-size: 12pt; }
}
