/**
 * SmartConstruct Ecosystem — Shared Brand Variables & Base Styles
 * Injected into every site via <!-- BRAND-CSS --> build placeholder.
 * Update once here — all 4 sites stay in sync.
 */

/* ═══════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES
   ═══════════════════════════════════════════════════════ */
:root {
  /* ── Brand Colours ──────────────────────────────────── */
  --orange:     #FF7A59;   /* Smart Orange   — primary accent  */
  --navy:       #2D3E50;   /* Construct Navy — primary dark    */
  --teal:       #00A38D;   /* AI Teal        — secondary       */
  --slate:      #334E68;   /* Charcoal Slate — body text       */
  --offwhite:   #F5F8FA;   /* Off-White Shell — light bg       */
  --white:      #ffffff;
  --navy-dark:  #1e2d3d;   /* Footer / deep bg                 */
  --grey-lt:    #EEF1F4;
  --grey-md:    #B0BEC5;
  --muted:      #7A8FA6;
  --border:     rgba(45,62,80,0.12);

  /* legacy aliases kept for backwards compat */
  --color-orange:   #FF7A59;
  --color-navy:     #2D3E50;
  --color-teal:     #00A38D;
  --color-slate:    #334E68;
  --color-offwhite: #F5F8FA;
  --color-white:    #ffffff;

  /* ── Typography ─────────────────────────────────────── */
  --font-family:  Arial, 'Helvetica Neue', Helvetica, sans-serif;
  --font-mono:    'Courier New', Courier, monospace;

  --font-h1:   clamp(30px, 5.5vw, 48px);
  --font-h2:   clamp(22px, 4vw,   36px);
  --font-h3:   clamp(18px, 2.5vw, 22px);
  --font-body: 16px;
  --font-sm:   14px;
  --font-xs:   12px;

  --weight-bold:     700;
  --weight-semibold: 600;
  --weight-normal:   400;

  --line-height-body:    1.65;
  --line-height-heading: 1.15;

  /* ── Spacing ─────────────────────────────────────────── */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  40px;
  --space-xl:  64px;
  --space-2xl: 96px;

  /* ── Borders & Radius ────────────────────────────────── */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* ── Shadows ─────────────────────────────────────────── */
  --shadow-card:  0 4px 24px rgba(45,62,80,0.08);
  --shadow-hover: 0 12px 36px rgba(45,62,80,0.14);
  --shadow-nav:   0 2px 16px rgba(45,62,80,0.20);

  /* ── Transitions ─────────────────────────────────────── */
  --ease: 0.2s ease;
}

/* ═══════════════════════════════════════════════════════
   2. MOBILE-FIRST RESET & BASE
   ═══════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-family);
  font-size: var(--font-body);
  line-height: var(--line-height-body);
  color: var(--slate);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* ── Touch targets — minimum 44×44px for accessibility ── */
a, button, [role="button"],
input[type="button"], input[type="submit"], input[type="reset"] {
  min-height: 44px;
}

/* ── Headings ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: var(--weight-bold);
  line-height: var(--line-height-heading);
  color: var(--navy);
}
h1 { font-size: var(--font-h1); }
h2 { font-size: var(--font-h2); }
h3 { font-size: var(--font-h3); }

/* ── Links ───────────────────────────────────────────── */
a {
  color: var(--orange);
  text-decoration: none;
  transition: color var(--ease);
}
a:hover { color: var(--navy); }

/* ── Responsive container ───────────────────────────── */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }
@media (min-width: 1200px) { .container { padding: 0 24px; } }

/* ═══════════════════════════════════════════════════════
   3. HAMBURGER MENU (shared across all sites)
   ═══════════════════════════════════════════════════════ */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  border-radius: var(--radius-sm);
  transition: background var(--ease);
}
.hamburger:hover { background: rgba(255,255,255,0.08); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
}

/* Mobile nav drawer (used by sites with class .site-nav) */
@media (max-width: 768px) {
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--navy);
    padding: 12px 20px 20px;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 99;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    display: block;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ═══════════════════════════════════════════════════════
   4. SHARED COLOUR UTILITIES
   ═══════════════════════════════════════════════════════ */
.brand-orange  { color: var(--orange); }
.brand-navy    { color: var(--navy); }
.brand-teal    { color: var(--teal); }
.brand-slate   { color: var(--slate); }

.bg-navy       { background-color: var(--navy); }
.bg-orange     { background-color: var(--orange); }
.bg-teal       { background-color: var(--teal); }
.bg-offwhite   { background-color: var(--offwhite); }
.bg-white      { background-color: var(--white); }

/* ── Text helpers ─────────────────────────────────────── */
.text-center  { text-align: center; }
.text-muted   { color: var(--muted); }
.text-sm      { font-size: var(--font-sm); }
.text-xs      { font-size: var(--font-xs); }
.text-upper   { text-transform: uppercase; letter-spacing: 0.08em; }

/* ── Flex/grid helpers ───────────────────────────────── */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-sm       { gap: var(--space-sm); }
.gap-md       { gap: var(--space-md); }

/* ═══════════════════════════════════════════════════════
   5. SHARED BUTTON STYLES
   ═══════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: var(--weight-bold);
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  border: none;
  cursor: pointer;
  min-height: 44px;
  white-space: nowrap;
}
.btn-primary:hover {
  background: #e86a49;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,122,89,0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--navy);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: var(--weight-bold);
  padding: 12px 27px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 2px solid var(--navy);
  transition: all var(--ease);
  cursor: pointer;
  min-height: 44px;
  white-space: nowrap;
}
.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-1px);
}

/* Mobile: full-width stacked buttons */
@media (max-width: 480px) {
  .btn-group {
    flex-direction: column;
    gap: 10px;
  }
  .btn-group .btn-primary,
  .btn-group .btn-secondary,
  .btn-group .btn,
  .btn-group a[class*="btn"] {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════
   6. ECOSYSTEM NAV — MOBILE OVERRIDES
   ═══════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .eco-nav { padding: 0 12px; }
  .eco-nav__link { font-size: 10px; padding: 4px 5px; gap: 4px; }
  .eco-nav__dot  { width: 5px; height: 5px; }
}

/* ═══════════════════════════════════════════════════════
   7. ECOSYSTEM FOOTER — MOBILE OVERRIDES
   ═══════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .eco-footer { padding: 32px 16px; }
  .eco-footer__sites { grid-template-columns: 1fr; }
  .eco-footer__site-card { padding: 14px 16px; }
}
