/* ==========================================================================
   Life Insurance Policy Support — Design System Stylesheet
   Mobile-first responsive design
   ========================================================================== */

/* ---------- CSS Custom Properties (Design Tokens) ---------- */
:root {
  --color-primary: #1B4F72;
  --color-cta: #27AE60;
  --color-cta-hover: #219A52;
  --color-background: #FFFFFF;
  --color-light-gray: #F8F9FA;
  --color-text: #333333;
  --color-muted: #6C757D;
  --color-border: #E0E0E0;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-weight-normal: 400;
  --font-weight-bold: 700;

  --max-width: 960px;
  --section-padding-mobile: 48px 20px;
  --section-padding-desktop: 80px 20px;
  --card-padding: 24px;
  --button-padding: 16px 32px;
  --line-height: 1.6;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  font-size: 16px;
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: 1.2;
}

h1 {
  font-size: 32px;
  margin-bottom: 16px;
}

h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

p {
  margin-bottom: 16px;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--section-padding-mobile);
}

.section--gray {
  background-color: var(--color-light-gray);
}

.section .container {
  padding: 0;
}

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

/* ---------- Sticky Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.2s;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

.site-header.scrolled {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.site-logo {
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  color: #FFFFFF;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #FFFFFF;
  font-weight: var(--font-weight-bold);
  font-size: 16px;
  text-decoration: none;
}

.header-phone:hover {
  text-decoration: none;
  opacity: 0.9;
}

.header-phone .phone-icon {
  font-size: 18px;
}

/* ---------- Hero Section ---------- */
.hero {
  padding: 48px 20px;
  text-align: center;
  background-color: var(--color-background);
}

.hero .container {
  padding: 0;
}

.hero h1 {
  color: var(--color-primary);
  margin-bottom: 16px;
}

.hero .hero-subtext {
  font-size: 17px;
  color: var(--color-text);
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero .cta-button {
  width: 100%;
  max-width: 100%;
  text-align: center;
  font-size: 18px;
}

.hero-details {
  margin-top: 16px;
  font-size: 14px;
  color: var(--color-muted);
}

.hero-details span {
  display: inline-block;
  margin: 0 8px;
}

.hero-disclaimer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--color-border);
  font-size: 13px;
  color: var(--color-muted);
  font-style: italic;
}

/* ---------- CTA Button ---------- */
.cta-button {
  background: var(--color-cta);
  color: #FFFFFF;
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  padding: var(--button-padding);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.1s;
}

.cta-button:hover {
  background: var(--color-cta-hover);
  text-decoration: none;
  color: #FFFFFF;
}

.cta-button:active {
  transform: scale(0.98);
}

/* ---------- Trust Signals ---------- */
.trust-signals {
  padding: var(--section-padding-mobile);
  background-color: var(--color-light-gray);
}

.trust-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--color-background);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.trust-item .trust-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.trust-item h3 {
  font-size: 16px;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.trust-item p {
  font-size: 14px;
  color: var(--color-muted);
  margin-bottom: 0;
}

/* ---------- How It Works ---------- */
.how-it-works {
  padding: var(--section-padding-mobile);
  text-align: center;
}

.how-it-works h2 {
  margin-bottom: 32px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step {
  padding: var(--card-padding);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #FFFFFF;
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  border-radius: 50%;
  margin-bottom: 12px;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  color: var(--color-muted);
  font-size: 15px;
  margin-bottom: 0;
}

/* ---------- FAQ / Accordion ---------- */
.faq {
  padding: var(--section-padding-mobile);
  background-color: var(--color-light-gray);
}

.faq h2 {
  text-align: center;
  margin-bottom: 32px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 20px;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--color-light-gray);
}

.faq-question::after {
  content: '+';
  font-size: 22px;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item.active .faq-question::after {
  content: '\2212';
  transform: rotate(0deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 20px 16px;
  font-size: 15px;
  color: var(--color-muted);
  line-height: var(--line-height);
}

/* ---------- About Section ---------- */
.about {
  padding: var(--section-padding-mobile);
}

.about h2 {
  text-align: center;
  margin-bottom: 24px;
}

.about p {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: var(--color-text);
}

/* ---------- Second CTA Section ---------- */
.cta-section {
  padding: var(--section-padding-mobile);
  background-color: var(--color-primary);
  text-align: center;
  color: #FFFFFF;
}

.cta-section h2 {
  color: #FFFFFF;
  margin-bottom: 8px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
}

.cta-section .cta-button {
  width: 100%;
  max-width: 100%;
  font-size: 18px;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 20px;
  background-color: #1A1A2E;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-size: 14px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-disclaimer {
  max-width: 600px;
  margin: 0 auto 16px;
  font-size: 13px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

/* ---------- Page Content (for about, privacy, terms, disclaimer) ---------- */
.page-content {
  padding: var(--section-padding-mobile);
}

.page-content h1 {
  margin-bottom: 24px;
  text-align: center;
}

.page-content h2 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 20px;
}

.page-content p,
.page-content li {
  margin-bottom: 12px;
  line-height: var(--line-height);
}

.page-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.page-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ---------- Desktop Breakpoint (960px+) ---------- */
@media (min-width: 960px) {
  body {
    font-size: 18px;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 36px;
  }

  .section {
    padding: var(--section-padding-desktop);
  }

  /* Header */
  .site-header .container {
    padding: 14px 20px;
  }

  .site-logo {
    font-size: 20px;
  }

  .header-phone {
    font-size: 18px;
  }

  /* Hero */
  .hero {
    padding: 80px 20px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero .hero-subtext {
    font-size: 19px;
  }

  .hero .cta-button {
    width: auto;
    max-width: 400px;
    font-size: 20px;
  }

  /* Trust Signals */
  .trust-signals {
    padding: var(--section-padding-desktop);
  }

  .trust-grid {
    flex-direction: row;
    gap: 24px;
  }

  .trust-item {
    flex: 1;
    flex-direction: column;
    text-align: center;
    padding: var(--card-padding);
  }

  /* How It Works */
  .how-it-works {
    padding: var(--section-padding-desktop);
  }

  .steps {
    flex-direction: row;
    gap: 32px;
  }

  .step {
    flex: 1;
    position: relative;
  }

  .step:not(:last-child)::after {
    content: '\2192';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--color-muted);
  }

  /* FAQ */
  .faq {
    padding: var(--section-padding-desktop);
  }

  .faq-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* About */
  .about {
    padding: var(--section-padding-desktop);
  }

  /* CTA Section */
  .cta-section {
    padding: var(--section-padding-desktop);
  }

  .cta-section .cta-button {
    width: auto;
    max-width: 400px;
    font-size: 20px;
  }

  /* Page Content */
  .page-content {
    padding: var(--section-padding-desktop);
  }

  .page-content .container {
    max-width: 720px;
  }
}

/* ---------- Utility: Screen reader only ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
