/* ═══════════════════════════════════════════
   VED CONSULTING — Shared Stylesheet
   ═══════════════════════════════════════════ */

/* ── Brand tokens ── */
:root {
  --blue:  #4B3FC8;
  --teal:  #1AA8A0;
  --mid:   #3476C4;
  --grad:  linear-gradient(135deg, #4B3FC8 0%, #3476C4 50%, #1AA8A0 100%);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans:  'DM Sans', sans-serif;
}

/* ── Light theme ── */
[data-theme="light"] {
  --bg:      #F6F5F0;
  --bg-alt:  #FFFFFF;
  --ink:     #0E0E0E;
  --soft:    #5A5550;
  --border:  #DDD8CF;
  --surface: #EBEBEB;
  --acc:     #4B3FC8;
  --acc2:    #1AA8A0;
  --dark:    #0E0E0E;
  --qt:      rgba(246,245,240,.65);
  --qs:      rgba(246,245,240,.38);
  --nav-bg:  rgba(246,245,240,.88);
}

/* ── Dark theme ── */
[data-theme="dark"] {
  --bg:      #0D0D10;
  --bg-alt:  #13131A;
  --ink:     #F0EEE8;
  --soft:    #8A8680;
  --border:  #252530;
  --surface: #1C1C26;
  --acc:     #7B6FE8;
  --acc2:    #2EC8BF;
  --dark:    #080810;
  --qt:      rgba(240,238,232,.65);
  --qs:      rgba(240,238,232,.35);
  --nav-bg:  rgba(13,13,16,.90);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

/* ════════════════════════════════════════════
   NAV  (injected by nav.js)
   ════════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 3.5rem;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background .3s, border-color .3s;
}
.logo-wrap { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.logo-img  { height: 36px; width: auto; }
.logo-txt  { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); transition: color .3s; }
.logo-txt span { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: .82rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--soft); text-decoration: none; transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-links a.active { border-bottom: 2px solid var(--acc); padding-bottom: 2px; }

.nav-r { display: flex; align-items: center; gap: 1rem; }

/* Theme toggle */
.theme-tog {
  display: flex; background: var(--surface);
  border: 1px solid var(--border); border-radius: 3px; padding: 2px;
  transition: background .3s, border-color .3s;
}
.tbtn {
  background: none; border: none; cursor: pointer;
  padding: 5px 9px; border-radius: 2px;
  font-size: .7rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--soft); transition: background .2s, color .2s;
}
.tbtn.on { background: var(--acc); color: #fff; }
.tbtn:hover:not(.on) { color: var(--ink); }

.nav-cta {
  font-size: .82rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--acc); border: none; padding: .6rem 1.3rem;
  cursor: pointer; text-decoration: none; transition: background .2s, transform .15s;
}
.nav-cta:hover { background: var(--acc2); transform: translateY(-1px); }

/* ════════════════════════════════════════════
   FOOTER  (injected by nav.js)
   ════════════════════════════════════════════ */
footer {
  background: var(--dark);
  padding: 2rem 3.5rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; letter-spacing: .04em; color: rgba(240,238,232,.38);
  transition: background .3s;
}
.flogo { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.flogo img { height: 22px; filter: brightness(10); opacity: .6; }
.fbrand { font-family: var(--serif); font-size: 1rem; color: rgba(240,238,232,.55); }
footer a { color: rgba(240,238,232,.38); text-decoration: none; transition: color .2s; }
footer a:hover { color: rgba(240,238,232,.8); }
.footer-links { display: flex; gap: 1.5rem; }

/* ════════════════════════════════════════════
   SHARED COMPONENTS
   ════════════════════════════════════════════ */
.page-wrap { padding-top: 72px; min-height: calc(100vh - 80px); }

/* Section base */
section { padding: 7rem 3.5rem; }
.section-label {
  font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 1rem;
}
.section-title {
  font-family: var(--serif); font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.15; margin-bottom: 1.25rem; color: var(--ink);
}
.section-body { font-size: 1rem; color: var(--soft); max-width: 52ch; line-height: 1.75; }

/* Page hero (for inner pages) */
.page-hero {
  background: var(--dark);
  padding: 8rem 3.5rem 6rem;
  position: relative; overflow: hidden;
  transition: background .3s;
}
.page-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(74,63,200,.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,168,160,.1) 1px, transparent 1px);
  background-size: 48px 48px;
}
.page-hero-orb {
  position: absolute; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(74,63,200,.2) 0%, rgba(26,168,160,.08) 50%, transparent 70%);
  top: -100px; right: -100px;
}
.page-hero-content { position: relative; z-index: 1; max-width: 680px; }
.page-eyebrow {
  font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 1.25rem;
}
.page-headline {
  font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.08; font-weight: 400; color: #F0EEE8; margin-bottom: 1.5rem;
}
.page-headline em {
  font-style: italic;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-sub { font-size: 1.05rem; color: rgba(240,238,232,.6); max-width: 48ch; line-height: 1.75; }

/* Buttons */
.btn-p {
  display: inline-block; background: var(--grad); color: #fff; border: none;
  padding: .85rem 2rem; font-family: var(--sans); font-size: .88rem;
  font-weight: 500; letter-spacing: .04em; cursor: pointer; text-decoration: none;
  transition: opacity .2s, transform .15s;
}
.btn-p:hover { opacity: .88; transform: translateY(-1px); }
.btn-g {
  display: inline-block; font-size: .88rem; font-weight: 500; letter-spacing: .04em;
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--border); padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.btn-g:hover { color: var(--acc); border-color: var(--acc); }
.btn-outline {
  display: inline-block; font-size: .82rem; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; color: var(--acc); text-decoration: none;
  border: 1px solid var(--acc); padding: .6rem 1.3rem;
  transition: background .2s, color .2s;
}
.btn-outline:hover { background: var(--acc); color: #fff; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.tag {
  font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--border); padding: .35rem .75rem; color: var(--soft);
  transition: border-color .2s, color .2s;
}
.tag:hover { border-color: var(--acc); color: var(--acc); }

/* Divider */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* Fade-up animation */
.fu { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.fu.vis { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════
   INDEX PAGE — Hero
   ════════════════════════════════════════════ */
#hero { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; padding-top: 72px; }
.hero-l {
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem 4rem 6rem 3.5rem;
}
.hero-eyebrow {
  font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 1.5rem;
}
.hero-h1 {
  font-family: var(--serif); font-size: clamp(2.8rem,4.5vw,4.8rem);
  line-height: 1.08; font-weight: 400; margin-bottom: 1.75rem; color: var(--ink);
}
.hero-h1 em {
  font-style: italic;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub { font-size: 1.05rem; color: var(--soft); max-width: 38ch; margin-bottom: 2.5rem; line-height: 1.7; }
.hero-acts { display: flex; gap: 1rem; align-items: center; }

.hero-r { position: relative; overflow: hidden; background: var(--dark); transition: background .3s; }
.hgrid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(74,63,200,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,168,160,.12) 1px, transparent 1px);
  background-size: 48px 48px;
}
.horb {
  position: absolute; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(74,63,200,.25) 0%, rgba(26,168,160,.12) 50%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.hstats { position: absolute; bottom: 3rem; left: 3rem; right: 3rem; display: flex; gap: 2rem; }
.hstat { flex: 1; border-top: 1px solid rgba(74,63,200,.4); padding-top: 1rem; }
.hstat-n {
  font-family: var(--serif); font-size: 2.2rem;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1; margin-bottom: .3rem;
}
.hstat-l { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--qs); }
.hquote { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; padding: 2rem; width: 80%; }
.hquote blockquote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1rem,1.8vw,1.5rem); color: var(--qt); line-height: 1.5;
  max-width: 28ch; margin: 0 auto;
}

/* ════════════════════════════════════════════
   INDEX PAGE — Services
   ════════════════════════════════════════════ */
#services { background: var(--bg-alt); transition: background .3s; }
.svc-hdr {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: end; margin-bottom: 4rem; padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
/* Primary 2×2 grid */
.svc-grid { display: grid; grid-template-columns: repeat(3,1fr); }
.svc-primary { grid-template-columns: repeat(4,1fr); margin-bottom: 0; }
.svc-primary .svc-card:nth-child(4n) { border-right: none; }
.svc-primary .svc-card:nth-last-child(-n+4) { border-bottom: 1px solid var(--border); }

/* Sub-header between primary and secondary grids */
.svc-cap-hdr {
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0;
}

/* Secondary 3×2 grid */
.svc-secondary { border-top: 1px solid var(--border); }

.svc-card {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.svc-card:nth-child(3n) { border-right: none; }
.svc-card:nth-last-child(-n+3) { border-bottom: none; }
.svc-card:hover { background: var(--bg); }

/* Primary cards — slightly more prominent */
.svc-card--primary { background: var(--bg); }
.svc-card--primary .svc-name { font-size: 1.3rem; }
.svc-card--primary .svc-icon { color: var(--acc2); }
.svc-card--primary:hover { background: var(--bg-alt); }

.svc-icon { width: 34px; height: 34px; margin-bottom: 1.25rem; color: var(--acc); }
.svc-name { font-family: var(--serif); font-size: 1.2rem; margin-bottom: .6rem; color: var(--ink); }
.svc-desc { font-size: .88rem; color: var(--soft); line-height: 1.65; }

/* ════════════════════════════════════════════
   INDEX PAGE — Approach
   ════════════════════════════════════════════ */
#approach { background: var(--dark); transition: background .3s; }
.app-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 2px; margin-top: 4rem; }
.app-step {
  background: rgba(246,245,240,.03); padding: 2.5rem 2rem;
  border-left: 2px solid transparent; transition: border-color .2s, background .2s;
}
.app-step:hover { border-color: var(--teal); background: rgba(246,245,240,.06); }
.step-n { font-family: var(--serif); font-size: 3rem; color: rgba(246,245,240,.08); line-height: 1; margin-bottom: 1rem; }
.step-t { font-family: var(--serif); font-size: 1.1rem; color: #F0EEE8; margin-bottom: .5rem; }
.step-d { font-size: .82rem; color: rgba(240,238,232,.42); line-height: 1.65; }

/* ════════════════════════════════════════════
   INDEX PAGE — About strip
   ════════════════════════════════════════════ */
#about-strip {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6rem; align-items: center; padding: 7rem 3.5rem;
}
.avis { position: relative; height: 460px; }
.abox { position: absolute; inset: 0 2rem 2rem 0; background: var(--dark); transition: background .3s; }
.abox-acc { position: absolute; bottom: 0; right: 0; width: 60%; height: 55%; border: 2px solid var(--teal); }
.abox-in { position: absolute; top: 2.5rem; left: 2.5rem; right: 2.5rem; bottom: 2.5rem; }
.abox-lbl { font-family: var(--serif); font-style: italic; font-size: 1rem; color: rgba(240,238,232,.35); }
.alogo { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 130px; opacity: .18; filter: brightness(10); }
.astat {
  position: absolute; bottom: 0; left: 0;
  font-family: var(--serif); font-size: 3.6rem; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.astat small {
  display: block; font-family: var(--sans); font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-top: .4rem;
}

/* ════════════════════════════════════════════
   CONTACT PAGE
   ════════════════════════════════════════════ */
.cnt-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6rem;
  align-items: start; padding: 6rem 3.5rem;
}
.cnt-form { display: flex; flex-direction: column; gap: 1.25rem; }
.fg { display: flex; flex-direction: column; gap: .4rem; }
.fg label { font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.fg input, .fg textarea, .fg select {
  background: transparent; border: 1px solid var(--border);
  padding: .75rem 1rem; font-family: var(--sans); font-size: .92rem;
  color: var(--ink); outline: none; transition: border-color .2s; -webkit-appearance: none;
}
.fg input:focus, .fg textarea:focus, .fg select:focus { border-color: var(--acc); }
.fg textarea { resize: vertical; min-height: 140px; }
.fg select option { background: var(--bg); color: var(--ink); }
.fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.cnt-info { display: flex; flex-direction: column; gap: 0; }
.cdi { padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.cdi:first-child { border-top: 1px solid var(--border); }
.cdl { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin-bottom: .35rem; }
.cdv { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }
.cdv a { color: var(--ink); text-decoration: none; transition: color .2s; }
.cdv a:hover { color: var(--acc); }

/* ════════════════════════════════════════════
   ABOUT PAGE
   ════════════════════════════════════════════ */
.about-lead {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6rem; align-items: center; padding: 6rem 3.5rem;
}
.about-portrait {
  position: relative; height: 500px;
}
.about-portrait-box { position: absolute; inset: 0 2rem 2rem 0; background: var(--dark); transition: background .3s; }
.about-portrait-acc { position: absolute; bottom: 0; right: 0; width: 55%; height: 50%; border: 2px solid var(--teal); }
.about-portrait-logo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 160px; opacity: .15; filter: brightness(10);
}

.about-values { background: var(--bg-alt); padding: 6rem 3.5rem; transition: background .3s; }
.values-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; margin-top: 3.5rem; }
.value-card {
  padding: 2.5rem 2rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.value-card:nth-child(3n) { border-right: none; }
.value-card:nth-last-child(-n+3) { border-bottom: none; }
.value-card:hover { background: var(--bg); }
.value-num {
  font-family: var(--serif); font-size: 2.5rem; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 1rem;
}
.value-title { font-family: var(--serif); font-size: 1.2rem; margin-bottom: .6rem; color: var(--ink); }
.value-desc { font-size: .88rem; color: var(--soft); line-height: 1.65; }

.about-stack { padding: 6rem 3.5rem; }
.stack-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 2px; margin-top: 3.5rem; }
.stack-group {
  padding: 2rem 1.75rem; background: var(--bg-alt);
  border-left: 2px solid transparent; transition: border-color .2s, background .2s;
}
.stack-group:hover { border-color: var(--acc); }
.stack-cat { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--acc); margin-bottom: 1rem; }
.stack-items { display: flex; flex-direction: column; gap: .4rem; }
.stack-item { font-family: var(--serif); font-size: 1rem; color: var(--ink); }

/* ════════════════════════════════════════════
   LEGAL PAGE
   ════════════════════════════════════════════ */
.legal-wrap { max-width: 720px; padding: 6rem 3.5rem; }
.legal-wrap h2 {
  font-family: var(--serif); font-size: 1.6rem; color: var(--ink);
  margin: 3rem 0 1rem; padding-top: 3rem; border-top: 1px solid var(--border);
}
.legal-wrap h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.legal-wrap h3 { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); margin: 2rem 0 .5rem; }
.legal-wrap p { font-size: .95rem; color: var(--soft); line-height: 1.8; margin-bottom: 1rem; }
.legal-wrap a { color: var(--acc); }
.legal-wrap ul { padding-left: 1.5rem; color: var(--soft); font-size: .95rem; line-height: 1.8; }
.legal-wrap ul li { margin-bottom: .4rem; }
.legal-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 3rem; }
.legal-tab {
  padding: .85rem 2rem; font-size: .82rem; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; color: var(--soft); cursor: pointer; border: none;
  background: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .2s, border-color .2s;
}
.legal-tab.on { color: var(--acc); border-color: var(--acc); }
.legal-panel { display: none; }
.legal-panel.on { display: block; }

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .logo-txt { display: none; }

  section { padding: 4rem 1.5rem; }
  .page-hero { padding: 6rem 1.5rem 4rem; }

  #hero { grid-template-columns: 1fr; }
  .hero-r { display: none; }
  .hero-l { padding: 5rem 1.5rem 3rem; }

  .svc-hdr { grid-template-columns: 1fr; gap: 1.5rem; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-primary { grid-template-columns: 1fr; }
  .svc-secondary { grid-template-columns: 1fr; }
  .svc-card { border-right: none; }
  .svc-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .svc-primary .svc-card:nth-last-child(-n+4) { border-bottom: 1px solid var(--border); }
  .svc-card:last-child { border-bottom: none; }

  .app-steps { grid-template-columns: 1fr 1fr; }

  #about-strip { grid-template-columns: 1fr; padding: 4rem 1.5rem; }
  .avis { height: 260px; }

  .cnt-grid { grid-template-columns: 1fr; padding: 4rem 1.5rem; gap: 3rem; }
  .fg-row { grid-template-columns: 1fr; }

  .about-lead { grid-template-columns: 1fr; padding: 4rem 1.5rem; gap: 3rem; }
  .about-portrait { height: 260px; }
  .values-grid { grid-template-columns: 1fr; }
  .value-card { border-right: none; }
  .value-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .value-card:last-child { border-bottom: none; }
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .about-values, .about-stack { padding: 4rem 1.5rem; }

  .legal-wrap { padding: 4rem 1.5rem; }
  .legal-tabs { overflow-x: auto; }

  footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem 1.5rem; }
  .footer-links { justify-content: center; }
}
