/* ====== Base Styles ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #0f172a;
  background-color: #f8fafc;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

main {
  display: block;
}

/* ====== Layout ====== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background-color: #f1f5f9;
}

.section-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-header {
  max-width: 720px;
}

.section-header h2 {
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

.section-header p {
  margin: 0;
  color: #64748b;
}

/* ====== Header ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.92));
  color: #e5e7eb;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #22c55e);
  font-size: 0.8rem;
  font-weight: 700;
  color: #f9fafb;
}

.logo-text {
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.main-nav a {
  color: #e5e7eb;
  opacity: 0.9;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  transition: width 0.2s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  width: 100%;
}

/* ====== Hero ====== */
.hero {
  background: radial-gradient(circle at top left, #1d4ed8, #020617);
  color: #e5e7eb;
  padding: 4rem 0 3.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  margin: 0 0 1rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  margin: 0 0 1.25rem;
  color: #cbd5f5;
}

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  color: #e5e7eb;
}

.hero-bullets li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.95rem;
}

.hero-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #22c55e;
}

.hero-highlight {
  display: none;
}

.hero-card {
  background: radial-gradient(circle at top left, #22c55e, #1d4ed8);
  padding: 1.5rem 1.75rem;
  border-radius: 1.25rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.5);
}

.hero-card-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #dbeafe;
  margin: 0 0 0.5rem;
}

.hero-card-value {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #f9fafb;
}

.hero-card-note {
  margin: 0;
  font-size: 0.8rem;
  color: #dbeafe;
}

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, #2563eb, #22c55e);
  color: #f9fafb;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.45);
}

.btn-full {
  width: 100%;
  padding: 0.75rem 1.5rem;
}

/* ====== Cards ====== */
.card {
  background-color: #ffffff;
  border-radius: 1rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
}

.card-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card-results {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card-chart {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ====== Calculator Layout ====== */
.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr);
  gap: 1.5rem;
}

/* ====== Form Fields ====== */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.field-value {
  font-size: 0.85rem;
  color: #2563eb;
  font-weight: 600;
}

.field-with-prefix,
.field-with-suffix {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.field-prefix,
.field-suffix {
  font-size: 0.9rem;
  color: #64748b;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  background-color: #f1f5f9;
}

input[type='number'],
select {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5f5;
  background-color: #ffffff;
  width: 100%;
  color: #0f172a;
}

input[type='number']:focus-visible,
select:focus-visible,
input[type='range']:focus-visible {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb33;
}

input[type='number']::placeholder {
  color: #cbd5f5;
}

select {
  cursor: pointer;
}

input[type='range'] {
  width: 100%;
  accent-color: #2563eb;
}

.range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #9ca3af;
}

.field-help {
  margin: 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.form-error {
  margin: 0;
  font-size: 0.85rem;
  color: #b91c1c;
  min-height: 1rem;
}

/* ====== Results ====== */
.results-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.results-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.results-block {
  background: linear-gradient(135deg, #2563eb, #0f172a);
  color: #e5e7eb;
  border-radius: 0.9rem;
  padding: 1.25rem 1.35rem;
}

.results-label {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #bfdbfe;
}

.results-value {
  margin: 0 0 0.1rem;
  font-size: 1.75rem;
  font-weight: 700;
}

.results-caption {
  margin: 0;
  font-size: 0.8rem;
  color: #cbd5f5;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.results-item {
  border-radius: 0.85rem;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  padding: 0.9rem 1rem;
}

.results-subvalue {
  margin: 0.1rem 0 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
}

.results-note {
  font-size: 0.8rem;
  color: #4b5563;
  background-color: #fffbeb;
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #facc15;
}

.results-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

.results-meta-text {
  margin: 0;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background-color: #e2e8f0;
  color: #1e293b;
}

.risk-badge::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: currentColor;
}

.results-facts {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.85rem;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.results-facts li {
  line-height: 1.4;
}

.results-facts strong {
  color: #0f172a;
}

.scenario-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  padding: 1.1rem 1.2rem;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scenario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scenario-title {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
}

.scenario-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.scenario-table-wrapper {
  overflow-x: auto;
}

.scenario-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.scenario-table th,
.scenario-table td {
  text-align: left;
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid #e2e8f0;
}

.scenario-table th:first-child,
.scenario-table td:first-child {
  padding-left: 0;
}

.scenario-table th:last-child,
.scenario-table td:last-child {
  padding-right: 0;
}

.scenario-table tr:last-child td,
.scenario-table tr:last-child th {
  border-bottom: none;
}

.scenario-footnote {
  margin: 0;
  font-size: 0.8rem;
  color: #475569;
}

/* ====== Chart ====== */
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.chart-title {
  margin: 0;
  font-weight: 600;
}

.chart-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.chart-wrapper {
  width: 100%;
  height: 260px;
}

/* ====== Learn Section ====== */
.section-grid {
  display: grid;
  gap: 2rem;
}

.learn-cards {
  display: grid;
  gap: 1.25rem;
}

.info-card {
  background-color: #ffffff;
  border-radius: 0.9rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid #e2e8f0;
}

.info-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.info-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.profile-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.profile-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #475569;
  gap: 0.5rem;
}

.profile-list li strong {
  color: #0f172a;
}

.profile-note {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.insights-grid {
  display: grid;
  gap: 1.25rem;
}

.savings-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.savings-form input {
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  font: inherit;
}

.savings-result {
  border-top: 1px solid #e2e8f0;
  padding-top: 0.85rem;
}

.feed-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.data-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.data-feed li {
  font-size: 0.9rem;
  color: #475569;
}

.data-feed li strong {
  color: #0f172a;
}

.historical-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.range-btn {
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  background-color: transparent;
  color: #4338ca;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.range-btn.active,
.range-btn:hover,
.range-btn:focus-visible {
  background-color: #4338ca;
  color: #f9fafb;
  border-color: #4338ca;
}

/* ====== FAQ ====== */
.faq-list {
  display: grid;
  gap: 1.25rem;
}

.faq-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  color: #4b5563;
  font-size: 0.95rem;
}

.static-page {
  background-color: #f8fafc;
  min-height: 100vh;
}

.static-main {
  padding: 4rem 0 3rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0 0 0.25rem;
}

.about-grid,
.contact-grid {
  display: grid;
  gap: 1.5rem;
}

.contact-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #475569;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #d0d7e8;
  background-color: #ffffff;
}

.contact-form textarea {
  resize: vertical;
}

.policy-card {
  background-color: #ffffff;
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.policy-card h2 {
  margin: 1rem 0 0.35rem;
  font-size: 1.15rem;
}

.policy-card ul {
  margin: 0 0 0.5rem;
  padding-left: 1.25rem;
  color: #4b5563;
  line-height: 1.6;
}

.form-help,
.form-help a {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
}

.highlight-once {
  animation: pulseHighlight 0.6s ease;
}

@keyframes pulseHighlight {
  0% {
    background-color: rgba(34, 197, 94, 0.25);
  }
  100% {
    background-color: transparent;
  }
}

/* ====== Footer ====== */
.site-footer {
  padding: 1.75rem 0 2.25rem;
  background-color: #020617;
  color: #9ca3af;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  text-align: center;
}

.footer-copy {
  margin: 0;
}

.footer-note {
  margin: 0;
  color: #6b7280;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.9rem;
}

.footer-links a {
  color: #f9fafb;
  opacity: 0.85;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  opacity: 1;
  text-decoration: underline;
}

/* ====== Responsive ====== */
@media (min-width: 768px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
  }

  .hero-highlight {
    display: block;
  }

  .hero {
    padding: 4.5rem 0 4rem;
  }

  .calculator-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    align-items: flex-start;
  }

  .section-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr);
  }

  .learn-cards {
    grid-template-columns: 1fr;
  }

  .main-nav {
    font-size: 0.9rem;
  }

  .insights-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .chart-wrapper {
    height: 320px;
  }
}

@media (max-width: 640px) {
  .main-nav {
    display: none;
  }

  .hero {
    padding-top: 3.25rem;
  }

  .header-inner {
    justify-content: space-between;
  }

  .logo-text {
    font-size: 0.9rem;
  }
}


