/* ============================================================
   BestBuddy Technology — Main Stylesheet
   Mobile-first, CSS Custom Properties, Grid + Flexbox
   ============================================================ */

/* ── 1. Custom Properties ──────────────────────────────────── */
:root {
  /* Brand colours */
  --red:        #E8321E;
  --red-dark:   #C42515;
  --red-light:  #FF4D37;
  --red-glow:   rgba(232, 50, 30, 0.20);
  --red-bg:     rgba(232, 50, 30, 0.07);
  --teal:       #0891B2;
  --teal-dark:  #0670A0;
  --teal-glow:  rgba(8, 145, 178, 0.18);
  --teal-bg:    rgba(8, 145, 178, 0.07);
  --amber:      #F59E0B;
  --green:      #10B981;
  --purple:     #7C3AED;

  /* Neutral palette */
  --bg:         #F7F8FA;
  --surface:    #FFFFFF;
  --surface-2:  #EFF1F5;
  --surface-3:  #E5E7EB;
  --border:     rgba(0, 0, 0, 0.08);
  --border-md:  rgba(0, 0, 0, 0.14);

  /* Text */
  --text:       #111318;
  --text-2:     #374151;
  --muted:      #6B7280;
  --muted-light:#9CA3AF;

  /* Typography */
  --font-head:  'Space Grotesk', 'DM Sans', system-ui, sans-serif;
  --font-body:  'DM Sans', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, monospace;

  /* Spacing scale */
  --s-1: 0.25rem;  /* 4px  */
  --s-2: 0.5rem;   /* 8px  */
  --s-3: 0.75rem;  /* 12px */
  --s-4: 1rem;     /* 16px */
  --s-5: 1.25rem;  /* 20px */
  --s-6: 1.5rem;   /* 24px */
  --s-8: 2rem;     /* 32px */
  --s-10:2.5rem;   /* 40px */
  --s-12:3rem;     /* 48px */
  --s-16:4rem;     /* 64px */
  --s-20:5rem;     /* 80px */
  --s-24:6rem;     /* 96px */

  /* Border radius */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-full:9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.07);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.08);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.16), 0 8px 24px rgba(0,0,0,0.10);

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:   0.15s;
  --t-base:   0.25s;
  --t-slow:   0.4s;

  /* Nav height */
  --nav-h: 68px;

  /* Section padding */
  --section-py: clamp(4rem, 8vw, 7rem);
  --section-px: clamp(1.25rem, 5vw, 5rem);
  --container:  1280px;
}

/* ── 2. Reset & Base ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

/* Subtle grid texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

main, header, footer, section, article, aside, nav {
  position: relative;
  z-index: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

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

p { max-width: 72ch; }

::selection {
  background: var(--red);
  color: #fff;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── 3. Custom Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: var(--r-full); }

/* ── 4. Utility Classes ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--section-px);
}

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

.section--alt { background: var(--surface-2); }
.section--white { background: var(--surface); }
.section--dark {
  background: var(--text);
  color: #fff;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }

.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;
}

/* ── 5. Typography Components ──────────────────────────────── */

/* Label tag above headings */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--red-bg);
  border: 1px solid rgba(232, 50, 30, 0.25);
  color: var(--red);
  font-family: var(--font-head);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-sm);
  margin-bottom: var(--s-4);
}

.section-tag--teal {
  background: var(--teal-bg);
  border-color: rgba(8, 145, 178, 0.25);
  color: var(--teal);
}

/* Section heading block */
.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  margin-bottom: var(--s-4);
}

.section-head p {
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.75;
  max-width: 600px;
}

.section-head.center { text-align: center; }
.section-head.center p { margin-inline: auto; }

/* Gradient text */
.grad-text {
  background: linear-gradient(135deg, var(--red), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── 6. Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.8125rem 1.75rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              background var(--t-fast),
              color var(--t-fast),
              border-color var(--t-fast);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 20px var(--red-glow);
}
.btn--primary:hover {
  background: var(--red-dark);
  box-shadow: 0 8px 28px var(--red-glow);
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
}
.btn--secondary:hover {
  background: var(--teal-bg);
  color: var(--teal);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-md);
}
.btn--outline:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn--ghost {
  background: transparent;
  color: var(--red);
  padding-inline: var(--s-3);
}
.btn--ghost:hover {
  background: var(--red-bg);
}

.btn--lg {
  font-size: 1.0625rem;
  padding: 1rem 2.25rem;
}

.btn--sm {
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
}

/* ── 7. Navigation ─────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding-inline: var(--section-px);
  background: transparent;
  transition: background var(--t-base), box-shadow var(--t-base), backdrop-filter var(--t-base);
}

.nav.scrolled {
  background: rgba(247, 248, 250, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,0.06);
}

.nav__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  position: relative;
  z-index: 10;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-shrink: 0;
  text-decoration: none;
  position: relative;
  z-index: 10;
  cursor: pointer;
  pointer-events: auto;
}

.nav__logo img {
  height: 38px;
  width: auto;
}

.nav__logo-text {
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}

.nav__logo-sub {
  font-size: 0.6875rem;
  color: var(--muted);
  font-weight: 400;
  display: block;
  letter-spacing: 0.02em;
}

/* Desktop links */
.nav__links {
  display: none;
  align-items: center;
  gap: var(--s-1);
  position: relative;
  z-index: 10;
}

.nav__link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.nav__link:hover,
.nav__link.active {
  color: var(--red);
  background: var(--red-bg);
}

.nav__cta {
  display: none;
  align-items: center;
  gap: var(--s-3);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

/* Hamburger */
.nav__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--s-2);
  border-radius: var(--r-sm);
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
  flex-shrink: 0;
  position: relative;
  z-index: 1001;
  pointer-events: auto;
}

.nav__burger:hover {
  background: var(--surface-2);
  border-color: var(--border-md);
}

.nav__burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t-base) var(--ease-out), opacity var(--t-fast), width var(--t-base);
  transform-origin: center;
}

.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  position: fixed;
  top: var(--nav-h);
  inset-inline: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--s-6) var(--section-px);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  box-shadow: var(--shadow-lg);
  transform: translateY(-110%);
  opacity: 0;
  transition: transform var(--t-base) var(--ease-out), opacity var(--t-base);
  pointer-events: none;
  z-index: 999;
}

.nav__mobile.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav__mobile-link {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-2);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  transition: background var(--t-fast), color var(--t-fast);
  cursor: pointer;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.nav__mobile-link:hover,
.nav__mobile-link.active {
  background: var(--red-bg);
  color: var(--red);
}

.nav__mobile-cta {
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

/* ── 8. Hero Section ───────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  padding-inline: var(--section-px);
  padding-bottom: var(--s-16);
  position: relative;
  overflow: hidden;
}

.hero__bg-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero__bg-glow--red {
  top: 5%;
  left: -10%;
  width: clamp(300px, 50vw, 600px);
  height: clamp(300px, 50vw, 600px);
  background: radial-gradient(circle, rgba(232,50,30,0.10) 0%, transparent 70%);
}

.hero__bg-glow--teal {
  bottom: 10%;
  right: -5%;
  width: clamp(250px, 40vw, 500px);
  height: clamp(250px, 40vw, 500px);
  background: radial-gradient(circle, rgba(8,145,178,0.08) 0%, transparent 70%);
}

.hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(0,0,0,0.025) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(0,0,0,0.025) 60px);
}

.hero__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.hero__text {}

.hero__text h1 {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.hero__text p {
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 520px;
}

.hero__btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin-bottom: 3.5rem;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.hero__stat-num {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--red);
  line-height: 1;
}

.hero__stat-label {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: var(--s-1);
}

/* Dashboard mockup */
.hero__visual {
  position: relative;
}

.hero__dashboard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(232,50,30,0.08);
}

.hero__dash-bar {
  background: var(--surface-2);
  padding: var(--s-3) var(--s-4);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  border-bottom: 1px solid var(--border);
}

.hero__dash-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero__dash-url {
  flex: 1;
  margin-inline: var(--s-3);
  background: var(--surface);
  border-radius: var(--r-sm);
  height: 22px;
  display: flex;
  align-items: center;
  padding-inline: var(--s-3);
}

.hero__dash-url span {
  font-size: 0.6875rem;
  color: var(--muted);
}

.hero__dash-body {
  padding: var(--s-5);
}

.hero__dash-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.hero__dash-stat-card {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: var(--s-3);
}

.hero__dash-stat-val {
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}

.hero__dash-stat-lbl {
  font-size: 0.625rem;
  color: var(--muted);
  margin-top: var(--s-1);
}

.hero__dash-chart {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin-bottom: var(--s-3);
}

.hero__dash-chart-title {
  font-size: 0.6875rem;
  color: var(--muted);
  margin-bottom: var(--s-3);
}

.hero__dash-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 56px;
}

.hero__dash-bar-item {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--red), var(--teal));
}

.hero__dash-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  background: var(--surface-2);
  border-radius: var(--r-sm);
  margin-bottom: var(--s-2);
}

.hero__dash-dot-sm {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero__dash-row-text {
  font-size: 0.6875rem;
  color: var(--muted);
}

.hero__badge {
  position: absolute;
  top: -16px;
  right: -16px;
  background: var(--red);
  color: #fff;
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 0 24px var(--red-glow);
}

/* Scroll indicator */
.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-16);
}

.hero__scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--red));
}

.hero__scroll-label {
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── 9. Stats Bar ──────────────────────────────────────────── */
.stats-bar {
  padding-block: var(--s-16);
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.stats-bar__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}

.stats-bar__item {
  text-align: center;
  padding: var(--s-4);
}

.stats-bar__num {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--s-2);
}

.stats-bar__label {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ── 10. Services Grid ─────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base),
              border-color var(--t-base);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent, var(--red)), transparent);
  opacity: 0.7;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: color-mix(in srgb, var(--accent, var(--red)) 30%, transparent);
}

.service-card__icon {
  font-size: 2rem;
  margin-bottom: var(--s-4);
  display: block;
}

.service-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--s-3);
  color: var(--text);
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: none;
}

/* ── 11. ERP Modules Grid ──────────────────────────────────── */
.erp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
}

.erp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-5);
  cursor: pointer;
  position: relative;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.erp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--red);
  border-radius: var(--r-md) var(--r-md) 0 0;
  opacity: 0;
  transition: opacity var(--t-fast);
}

.erp-card:hover,
.erp-card.active {
  background: var(--red-bg);
  border-color: rgba(232,50,30,0.25);
}

.erp-card.active::before { opacity: 1; }

.erp-card__icon { font-size: 1.5rem; margin-bottom: var(--s-3); }

.erp-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--s-2);
}

.erp-card.active h3 { color: var(--red); }

.erp-card p {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: none;
}

/* ── 12. Portfolio Cards ───────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}

.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base);
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.portfolio-card__thumb {
  height: clamp(140px, 20vw, 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.portfolio-card__thumb-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  opacity: 0.5;
}

.portfolio-card__body {
  padding: clamp(1.25rem, 2.5vw, 1.5rem);
}

.portfolio-card__type {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}

.portfolio-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--s-2);
}

.portfolio-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: var(--s-4);
  max-width: none;
}

.portfolio-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.portfolio-tag {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  border: 1px solid;
}

/* ── 13. Team Cards ────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-6);
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  text-align: center;
  transition: transform var(--t-base), border-color var(--t-base);
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232,50,30,0.25);
}

.team-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(232,50,30,0.25), rgba(8,145,178,0.25));
  border: 2px solid var(--border);
  margin: 0 auto var(--s-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  color: var(--muted);
  overflow: hidden;
}

.team-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--s-1);
}

.team-card__role {
  font-size: 0.8125rem;
  color: var(--red);
  font-weight: 500;
  margin-bottom: var(--s-1);
}

.team-card__dept {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── 14. Testimonials ──────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  position: relative;
}

.testimonial-card__quote-mark {
  position: absolute;
  top: var(--s-5);
  right: var(--s-5);
  color: var(--red);
  font-size: 3rem;
  opacity: 0.2;
  font-family: serif;
  line-height: 1;
  user-select: none;
}

.testimonial-card__stars {
  display: flex;
  gap: 2px;
  margin-bottom: var(--s-4);
  color: var(--amber);
  font-size: 0.875rem;
}

.testimonial-card p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: var(--s-5);
  max-width: none;
}

.testimonial-card__author {
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.testimonial-card__org {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ── 15. Client Marquee ────────────────────────────────────── */
.marquee-wrap {
  overflow: hidden;
  position: relative;
}

.marquee-wrap::before,
.marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.marquee-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--surface-2), transparent);
}

.marquee-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--surface-2), transparent);
}

.marquee-track {
  display: flex;
  gap: var(--s-8);
  width: max-content;
  animation: marquee 22s linear infinite;
}

.marquee-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-6);
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── 16. Contact Page ──────────────────────────────────────── */
.contact-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-info {}

.contact-info-item {
  display: flex;
  gap: var(--s-4);
  align-items: flex-start;
  margin-bottom: var(--s-6);
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  background: var(--red-bg);
  border: 1px solid rgba(232,50,30,0.2);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.contact-info-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s-1);
}

.contact-info-value {
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.6;
  white-space: pre-line;
}

.contact-cta-box {
  background: linear-gradient(135deg, var(--red-bg), var(--teal-bg));
  border: 1px solid rgba(232,50,30,0.2);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
  margin-top: var(--s-8);
}

.contact-cta-box__icon { font-size: 2rem; flex-shrink: 0; }

.contact-cta-box h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--s-2);
}

.contact-cta-box p {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: none;
}

/* Form */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow-md);
}

.form-card h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: var(--s-6);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.form-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.form-field label span.req { color: var(--red); margin-left: 2px; }

.form-input,
.form-textarea,
.form-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.form-textarea { resize: vertical; min-height: 120px; }

.form-input::placeholder,
.form-textarea::placeholder { color: var(--muted-light); }

.form-success {
  text-align: center;
  padding: var(--s-12) 0;
}

.form-success__icon { font-size: 3rem; margin-bottom: var(--s-4); }
.form-success h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: var(--s-3); }
.form-success p { color: var(--muted); font-size: 0.9375rem; }

/* ── 17. Page Header (inner pages) ────────────────────────── */
.page-header {
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 5vw, 4rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  padding-inline: var(--section-px);
  background: linear-gradient(135deg, var(--red-bg) 0%, var(--teal-bg) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(0,0,0,0.02) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(0,0,0,0.02) 60px);
}

.page-header__inner {
  max-width: var(--container);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}

.breadcrumb__item {
  font-size: 0.8125rem;
  color: var(--muted);
}

.breadcrumb__item a {
  color: var(--red);
  transition: opacity var(--t-fast);
}

.breadcrumb__item a:hover { opacity: 0.75; }

.breadcrumb__sep {
  color: var(--muted-light);
  font-size: 0.75rem;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: var(--s-4);
}

.page-header p {
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  color: var(--muted);
  max-width: 600px;
}

/* ── 18. About Page ────────────────────────────────────────── */
.about-split {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.about-card {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  position: relative;
  overflow: hidden;
}

.about-card__scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  animation: scan 3.5s linear infinite;
  opacity: 0.5;
}

.about-card__header {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--border);
}

.about-card__header img { height: 52px; }

.about-card__header-name {
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.about-card__header-type {
  font-size: 0.75rem;
  color: var(--muted);
}

.about-card__header-gstin {
  font-size: 0.6875rem;
  color: var(--teal);
  margin-top: var(--s-1);
}

.about-card__row {
  display: flex;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}

.about-card__row-icon { font-size: 1.125rem; flex-shrink: 0; margin-top: 2px; }

.about-card__row-lbl {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.about-card__row-val {
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 500;
}

.about-card__accent {
  position: absolute;
  left: 0;
  top: var(--s-5);
  bottom: var(--s-5);
  width: 3px;
  background: linear-gradient(to bottom, var(--red), var(--teal));
  border-radius: 0 var(--r-full) var(--r-full) 0;
}

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

.about-badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8125rem;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-full);
}

/* ── 19. CTA Banner ────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--red), color-mix(in srgb, var(--red) 60%, var(--teal)));
  color: #fff;
  padding-block: clamp(3rem, 6vw, 5rem);
  padding-inline: var(--section-px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.03) 20px, rgba(255,255,255,0.03) 21px);
}

.cta-banner__inner {
  max-width: 680px;
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--s-4);
}

.cta-banner p {
  font-size: 1.0625rem;
  opacity: 0.85;
  margin-bottom: var(--s-8);
  max-width: 520px;
  margin-inline: auto;
}

.cta-banner .btn--primary {
  background: #fff;
  color: var(--red);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.cta-banner .btn--primary:hover {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

.cta-banner .btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.cta-banner .btn--secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.8);
  color: #fff;
}

.cta-banner__btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: center;
}

/* ── 20. Footer ────────────────────────────────────────────── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  padding-inline: var(--section-px);
}

.footer__grid {
  max-width: var(--container);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.footer__brand img {
  height: 44px;
  margin-bottom: var(--s-4);
}

.footer__brand p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 340px;
  margin-bottom: var(--s-3);
}

.footer__gstin {
  font-size: 0.75rem;
  color: var(--teal);
}

.footer__col-title {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--s-4);
}

.footer__link {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: var(--s-3);
  transition: color var(--t-fast);
}

.footer__link:hover { color: var(--red); }

.footer__address {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.8;
}

.footer__bottom {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding-bottom: var(--s-8);
}

.footer__bottom-text {
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer__bottom-made {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ── 21. Floating Stat Cards (Hero decoration) ─────────────── */
.hero__float-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__float-card {
  position: absolute;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--r-lg);
  padding: var(--s-4) var(--s-5);
  box-shadow: var(--shadow-md);
  animation: float 5s ease-in-out infinite;
}

.hero__float-val {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.hero__float-lbl {
  font-size: 0.6875rem;
  color: var(--muted);
  margin-top: var(--s-1);
}

/* ── 22. Reveal Animation ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 23. Legal Pages ───────────────────────────────────────── */
.legal-body {
  max-width: 800px;
}

.legal-body h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-top: var(--s-10);
  margin-bottom: var(--s-4);
}

.legal-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: var(--s-6);
  margin-bottom: var(--s-3);
}

.legal-body p {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: var(--s-4);
  max-width: none;
}

.legal-body ul, .legal-body ol {
  list-style: disc;
  padding-left: var(--s-6);
  margin-bottom: var(--s-4);
}

.legal-body ul li, .legal-body ol li {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: var(--s-2);
}

/* ── 24. Blog Placeholder ──────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card__thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--red-bg), var(--teal-bg));
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.blog-card__body {
  padding: clamp(1.25rem, 2.5vw, 1.5rem);
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  font-size: 0.75rem;
  color: var(--muted);
}

.blog-card__cat {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(232,50,30,0.2);
  border-radius: var(--r-sm);
  padding: 2px 8px;
  font-weight: 600;
  font-size: 0.6875rem;
}

.blog-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: var(--s-2);
  line-height: 1.4;
}

.blog-card h3 a { color: var(--text); transition: color var(--t-fast); }
.blog-card h3 a:hover { color: var(--red); }

.blog-card p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: var(--s-4);
  max-width: none;
  line-height: 1.7;
}

/* ── 25. Keyframe Animations ───────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scan {
  from { top: 0; }
  to   { top: 100%; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--red-glow); }
  50%       { box-shadow: 0 0 0 12px transparent; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hero entrance animations */
.anim-fade-up   { animation: fadeUp 0.8s var(--ease-out) both; }
.anim-fade-in   { animation: fadeIn 0.8s var(--ease-out) both; }
.anim-delay-1   { animation-delay: 0.1s; }
.anim-delay-2   { animation-delay: 0.2s; }
.anim-delay-3   { animation-delay: 0.3s; }
.anim-delay-4   { animation-delay: 0.4s; }
.anim-delay-5   { animation-delay: 0.5s; }
.anim-delay-6   { animation-delay: 0.6s; }
.anim-float     { animation: float 6s ease-in-out infinite; }

/* ── 26. Responsive — Tablet 640px+ ───────────────────────── */
@media (min-width: 640px) {
  .stats-bar__grid   { grid-template-columns: repeat(4, 1fr); }
  .services-grid     { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid    { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid         { grid-template-columns: repeat(2, 1fr); }

  .form-row { grid-template-columns: 1fr 1fr; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}

/* ── 27. Responsive — Desktop 1024px+ ─────────────────────── */
@media (min-width: 1024px) {
  .nav__links { display: flex; }
  .nav__cta   { display: flex; }
  .nav__burger { display: none; }

  .hero__inner { grid-template-columns: 1fr 1fr; }
  .hero__scroll { display: flex; }

  .hero__dash-stats { grid-template-columns: repeat(4, 1fr); }

  .about-split  { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }

  .services-grid     { grid-template-columns: repeat(3, 1fr); }
  .erp-grid          { grid-template-columns: repeat(4, 1fr); }
  .portfolio-grid    { grid-template-columns: repeat(3, 1fr); }
  .team-grid         { grid-template-columns: repeat(4, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); }
  .blog-grid         { grid-template-columns: repeat(3, 1fr); }

  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ── 28. Responsive — Wide 1280px+ ────────────────────────── */
@media (min-width: 1280px) {
  .hero__float-cards { display: block; }
}

/* ── 29. Dark Mode ─────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #0E1015;
    --surface:    #161820;
    --surface-2:  #1C1F28;
    --surface-3:  #232735;
    --border:     rgba(255, 255, 255, 0.08);
    --border-md:  rgba(255, 255, 255, 0.14);
    --text:       #F1F3F5;
    --text-2:     #D1D5DB;
    --muted:      #9CA3AF;
    --muted-light:#6B7280;
  }

  .nav.scrolled {
    background: rgba(14, 16, 21, 0.92);
  }

  .nav__mobile { background: var(--surface); }

  body::before {
    background-image:
      linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  }

  .hero__float-card { background: rgba(22, 24, 32, 0.92); }

  .marquee-wrap::before {
    background: linear-gradient(to right, var(--surface-2), transparent);
  }
  .marquee-wrap::after {
    background: linear-gradient(to left, var(--surface-2), transparent);
  }
}

/* ── 30. Print ─────────────────────────────────────────────── */
@media print {
  .nav, .nav__mobile, .cta-banner, .hero__float-cards { display: none !important; }
  body { background: white; color: black; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.75em; }
}

/* ── 31. Reduced Motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
}
