/* ============================================================
   FamilyTracking — Shared Design System
   Aesthetic: warm, trustworthy, modern-organic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #fbf8f3;
  --bg-soft: #f4efe6;
  --ink: #1f2a2e;
  --ink-soft: #4a585c;
  --teal: #0f6e63;
  --teal-deep: #0a4d45;
  --teal-light: #d7ece7;
  --coral: #f06a4d;
  --coral-soft: #fde4dd;
  --sand: #e9dcc6;
  --line: #e4ddd0;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(31,42,46,0.06);
  --shadow-md: 0 10px 30px rgba(31,42,46,0.10);
  --shadow-lg: 0 24px 60px rgba(31,42,46,0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1140px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; transition: color .2s; }
a:hover { color: var(--coral); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
p { color: var(--ink-soft); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,248,243,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--ink); }
.brand .logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  display: grid; place-items: center; color: #fff; flex-shrink: 0;
}
.brand:hover { color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: .96rem; }
.nav-links a:hover { color: var(--teal); }
.nav-cta {
  background: var(--teal); color: #fff !important; padding: 10px 20px;
  border-radius: 999px; font-weight: 600; box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: var(--teal-deep); color: #fff !important; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; }
.menu-toggle svg { width: 28px; height: 28px; stroke: var(--ink); }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 16px 24px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 8px 0; width: 100%; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  cursor: pointer; border: none; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--coral); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #e0573b; color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-ghost:hover { background: var(--teal); color: #fff; }
.btn-lg { padding: 16px 34px; font-size: 1.08rem; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 90px 0 80px; overflow: hidden; }
.hero-blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; z-index: 0;
}
.hero-blob.a { width: 420px; height: 420px; background: var(--teal-light); top: -120px; right: -80px; }
.hero-blob.b { width: 360px; height: 360px; background: var(--coral-soft); bottom: -140px; left: -100px; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal-light); color: var(--teal-deep); font-weight: 600; font-size: .85rem;
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px; letter-spacing: .01em;
}
.hero p.lead { font-size: 1.18rem; margin: 22px 0 32px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 30px; font-size: .9rem; color: var(--ink-soft); display: flex; gap: 22px; flex-wrap: wrap; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }

.phone-mock {
  position: relative; width: 280px; margin: 0 auto;
  background: var(--ink); border-radius: 38px; padding: 12px;
  box-shadow: var(--shadow-lg); transform: rotate(2deg);
}
.phone-screen { background: var(--white); border-radius: 28px; overflow: hidden; }
.phone-map {
  height: 320px; position: relative;
  background:
    radial-gradient(circle at 30% 40%, var(--teal-light), transparent 40%),
    radial-gradient(circle at 70% 70%, var(--coral-soft), transparent 45%),
    repeating-linear-gradient(0deg, #eef3f1 0, #eef3f1 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(90deg, #eef3f1 0, #eef3f1 1px, transparent 1px, transparent 40px),
    #f7faf9;
}
.map-pin {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: var(--shadow-sm);
}
.map-pin.p1 { background: var(--teal); top: 38%; left: 32%; }
.map-pin.p2 { background: var(--coral); top: 64%; left: 62%; }
.map-pin.p3 { background: #e3a008; top: 26%; left: 70%; }
.phone-card { padding: 16px 18px; }
.phone-card .row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.phone-card .row:last-child { border-bottom: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.phone-card .meta { font-size: .82rem; }
.phone-card .meta strong { display: block; color: var(--ink); font-size: .92rem; }
.phone-card .meta span { color: var(--ink-soft); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .phone-mock { transform: rotate(0); }
}

/* ---------- Sections ---------- */
section { position: relative; }
.section-pad { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 54px; }
.section-head .eyebrow { color: var(--coral); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .82rem; }
.section-head h2 { margin: 12px 0 16px; }
.bg-soft { background: var(--bg-soft); }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--teal-light); color: var(--teal-deep); margin-bottom: 18px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.feature-card p { font-size: .96rem; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.step { text-align: center; }
.step-num {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.5rem;
  background: var(--coral); color: #fff;
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat .num { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; color: var(--teal); }
.stat .label { font-size: .92rem; color: var(--ink-soft); }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 32px; } }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: stretch; }
.price-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 30px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); position: relative;
}
.price-card.featured { border: 2px solid var(--teal); box-shadow: var(--shadow-md); transform: scale(1.02); }
.price-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--coral); color: #fff; font-size: .78rem; font-weight: 700;
  padding: 6px 16px; border-radius: 999px;
}
.price-card h3 { font-size: 1.35rem; }
.price-amount { font-family: var(--serif); font-size: 3rem; font-weight: 700; color: var(--ink); margin: 14px 0 4px; }
.price-amount span { font-size: 1rem; font-family: var(--sans); color: var(--ink-soft); font-weight: 500; }
.price-period { color: var(--ink-soft); font-size: .9rem; margin-bottom: 24px; }
.price-list { list-style: none; margin: 0 0 28px; flex: 1; }
.price-list li { padding: 9px 0; display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; border-bottom: 1px solid var(--line); }
.price-list li svg { width: 18px; height: 18px; color: var(--teal); flex-shrink: 0; margin-top: 3px; }
@media (max-width: 860px) { .pricing-grid { grid-template-columns: 1fr; } .price-card.featured { transform: none; } }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 22px 0; font-family: var(--serif); font-size: 1.18rem; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-q .ic { width: 26px; height: 26px; flex-shrink: 0; transition: transform .25s; color: var(--teal); }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding-bottom: 22px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  border-radius: 28px; padding: 60px 48px; text-align: center; color: #fff; position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 520px; margin: 14px auto 28px; }
.cta-band .btn-primary { background: #fff; color: var(--teal-deep); }
.cta-band .btn-primary:hover { background: var(--bg); color: var(--teal-deep); }

/* ---------- Article / prose ---------- */
.article-hero { padding: 56px 0 30px; }
.article-meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: .88rem; color: var(--ink-soft); margin-bottom: 18px; }
.tag { background: var(--teal-light); color: var(--teal-deep); padding: 4px 13px; border-radius: 999px; font-weight: 600; font-size: .78rem; }
.prose { font-size: 1.08rem; }
.prose h2 { margin: 38px 0 16px; }
.prose h3 { margin: 28px 0 12px; }
.prose p { margin-bottom: 18px; color: #3a474b; }
.prose ul, .prose ol { margin: 0 0 18px 22px; color: #3a474b; }
.prose li { margin-bottom: 8px; }
.prose blockquote {
  border-left: 4px solid var(--coral); background: var(--coral-soft);
  padding: 16px 22px; border-radius: 0 12px 12px 0; margin: 24px 0; font-style: italic; color: var(--ink);
}
.prose img { border-radius: var(--radius); margin: 24px 0; }
.prose a { text-decoration: underline; }
.key-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin: 26px 0; }
.key-box h4 { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 10px; }

/* ---------- Blog index cards ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.blog-thumb { height: 160px; position: relative; }
.blog-body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.blog-body .tag { align-self: flex-start; margin-bottom: 12px; }
.blog-body h3 { font-size: 1.22rem; line-height: 1.25; margin-bottom: 10px; }
.blog-body h3 a { color: var(--ink); }
.blog-body h3 a:hover { color: var(--teal); }
.blog-body p { font-size: .93rem; flex: 1; }
.blog-body .read { margin-top: 14px; font-weight: 600; font-size: .9rem; }
@media (max-width: 860px) { .blog-grid { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 7px; font-size: .95rem; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: 1rem; background: var(--white); color: var(--ink); transition: border .2s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: none; border-color: var(--teal); }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 38px; box-shadow: var(--shadow-sm); }

/* ---------- Contact info ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 44px; align-items: start; }
.info-item { display: flex; gap: 16px; margin-bottom: 26px; }
.info-item .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--teal-light); color: var(--teal-deep); display: grid; place-items: center; flex-shrink: 0; }
.info-item .ic svg { width: 22px; height: 22px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Page hero (simple) ---------- */
.page-hero { padding: 64px 0 40px; text-align: center; position: relative; }
.page-hero .eyebrow { color: var(--coral); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .82rem; }
.page-hero h1 { margin: 12px 0 14px; }
.page-hero p { max-width: 600px; margin: 0 auto; font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c7d1d2; padding: 60px 0 28px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .92rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; font-weight: 700; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer a { color: #c7d1d2; font-size: .94rem; }
.site-footer a:hover { color: var(--coral); }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; margin-bottom: 14px; }
.footer-brand .logo-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--teal), var(--teal-deep)); display: grid; place-items: center; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .86rem; color: #94a3a4; }
.footer-disclaimer { font-size: .82rem; color: #7e8c8d; margin-top: 14px; max-width: 520px; line-height: 1.5; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Misc ---------- */
.center { text-align: center; }
.mt-40 { margin-top: 40px; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
.breadcrumb { font-size: .86rem; color: var(--ink-soft); margin-bottom: 16px; }
.breadcrumb a { color: var(--teal); }
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin: 24px 0 32px; }
.toc strong { display: block; margin-bottom: 10px; font-family: var(--serif); }
.toc ul { list-style: none; }
.toc li { margin-bottom: 7px; }
.ad-slot { background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 14px; text-align: center; color: #9aa6a7; font-size: .8rem; margin: 30px 0; }

/* ===== Blog index filter chips ===== */
.chip-row{display:flex;flex-wrap:wrap;gap:.6rem;margin-bottom:2.2rem}
.chip{font-family:inherit;font-size:.9rem;font-weight:600;color:var(--ink-soft);
  background:#fff;border:1.5px solid var(--line);padding:.5rem 1.1rem;border-radius:999px;
  cursor:pointer;transition:all .2s ease}
.chip:hover{border-color:var(--teal);color:var(--teal)}
.chip.active{background:var(--teal);border-color:var(--teal);color:#fff}

/* ===== Blog card meta ===== */
.blog-card-meta{display:flex;align-items:center;gap:.5rem;margin-top:.9rem;
  font-size:.82rem;color:var(--ink-soft)}
.blog-card.hide{display:none}

/* ===== Article narrow wrapper + lead ===== */
.wrap-narrow{max-width:720px;margin:0 auto;padding:0 1.4rem}
.article-lead{font-size:1.2rem;line-height:1.6;color:var(--ink-soft);
  max-width:640px;margin:1rem auto 0}

/* ===== Related articles ===== */
.related{background:var(--bg-soft);margin-top:4rem;padding:3.5rem 0}
.related-title{font-family:var(--serif);font-size:1.7rem;margin-bottom:1.8rem;text-align:center}
.related .blog-grid{max-width:1100px;margin:0 auto}

/* ===== Article CTA box spacing ===== */
.article-cta{margin-top:2.5rem;text-align:center}
.article-cta h3{margin-bottom:.6rem}
.article-cta .btn{margin-top:1rem}

/* ===== Article figures (illustrations) ===== */
.article-figure{margin:2rem 0;text-align:center}
.article-figure img{width:100%;height:auto;border-radius:var(--radius);
  display:block;box-shadow:var(--shadow-sm)}
.article-figure figcaption{margin-top:.7rem;font-size:.88rem;color:var(--ink-soft);
  font-style:italic;line-height:1.5}

/* ===== Blog card body + image thumbs (alias fixes) ===== */
.blog-card-body{padding:22px 22px 26px;display:flex;flex-direction:column;flex:1}
.blog-card-body .tag{align-self:flex-start;margin-bottom:12px}
.blog-card-body h3{font-size:1.22rem;line-height:1.25;margin-bottom:10px;color:var(--ink)}
.blog-card-body p{font-size:.93rem;flex:1;color:var(--ink-soft)}
.blog-thumb{overflow:hidden}
.blog-thumb img{width:100%;height:100%;object-fit:cover;display:block}

/* ===== Sensitive-topic disclaimer note ===== */
.prose .sensitive-note{margin-top:1.8rem;padding:.9rem 1.1rem;border-left:3px solid var(--sand);
  background:#fbf6ea;border-radius:8px;font-size:.9rem;color:var(--ink-soft)}
