/* ============================================
   ELDERISYN DESIGN SYSTEM
   Premium, warm, emotionally resonant
   With dark mode support
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #1B6E72;
  --color-primary-dark: #145456;
  --color-primary-light: #238E93;
  --color-secondary: #4CAF7D;
  --color-accent: #E8935A;
  --color-accent-hover: #D4803E;
  --color-bg: #FAF8F5;
  --color-surface: #F0EDE8;
  --color-text: #1A1A1A;
  --color-text-secondary: #6B6B6B;
  --color-text-inverse: #FFFFFF;
  --color-emergency: #C0392B;
  --color-border: #E0DDD8;
  --color-white: #FFFFFF;
  --color-card-bg: #FFFFFF;

  /* Nav specific */
  --nav-bg: rgba(250, 248, 245, 0.92);
  --nav-border: var(--color-border);

  /* Footer specific */
  --footer-bg: #1A1A1A;
  --footer-text: rgba(255, 255, 255, 0.7);
  --footer-text-muted: rgba(255, 255, 255, 0.5);
  --footer-text-dimmed: rgba(255, 255, 255, 0.4);
  --footer-link: rgba(255, 255, 255, 0.6);
  --footer-link-hover: #FFFFFF;
  --footer-heading: #FFFFFF;
  --footer-border: rgba(255, 255, 255, 0.1);
  --footer-disclaimer: rgba(255, 255, 255, 0.35);

  /* Hero / CTA gradients */
  --hero-gradient: linear-gradient(135deg, #1B6E72 0%, #1A5C60 40%, #1B6E72 60%, #4CAF7D 100%);
  --cta-gradient: linear-gradient(135deg, #1B6E72 0%, #1A5C60 50%, #4CAF7D 100%);

  /* Callout */
  --callout-bg: #F0EDE8;
  --callout-warning-bg: #FDF2F0;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(27, 110, 114, 0.06);
  --shadow-md: 0 4px 20px rgba(27, 110, 114, 0.08);
  --shadow-lg: 0 8px 40px rgba(27, 110, 114, 0.12);
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);

  /* Pricing */
  --pricing-unavailable: #E0DDD8;
  --pricing-check-color: %234CAF7D;
  --pricing-x-color: %23E0DDD8;

  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, 'Inter', BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --max-width: 1200px;
  --nav-height: 72px;
}

/* --- Dark Theme --- */
[data-theme="dark"] {
  --color-bg: #1A1A2E;
  --color-surface: #16213E;
  --color-text: #E5E5E5;
  --color-text-secondary: #9CA3AF;
  --color-text-inverse: #1A1A2E;
  --color-border: #2A2A4A;
  --color-white: #1E1E36;
  --color-card-bg: #16213E;
  --color-emergency: #E74C3C;

  --nav-bg: rgba(26, 26, 46, 0.92);
  --nav-border: #2A2A4A;

  --footer-bg: #0F0F23;
  --footer-text: rgba(229, 229, 229, 0.7);
  --footer-text-muted: rgba(229, 229, 229, 0.5);
  --footer-text-dimmed: rgba(229, 229, 229, 0.4);
  --footer-link: rgba(229, 229, 229, 0.6);
  --footer-link-hover: #E5E5E5;
  --footer-heading: #E5E5E5;
  --footer-border: rgba(229, 229, 229, 0.1);
  --footer-disclaimer: rgba(229, 229, 229, 0.35);

  --hero-gradient: linear-gradient(135deg, #0F3D3F 0%, #0D2E30 40%, #0F3D3F 60%, #2D7A53 100%);
  --cta-gradient: linear-gradient(135deg, #0F3D3F 0%, #0D2E30 50%, #2D7A53 100%);

  --callout-bg: #16213E;
  --callout-warning-bg: #2A1A16;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.2);

  --pricing-unavailable: #3A3A5A;
  --pricing-check-color: %234CAF7D;
  --pricing-x-color: %233A3A5A;
}

/* --- Color transition for dark mode --- */
html, body, .nav, .card, .pricing-card, .footer, .section-alt,
.hero, .cta-banner, .page-header, .callout, .callout-warning,
.toggle-switch, .faq-question, .btn, .nav-links,
h1, h2, h3, h4, h5, h6, p, a, span, li {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -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; transition: color 0.2s; }
a:hover { color: var(--color-primary-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.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;
}

.text-center { text-align: center; }
.text-secondary { color: var(--color-text-secondary); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background: var(--color-accent);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 147, 90, 0.35);
}

.btn-secondary {
  background: transparent;
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.8);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #FFFFFF;
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
  z-index: 1000;
  transition: box-shadow 0.3s, background-color 0.3s, border-color 0.3s;
}

.nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo:hover { opacity: 0.9; }

.nav-logo svg {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--color-primary);
}

.nav-cta {
  padding: 0.625rem 1.5rem !important;
  font-size: 0.9rem !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* --- Dark Mode Toggle --- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(27, 110, 114, 0.06);
}

[data-theme="dark"] .theme-toggle:hover {
  background: rgba(27, 110, 114, 0.15);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.4s ease, opacity 0.3s ease;
  position: absolute;
}

.theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

.theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-2xl);
  background: var(--hero-gradient);
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 70%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(76, 175, 125, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--color-bg), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero h1 {
  color: #FFFFFF;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* --- Sections --- */
.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background: var(--color-surface);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--color-text-secondary);
  font-size: 1.15rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

/* --- Cards --- */
.card {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(27, 110, 114, 0.08), rgba(76, 175, 125, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}

[data-theme="dark"] .card-icon {
  background: linear-gradient(135deg, rgba(27, 110, 114, 0.2), rgba(76, 175, 125, 0.2));
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

/* --- Grid Layouts --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

/* --- Problem Section --- */
.problem-card {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}

.problem-card .card-icon {
  margin: 0 auto var(--space-md);
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.06), rgba(232, 147, 90, 0.08));
  color: var(--color-accent);
}

[data-theme="dark"] .problem-card .card-icon {
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.15), rgba(232, 147, 90, 0.15));
}

/* --- Steps / How It Works --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  counter-reset: step;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
}

.step h3 { margin-bottom: 0.5rem; }

.step p {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

.step-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-sm);
  color: var(--color-primary);
  opacity: 0.7;
}

.step-icon svg { width: 100%; height: 100%; }

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* --- Trust Section --- */
.trust-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.trust-item {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}

.trust-item .card-icon {
  margin: 0 auto var(--space-md);
  background: linear-gradient(135deg, rgba(27, 110, 114, 0.1), rgba(76, 175, 125, 0.1));
  width: 64px;
  height: 64px;
}

[data-theme="dark"] .trust-item .card-icon {
  background: linear-gradient(135deg, rgba(27, 110, 114, 0.25), rgba(76, 175, 125, 0.25));
}

.trust-item .card-icon svg {
  width: 32px;
  height: 32px;
}

/* --- Pricing --- */
.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  font-weight: 500;
}

.pricing-toggle span {
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.pricing-toggle span.active {
  color: var(--color-text);
  font-weight: 600;
}

.toggle-switch {
  position: relative;
  width: 56px;
  height: 30px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.3s;
  border: none;
  padding: 0;
}

.toggle-switch[aria-checked="true"] {
  background: var(--color-primary);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.toggle-switch[aria-checked="true"]::after {
  transform: translateX(26px);
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: 850px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border: 2px solid var(--color-primary);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.375rem 1.25rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-secondary);
}

.pricing-desc {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.pricing-features {
  margin-bottom: var(--space-lg);
}

.pricing-features li {
  padding: 0.5rem 0;
  padding-left: 1.75rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.pricing-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234CAF7D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.pricing-features li.unavailable {
  color: var(--pricing-unavailable);
}

.pricing-features li.unavailable::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E0DDD8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}

[data-theme="dark"] .pricing-features li.unavailable::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A3A5A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}

.pricing-card .btn {
  width: 100%;
}

/* --- FAQ / Accordion --- */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: var(--space-md) 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  transition: transform 0.3s;
  color: var(--color-text-secondary);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

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

.faq-answer-inner {
  padding-bottom: var(--space-md);
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 400px;
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--cta-gradient);
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner h2 {
  color: #FFFFFF;
  margin-bottom: var(--space-sm);
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
  margin-bottom: var(--space-lg);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Footer --- */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer-brand .nav-logo {
  display: inline-flex;
  margin-bottom: var(--space-sm);
}

.footer-brand .nav-logo svg .logo-wordmark {
  fill: var(--footer-heading);
}

.footer-brand .nav-logo svg .logo-icon-primary {
  fill: var(--color-primary);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--footer-text-muted);
}

.footer h4 {
  color: var(--footer-heading);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer ul a {
  color: var(--footer-link);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer ul a:hover {
  color: var(--footer-link-hover);
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--footer-disclaimer);
  line-height: 1.6;
  border-top: 1px solid var(--footer-border);
  padding-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--footer-text-dimmed);
}

/* --- Page Header (inner pages) --- */
.page-header {
  padding: calc(var(--nav-height) + var(--space-xl)) 0 var(--space-xl);
  background: var(--hero-gradient);
  text-align: center;
}

.page-header h1 {
  color: #FFFFFF;
  margin-bottom: var(--space-xs);
}

.page-header p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.15rem;
}

/* --- Prose / Long-form text --- */
.prose {
  max-width: 780px;
  margin: 0 auto;
}

.prose h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  font-size: 1.75rem;
}

.prose h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
  font-size: 1.3rem;
}

.prose p {
  margin-bottom: var(--space-sm);
  color: var(--color-text-secondary);
}

.prose ul, .prose ol {
  margin-bottom: var(--space-sm);
  padding-left: 1.5rem;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
  margin-bottom: 0.375rem;
  color: var(--color-text-secondary);
}

.prose strong { color: var(--color-text); }

.callout {
  background: var(--callout-bg);
  border-left: 4px solid var(--color-primary);
  padding: var(--space-md);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--space-lg) 0;
}

.callout p { margin-bottom: 0; }

.callout-warning {
  border-left-color: var(--color-emergency);
  background: var(--callout-warning-bg);
}

/* --- About page --- */
.about-values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.about-value {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.about-value h3 { margin-bottom: 0.5rem; }
.about-value p { color: var(--color-text-secondary); font-size: 1rem; }

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-3, .features-grid, .steps, .trust-items {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-120%);
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-toggle {
    display: block;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--nav-height) + var(--space-xl)) 0 var(--space-xl);
  }

  .hero h1 { font-size: 2rem; }

  .grid-3, .grid-2, .features-grid, .steps, .trust-items {
    grid-template-columns: 1fr;
  }

  .pricing-cards {
    grid-template-columns: 1fr;
    max-width: 450px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .section { padding: var(--space-xl) 0; }
  .section-header { margin-bottom: var(--space-lg); }

  .about-values {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .container { padding: 0 var(--space-sm); }
  .card { padding: var(--space-md); }
  .pricing-card { padding: var(--space-lg) var(--space-md); }
}

/* --- Nav actions container --- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  .theme-toggle svg {
    transition: none;
  }
}

/* --- High contrast --- */
@media (prefers-contrast: high) {
  :root {
    --color-text-secondary: #333333;
    --shadow-card: 0 0 0 2px var(--color-text);
  }
  .btn-primary {
    border: 2px solid var(--color-text);
  }
}