/* ==========================================================================
   GeekHub Enterprise Technologies — main.css
   Global styles, CSS variables, reset, typography, layout utilities
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Brand Colors — darker base (correction #8) */
  --navy:           #010623;
  --navy-dark:      #000212;
  --navy-mid:       #060d1e;
  --navy-light:     #0a1630;
  --navy-card:      #070e28;
  --white:          #FFFFFF;
  --black:          #000000;
  --black-soft:     #000212;

  /* Accent — primary indigo */
  --accent:         #1D236D;
  --accent-hover:   rgba(29, 35, 109, 0.80);
  --accent-light:   rgba(110, 142, 251, 0.10);
  --accent-border:  rgba(110, 142, 251, 0.22);
  --accent-glow:    rgba(110, 142, 251, 0.18);
  /* Lighter for text/labels on very dark bg (correction #8) */
  --accent-bright:  #6e8efb;

  /* Text */
  --text-primary:   #FFFFFF;
  --text-muted:     rgba(255, 255, 255, 0.62);
  --text-faint:     rgba(255, 255, 255, 0.36);
  --text-dark:      #010623;
  --text-dark-muted: rgba(1, 6, 35, 0.60);

  /* UI Surfaces */
  --border:         rgba(255, 255, 255, 0.07);
  --border-accent:  rgba(110, 142, 251, 0.22);
  --card-bg:        rgba(255, 255, 255, 0.038);
  --card-hover:     rgba(255, 255, 255, 0.062);
  --overlay-dark:   rgba(1, 6, 35, 0.70);
  --overlay-heavy:  rgba(0, 2, 18, 0.86);

  /* Typography — Lexend Deca only */
  --font-primary:   'Lexend Deca', sans-serif;

  /* Font Weights */
  --fw-light:       300;
  --fw-regular:     400;
  --fw-medium:      500;
  --fw-semibold:    600;
  --fw-bold:        700;

  /* Layout */
  --max-width:      1200px;
  --section-y:      56px;
  --section-y-sm:   36px;
  --container-x:    clamp(22px, 4.5vw, 60px);

  /* Shape */
  --radius-sm:      4px;
  --radius:         8px;
  --radius-md:      14px;
  --radius-lg:      22px;
  --radius-img:     16px;   /* Global image treatment border-radius */
  --radius-full:    9999px;

  /* Shadows */
  --shadow-sm:      0 2px 12px rgba(0, 0, 0, 0.35);
  --shadow:         0 6px 36px rgba(0, 0, 0, 0.50);
  --shadow-lg:      0 18px 64px rgba(0, 0, 0, 0.65);
  --shadow-accent:  0 8px 32px rgba(29, 35, 109, 0.28);

  /* Transitions */
  --ease:           0.28s ease;
  --ease-out:       0.30s cubic-bezier(0.22, 1, 0.36, 1);
  --ease-slow:      0.60s cubic-bezier(0.22, 1, 0.36, 1);

  /* Nav height */
  --nav-h:          72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar {
  display: none;
}

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

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease);
}

ul, ol { list-style: none; }

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

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

input, textarea, select { outline: none; }

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--white);
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.03em;
  line-height: 1.10;
}

h2 {
  font-size: clamp(1.85rem, 3.4vw, 3rem);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.2rem, 1.9vw, 1.75rem);
  font-weight: var(--fw-medium);
  letter-spacing: -0.015em;
}

h4 {
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  font-weight: var(--fw-medium);
}

h5 { font-size: 1.0rem; font-weight: var(--fw-medium); }
h6 { font-size: 0.875rem; font-weight: var(--fw-medium); }

p {
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  font-weight: var(--fw-regular);
  color: var(--text-muted);
  line-height: 1.85;
}

strong {
  font-weight: var(--fw-semibold);
  color: var(--white);
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-x);
}

.section-padding      { padding: var(--section-y) 0; }
.section-padding--sm  { padding: var(--section-y-sm) 0; }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* Flex helpers */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.gap-sm       { gap: 10px; }
.gap-md       { gap: 20px; }
.gap-lg       { gap: 40px; }

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

/* --------------------------------------------------------------------------
   5. Section Labels & Headers
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent-bright);
  flex-shrink: 0;
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.45);
}

.eyebrow--light::before {
  background: rgba(255, 255, 255, 0.30);
}

.section-title {
  font-family: var(--font-primary);
  font-weight: var(--fw-semibold);
  color: var(--white);
  margin-bottom: 18px;
  letter-spacing: -0.025em;
}

.section-title .accent {
  color: var(--accent-bright);
}

.section-intro {
  font-size: clamp(0.9rem, 1.2vw, 1.0rem);
  font-weight: var(--fw-light);
  color: var(--text-muted);
  line-height: 1.88;
  max-width: 600px;
}

.section-header {
  margin-bottom: 36px;
}

.section-header--center {
  text-align: center;
}

.section-header--center .eyebrow {
  justify-content: center;
}

.section-header--center .section-intro {
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   6. Utility
   -------------------------------------------------------------------------- */
.text-accent  { color: var(--accent-bright) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-white   { color: var(--white) !important; }

/* Responsive line breaks — visible on desktop, hidden on mobile */
.br-desktop { display: inline; }
@media (max-width: 768px) {
  .br-desktop { display: none; }
}

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

/* --------------------------------------------------------------------------
   7. Background Textures
   -------------------------------------------------------------------------- */
.bg-dots {
  background-image: radial-gradient(
    circle, rgba(255,255,255,0.04) 1px, transparent 1px
  );
  background-size: 32px 32px;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 72px 72px;
}

/* --------------------------------------------------------------------------
   8. Global Image Treatment (correction #14)
   Images in content sections: 16px radius, ~24px from container edges
   -------------------------------------------------------------------------- */
.img-contained {
  border-radius: var(--radius-img);
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   9. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root { --section-y: 48px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --section-y:    40px;
    --section-y-sm: 28px;
    --container-x:  20px;
  }
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; gap: 18px; }
}

/* --------------------------------------------------------------------------
   10. Mobile Text Alignment — global left-align below 768px
   Exceptions: .page-hero (hero banner) and .stats-bar retain their own
   alignment. Everything else is forced left.
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  h1, h2, h3, h4, h5, h6,
  p,
  .eyebrow,
  .section-title,
  .section-intro,
  .section-header,
  .section-header--center {
    text-align: left;
  }

  /* Reset centering helpers that section-header--center applies */
  .section-header--center .eyebrow {
    justify-content: flex-start;
  }
  .section-header--center .section-intro {
    margin-left: 0;
    margin-right: 0;
  }

  /* Keep hero banner left-aligned (page-hero is always left) */
  .page-hero h1,
  .page-hero .page-hero__heading,
  .page-hero .eyebrow,
  .page-hero p {
    text-align: left;
  }

  /* Home hero headline stays centered */
  .hero h1,
  .hero__heading {
    text-align: center;
  }

  /* Keep stats bar numbers/labels centered */
  .stats-bar,
  .stats-bar__item,
  .stats-bar__number,
  .stats-bar__label {
    text-align: center;
  }
}
