/* ============================================================
   NC SOUTH — design system (rebuild to brief)
   Navy base · cyan interactive · orange primary action
   Light default with dark toggle via [data-theme]
   ============================================================ */

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

/* ---------- Theme tokens ---------- */
:root, [data-theme="light"] {
  --bg:          #ffffff;
  --bg-tint:     #f7f9fb;   /* mist */
  --surface:     #ffffff;
  --surface-2:   #f7f9fb;
  --band:        #2c3e50;   /* navy dark feature bands */
  --band-2:      #24323f;   /* deeper band nesting */
  --footer:      #1e2b38;

  --ink:         #1a2530;   /* body text */
  --ink-strong:  #2c3e50;   /* navy headings */
  --ink-soft:    #64748b;   /* slate secondary */
  --ink-faint:   #94a3b3;
  --on-band:     #eef3f8;   /* text on navy bands */
  --on-band-soft:#a9bccd;

  --line:        #e5eaf0;
  --line-strong: #d4dce5;

  --navy:        #2c3e50;
  --cyan:        #02a6fc;
  --cyan-ink:    #0284c9;   /* cyan legible as text on white */
  --cyan-wash:   #e7f5fe;
  --orange:      #f5a623;
  --orange-ink:  #b9770a;
  --orange-wash: #fdf1dc;

  --cyan-on-band:  #4cc0ff;
  --orange-on-band:#ffbb52;

  --shadow-sm: 0 1px 2px rgba(44,62,80,0.06), 0 2px 6px rgba(44,62,80,0.05);
  --shadow-md: 0 6px 18px rgba(44,62,80,0.08), 0 18px 44px rgba(44,62,80,0.08);
  --shadow-lg: 0 24px 70px rgba(30,43,56,0.16);
}

[data-theme="dark"] {
  --bg:          #16202b;
  --bg-tint:     #111a23;
  --surface:     #1e2b38;
  --surface-2:   #243240;
  --band:        #1b2732;
  --band-2:      #141d26;
  --footer:      #0f161d;

  --ink:         #eaf0f6;
  --ink-strong:  #ffffff;
  --ink-soft:    #a9bccd;
  --ink-faint:   #7c8ea0;
  --on-band:     #eef3f8;
  --on-band-soft:#a9bccd;

  --line:        #2e3e4e;
  --line-strong: #3a4c5e;

  --navy:        #2c3e50;
  --cyan:        #29b0ff;
  --cyan-ink:    #5cc4ff;
  --cyan-wash:   rgba(41,176,255,0.12);
  --orange:      #f7ad33;
  --orange-ink:  #ffbb52;
  --orange-wash: rgba(247,173,51,0.13);

  --cyan-on-band:  #4cc0ff;
  --orange-on-band:#ffbb52;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.24);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.34), 0 18px 44px rgba(0,0,0,0.3);
  --shadow-lg: 0 24px 70px rgba(0,0,0,0.5);
}

:root {
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, sans-serif;
  --maxw: 1200px;
  --radius: 12px;
  --radius-lg: 20px;
  --sp-section: clamp(72px, 9vw, 130px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .4s ease, color .4s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4 { margin: 0; font-family: var(--font-head); font-weight: 600; color: var(--ink-strong); letter-spacing: -0.02em; }
p { margin: 0; }
::selection { background: var(--cyan); color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { padding: var(--sp-section) 0; }
.section.tint { background: var(--bg-tint); }
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan-ink);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--cyan); border-radius: 2px; }
.eyebrow.plain::before { display: none; }
.on-band .eyebrow, .eyebrow.on-band { color: var(--cyan-on-band); }

.display {
  font-size: clamp(38px, 5.6vw, 68px);
  line-height: 1.05; letter-spacing: -0.03em; font-weight: 600;
  text-wrap: balance;
}
.h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -0.025em; text-wrap: balance; }
.h3 { font-size: clamp(21px, 2.3vw, 27px); line-height: 1.2; letter-spacing: -0.02em; }
.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }
.on-band, .on-band h1, .on-band h2, .on-band h3 { color: var(--on-band); }
.on-band .lede { color: var(--on-band-soft); }
.accent-cyan { color: var(--cyan-ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 15.5px;
  padding: 14px 24px; border-radius: 100px; border: 1.5px solid transparent;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), background .2s, color .2s, box-shadow .25s, border-color .2s;
  white-space: nowrap; line-height: 1; cursor: pointer;
}
.btn .arrow { transition: transform .3s cubic-bezier(.2,.7,.3,1); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--orange); color: #33240a; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(245,166,35,0.36); }
.btn-secondary { background: transparent; color: var(--ink-strong); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--navy); transform: translateY(-2px); }
.on-band .btn-secondary { color: #fff; border-color: rgba(255,255,255,0.32); }
.on-band .btn-secondary:hover { border-color: #fff; }
.btn-cyan { background: var(--cyan); color: #fff; }
.btn-cyan:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(2,166,252,0.32); }
.link-cyan { color: var(--cyan-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.link-cyan .arrow { transition: transform .3s cubic-bezier(.2,.7,.3,1); }
.link-cyan:hover .arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.nav-left { display: flex; align-items: center; gap: 38px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link { font-size: 15px; font-weight: 500; color: var(--ink-soft); transition: color .2s; position: relative; }
.nav-link:hover, .nav-link.active { color: var(--ink-strong); }
.nav-right { display: flex; align-items: center; gap: 14px; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.logo-word { font-family: var(--font-head); font-weight: 600; font-size: 18px; letter-spacing: 0.005em; color: var(--ink-strong); }
.logo-word .lw-thin { font-weight: 400; opacity: 0.75; }

/* Services dropdown */
.has-drop { position: relative; }
.drop-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font-size: 15px; font-weight: 500; color: var(--ink-soft); }
.drop-toggle:hover, .has-drop:hover .drop-toggle { color: var(--ink-strong); }
.drop-toggle .chev { width: 12px; height: 12px; transition: transform .25s; }
.has-drop:hover .drop-toggle .chev { transform: rotate(180deg); }
.drop-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 10px; width: 320px;
  opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s;
}
.has-drop:hover .drop-menu, .has-drop:focus-within .drop-menu { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.drop-menu::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.drop-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 13px; border-radius: 11px; transition: background .18s; }
.drop-item:hover { background: var(--bg-tint); }
.drop-item .di-ico { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--cyan-wash); color: var(--cyan-ink); display: grid; place-items: center; }
.drop-item .di-ico svg { width: 18px; height: 18px; }
.drop-item h5 { margin: 0 0 2px; font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--ink-strong); }
.drop-item p { font-size: 13px; color: var(--ink-soft); line-height: 1.4; }

/* Theme toggle */
.theme-toggle { width: 38px; height: 38px; border-radius: 100px; border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink-soft); display: grid; place-items: center; transition: color .2s, border-color .2s, transform .2s; }
.theme-toggle:hover { color: var(--ink-strong); border-color: var(--navy); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

/* Mobile nav */
.nav-toggle { display: none; width: 40px; height: 40px; border: 0; background: none; color: var(--ink-strong); align-items: center; justify-content: center; }
.mobile-menu { display: none; }
@media (max-width: 900px) {
  .nav-links, .nav-right .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-menu {
    display: block; position: fixed; inset: 72px 0 0 0; z-index: 99;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 14px 20px 26px; box-shadow: var(--shadow-lg);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .3s, opacity .3s;
    height: calc(100vh - 72px); height: calc(100dvh - 72px); overflow-y: auto;
  }
  .mobile-menu.open { transform: none; opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .mobile-menu a { display: block; padding: 13px 0; font-size: 18px; color: var(--ink-strong); border-bottom: 1px solid var(--line); }
  .mobile-menu .m-sub a { padding: 10px 0 10px 16px; font-size: 16px; color: var(--ink-soft); border: 0; }
  .mobile-menu .m-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); padding: 16px 0 4px; }
  .mobile-menu .btn { width: 100%; justify-content: center; margin-top: 18px; }
}

/* ---------- Reveal (capture-proof: visible by default) ---------- */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal.in { animation: fadeUp .7s cubic-bezier(.2,.7,.3,1); }
  .js .reveal.in[data-d="1"] { animation-delay: .07s; }
  .js .reveal.in[data-d="2"] { animation-delay: .14s; }
  .js .reveal.in[data-d="3"] { animation-delay: .21s; }
  .js .reveal.in[data-d="4"] { animation-delay: .28s; }
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.no-anim .reveal.in { animation: none !important; }

/* ---------- Section heading block ---------- */
.sec-head { max-width: 720px; margin-bottom: 54px; }
.sec-head .h2 { margin-top: 18px; }
.sec-head .lede { margin-top: 18px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head.center .eyebrow { justify-content: center; }

/* ---------- Service card ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid, .card-grid.cols-4 { grid-template-columns: 1fr; } }

.svc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 26px 26px; display: flex; flex-direction: column;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s, border-color .3s;
}
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.svc-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--cyan-wash); color: var(--cyan-ink); display: grid; place-items: center; margin-bottom: 20px; }
.svc-ico svg { width: 23px; height: 23px; }
.svc-card h3 { margin-bottom: 10px; font-size: 20px; }
.svc-card p { color: var(--ink-soft); font-size: 15.5px; flex: 1; }
.svc-card .link-cyan { margin-top: 18px; font-size: 14.5px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--band); border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 72px); position: relative; overflow: hidden; text-align: center; }
.cta-band .accent-line { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--cyan), var(--orange)); }
.cta-band h2 { color: #fff; max-width: 20ch; margin: 0 auto; }
.cta-band .lede { color: var(--on-band-soft); margin: 18px auto 0; max-width: 52ch; }
.cta-actions { margin-top: 30px; display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }

/* ---------- Placeholder / diagram frame ---------- */
.frame { background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--radius-lg); position: relative; overflow: hidden; }
.ph { position: relative; overflow: hidden; background: var(--bg-tint); border: 1px dashed var(--line-strong); border-radius: var(--radius); display: grid; place-items: center; color: var(--ink-faint); }
.ph span { font-family: var(--font-body); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- Footer ---------- */
.footer { background: var(--footer); color: var(--on-band-soft); padding: var(--sp-section) 0 34px; }
.footer a { color: var(--on-band-soft); transition: color .2s; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 52px; }
.footer-brand p { max-width: 34ch; font-size: 15px; margin-top: 16px; color: var(--on-band-soft); }
.footer-lockup img { height: 30px; width: auto; }
.footer-col h4 { font-family: var(--font-body); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #7e93a6; margin-bottom: 16px; font-weight: 600; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 15px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13.5px; color: #7e93a6; flex-wrap: wrap; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
