/* ==========================================================================
   HeadFirst Services — shared design system
   Used across headfirstservices.com and every /app subdirectory.
   Plain CSS, no build step, safe for Cloudflare Pages static hosting.
   ========================================================================== */

:root {
  /* Brand palette — clean modern SaaS: light bg, blue/teal accent */
  --color-bg: #ffffff;
  --color-bg-alt: #f6f9fb;
  --color-bg-dark: #0f2b3d;
  --color-text: #142530;
  --color-text-muted: #55707d;
  --color-primary: #0d7d8f;      /* teal */
  --color-primary-dark: #0a6270;
  --color-accent: #2e6bff;       /* blue */
  --color-border: #e2e9ec;
  --color-success: #1a8f5e;
  --color-warning: #b5790a;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container-width: 1120px;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(15, 43, 61, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 43, 61, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Nav ---------- */
.site-nav {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  z-index: 100;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--color-text);
}
.brand-mark:hover { text-decoration: none; }

.brand-mark .mono {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark img.app-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
}
.nav-links a { color: var(--color-text-muted); }
.nav-links a:hover { color: var(--color-text); text-decoration: none; }

.nav-cta {
  background: var(--color-primary);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--color-primary-dark); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 48px 0 40px;
}
.hero.with-bg {
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(13, 125, 143, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
h1 {
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.hero p.lede {
  font-size: 19px;
  color: var(--color-text-muted);
  max-width: 52ch;
  margin: 0 0 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art img {
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  max-width: 220px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); text-decoration: none; color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover { border-color: var(--color-text-muted); text-decoration: none; }
.btn-disabled {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border-color: var(--color-border);
  cursor: default;
}
.btn-disabled:hover { text-decoration: none; }

/* ---------- Sections ---------- */
section { padding: 40px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head {
  max-width: 62ch;
  margin: 0 0 24px;
}
.section-head .eyebrow { margin-bottom: 14px; }
h2 { font-size: 30px; letter-spacing: -0.01em; margin: 0 0 12px; }
.section-head p { color: var(--color-text-muted); font-size: 17px; margin: 0; }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 18px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--color-text-muted); font-size: 15px; }
.card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(13, 125, 143, 0.10);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 19px;
}

/* Product cards on hub homepage */
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card .product-top {
  padding: 20px 20px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.product-card .product-top img { width: 52px; height: 52px; border-radius: 12px; }
.product-card .product-mono {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.product-card .product-body { padding: 12px 20px 20px; flex: 1; }
.product-card h3 { font-size: 19px; margin: 0 0 6px; }
.product-card p { color: var(--color-text-muted); font-size: 15px; margin: 0 0 16px; }
.status-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.status-live { background: rgba(26, 143, 94, 0.12); color: var(--color-success); }
.status-soon { background: rgba(181, 121, 10, 0.12); color: var(--color-warning); }
.status-planned { background: var(--color-bg-alt); color: var(--color-text-muted); }

/* Category label above product grids */
.category-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 18px;
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 22px 0;
}
.faq-item:first-child { border-top: 1px solid var(--color-border); }
.faq-item h3 { font-size: 16px; margin: 0 0 8px; }
.faq-item p { margin: 0; color: var(--color-text-muted); }
details.faq-item summary { cursor: pointer; }
details.faq-item summary h3 { display: inline; margin: 0; }
details.faq-item summary::marker { color: var(--color-primary); }
details.faq-item p { margin-top: 10px; line-height: 1.6; }
details.faq-item[open] summary h3 { color: var(--color-primary); }

/* ---------- Store badges ---------- */
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 9px;
  border: 1px solid var(--color-border);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  background: #fff;
}
.store-badge .sub { display: block; font-size: 11px; font-weight: 500; color: var(--color-text-muted); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--color-bg-dark);
  color: #fff;
  border-radius: 20px;
  padding: 36px;
  text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.72); font-size: 17px; max-width: 56ch; margin: 0 auto 20px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0 20px;
  background: var(--color-bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}
.footer-grid h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--color-text); font-size: 14px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Breadcrumb / back link ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}

/* ---------- Disclaimer / note boxes ---------- */
.note-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 34px; }
}

@media (max-width: 560px) {
  .nav-links { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 36px 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
