/*
Theme Name: FlaxiFab
Theme URI: https://flaxifab.com
Author: FlaxiFab Systems
Author URI: https://flaxifab.com
Description: Official FlaxiFab marketing theme — ultra-fast, secure, SEO-optimised. Built to match app.flaxifab.com design system.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
License: Proprietary
License URI: https://flaxifab.com/terms
Text Domain: flaxifab
Tags: dark, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready
*/

/* ============================================================
   0. RESET & BOX MODEL
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   1. DESIGN TOKENS — matches globals.css from app.flaxifab.com
   ============================================================ */
:root {
  /* Brand palette */
  --color-bg:           #F7FAF8;
  --color-bg-card:      #FFFFFF;
  --color-border:       #E9F0EC;
  --color-border-hover: #C4D4CE;
  --color-text:         #182320;
  --color-text-muted:   #6C7D75;
  --color-text-faint:   #C4D0CB;

  /* Emerald/teal accent — identical to Next.js app */
  --color-primary:      #4CAF8D;
  --color-primary-lt:   #409B7A;
  --color-teal:         #2D6E53;
  --color-cyan:         #06b6d4;

  /* Gradients */
  --grad-primary:  linear-gradient(135deg, #4CAF8D, #2D6E53);
  --grad-text:     linear-gradient(90deg, #2D6E53, #4CAF8D, #0d9488);
  --grad-glow-top: radial-gradient(ellipse 900px 500px at 50% 0%, rgba(76,175,141,0.12), transparent 70%);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-section: clamp(3rem, 8vw, 6rem);
  --max-width: 72rem;  /* 1152px */

  /* Radius */
  --radius-sm:  0.75rem;
  --radius-md:  1rem;
  --radius-lg:  1.5rem;
  --radius-xl:  2rem;

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

/* ============================================================
   2. BASE TYPOGRAPHY
   ============================================================ */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 700; }

p { color: var(--color-text-muted); line-height: 1.75; }

a {
  color: var(--color-primary-lt);
  text-decoration: none;
  transition: color .2s var(--ease);
}
a:hover { color: var(--color-text); }

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

/* ============================================================
   3. LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section { padding-block: var(--space-section); }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-center { text-align: center; }
.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   4. NAVBAR
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-block: 1rem;
  transition: background .3s var(--ease), backdrop-filter .3s var(--ease);
}

.site-header.scrolled {
  background: rgba(247,250,248,.85);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-text) !important;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.navbar__logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.navbar__nav a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color .2s var(--ease);
}
.navbar__nav a:hover { color: var(--color-text); }

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Hamburger (mobile) */
.navbar__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--color-text);
}

/* Mobile drawer */
.navbar__mobile {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0 0.5rem;
  border-top: 1px solid var(--color-border);
  margin-top: 0.75rem;
}
.navbar__mobile.open { display: flex; }
.navbar__mobile a {
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
.navbar__mobile a:hover { color: var(--color-text); }

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none !important;
  transition: opacity .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease);
  border: none;
  white-space: nowrap;
  min-height: 48px;
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--grad-primary);
  color: #ffffff !important;
  box-shadow: 0 8px 30px -6px rgba(76,175,141,.45);
}
.btn--primary:hover { opacity: 0.88; box-shadow: 0 12px 40px -6px rgba(76,175,141,.55); }

.btn--ghost {
  background: rgba(0,0,0,0.02);
  color: var(--color-text) !important;
  border: 1px solid var(--color-border);
}
.btn--ghost:hover { background: rgba(0,0,0,0.05); }

.btn--outline {
  background: transparent;
  color: var(--color-text) !important;
  border: 1px solid var(--color-border);
}
.btn--outline:hover { background: rgba(0,0,0,0.03); }

.btn--lg {
  padding: 1rem 2rem;
  font-size: 1.0625rem;
  min-height: 56px;
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  min-height: 36px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   6. HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  padding-top: calc(var(--space-section) + 5rem);
  padding-bottom: var(--space-section);
  overflow: hidden;
  text-align: center;
}

.hero__glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: var(--grad-glow-top);
  pointer-events: none;
  z-index: 0;
}

.hero__content { position: relative; z-index: 1; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(5,150,105,0.30);
  background: rgba(5,150,105,0.10);
  color: #6ee7b7;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero__heading {
  margin-bottom: 1.25rem;
}

.hero__subtext {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 48rem;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3.5rem;
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 48rem;
  margin-inline: auto;
}

.stats-bar__item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.stats-bar__value {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.stats-bar__label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
}

/* ============================================================
   7. SECTION HEADER (reusable)
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-header__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary-lt);
  margin-bottom: 0.75rem;
  display: block;
}

.section-header__heading { margin-bottom: 0.75rem; }
.section-header__body { max-width: 42rem; margin-inline: auto; font-size: 1.0625rem; }

/* ============================================================
   8. FEATURE CARDS GRID
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 4px 20px -2px rgba(0,0,0,0.03);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .2s var(--ease);
}

.feature-card:hover {
  border-color: var(--color-primary-lt);
  box-shadow: 0 12px 30px -4px rgba(76,175,141,0.12);
  transform: translateY(-2px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.feature-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.feature-card__desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.40);
  line-height: 1.7;
}

/* Icon gradient backgrounds */
.icon--emerald-purple { background: linear-gradient(135deg, #10b981, #7c3aed); }
.icon--blue-cyan       { background: linear-gradient(135deg, #3b82f6, #0891b2); }
.icon--emerald-teal    { background: linear-gradient(135deg, #10b981, #0d9488); }
.icon--orange-red      { background: linear-gradient(135deg, #f97316, #ef4444); }
.icon--pink-rose       { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.icon--teal-blue       { background: linear-gradient(135deg, #14b8a6, #3b82f6); }

/* ============================================================
   9. WHY CHOOSE US (2-col layout)
   ============================================================ */
.why-section { position: relative; }
.why-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #041E13, transparent);
  pointer-events: none;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
}

.why-grid__cta-side {}
.why-grid__cta-side p { margin-bottom: 2rem; font-size: 1.0625rem; }

.why-cards { display: flex; flex-direction: column; gap: 0.875rem; }

.why-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.why-card:hover {
  border-color: rgba(76,175,141,0.3);
  box-shadow: 0 8px 20px rgba(76,175,141,0.08);
}

.why-card__number {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(to bottom, #4CAF8D, rgba(76,175,141,0.2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
  width: 2.5rem;
  line-height: 1;
}

.why-card__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.why-card__desc { font-size: 0.8125rem; color: var(--color-text-muted); line-height: 1.65; }

/* ============================================================
   10. PRICING CARDS
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.pricing-card--featured {
  background: #ffffff;
  border-color: rgba(76,175,141,0.4);
  box-shadow: 0 20px 60px -10px rgba(76,175,141,0.15);
}

.pricing-card__badge {
  position: absolute;
  top: -0.875rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 1rem;
  background: var(--grad-primary);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.pricing-card__name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.pricing-card__desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.pricing-card__price {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  line-height: 1;
}

.pricing-card__price span {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.pricing-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.pricing-card__features li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
}

.pricing-card__features li svg {
  flex-shrink: 0;
  color: #34d399;
}

/* ============================================================
   11. FINAL CTA BANNER
   ============================================================ */
.cta-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(76,175,141,0.08), rgba(45,110,83,0.04));
  border: 1px solid rgba(76,175,141,0.15);
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 6vw, 5rem);
  text-align: center;
  overflow: hidden;
}

.cta-banner__glow-1 {
  position: absolute;
  top: -4rem;
  right: -4rem;
  width: 16rem;
  height: 16rem;
  background: rgba(5,150,105,.18);
  border-radius: 50%;
  filter: blur(3rem);
  pointer-events: none;
}

.cta-banner__glow-2 {
  position: absolute;
  bottom: -4rem;
  left: -4rem;
  width: 16rem;
  height: 16rem;
  background: rgba(13,148,136,.18);
  border-radius: 50%;
  filter: blur(3rem);
  pointer-events: none;
}

.cta-banner__content { position: relative; }
.cta-banner__heading { margin-bottom: 1rem; }
.cta-banner__subtext { max-width: 40rem; margin-inline: auto; margin-bottom: 2.5rem; font-size: 1.0625rem; }
.cta-banner__note { font-size: 0.8rem; color: rgba(255,255,255,0.20); margin-top: 1rem; }

/* ============================================================
   12. FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
}

.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.35);
  transition: color .2s var(--ease);
}
.footer-nav a:hover { color: var(--color-text); }

.footer-copy {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.20);
}

/* ============================================================
   13. SECURITY — Remove WordPress fingerprints in CSS
   ============================================================ */
/* No wp-block or Gutenberg styles leak into front-end */
.wp-block-image, .wp-block-paragraph { all: unset; }

/* ============================================================
   14. RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid  { grid-template-columns: 1fr; max-width: 26rem; margin-inline: auto; }
  .why-grid      { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
  .stats-bar     { grid-template-columns: repeat(2, 1fr); }
  .navbar__nav   { display: none; }
  .navbar__toggle { display: flex; }
  .footer-inner  { flex-direction: column; align-items: center; text-align: center; }
  .footer-nav    { justify-content: center; }
}

@media (max-width: 500px) {
  .features-grid { grid-template-columns: 1fr; }
  .stats-bar     { grid-template-columns: repeat(2, 1fr); }
  .hero__cta     { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
}

/* ============================================================
   15. ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  animation: fadeUp .5s var(--ease) both;
}

[data-delay="100"] { animation-delay: .1s; }
[data-delay="200"] { animation-delay: .2s; }
[data-delay="300"] { animation-delay: .3s; }
[data-delay="400"] { animation-delay: .4s; }
[data-delay="500"] { animation-delay: .5s; }

/* Intersection observer trigger class */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ============================================================
   16. WORDPRESS SPECIFICS — No admin bar layout shift
   ============================================================ */
html body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  html body.admin-bar .site-header { top: 46px; }
}
