/* WordPress equivalent: style.css (main theme stylesheet)
   Enqueue via: wp_enqueue_style() in functions.php */


/* ──────────────────────────────────────────────────────────────
   DESIGN TOKENS
   One scale, one accent. Sections reference these via var() in
   their inline styles, so sizes and colours change here only.
   ────────────────────────────────────────────────────────────── */
:root {
  /* Type scale (1.5x steps, capped for large screens) */
  --fs-h1:      clamp(2.6rem, 5.6vw, 4.5rem);   /* 42 -> 72 */
  --fs-h2:      clamp(1.9rem, 3.6vw, 3rem);     /* 30 -> 48 */
  --fs-h3:      clamp(1.4rem, 2.2vw, 2rem);     /* 22 -> 32 */
  --fs-h4:      1.375rem;                       /* 22  card titles */
  --fs-h5:      1.125rem;                       /* 18  job titles */
  --fs-lead:    1.1875rem;                      /* 19  lead paragraphs */
  --fs-body:    1.0625rem;                      /* 17  body copy */
  --fs-small:   0.9063rem;                      /* 14.5 meta, nav, buttons */
  --fs-meta:    0.8125rem;                      /* 13 */
  --fs-eyebrow: 0.78125rem;                     /* 12.5 section labels */

  /* Text ladder on #1a1a1a. All four pass WCAG AA for their size. */
  --text-0: #ffffff;
  --text-1: rgba(255,255,255,0.88);
  --text-2: rgba(255,255,255,0.70);
  --text-3: rgba(255,255,255,0.58);
  --text-4: rgba(255,255,255,0.44);

  /* Accent: the constellation blue, promoted to a real token */
  --accent:        #7cc4ff;
  --accent-soft:   rgba(124,196,255,0.16);
  --accent-line:   rgba(124,196,255,0.32);
  --accent-glow:   rgba(124,196,255,0.45);

  /* Surfaces */
  --bg:        #1a1a1a;
  --surface:   rgba(255,255,255,0.035);
  --border:    rgba(255,255,255,0.10);

  /* Chrome */
  --nav-h: 52px;
}

/* Eyebrow / section label: one treatment everywhere */
.eyebrow {
  font-size: var(--fs-eyebrow) !important;
  font-weight: 600 !important;
  letter-spacing: 0.13em !important;
  text-transform: uppercase;
}

html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #1a1a1a;
  color: #fff;
  padding-top: var(--nav-h);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

nav {
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

/* Ensure bottom content clears the home indicator */
.site-footer { padding-bottom: env(safe-area-inset-bottom); }

/* ── SKIP LINK (keyboard accessibility) ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
  z-index: 1000;
  background: var(--accent);
  color: #1a1a1a;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
}
.skip-link:focus {
  position: fixed;
  left: 50%;
  top: 8px;
  width: auto; height: auto;
  transform: translateX(-50%);
}

    /* ── NAV ── */
    nav {
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 24px; height: var(--nav-h); background: #1a1a1a;
      position: fixed; top: 0; left: 0; right: 0; z-index: 100;
      transition: transform 0.35s ease;
    }
    .nav-left { display: flex; align-items: center; gap: 28px; }

    .nav-logo { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; cursor: pointer; margin-top: 2px; }
    .nav-logo img { height: 19px; width: auto; display: block; pointer-events: none; }
    .nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
    .nav-links a {
      font-size: var(--fs-small); font-weight: 400; color: var(--text-1);
      text-decoration: none; white-space: nowrap; transition: color 0.15s;
    }
    .nav-links a:hover { color: #fff; }
    .nav-links li.active a { color: #fff; }
    .nav-dropdown {
      display: flex; align-items: center; gap: 4px; font-size: 14px;
      color: rgba(255,255,255,0.80); cursor: pointer; white-space: nowrap;
    }
    .nav-dropdown svg { width: 12px; height: 12px; opacity: 0.7; }

    .hamburger {
      display: none; flex-direction: column; justify-content: center;
      gap: 5px; background: none; border: none; cursor: pointer; padding: 4px;
    }
    .hamburger span {
      display: block; width: 20px; height: 1.5px;
      background: rgba(255,255,255,0.80); border-radius: 2px;
      transition: transform 0.25s, opacity 0.25s;
    }
    .hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

    .mobile-menu {
      display: none; flex-direction: column; background: #252525;
      border-top: 1px solid rgba(255,255,255,0.08); padding: 8px 0;
      position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 99;
    }
    .mobile-menu.open { display: flex; }
    .mobile-menu a {
      font-size: var(--fs-small); color: var(--text-1); text-decoration: none;
      padding: 14px 24px; transition: background 0.15s, color 0.15s;
    }
    .mobile-menu a:hover { background: rgba(255,255,255,0.05); color: #fff; }
    .mobile-menu a.active { color: #fff; }

    @media (max-width: 680px) {
      .nav-links { display: none; }
      .hamburger { display: flex; }
    }

    /* ── HERO ── */
    .hero {
      position: relative; margin: 8px; border-radius: 10px; overflow: hidden; z-index: 1;
      height: calc(100vh - var(--nav-h) - 26px); min-height: 520px;
    }
    #networkCanvas {
      position: absolute; inset: 0; width: 100%; height: 100%;
    }
    /* Scrim: keeps the animation visible but gives the copy solid ground */
    .hero::after {
      content: '';
      position: absolute; inset: 0; z-index: 1; pointer-events: none;
      background:
        linear-gradient(to top, rgba(12,12,12,0.94) 0%, rgba(12,12,12,0.78) 22%,
                        rgba(12,12,12,0.32) 45%, transparent 68%),
        linear-gradient(to right, rgba(12,12,12,0.55) 0%, transparent 55%);
    }
    .hero-content {
      position: absolute; bottom: 44px; left: 52px; right: 52px; z-index: 2;
      max-width: 65%;
    }
    .hero-content h1 {
      font-family: 'DM Sans', sans-serif;
      font-size: var(--fs-h1);
      font-weight: 700; line-height: 1.06; letter-spacing: -0.028em;
      color: var(--text-0); margin-bottom: 22px;
    }
    .hero-content p {
      font-size: var(--fs-lead); font-weight: 400; line-height: 1.6;
      color: var(--text-1); max-width: 56ch;
    }

    @media (max-width: 680px) {
      .hero-content { left: 28px; right: 28px; bottom: 32px; }
      .hero-content h1 { font-size: clamp(2.2rem, 8vw, 3.2rem); }
    }

    /* ── MOBILE RESPONSIVENESS ── */
    @media (max-width: 768px) {
      body { font-size: 16px; }

      /* Nav */
      nav { padding: 0 16px; }
      .nav-left { gap: 0; }
      .nav-logo img { height: 14px; }
      .nav-links { display: none; }
      .hamburger { display: flex; }
      .mobile-menu { left: 0; right: 0; width: 100%; }

      /* Hero */
      .hero { margin: 6px; }
      .hero-content { left: 0; right: 0; bottom: 0; max-width: 100%; padding: 2rem 1.5rem; }
      .hero-content h1 { font-size: 2.2rem; }
      .hero-content p { font-size: var(--fs-body); max-width: 100%; }
      #networkCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

      /* About */
      .about-flex { flex-direction: column; gap: 32px; }
      .about-right { flex: none; width: 100%; height: 280px; }
      #about h2 { font-size: 1.8rem; }

      /* Services */
      #services > div > div[style*="grid-template-columns:1fr 1fr 1fr"],
      #services > div > div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
      }
      #services > div { padding: 0 1.5rem !important; }
      .svc-card > div:last-child { padding: 1.5rem !important; }

      /* Jobs */
      #jobs { padding-top: 80px !important; }
      #jobs > div[style*="max-width"] { padding: 0 1.5rem 32px !important; }
      .jobs-track {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 1.5rem 40px !important;
      }
      .job-card { flex: 0 0 75vw !important; }
      #jobs > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

      /* Footer / Contact */
      footer#contact > div[style*="flex"] {
        flex-direction: column !important;
        text-align: center !important;
        padding: 60px 1.5rem 48px !important;
        gap: 32px !important;
      }
      footer#contact div[style*="text-align: center"] { text-align: center !important; }
      footer#contact h2 { font-size: clamp(1.6rem, 6vw, 2.2rem) !important; }
      footer#contact p { font-size: 14px !important; }
      footer#contact a[href^="mailto"] { font-size: 15px !important; word-break: break-all; }
      footer#contact > div[style*="border-top"] { justify-content: center !important; padding: 16px 1.5rem !important; }

      /* Mission */
      #mission > div { padding: 0 1.5rem !important; }
      #mission > div > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 48px !important;
      }
      #mission > div > div > div[style*="padding-right"] { padding-right: 0 !important; border-right: none !important; }
      #mission > div > div > div[style*="padding-left"]  { padding-left: 0 !important; border-top: 1px solid rgba(255,255,255,0.10); padding-top: 48px !important; }

      /* Secondary text brightness — improve readability on phone screens */
      .hero-content p,
      #about p:not(.eyebrow),
      #about .about-text p:not(.eyebrow),
      #services p:not(.eyebrow),
      .svc-card p:not(.eyebrow),
      #jobs p:not(.eyebrow),
      .job-card p:not(.eyebrow),
      #mission p:not(.eyebrow),
      footer#contact p:not(.eyebrow) { color: var(--text-1); }

      /* Larger tap targets on mobile */
      nav {
        height: 48px !important;
      }

      body {
        padding-top: 48px !important;
      }

      .mobile-menu {
        top: 48px !important;
      }

      .mobile-menu a {
        padding: 14px 24px !important;
        min-height: 44px !important;
      }

      .hamburger {
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
      }

      /* Jobs carousel scroll hint */
      #jobs > div[style*="padding: 0 40px"],
      #jobs > div[style*="padding:0 40px"] {
        position: relative !important;
      }

      #jobs > div[style*="padding: 0 40px"]::after,
      #jobs > div[style*="padding:0 40px"]::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 60px;
        background: linear-gradient(to right, transparent, #1a1a1a);
        pointer-events: none;
        z-index: 2;
      }

      /* Minimum tap target sizes on mobile */
      .job-card a,
      .svc-card a,
      .hero-cta,
      #contactSubmit {
        min-height: 44px !important;
        min-width: 44px !important;
      }

    }

    /* ── SERVICE CARD HOVER ── */
    .svc-card:hover { background: rgba(255,255,255,0.055) !important; border-color: rgba(255,255,255,0.14) !important; }

/* ── ACCESSIBILITY: Improved text contrast ── */
/* These override inline styles where opacity is too low for WCAG AA */

/* Body copy, excluding section labels so the accent survives */
#about .about-text p:not(.eyebrow),
#services p:not(.eyebrow),
#expertise p:not(.eyebrow),
#mission p:not(.eyebrow),
#jobs p:not(.eyebrow) {
  color: var(--text-2);
}

/* Card body text */
.svc-card p:not(.eyebrow),
.exp-card p:not(.eyebrow),
.job-card span:not(.eyebrow) {
  color: var(--text-2);
}

/* Supporting text (privacy note, perks) */
#contact p[style*="--text-4"],
.jobs-perks p {
  color: var(--text-3);
}

/* Every section label reads in the accent */
.eyebrow { color: var(--accent) !important; }
/* except the top-level section name, which stays quiet */
#about > div > p.eyebrow:first-of-type,
#services > div > p.eyebrow:first-of-type,
#expertise > div > p.eyebrow:first-of-type,
#mission > div > p.eyebrow:first-of-type,
#jobs > div > p.eyebrow:first-of-type,
#contact p.eyebrow:first-of-type {
  color: var(--text-3) !important;
}

/* ── ACCESSIBILITY: Focus-visible styles for keyboard navigation ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Ghost button focus */
.hero-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Nav links focus */
.nav-links a:focus-visible,
.mobile-menu a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Remove default outline (replaced by focus-visible above) */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ── HERO CTA ── */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  margin-top: 24px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  will-change: transform;
}
.hero-cta:hover {
  color: #0d1520;
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-1px);
}
.hero-cta svg { transition: transform 0.2s ease; }
.hero-cta:hover svg { transform: translateX(2px); }

/* ── SITE FOOTER ── */
.site-footer {
  background: #1a1a1a;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: 'DM Sans', sans-serif;
  position: relative;
  overflow: hidden;
}
.site-footer #joinCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 52px 40px;
  position: relative;
  z-index: 1;
}
.footer-logo-row { margin-bottom: 48px; }
.footer-logo img {
  height: 28px;
  width: auto;
  display: block;
  opacity: 0.95;
}
.footer-meta {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-meta span {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.02em;
}
@media (max-width: 768px) {
  .footer-inner { padding: 48px 1.5rem 32px; }
  .footer-logo img { height: 24px; }
}

/* ── SCROLL-TO-TOP (Consultics mark) ── */
.scroll-top {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  right: calc(16px + env(safe-area-inset-right));
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.25s ease;
  z-index: 1000;
  cursor: pointer;
  padding: 2px;
  -webkit-tap-highlight-color: transparent;
}
.scroll-top img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px var(--accent-glow));
  transition: filter 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.scroll-top:hover img {
  filter: drop-shadow(0 0 10px var(--accent));
  transform: translateY(-2px);
}
/* main.js toggles inline opacity; when it sets >0 we also allow pointer events */
.scroll-top[style*="opacity: 0.7"],
.scroll-top[style*="opacity: 1"],
.scroll-top[style*="opacity:0.7"],
.scroll-top[style*="opacity:1"] {
  pointer-events: auto;
}
@media (max-width: 768px) {
  .scroll-top {
    width: 48px;
    height: 48px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    right: calc(12px + env(safe-area-inset-right));
  }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Hide decorative canvases — main.js also checks this flag to skip rendering */
  #networkCanvas, #joinCanvas, #bgCanvas, #aboutCanvas,
  #servicesCanvas, #expertiseCanvas { display: none; }
  .hero { background: radial-gradient(ellipse at 30% 20%, var(--accent-soft), transparent 60%), var(--bg); }
}
