/* EdgeFXN — shared stylesheet
   Palette: BDA navy blue (matches thebdapp.com brand + logo).
   Dark mode default. [data-theme="light"] flips tokens. */

:root {
  --bg-0:        #070b18;   /* deepest navy — page bg */
  --bg-1:        #0a1024;   /* footer + strip */
  --bg-2:        #0f1a30;   /* mid navy */
  --surface:     #0f172a;   /* card fill (slate-900) */
  --surface-2:   #172033;
  --line:        #1e293b;   /* slate-800 */
  --line-2:      #2a3654;

  --text-hi:     #f1f5f9;
  --text:        #cbd5e1;
  --text-mid:    #94a3b8;
  --text-lo:     #64748b;

  --accent:      #3b82f6;   /* BDA royal blue */
  --accent-2:    #1d4ed8;   /* deep navy blue */
  --accent-glow: #3b82f640;
  --focus-ring:  #60a5fa;   /* light-blue focus */

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 30px;

  /* No secondary white/light shadow — just a subtle drop */
  --shadow-card:  0 12px 28px rgba(2,6,20,.55);
  --shadow-btn:   0 4px 20px rgba(59,130,246,.24);
  --shadow-hero:  0 30px 80px rgba(30,64,175,.22);

  --font-sans:   "Space Grotesk", "Inter", "Segoe UI", -apple-system, sans-serif;
  --font-mono:   "JetBrains Mono", "Menlo", "Consolas", monospace;

  --max: 1200px;
}

[data-theme="light"] {
  --bg-0:      #ffffff;
  --bg-1:      #f6f8fb;
  --bg-2:      #eef2f7;
  --surface:   #ffffff;
  --surface-2: #f2f5fa;
  --line:      #dfe5ee;
  --line-2:    #c9d1de;

  --text-hi:   #0a0f1a;
  --text:      #182033;
  --text-mid:  #4b5670;
  --text-lo:   #7a869c;

  --accent:      #1d4ed8;
  --accent-2:    #1e40af;
  --accent-glow: #1d4ed830;
  --focus-ring:  #2563eb;

  --shadow-card: 0 4px 20px rgba(20,40,80,.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .18s ease, opacity .18s ease; }
a:hover { color: var(--text-hi); }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-hi);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 .4em;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.4rem); }
p { color: var(--text); margin: 0 0 1em; }

code, pre { font-family: var(--font-mono); font-size: .92em; }
pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
}

/* ─────────────  LAYOUT  ───────────── */
.container { width: 100%; max-width: var(--max); padding: 0 clamp(1.1rem, 3vw, 2rem); margin: 0 auto; }
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  padding: .35rem .8rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  margin-bottom: 1.1rem;
  background: linear-gradient(180deg, rgba(59,130,246,.08), rgba(59,130,246,0));
}

/* ─────────────  HEADER  ───────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--bg-0) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 1.2rem; padding: .9rem 0; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text-hi); font-weight: 600; letter-spacing: -.01em; font-size: 1.15rem; }
.brand img { height: 32px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.primary-nav a { color: var(--text); font-size: .96rem; font-weight: 500; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--text-hi); }

.header-tools { display: flex; align-items: center; gap: .8rem; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text-hi);
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* THEME TOGGLE */
.theme-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text-hi);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .18s ease, transform .12s ease;
}
.theme-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.theme-btn svg { width: 20px; height: 20px; }
[data-theme="light"] .theme-btn .icon-sun { display: none; }
[data-theme="light"] .theme-btn .icon-moon { display: block; }
.theme-btn .icon-sun { display: block; }
.theme-btn .icon-moon { display: none; }

/* AUDIO CONTROL */
.audio-shell { display: inline-flex; align-items: center; gap: .55rem; }
.audio-toggle {
  --size: 44px;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  border: 2px solid var(--line-2);
  background: var(--surface);
  color: var(--text-mid);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.audio-toggle svg { width: 22px; height: 22px; fill: currentColor; }
.audio-toggle:hover { color: var(--accent); border-color: var(--accent); }
.audio-toggle[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 10%, var(--surface));
  box-shadow: 0 0 12px var(--accent-glow);
}
.audio-slider {
  -webkit-appearance: none; appearance: none;
  width: 90px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--line));
  outline: none;
}
.audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--text-hi);
  box-shadow: 0 0 8px var(--accent-glow);
  cursor: pointer;
}
.audio-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text-hi); border: none; cursor: pointer; }
@media (max-width: 720px) { .audio-slider { display: none; } }

/* ─────────────  BUTTONS  ───────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 13px 26px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-btn);
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 6px 26px rgba(59,130,246,.36); }
.btn .inner { display: inline-flex; align-items: center; gap: .5rem; padding: 0; background: none; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-hi);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease;
}
.btn-ghost:hover { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, transparent); color: var(--text-hi); }

/* ─────────────  HERO  ───────────── */
.hero { position: relative; padding: clamp(4.5rem, 12vw, 9rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 620px;
  background:
    radial-gradient(60% 60% at 30% 10%, rgba(59,130,246,.18), transparent 70%),
    radial-gradient(50% 50% at 80% 20%, rgba(29,78,216,.16), transparent 70%);
  filter: blur(20px); pointer-events: none; z-index: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(30,58,138,.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,58,138,.35) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(70% 70% at 50% 30%, black, transparent);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 30%, black, transparent);
  opacity: .55; pointer-events: none; z-index: 0;
}
[data-theme="light"] .hero::after {
  background-image:
    linear-gradient(rgba(30,58,138,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,58,138,.10) 1px, transparent 1px);
}
.hero .container { position: relative; z-index: 1; }
.hero-headline { max-width: 940px; font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: 1.02; margin-bottom: 1.2rem; }
.hero-headline .accent {
  background: linear-gradient(180deg, var(--text-hi), var(--text-mid));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 780px; color: var(--text-mid); font-size: clamp(1.05rem, 1.5vw, 1.25rem); margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-strip {
  margin-top: 3.5rem;
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex; gap: 2rem; flex-wrap: wrap; align-items: center;
  color: var(--text-mid);
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-strip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

/* ─────────────  CARDS  ───────────── */
.grid { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Service cards — deep navy fill, thin blue border, NO white shadow */
.card-svc {
  background: linear-gradient(160deg, #0d1a37 0%, #0b1224 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: flex; flex-direction: column; gap: .5rem;
  color: var(--text-hi);
  text-decoration: none;
  overflow: hidden; position: relative;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  box-shadow: var(--shadow-card);
}
.card-svc:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 14px 34px rgba(59,130,246,.20); }
.card-svc .thumb {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  margin-bottom: .6rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.card-svc .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-svc .small-text { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.card-svc .title { color: var(--text-hi); font-size: 22px; font-weight: 600; margin: 4px 0; line-height: 1.2; }
.card-svc .desc { color: var(--text-mid); font-size: 14px; font-weight: 400; line-height: 1.55; }
.card-svc .arrow { color: var(--accent); margin-top: auto; font-weight: 600; font-size: .95rem; }

[data-theme="light"] .card-svc {
  background: linear-gradient(160deg, #ffffff, #f6f8fb);
  border-color: var(--line);
  color: var(--text-hi);
  box-shadow: var(--shadow-card);
}
[data-theme="light"] .card-svc .title { color: var(--text-hi); }
[data-theme="light"] .card-svc .desc { color: var(--text-mid); }
[data-theme="light"] .card-svc .small-text { color: var(--accent); }
[data-theme="light"] .card-svc .arrow { color: var(--accent); }

/* Value pillar cards — flat navy, no dual shadow */
.card-pillar {
  width: 100%;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 26px 24px;
  color: var(--text-hi);
  display: flex; flex-direction: column; gap: .5rem;
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, border-color .18s ease;
}
.card-pillar:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-pillar h3 { color: var(--text-hi); font-size: 1.15rem; }
.card-pillar p { color: var(--text-mid); font-size: .95rem; margin: 0; }
[data-theme="light"] .card-pillar {
  background: #ffffff;
  color: var(--text-hi);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
[data-theme="light"] .card-pillar h3 { color: var(--text-hi); }
[data-theme="light"] .card-pillar p { color: var(--text-mid); }

/* Team card */
.card-team {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, border-color .18s ease;
}
.card-team:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-team .team-photo { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-2); }
.card-team .team-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-team .team-body { padding: 1.2rem 1.3rem 1.4rem; }
.card-team h3 { color: var(--text-hi); margin: 0 0 .2rem; font-size: 1.15rem; }
.card-team .role { color: var(--accent); font-family: var(--font-mono); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.card-team p { color: var(--text-mid); margin: .7rem 0 0; font-size: .95rem; }

/* Image + text feature strip */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: center;
  margin: 4rem 0;
}
.feature-split .visual {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4/3;
  background: var(--bg-2);
  box-shadow: var(--shadow-card);
}
.feature-split .visual img { width: 100%; height: 100%; object-fit: cover; }
.feature-split h2 { margin-top: 0; }
@media (max-width: 780px) { .feature-split { grid-template-columns: 1fr; } }

/* ─────────────  ARTICLE / BLOG  ───────────── */
.article { max-width: 720px; margin: 0 auto; padding: 4rem 0 6rem; }
.article header { margin-bottom: 2rem; }
.article h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.article .meta { color: var(--text-lo); font-family: var(--font-mono); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; }
.article h2, .article h3 { margin-top: 2.4rem; }
.article p, .article li { color: var(--text); font-size: 1.05rem; }
.article ul, .article ol { padding-left: 1.4rem; }
.article a { border-bottom: 1px solid var(--accent-glow); }

.article-list { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex; flex-direction: column; gap: .5rem;
  transition: border-color .2s ease, transform .12s ease;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.article-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.article-card .meta { color: var(--text-lo); font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.article-card h3 { color: var(--text-hi); margin: .3rem 0; }
.article-card p { color: var(--text-mid); font-size: .95rem; margin: 0; }
.article-card .read-more { color: var(--accent); font-weight: 500; margin-top: auto; }

/* ─────────────  FORM (BDA navy palette)  ───────────── */
.form-card {
  width: 100%;
  max-width: 480px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex; flex-direction: column; gap: 1rem;
  box-shadow: var(--shadow-card);
}
.form-card h2 { color: var(--text-hi); margin: 0; font-size: 1.5rem; }
.form-card p { color: var(--text-mid); font-size: .95rem; margin: 0; }
.form-field {
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.form-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-field label {
  display: block;
  font-size: .72rem;
  font-family: var(--font-mono);
  color: var(--text-mid);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--text-hi);
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0;
  margin: 0;
  resize: vertical;
}
.form-field textarea { min-height: 110px; }
.form-submit {
  display: block;
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 14px 13px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: transform .12s ease, filter .18s ease, box-shadow .18s ease;
  box-shadow: var(--shadow-btn);
}
.form-submit:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 6px 26px rgba(59,130,246,.4); }
.form-status { font-family: var(--font-mono); font-size: .85rem; margin-top: .3rem; min-height: 1.2rem; }
.form-status.ok  { color: var(--accent); }
.form-status.err { color: #ff6b6b; }
[data-theme="light"] .form-card {
  background: #ffffff;
  color: var(--text-hi);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
[data-theme="light"] .form-card h2 { color: var(--text-hi); }
[data-theme="light"] .form-card p { color: var(--text-mid); }
[data-theme="light"] .form-field { background: var(--bg-2); border-color: var(--line); }
[data-theme="light"] .form-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
[data-theme="light"] .form-field label { color: var(--text-mid); }
[data-theme="light"] .form-field input, [data-theme="light"] .form-field textarea, [data-theme="light"] .form-field select { color: var(--text-hi); }

/* ─────────────  CTA STRIP  ───────────── */
.cta { padding: clamp(3rem, 6vw, 5rem) 0; text-align: center; }
.cta-card {
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(80% 100% at 50% 0%, rgba(59,130,246,.14), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-card);
}
.cta-card h2 { margin-bottom: .6rem; }
.cta-card p { color: var(--text-mid); max-width: 620px; margin: 0 auto 1.6rem; }

/* ─────────────  FOOTER  ───────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.6rem 0 2rem;
  color: var(--text-mid);
  background: var(--bg-1);
}
.footer-row { display: grid; gap: 2rem; grid-template-columns: 2fr 1fr 1fr 1fr; }
.footer-row h4 { color: var(--text-hi); font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; font-family: var(--font-mono); margin-bottom: .8rem; }
.footer-row ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.footer-row a { color: var(--text); }
.footer-row a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  color: var(--text-lo);
  font-size: .85rem;
}
.footer-bottom a { color: var(--text-mid); }

/* ─────────────  MOBILE  ───────────── */
@media (max-width: 860px) {
  .primary-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-1);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
  }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: .7rem 1.4rem; border-bottom: 1px solid var(--line); }
  .primary-nav a:last-child { border-bottom: none; }
  .nav-toggle { display: inline-flex; }
  .footer-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .header-row { gap: .55rem; }
  .brand { font-size: 1rem; }
  .brand img { height: 26px; }
  .hero-strip { gap: 1rem; font-size: .72rem; }
  .footer-row { grid-template-columns: 1fr; }
  .btn, .btn-ghost { padding: 11px 18px; font-size: .95rem; }
}

/* ─────────────  UTILITIES  ───────────── */
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row   { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.center-text { text-align: center; }
.max-p { max-width: 640px; margin-left: auto; margin-right: auto; }
.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; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
