/* ============================================================================
   FitCoach AI — Global Stylesheet
   Brand color: Chrome Teal #00CED1
   Mobile-first, performant, no external dependencies.
   ============================================================================ */

:root {
  /* Brand palette */
  --brand-50:  #E0FBFC;
  --brand-100: #B2F5F5;
  --brand-200: #80E9EA;
  --brand-300: #4DDBDD;
  --brand-400: #26D2D4;
  --brand-500: #00CED1;
  --brand-600: #00A8AA;
  --brand-700: #008082;
  --brand-800: #005A5C;
  --brand-900: #003738;

  /* Accent */
  --accent-500: #6C5CE7;
  --accent-600: #5949C9;

  /* Neutrals */
  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Semantic */
  --success: #10B981;
  --warning: #F59E0B;
  --danger:  #EF4444;

  /* Surfaces */
  --bg:        #FFFFFF;
  --bg-soft:   #F8FAFC;
  --surface:   #FFFFFF;
  --border:    #E2E8F0;
  --text:      #0F172A;
  --text-soft: #475569;
  --text-mute: #94A3B8;

  /* Layout */
  --container-w: 1200px;
  --gutter: clamp(1rem, 2vw, 1.5rem);
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-sans);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow:    0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.10);
  --shadow-brand: 0 8px 24px rgba(0, 206, 209, 0.25);

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0B1220;
    --bg-soft:   #0F172A;
    --surface:   #131C2D;
    --border:    #1E293B;
    --text:      #E2E8F0;
    --text-soft: #94A3B8;
    --text-mute: #64748B;
  }
}

/* ───────────────────────────────────────── reset ───── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-600); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--brand-700); }
button { font: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--text-soft); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-soft); }

/* ───────────────────────────────────────── layout ───── */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-tight { padding: clamp(2rem, 5vw, 3.5rem) 0; }

.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.center { text-align: center; }
.muted { color: var(--text-mute); }

/* ───────────────────────────────────────── header / nav ───── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 800; font-size: 1.15rem; color: var(--text);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 14px;
  box-shadow: var(--shadow-brand);
}
.nav-menu {
  display: none; gap: 1.5rem; list-style: none; margin: 0; padding: 0;
}
.nav-menu a {
  color: var(--text-soft); font-weight: 500; font-size: 0.95rem;
  padding: 0.5rem 0; transition: color .2s var(--ease);
}
.nav-menu a:hover, .nav-menu a.active { color: var(--brand-600); }
@media (min-width: 900px) { .nav-menu { display: flex; } }

.nav-cta { display: inline-flex; gap: 0.5rem; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text-soft);
  font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--border);
  transition: all .2s var(--ease);
}
.lang-switch:hover { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); }

.menu-toggle {
  display: inline-flex; width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm); color: var(--text);
}
@media (min-width: 900px) { .menu-toggle { display: none; } }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem var(--gutter);
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.mobile-menu a {
  display: block; padding: 0.75rem 0; color: var(--text);
  font-weight: 500; border-bottom: 1px solid var(--border);
}

/* ───────────────────────────────────────── buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600; font-size: 0.98rem;
  white-space: nowrap; cursor: pointer;
  transition: all .2s var(--ease);
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  color: white; box-shadow: var(--shadow-brand);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(0, 206, 209, 0.35); color: white; }
.btn-ghost {
  background: var(--bg-soft); color: var(--text); border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg); border-color: var(--brand-300); color: var(--brand-700); }
.btn-link { color: var(--brand-600); padding: 0.5rem 0.75rem; }
.btn-link:hover { color: var(--brand-700); }
.btn-store {
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.75rem 1.25rem; border-radius: var(--radius);
  background: #0F172A; color: white; font-weight: 600;
  font-size: 0.95rem;
}
.btn-store:hover { background: #1E293B; color: white; }
.btn-store small { display: block; font-size: 0.7rem; opacity: 0.7; line-height: 1; margin-bottom: 2px; }

/* ───────────────────────────────────────── hero ───── */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3.5rem, 9vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--brand-50) 60%, var(--bg)) 0%,
    var(--bg) 100%);
}
.hero-grid {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; } }
.hero h1 .accent {
  background: linear-gradient(120deg, var(--brand-500), var(--accent-500));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-subhead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-soft); margin: 0 0 1.5rem; max-width: 600px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.25rem 1.5rem; color: var(--text-mute); font-size: 0.92rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-trust svg { width: 18px; height: 18px; color: var(--brand-500); }

.hero-mock {
  position: relative;
  background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem;
  text-align: center; color: white;
  box-shadow: 0 20px 60px rgba(0, 206, 209, 0.3);
  min-height: 380px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.hero-mock-emoji { font-size: 4rem; margin-bottom: 1rem; line-height: 1; }
.hero-mock h3 { color: white; }
.hero-mock p { color: rgba(255,255,255,0.9); }

/* ───────────────────────────────────────── feature cards ───── */
.feature-card {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .25s var(--ease);
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow);
}
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-100), var(--brand-50));
  color: var(--brand-700);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; font-size: 1.5rem;
}
.feature-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.95rem; margin: 0; }
.feature-card a { display: inline-block; margin-top: 1rem; font-weight: 600; }

/* ───────────────────────────────────────── steps ───── */
.steps { counter-reset: step; }
.step {
  position: relative; padding: 2rem 1.5rem 2rem 4.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 1.25rem; top: 1.5rem;
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
  color: white; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  box-shadow: var(--shadow-brand);
}

/* ───────────────────────────────────────── faq ───── */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color .2s var(--ease);
}
.faq-item[open] { border-color: var(--brand-300); }
.faq-item summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600; color: var(--text);
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.5rem; color: var(--brand-600); transition: transform .2s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 1.5rem 1.25rem; color: var(--text-soft); }
.faq-body p { margin: 0; }

/* ───────────────────────────────────────── breadcrumbs ───── */
.crumbs {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  font-size: 0.875rem; color: var(--text-mute);
  padding: 1rem 0;
}
.crumbs a { color: var(--text-soft); }
.crumbs a:hover { color: var(--brand-600); }
.crumbs li { display: inline-flex; align-items: center; gap: 0.5rem; }
.crumbs li + li::before { content: "/"; color: var(--text-mute); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ───────────────────────────────────────── tool / calculator ───── */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
}
.form-row { display: grid; gap: 0.5rem; margin-bottom: 1.25rem; }
.form-row label { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.form-row .hint { font-size: 0.85rem; color: var(--text-mute); }
.form-row input, .form-row select {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form-row input:focus, .form-row select:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(0, 206, 209, 0.15);
}
.form-row .group { display: flex; gap: 0.75rem; }
.form-row .group > label {
  flex: 1; padding: 0.85rem 1rem; cursor: pointer; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-weight: 600; transition: all .2s var(--ease);
}
.form-row .group > label.selected,
.form-row .group input[type=radio]:checked + label {
  background: var(--brand-50); border-color: var(--brand-500); color: var(--brand-700);
}
.form-row .group input[type=radio] { display: none; }

.tool-result {
  margin-top: 1.5rem; padding: 1.5rem;
  background: linear-gradient(135deg, var(--brand-50), var(--bg-soft));
  border-radius: var(--radius);
  border-left: 4px solid var(--brand-500);
}
.tool-result .big { font-size: 2.5rem; font-weight: 800; color: var(--brand-700); margin-bottom: 0.25rem; }
.tool-result .label { color: var(--text-soft); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.tool-result .interp { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--brand-200); }

/* ───────────────────────────────────────── stats / pills ───── */
.pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  background: var(--brand-50); color: var(--brand-700);
  font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--brand-200);
}
.pill.accent { background: rgba(108, 92, 231, 0.1); color: var(--accent-600); border-color: rgba(108, 92, 231, 0.2); }

/* ───────────────────────────────────────── article (blog) ───── */
.article {
  max-width: 760px; margin: 0 auto;
  font-size: 1.05rem; line-height: 1.75;
}
.article h2 { margin-top: 2.5em; }
.article h3 { margin-top: 1.8em; }
.article p, .article ul, .article ol { color: var(--text); }
.article ul, .article ol { padding-left: 1.5rem; margin-bottom: 1.5em; }
.article li { margin-bottom: 0.5em; }
.article blockquote {
  margin: 1.5em 0; padding: 1.25em 1.5em;
  border-left: 4px solid var(--brand-500);
  background: var(--brand-50); border-radius: var(--radius-sm);
  color: var(--text);
  font-style: italic;
}
.article code {
  background: var(--bg-soft); padding: 2px 6px;
  border-radius: 4px; font-size: 0.92em;
}
.article-meta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: 0.9rem; color: var(--text-mute);
  padding: 1rem 0; border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.tldr {
  margin: 2rem 0; padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--brand-50), var(--bg-soft));
  border-radius: var(--radius);
  border-left: 4px solid var(--brand-500);
}
.tldr h3 { margin: 0 0 0.5rem; color: var(--brand-700); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.tldr p { margin: 0; color: var(--text); }

/* ───────────────────────────────────────── cta band ───── */
.cta-band {
  background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
  color: white;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
  margin: 3rem 0;
}
.cta-band h2 { color: white; margin-bottom: 1rem; }
.cta-band p { color: rgba(255,255,255,0.92); margin-bottom: 1.5rem; max-width: 640px; margin-left: auto; margin-right: auto; }
.cta-band .btn-primary {
  background: white; color: var(--brand-700);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.cta-band .btn-primary:hover { background: var(--brand-50); color: var(--brand-800); }
.cta-band .btn-store { background: rgba(0,0,0,0.25); }
.cta-band .btn-store:hover { background: rgba(0,0,0,0.35); }

/* ───────────────────────────────────────── footer ───── */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer-grid h4 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-mute); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer-grid a { color: var(--text-soft); font-size: 0.95rem; }
.footer-grid a:hover { color: var(--brand-600); }
.footer-bottom {
  padding-top: 1.5rem; border-top: 1px solid var(--border);
  color: var(--text-mute); font-size: 0.85rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
}

/* ───────────────────────────────────────── utilities ───── */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand-600); color: white; padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
  z-index: 100;
}
.skip-link:focus { left: 0; color: white; }

/* Print-friendly */
@media print {
  .site-header, .site-footer, .cta-band, .nav-cta { display: none !important; }
  body { color: #000; background: #fff; }
}
