@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #f7f9fc;
  --primary: #0f1e2d;
  --secondary: #5b6b7a;
  --accent: #1f4fd8;
  --card: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--primary);
  line-height: 1.55;
}

header { background: #ffffff; border-bottom: 1px solid #e3e7ee; position: sticky; top: 0; z-index: 100; }
.nav { max-width: 1200px; margin: 0 auto; padding: 0.75rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 600; font-size: 1.2rem; letter-spacing: 0.2px; }
.nav a { margin-left: 2rem; text-decoration: none; color: var(--secondary); font-size: 0.95rem; }

.hero { background: linear-gradient(180deg, #ffffff, #f0f3f9); padding: 2rem 2rem 3rem; text-align: center; }
.hero-inner { max-width: 900px; margin: 0 auto; }
.hero h1 { font-size: 2.6rem; font-weight: 600; margin-bottom: 1.25rem; }
.hero p { font-size: 1.2rem; color: var(--secondary); max-width: 700px; margin: 0 auto; }

section { padding: 2.25rem 2rem; }
.container { max-width: 1200px; margin: 0 auto; }

.pillars, .services, .leadership { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }

.card, .leader { background: var(--card); border-radius: 12px; padding: 2rem; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }

img.generic { width: 100%; height: auto; border-radius: 12px; margin-bottom: 1rem; }
.hero .generic { width: auto; height: auto; max-width: none; max-height: none; display: block; margin: 1rem auto; }

/* Constrain the Raleigh page hero to prevent excessive sizing */
#raleigh-hero-img {
  width: 100%;
  max-width: 900px;
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: 12px;
}

/* Use intrinsic size for About image but prevent overflow on small viewports */
#about .generic { width: auto; height: auto; max-width: 100%; display: block; margin: 1rem auto; }

/* Leadership headshots */
.leader { display: flex; align-items: center; gap: 1rem; }
.leader img.headshot { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 64px; }
.leader .meta { display: flex; flex-direction: column; }
.leader .meta strong { font-weight: 600; }
.leader .meta span { color: var(--secondary); font-size: 0.95rem; }

/* Ensure service images (officespace/boardroom) render the same size */
.services .card img.generic { width: auto; height: auto; max-width: 360px; display: block; margin: 0 auto 1rem; }

h2 { font-size: 1.85rem; font-weight: 600; margin-bottom: 1.1rem; }
h3 { margin-bottom: 0.75rem; font-weight: 500; }
p.muted { color: var(--secondary); }

footer { background: #0f1e2d; color: #c7cfdb; padding: 2rem 2rem; }
footer .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
footer a { color: #c7cfdb; text-decoration: none; display: block; margin-bottom: 0.5rem; font-size: 0.9rem; }
.copyright { margin-top: 2rem; font-size: 0.8rem; color: #8e99aa; }

/* Subtle/static TV-noise overlay used during brief ARG "glitches" */
.glitch {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* allow interaction while overlay shows */
  /* place above all site content */
  z-index: 2147483646;
  opacity: 0; /* toggled by .active */
  /* match JS flash duration and provide smoother fade (slower pulse) */
  transition: opacity 1300ms linear;
}

/* two noisy layers to emulate TV static */
.glitch::before,
.glitch::after {
  content: '';
  /* use fixed so the layers truly sit above everything and don't get clipped by other stacking contexts */
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  display: block;
  pointer-events: none;
  z-index: 2147483647;
}

/* stronger, non-blended noise layers for visible TV static */

.glitch::before {
  /* very fine grain (1-2px noise) */
  background-image: linear-gradient(0deg, rgba(255,255,255,0.6) 50%, rgba(0,0,0,0.6) 50%);
  background-size: 2px 2px;
  /* provide a stronger dark base so noise is visible over light pages */
  background-color: rgba(0,0,0,0.65);
  /* increase layer intensity for a darker overall effect */
  opacity: 1;
  /* multiply helps darken bright content underneath so static shows */
  mix-blend-mode: multiply;
  filter: grayscale(100%) contrast(150%);
  /* animate background-position instead of transforming the layer to avoid
     visible seams/diagonal lines from pixel snapping during transforms */
  will-change: background-position;
  /* slower, less frantic grain movement */
  animation: noise-anim-fast 750ms steps(2) infinite;
}


.glitch::after {
  /* coarser grain + scanlines for depth */
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.12) 1px, transparent 1px),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.05) 2px, transparent 2px, transparent 4px);
  background-size: 5px 5px, 100% 6px;
  /* stronger for darker feel */
  background-color: rgba(0,0,0,0.35);
  opacity: 1;
  /* allow scanlines to darken the page beneath */
  mix-blend-mode: multiply;
  will-change: background-position;
  /* slower, smooth scanline drift */
  animation: noise-anim-slow 1500ms steps(3) infinite reverse;
}

/* active state — visible static */
.glitch.active { opacity: 0.95; }

/* permanent state: stop motion and lighten the static */
.glitch.permanent { opacity: 0.35; }
.glitch.permanent::before,
.glitch.permanent::after {
  animation: none !important;
  mix-blend-mode: normal;
}
.glitch.permanent::before {
  /* much lighter darkening so images remain visible */
  background-color: rgba(0,0,0,0.12);
  filter: grayscale(100%) contrast(105%);
}
.glitch.permanent::after {
  background-color: rgba(0,0,0,0.02);
  filter: none;
}

@keyframes noise-anim-fast {
  0% { background-position: 0px 0px; }
  100% { background-position: 3px -3px; }
}

@keyframes noise-anim-slow {
  0% { background-position: 0px 0px; }
  100% { background-position: -6px 6px; }
}
