/* ============================================================
   FitFlow — Web Design System
   Mirrors the app: light sage canvas, white rounded cards,
   crimson accent (themeable), bold rounded Nunito type.
   ============================================================ */

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

:root {
  /* ---- canvas + surfaces ---- */
  --sage:        #E8EEE9;   /* page background */
  --sage-deep:   #E0E8E2;   /* alternating sections */
  --sage-sink:   #DCE5DE;   /* inset wells inside cards */
  --surface:     #FFFFFF;   /* cards */

  /* ---- text ---- */
  --ink:      #17231C;      /* headings */
  --ink-2:    #2A352E;      /* strong body */
  --muted:    #7C9387;      /* sage-gray secondary text */
  --muted-2:  #A0B2A7;      /* faint */

  /* ---- lines ---- */
  --line:      #D8E2DB;
  --line-soft: #E6EDE8;

  /* ---- category colours (constant across themes) ---- */
  --blue:   #3B82F6;  --blue-tint:   #E7EFFC;
  --orange: #EF8B3C;  --orange-tint: #FBEBDC;
  --green:  #28A86A;  --green-tint:  #E2F2E9;
  --yellow: #F4B740;  --yellow-tint: #FCF1D9;

  /* ---- accent (themeable) — default: Crimson ---- */
  --accent:      #E6394F;
  --accent-deep: #CB2E43;
  --accent-tint: #FBE0E5;
  --accent-glow: rgba(230, 57, 79, 0.26);
  --on-accent:   #FFFFFF;

  /* ---- radii ---- */
  --r-card: 24px;
  --r-lg:   30px;
  --r-btn:  16px;
  --r-chip: 12px;
  --r-pill: 999px;

  /* ---- shadows (soft, greenish-black) ---- */
  --sh-sm: 0 2px 10px rgba(22, 40, 30, 0.05);
  --sh-md: 0 10px 30px rgba(22, 40, 30, 0.07);
  --sh-lg: 0 30px 70px rgba(22, 40, 30, 0.13);

  --maxw: 1140px;
}

[data-accent="forest"] {
  --accent: #27A567; --accent-deep: #1F8A54; --accent-tint: #E1F2E8;
  --accent-glow: rgba(39, 165, 103, 0.26);
}
[data-accent="ocean"] {
  --accent: #3B82F6; --accent-deep: #2D6FE0; --accent-tint: #E7EFFC;
  --accent-glow: rgba(59, 130, 246, 0.26);
}
[data-accent="ember"] {
  --accent: #EE8A3C; --accent-deep: #D9772A; --accent-tint: #FCEEE0;
  --accent-glow: rgba(238, 138, 60, 0.30);
}

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

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--sage);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* soft grain / ambient blooms helper */
.bloom {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(232, 238, 233, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(232,238,233,0.9); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo-img {
  width: 38px; height: 38px;
  border-radius: 11px;
  box-shadow: var(--sh-sm);
  display: block;
}
.logo-text { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 15.5px; font-weight: 700; color: var(--muted);
  text-decoration: none; transition: color .18s;
}
.nav-links a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav-links .nav-link { display: none; } }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: -0.01em;
  border-radius: var(--r-btn);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform .16s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  padding: 15px 26px;
  font-size: 16px;
  box-shadow: 0 10px 26px -8px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 16px 32px -8px var(--accent-glow); }
.btn-primary.lg { padding: 18px 34px; font-size: 18px; border-radius: 18px; }

.btn-sm { padding: 10px 20px; font-size: 14.5px; border-radius: var(--r-pill); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink-2);
  padding: 15px 24px;
  font-size: 16px;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--line);
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--sh-md); color: var(--ink); }

.store-icon { width: 19px; height: 19px; flex-shrink: 0; }

/* ============================================================
   GENERIC SECTION SCAFFOLD
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow.plain { color: var(--muted); }
.h-sec {
  font-size: clamp(30px, 4.6vw, 50px);
  font-weight: 900; letter-spacing: -0.03em; line-height: 1.04;
  color: var(--ink); text-wrap: balance;
}
.sub-sec {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted); max-width: 560px; margin-top: 16px;
  font-weight: 500;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--sage-deep);
  border-top: 1px solid var(--line);
  padding: 64px 0 40px;
}
.footer-grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-tag { color: var(--muted); font-size: 15px; font-weight: 600; max-width: 280px; }
.footer-col h4 {
  font-size: 12.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted-2); margin-bottom: 16px;
}
.footer-col a {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 700; color: var(--ink-2);
  text-decoration: none; padding: 7px 0; transition: color .18s;
}
.footer-col a:hover { color: var(--accent); }
.footer-col a ion-icon { font-size: 16px; color: var(--muted); }
.footer-bottom {
  max-width: var(--maxw); margin: 40px auto 0; padding: 24px 24px 0;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.footer-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: var(--r-pill);
}
.footer-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ============================================================
   PROSE (legal / support pages)
   ============================================================ */
.page-head {
  padding: 130px 0 40px;
  position: relative;
}
.page-head .wrap { position: relative; z-index: 1; }
.page-head h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 900; letter-spacing: -0.03em; color: var(--ink);
}
.page-head .lead { font-size: 18px; color: var(--muted); margin-top: 12px; font-weight: 600; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 800; color: var(--accent);
  text-decoration: none; margin-bottom: 22px; white-space: nowrap;
}
.back-link ion-icon { font-size: 16px; }

.prose-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  max-width: 800px; margin: 0 auto 100px;
  padding: clamp(28px, 5vw, 56px);
}
.prose-card h2 {
  font-size: 22px; font-weight: 800; color: var(--ink);
  letter-spacing: -0.02em; margin: 34px 0 12px;
}
.prose-card h2:first-child { margin-top: 0; }
.prose-card h3 { font-size: 17.5px; font-weight: 800; color: var(--ink-2); margin: 26px 0 8px; }
.prose-card p, .prose-card li { font-size: 16px; color: var(--ink-2); line-height: 1.75; margin-bottom: 12px; font-weight: 500; }
.prose-card .muted { color: var(--muted); }
.prose-card ul { padding-left: 4px; list-style: none; }
.prose-card ul li { position: relative; padding-left: 26px; }
.prose-card ul li::before {
  content: ''; position: absolute; left: 4px; top: 11px;
  width: 7px; height: 7px; border-radius: 2px; background: var(--accent);
}
.prose-card a { color: var(--accent); font-weight: 800; text-decoration: none; }
.prose-card a:hover { text-decoration: underline; }
.prose-card strong { color: var(--ink); font-weight: 800; }
.updated {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 800; color: var(--muted);
  background: var(--sage); border-radius: var(--r-pill);
  padding: 7px 15px; margin-bottom: 32px;
}

/* callout box inside prose */
.callout {
  background: var(--accent-tint);
  border-radius: var(--r-card);
  padding: 22px 24px;
  margin: 24px 0;
  display: flex; gap: 14px; align-items: flex-start;
}
.callout ion-icon { font-size: 22px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.callout p { margin: 0; color: var(--ink-2); }
.callout strong { color: var(--ink); }

/* FAQ accordion */
.faq-item {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--sh-sm);
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 17px; font-weight: 800; color: var(--ink);
  padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-q ion-icon { font-size: 20px; color: var(--accent); transition: transform .25s; flex-shrink: 0; }
.faq-item.open .faq-q ion-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 24px 22px; color: var(--ink-2); font-size: 15.5px; line-height: 1.75; font-weight: 500; }
.faq-a-inner strong { color: var(--ink); font-weight: 800; }

/* contact card */
.contact-card {
  background: var(--ink);
  color: #EAF1EC;
  border-radius: var(--r-lg);
  padding: clamp(32px, 5vw, 52px);
  text-align: center;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}
.contact-card h2 { color: #fff; font-size: 26px; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 10px; }
.contact-card p { color: #A6BCAE; font-size: 16px; margin-bottom: 24px; }
.contact-card .btn-primary { position: relative; z-index: 1; }
.contact-card .bloom { width: 380px; height: 380px; background: var(--accent-glow); top: -160px; left: 50%; transform: translateX(-50%); opacity: .6; }
