/* ─────────────────────────────────────────────────────────────
   FinFlow Family · marketing site (finflowfamily.com)
   Shared stylesheet for umbrella + Grows/Life/Business drill-ins.

   Design tokens align with the in-product hub (welcome.html,
   index.html on finflowfamily.app). The marketing surface adds:
   per-app color theming, drill-in heroes, long-form sections,
   FAQ accordion, and the request-access modal.
   ───────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand */
  --navy: #1B2D4F;
  --navy-deep: #1B3A6B;
  --blue: #3B6EA5;
  --blue-light: #5B9BD5;
  --gold: #E8A030;
  --orange: #FF6A00;
  --cream: #F7F4EE;

  /* Surfaces */
  --bg: #EEF4FB;
  --surface: #FFFFFF;
  --surface-soft: #F7F9FC;
  --paper: #FBFAF6;

  /* Borders */
  --border: rgba(27, 45, 79, 0.10);
  --border-strong: rgba(27, 45, 79, 0.18);

  /* Text */
  --text: #1B2D4F;
  --text-muted: #6B7C99;
  --text-soft: #9BA5B4;

  /* Per-app colors */
  --grows: #FF6A00;
  --grows-soft: rgba(255, 106, 0, 0.10);
  --grows-tint: rgba(255, 106, 0, 0.04);
  --life: #3B6EA5;
  --life-soft: rgba(59, 110, 165, 0.10);
  --life-tint: rgba(59, 110, 165, 0.04);
  --biz: #676767;
  --biz-soft: rgba(103, 103, 103, 0.10);
  --biz-tint: rgba(103, 103, 103, 0.04);

  /* Radii */
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 6px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(27, 45, 79, 0.04);
  --shadow-md: 0 6px 20px rgba(27, 45, 79, 0.06);
  --shadow-lg: 0 20px 50px rgba(27, 45, 79, 0.10);
}

html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Cantarell', system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─────────────────────────────────────────────────────────────
   Top navigation (shared)
   ───────────────────────────────────────────────────────────── */

nav.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 2rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--navy);
}
.brand-mark { flex-shrink: 0; }
.brand-word { height: 26px; }

/* Back link on drill-ins */
.nav-back {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.15s;
}
.nav-back:hover { color: var(--navy); }
.nav-back .arrow { display: inline-block; transition: transform 0.18s; }
.nav-back:hover .arrow { transform: translateX(-3px); }
[dir="rtl"] .nav-back .arrow { transform: scaleX(-1); }
[dir="rtl"] .nav-back:hover .arrow { transform: scaleX(-1) translateX(-3px); }

/* Right side of nav */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Sign-in link */
.nav-signin {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-signin:hover { color: var(--navy); }
.nav-signin .arrow { display: inline-block; transition: transform 0.18s; }
.nav-signin:hover .arrow { transform: translateX(3px); }
[dir="rtl"] .nav-signin .arrow { transform: scaleX(-1); }
[dir="rtl"] .nav-signin:hover .arrow { transform: scaleX(-1) translateX(3px); }

/* Language toggle */
.lang-toggle {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-btn.active {
  background: var(--navy);
  color: #fff;
}
.lang-btn:not(.active):hover { color: var(--navy); }

/* ─────────────────────────────────────────────────────────────
   Main + container
   ───────────────────────────────────────────────────────────── */

main {
  flex: 1;
  background: var(--bg);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Page tint — drill-ins get a very subtle wash */
.page-tint-grows main { background: linear-gradient(180deg, var(--grows-tint) 0%, var(--bg) 320px); }
.page-tint-life main  { background: linear-gradient(180deg, var(--life-tint) 0%, var(--bg) 320px); }
.page-tint-biz main   { background: linear-gradient(180deg, var(--biz-tint) 0%, var(--bg) 320px); }

/* ─────────────────────────────────────────────────────────────
   Hero (umbrella and drill-ins share base, drill-ins layer color)
   ───────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 4.5rem 0 3rem;
}

.hero-pill {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--navy);
  margin-bottom: 1rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 .accent {
  position: relative;
  display: inline-block;
  color: var(--blue);
}
.hero h1 .accent::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 4px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.hero p.lead {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--navy);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.95rem 1.9rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.hero-cta:hover {
  background: var(--blue);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(59, 110, 165, 0.35);
}
.hero-cta .arrow { display: inline-block; transition: transform 0.18s; }
.hero-cta:hover .arrow { transform: translateX(3px); }
[dir="rtl"] .hero-cta .arrow { transform: scaleX(-1); }
[dir="rtl"] .hero-cta:hover .arrow { transform: scaleX(-1) translateX(3px); }

/* Drill-in heroes — color-themed CTA */
.page-grows .hero-cta { background: var(--grows); }
.page-grows .hero-cta:hover { background: #E55F00; box-shadow: 0 8px 24px rgba(255, 106, 0, 0.35); }
.page-life .hero-cta { background: var(--life); }
.page-life .hero-cta:hover { background: var(--navy-deep); }
.page-biz .hero-cta { background: #4A4A4A; }
.page-biz .hero-cta:hover { background: #2A2A2A; }

/* Drill-in hero logo */
.drill-hero-logo {
  width: 110px;
  height: 110px;
  margin: 0 auto 1.5rem;
  display: block;
}
.drill-hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
}
.page-grows .drill-hero-tag { background: var(--grows-soft); color: var(--grows); }
.page-life .drill-hero-tag { background: var(--life-soft); color: var(--life); }
.page-biz .drill-hero-tag { background: var(--biz-soft); color: var(--biz); }

/* Hero in-page app pills (umbrella only) */
.hero-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.hero-pill-btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.hero-pill-btn:hover { background: #fff; color: var(--navy); }
.hero-pill-btn .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hero-pill-btn[data-app="grows"] .dot { background: var(--grows); }
.hero-pill-btn[data-app="life"] .dot { background: var(--life); }
.hero-pill-btn[data-app="biz"] .dot { background: var(--biz); }

/* ─────────────────────────────────────────────────────────────
   Sections
   ───────────────────────────────────────────────────────────── */

.section {
  padding: 3.5rem 0;
}
.section + .section { padding-top: 0; }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 1.5rem;
  text-align: center;
}

.section-title.with-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: start;
  margin-bottom: 1.2rem;
}
.section-title.with-rule::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.section-title.with-rule.color-grows::before { background: var(--grows); }
.section-title.with-rule.color-life::before  { background: var(--life); }
.section-title.with-rule.color-biz::before   { background: var(--biz); }

.section-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

/* ─────────────────────────────────────────────────────────────
   Why-FinFlow bullets (umbrella, section 3)
   ───────────────────────────────────────────────────────────── */

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 920px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .why-grid { grid-template-columns: 1fr; gap: 1rem; }
}

.why-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.why-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.why-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--navy);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.why-card-title::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.why-card-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────
   App cards (umbrella, section 4)
   ───────────────────────────────────────────────────────────── */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
@media (max-width: 860px) {
  .apps-grid { grid-template-columns: 1fr; gap: 1rem; max-width: 480px; margin: 0 auto; }
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.7rem 1.7rem;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.app-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.app-card[data-app="grows"]::before { background: var(--grows); }
.app-card[data-app="life"]::before  { background: var(--life); }
.app-card[data-app="biz"]::before   { background: var(--biz); }

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.app-card[data-app="grows"]:hover { border-color: rgba(255, 106, 0, 0.4); }
.app-card[data-app="life"]:hover  { border-color: rgba(59, 110, 165, 0.4); }
.app-card[data-app="biz"]:hover   { border-color: rgba(103, 103, 103, 0.4); }

.app-logo {
  width: 84px; height: 84px;
  margin-bottom: 1.3rem;
  display: block;
}
.app-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.app-card[data-app="grows"] .app-tag { color: var(--grows); }
.app-card[data-app="life"] .app-tag  { color: var(--life); }
.app-card[data-app="biz"] .app-tag   { color: var(--biz); }

.app-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 0.7rem;
}
.app-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}
.app-features {
  list-style: none;
  margin-bottom: 1.5rem;
  flex: 1;
}
.app-features li {
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.32rem 0 0.32rem 1.3rem;
  position: relative;
  line-height: 1.5;
}
.app-features li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.7rem;
  width: 6px; height: 6px;
  border-radius: 50%;
}
.app-card[data-app="grows"] .app-features li::before { background: var(--grows); }
.app-card[data-app="life"] .app-features li::before  { background: var(--life); }
.app-card[data-app="biz"] .app-features li::before   { background: var(--biz); }

.app-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.app-card[data-app="grows"] .app-cta { color: var(--grows); }
.app-card[data-app="life"] .app-cta  { color: var(--life); }
.app-card[data-app="biz"] .app-cta   { color: var(--biz); }
.app-cta .arrow { display: inline-block; transition: transform 0.18s; }
.app-card:hover .app-cta .arrow { transform: translateX(4px); }
[dir="rtl"] .app-cta .arrow { transform: scaleX(-1); }
[dir="rtl"] .app-card:hover .app-cta .arrow { transform: scaleX(-1) translateX(4px); }

/* ─────────────────────────────────────────────────────────────
   How-they-connect diagram (umbrella, section 5)
   ───────────────────────────────────────────────────────────── */

.connect-wrap {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.connect-prose {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.connect-prose strong { color: var(--text); font-weight: 700; }

.connect-diagram {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  max-width: 640px;
  margin: 0 auto;
}
.connect-diagram svg { width: 100%; height: auto; max-width: 560px; display: block; margin: 0 auto; }

/* ─────────────────────────────────────────────────────────────
   Soft-launch note
   ───────────────────────────────────────────────────────────── */

.launch-note {
  background: var(--surface);
  border-inline-start: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.5rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
}
.launch-note strong { color: var(--text); font-weight: 700; }

/* ─────────────────────────────────────────────────────────────
   Request access CTA section
   ───────────────────────────────────────────────────────────── */

.cta-section {
  text-align: center;
  padding: 4rem 0 4.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(232, 160, 48, 0.06) 100%);
}
.cta-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 0.8rem;
}
.cta-section .lead {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 1.7rem;
  line-height: 1.65;
}

/* ─────────────────────────────────────────────────────────────
   Drill-in long-form content
   ───────────────────────────────────────────────────────────── */

.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
}
.prose p { margin-bottom: 1.1rem; color: var(--text); }
.prose p.muted { color: var(--text-muted); font-style: italic; }
.prose strong { font-weight: 700; }

.prose h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin: 2.5rem 0 0.8rem;
}
.prose h4 {
  font-size: 1.05rem;
  font-weight: 700;
  font-style: italic;
  color: var(--navy);
  margin: 1.8rem 0 0.6rem;
}

.prose ul {
  margin: 0.5rem 0 1.2rem;
  padding-inline-start: 0;
  list-style: none;
}
.prose ul li {
  position: relative;
  padding-inline-start: 1.5rem;
  margin-bottom: 0.6rem;
  line-height: 1.65;
}
.prose ul li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.7rem;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-soft);
}
.page-grows .prose ul li::before { background: var(--grows); opacity: 0.7; }
.page-life .prose ul li::before  { background: var(--life); opacity: 0.7; }
.page-biz .prose ul li::before   { background: var(--biz); opacity: 0.7; }

/* Vision belief blocks */
.prose .belief {
  border-inline-start: 3px solid var(--border-strong);
  padding: 0.4rem 0 0.4rem 1.1rem;
  margin: 0.8rem 0 1.4rem;
  padding-inline-start: 1.1rem;
}
.page-grows .prose .belief { border-color: var(--grows); }
.page-life .prose .belief  { border-color: var(--life); }
.page-biz .prose .belief   { border-color: var(--biz); }
.prose .belief p { margin-bottom: 0.4rem; }
.prose .belief p:first-child { font-weight: 700; }
.prose .belief p:last-child { margin-bottom: 0; }

/* ─────────────────────────────────────────────────────────────
   FAQ (accordion using <details>)
   ───────────────────────────────────────────────────────────── */

.faq {
  max-width: 720px;
  margin: 0 auto;
}
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-soft);
  transition: transform 0.2s, color 0.15s;
  line-height: 1;
}
.faq details[open] summary::after {
  content: "−";
  color: var(--text);
}
.faq summary:hover { color: var(--blue); }
.faq summary:hover::after { color: var(--text); }
.faq .faq-answer {
  padding: 0 0 1.2rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq .faq-answer p { margin-bottom: 0.7rem; }
.faq .faq-answer p:last-child { margin-bottom: 0; }

/* ─────────────────────────────────────────────────────────────
   Request-access modal
   ───────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(27, 45, 79, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.modal-backdrop.open {
  display: flex;
  opacity: 1;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(27, 45, 79, 0.4);
  transform: translateY(8px);
  transition: transform 0.22s;
  overflow: hidden;
}
.modal-backdrop.open .modal { transform: translateY(0); }

.modal-header {
  padding: 1.5rem 1.7rem 0.5rem;
  position: relative;
}
.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--navy);
}
.modal-title-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}
.modal-close {
  position: absolute;
  top: 0.9rem;
  inset-inline-end: 0.9rem;
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-size: 1.3rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--surface-soft); color: var(--text); }

.modal-body {
  padding: 1rem 1.7rem 1.5rem;
}

.field {
  margin-bottom: 0.9rem;
}
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}
.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  transition: border-color 0.15s, background 0.15s;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--surface);
}
.field textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  line-height: 1.5;
}
.field-hint {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 0.3rem;
  font-style: italic;
}

.modal-footer {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.btn-primary {
  width: 100%;
  background: var(--navy);
  color: #fff;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 0.85rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover:not(:disabled) { background: var(--blue); }
.btn-primary:disabled {
  background: var(--text-soft);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  text-decoration: underline;
}
.btn-secondary:hover { color: var(--navy); }

/* Modal success / error states */
.modal-state {
  text-align: center;
  padding: 1.5rem 0.5rem 0.5rem;
}
.modal-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.modal-state-success .modal-state-icon {
  background: rgba(91, 127, 74, 0.12);
  color: #5B7F4A;
}
.modal-state-error .modal-state-icon {
  background: rgba(166, 84, 60, 0.12);
  color: #A6543C;
}
.modal-state-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.modal-state-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.modal-state-body a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}
.modal-state-body a:hover { text-decoration: underline; }

/* Form error inline */
.form-error {
  font-size: 0.85rem;
  color: #A6543C;
  margin-top: 0.4rem;
}

/* ─────────────────────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────────────────────── */

footer.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
footer.site-footer .heart { color: var(--gold); }
footer.site-footer .nav-signin { color: var(--text-soft); }
footer.site-footer .nav-signin:hover { color: var(--navy); }

/* ─────────────────────────────────────────────────────────────
   RTL + responsive
   ───────────────────────────────────────────────────────────── */

[dir="rtl"] body { font-family: 'Cantarell', system-ui, -apple-system, sans-serif; }
[dir="rtl"] .brand { direction: ltr; }

@media (max-width: 720px) {
  nav.topbar { padding: 0.85rem 1.2rem; }
  .container, .container-narrow { padding: 0 1.2rem; }
  .brand-word { height: 22px; }
  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 2.5rem 0; }
  .nav-right { gap: 0.5rem; }
  .nav-signin { display: none; }
  footer.site-footer { padding: 1.2rem 1.2rem; }
}

@media (max-width: 480px) {
  .modal-body { padding: 1rem 1.3rem 1.3rem; }
  .modal-header { padding: 1.3rem 1.3rem 0.4rem; }
}

/* Focus visible */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─────────────────────────────────────────────────────────────
   Hero pill buttons — colored variant (umbrella hero, no dots)
   The default pill buttons (above) keep the dot variant; the
   .hero-pill-btn-color variant tints the whole pill in app color.
   ───────────────────────────────────────────────────────────── */
.hero-pill-btn-color {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.hero-pill-btn-color:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(27, 45, 79, 0.12);
}
.hero-pill-btn-color[data-app="grows"] {
  background: var(--grows-soft);
  color: var(--grows);
  border-color: rgba(255, 106, 0, 0.25);
}
.hero-pill-btn-color[data-app="grows"]:hover {
  background: var(--grows);
  color: #fff;
}
.hero-pill-btn-color[data-app="life"] {
  background: var(--life-soft);
  color: var(--life);
  border-color: rgba(53, 113, 209, 0.25);
}
.hero-pill-btn-color[data-app="life"]:hover {
  background: var(--life);
  color: #fff;
}
.hero-pill-btn-color[data-app="biz"] {
  background: var(--biz-soft);
  color: var(--biz);
  border-color: rgba(67, 72, 78, 0.25);
}
.hero-pill-btn-color[data-app="biz"]:hover {
  background: var(--biz);
  color: #fff;
}

/* Hero subtitle — sits under the main lead, smaller and italic */
.hero p.hero-tagline {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-muted);
  font-style: italic;
  max-width: 540px;
  margin: -1rem auto 2rem;
}

/* Umbrella hero — three-app visual under the title.
   Goes ABOVE the lead paragraph so it answers "what is this" in a glance. */
.hero-trio {
  max-width: 520px;
  margin: 0.5rem auto 2rem;
  display: block;
}
.hero-trio svg {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 480px) {
  .hero-trio { max-width: 360px; margin: 0.5rem auto 1.5rem; }
}

/* Tighten umbrella hero overall: reduce vertical spread */
.hero-umbrella { padding: 3.5rem 0 2.5rem; }
.hero-umbrella .hero-tagline { margin: -0.5rem auto 1.5rem; }
.hero-umbrella p.lead { margin-bottom: 1.5rem; }

/* ─────────────────────────────────────────────────────────────
   Collapsible blocks (general purpose, separate from .faq)
   Used for Vision sub-sections, app-feature deep-dives, etc.
   Pattern: <details class="collapse"><summary>Title</summary><div class="collapse-body">…</div></details>
   ───────────────────────────────────────────────────────────── */
details.collapse {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.18s;
}
details.collapse[open] {
  box-shadow: 0 4px 14px rgba(27, 45, 79, 0.06);
}
details.collapse > summary {
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.15s;
}
details.collapse > summary::-webkit-details-marker { display: none; }
details.collapse > summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-muted);
  width: 1.2rem;
  text-align: center;
  transition: transform 0.2s;
  flex-shrink: 0;
}
details.collapse[open] > summary::after {
  content: "−";
  color: var(--text);
}
details.collapse > summary:hover { color: var(--blue); }
.page-grows details.collapse > summary:hover { color: var(--grows); }
.page-life details.collapse > summary:hover { color: var(--life); }
.page-biz details.collapse > summary:hover { color: var(--biz); }
details.collapse .collapse-body {
  padding: 0 1.2rem 1.2rem;
  color: var(--text);
}
details.collapse .collapse-body > p:first-child { margin-top: 0; }
details.collapse .collapse-body > p:last-child { margin-bottom: 0; }

/* Compact variant for inline sub-collapses (used inside Papers) */
details.collapse-mini {
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
  margin: 0;
}
details.collapse-mini:first-of-type { border-top: none; }
details.collapse-mini > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.15s;
}
details.collapse-mini > summary::-webkit-details-marker { display: none; }
details.collapse-mini > summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-muted);
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}
details.collapse-mini[open] > summary::after {
  content: "−";
  color: var(--text);
}
.page-grows details.collapse-mini > summary:hover { color: var(--grows); }
.page-life details.collapse-mini > summary:hover { color: var(--life); }
.page-biz details.collapse-mini > summary:hover { color: var(--biz); }
details.collapse-mini .collapse-body {
  padding-top: 0.7rem;
  color: var(--text);
  line-height: 1.65;
}
details.collapse-mini .collapse-body > p { margin-bottom: 0.8rem; }
details.collapse-mini .collapse-body > p:last-child { margin-bottom: 0; }

/* Academic quote (Papers section) — italic block with source citation */
.research-quote {
  margin: 0.6rem 0 0;
  padding: 0.7rem 0.95rem;
  background: var(--surface);
  border-inline-start: 3px solid var(--grows);
  border-radius: 4px;
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.page-life .research-quote { border-inline-start-color: var(--life); }
.page-biz .research-quote { border-inline-start-color: var(--biz); }
.research-quote .source {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.85;
}

/* Lead intro that sits above a collapse group — gives context before
   the user expands */
.collapse-lead {
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.collapse-group {
  margin-top: 0.5rem;
}

/* ─────────────────────────────────────────────────────────────
   Video embeds — autoplay teasers in feature sections
   ───────────────────────────────────────────────────────────── */
.video-frame {
  margin: 1.5rem auto 2rem;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(27, 45, 79, 0.12);
  background: var(--surface);
}
.video-frame video {
  display: block;
  width: 100%;
  height: auto;
}
.video-frame.video-frame-portrait {
  max-width: 360px;
}
.video-caption {
  display: block;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}
