/* AfterLoss shared styles. Calm, generous, older-audience-friendly. */

:root {
  --sage: #7c8a6f;
  --sage-deep: #5e6b54;
  --sage-soft: #e6ebe0;
  --cream: #fefcf7;
  --warm-cream: #f5efe4;
  --ink: #3a3a3a;
  --ink-muted: #6b6b6b;
  --rust: #b8755a;
  --rust-deep: #9a5e46;
  --rust-soft: #f4e3db;
  --shadow-soft: 0 2px 12px rgba(58, 58, 58, 0.06);
  --shadow-card: 0 4px 24px rgba(58, 58, 58, 0.08);
  --radius: 14px;
  --radius-lg: 22px;
  --max-w: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 640px) {
  body { font-size: 18px; }
}

h1, h2, h3, h4 {
  font-family: Georgia, 'Source Serif Pro', 'Source Serif 4', serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 16px;
}

h1 { font-size: clamp(48px, 7vw, 80px); line-height: 1.05; }
h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.15; margin-bottom: 20px; }
h3 { font-size: clamp(22px, 2.5vw, 28px); line-height: 1.3; margin-bottom: 12px; }
h4 { font-size: 20px; line-height: 1.35; margin-bottom: 10px; }

p { margin: 0 0 16px; }

a { color: var(--rust-deep); text-decoration: none; border-bottom: 1px solid currentColor; }
a:hover { color: var(--rust); }

img, svg { max-width: 100%; display: block; }

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

section { padding: 96px 0; }
@media (max-width: 640px) { section { padding: 64px 0; } }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 24px;
}

.lede {
  font-size: 22px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 620px;
  margin: 0 0 32px;
}

@media (max-width: 640px) { .lede { font-size: 19px; } }

/* Buttons */
.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 16px 32px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background 200ms ease, transform 150ms ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--rust);
  color: white;
}
.btn-primary:hover { background: var(--rust-deep); color: white; }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

/* Nav */
.site-nav {
  padding: 24px 0;
  background: var(--cream);
  border-bottom: 1px solid var(--sage-soft);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand {
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border: none;
}
.brand .dot { color: var(--rust); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--ink);
  font-size: 16px;
  border: none;
  font-weight: 500;
}
.nav-links a:hover { color: var(--rust-deep); }
@media (max-width: 640px) {
  .nav-links { gap: 16px; }
  .nav-links a:not(.btn-primary) { display: none; }
}

/* Hero */
.hero {
  padding: 80px 0 96px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--warm-cream) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.hero-illo {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(124, 138, 111, 0.18));
}

.email-form {
  display: flex;
  gap: 12px;
  max-width: 520px;
  margin: 32px 0 16px;
  flex-wrap: wrap;
}
.email-form input[type=email] {
  flex: 1 1 240px;
  min-height: 56px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--sage);
  font-size: 18px;
  font-family: inherit;
  background: white;
  color: var(--ink);
  outline: none;
}
.email-form input[type=email]:focus {
  border-color: var(--rust);
  box-shadow: 0 0 0 4px var(--rust-soft);
}
.trust-line {
  font-size: 16px;
  color: var(--ink-muted);
  margin: 0;
}
.form-msg { font-size: 16px; margin: 8px 0 0; min-height: 22px; }
.form-msg.ok { color: var(--sage-deep); }
.form-msg.err { color: var(--rust-deep); }

/* Decision tree */
.tree-section { background: var(--cream); }
.tree-wrap {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.tree-svg {
  width: 100%;
  height: auto;
  margin: 32px auto 24px;
}
.tree-caption {
  font-size: 18px;
  color: var(--ink-muted);
  max-width: 540px;
  margin: 0 auto;
}

/* Calculators */
.calc-section { background: var(--warm-cream); }
.calc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}
@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; }
}
.calc-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.calc-card h3 {
  margin-bottom: 12px;
}
.calc-rule {
  height: 2px;
  background: var(--sage);
  width: 48px;
  margin: 0 0 20px;
  border-radius: 2px;
}
.calc-card label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 14px 0 6px;
}
.calc-card input[type=number],
.calc-card select {
  width: 100%;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid #d8dccf;
  font-size: 17px;
  font-family: inherit;
  background: white;
  color: var(--ink);
  outline: none;
}
.calc-card input[type=number]:focus,
.calc-card select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-soft);
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 16px;
}
.checkbox-row input[type=checkbox] {
  width: 22px;
  height: 22px;
  accent-color: var(--sage);
  margin: 0;
}
.calc-result {
  margin-top: 24px;
  padding: 20px;
  background: var(--sage-soft);
  border-radius: 12px;
  font-size: 17px;
  color: var(--ink);
  min-height: 80px;
}
.calc-result strong { color: var(--sage-deep); font-size: 20px; }
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge.yes { background: var(--rust-soft); color: var(--rust-deep); }
.badge.no { background: #dde6d5; color: var(--sage-deep); }
.calc-disclaimer {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 12px;
  font-style: italic;
}

/* Steps */
.steps-section { background: var(--cream); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}
@media (max-width: 900px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card {
  text-align: left;
  padding: 8px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 20px;
}
.step-icon { width: 40px; height: 40px; color: var(--sage); margin-bottom: 12px; }
.step-card h3 { margin-bottom: 8px; }
.step-card p { color: var(--ink-muted); font-size: 17px; }

/* Timeline */
.timeline-section { background: var(--warm-cream); }
.timeline-scroll {
  overflow-x: auto;
  padding: 16px 0 32px;
  margin-top: 40px;
  scrollbar-color: var(--sage) transparent;
}
.timeline-track {
  display: flex;
  gap: 20px;
  padding: 0 4px;
  min-width: min-content;
}
.timeline-card {
  flex: 0 0 240px;
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border-top: 4px solid var(--sage);
}
.timeline-card .when {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 8px;
}
.timeline-card h4 { margin-bottom: 8px; font-size: 19px; }
.timeline-card p { font-size: 15px; color: var(--ink-muted); margin: 0; }
.timeline-caption {
  text-align: center;
  font-size: 17px;
  color: var(--ink-muted);
  margin-top: 16px;
}

/* Trust strip */
.trust-section {
  background: var(--sage-deep);
  color: var(--cream);
  padding: 48px 0;
  text-align: center;
}
.trust-section p {
  font-family: Georgia, serif;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.4;
  max-width: 820px;
  margin: 0 auto 20px;
  color: var(--cream);
}
.pill-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.pill {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(254, 252, 247, 0.12);
  border: 1px solid rgba(254, 252, 247, 0.25);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--cream);
}

/* Preview */
.preview-section { background: var(--cream); }
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) { .preview-grid { grid-template-columns: 1fr; } }
.fake-plan {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.fake-plan-task {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--sage-soft);
}
.fake-plan-task:last-of-type { border-bottom: none; }
.check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--sage);
  flex: 0 0 26px;
  margin-top: 2px;
}
.check.done {
  background: var(--sage);
  position: relative;
}
.check.done::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 8px;
  height: 14px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.task-body h4 { margin-bottom: 4px; font-size: 18px; }
.task-body .meta { font-size: 14px; color: var(--ink-muted); }
.fade-more {
  text-align: center;
  padding: 32px 0 8px;
  background: linear-gradient(180deg, transparent, var(--sage-soft));
  margin: 16px -28px -28px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  color: var(--sage-deep);
  font-style: italic;
}

/* Pricing */
.pricing-section { background: var(--warm-cream); }
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 40px;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 700px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.price-card.feature { border: 2px solid var(--rust); }
.price-tag {
  font-family: Georgia, serif;
  font-size: 56px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin: 16px 0 8px;
}
.price-tag .currency { font-size: 32px; vertical-align: super; color: var(--ink-muted); }
.price-meta { font-size: 16px; color: var(--ink-muted); margin-bottom: 20px; }
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  text-align: left;
  font-size: 17px;
}
.price-card li {
  padding: 8px 0 8px 28px;
  position: relative;
}
.price-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--sage);
  border-bottom: 2px solid var(--sage);
  transform: rotate(-45deg);
}
.pricing-care {
  text-align: center;
  font-size: 17px;
  color: var(--ink-muted);
  margin-top: 28px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ */
.faq-section { background: var(--cream); }
.faq-list { max-width: 780px; margin: 40px auto 0; }
details.faq {
  border-top: 1px solid var(--sage-soft);
  padding: 20px 0;
}
details.faq:last-of-type { border-bottom: 1px solid var(--sage-soft); }
details.faq summary {
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 22px;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+';
  font-size: 28px;
  color: var(--sage);
  transition: transform 200ms ease;
}
details.faq[open] summary::after { content: '-'; }
details.faq p {
  margin: 12px 0 0;
  font-size: 18px;
  color: var(--ink-muted);
}

/* Final CTA */
.final-cta-section {
  background: var(--sage-deep);
  color: var(--cream);
  text-align: center;
}
.final-cta-section h2 { color: var(--cream); }
.final-cta-section .email-form { margin: 32px auto; justify-content: center; }
.final-cta-section .email-form input[type=email] {
  background: rgba(254, 252, 247, 0.95);
  border-color: transparent;
}

/* Footer */
.site-footer {
  background: var(--cream);
  padding: 48px 0 32px;
  border-top: 1px solid var(--sage-soft);
  font-size: 15px;
  color: var(--ink-muted);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--ink-muted); border-bottom: 1px solid transparent; }
.site-footer a:hover { color: var(--ink); border-bottom-color: currentColor; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* Generic prose for content pages */
.prose {
  max-width: 720px;
  margin: 0 auto;
}
.prose p, .prose li { font-size: 19px; line-height: 1.7; }
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 28px; }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
