/* ============================================================
   QUALIVIDENCE · SHARED STYLESHEET
   Single source of truth for all eight pages.
   ============================================================ */

/* Global smooth-scroll for anchor jumps; scroll-margin offsets the fixed nav */
html { scroll-behavior: smooth; }
:target { scroll-margin-top: 100px; }
[id="the-founder"], [id="founding-adviser"], [id="lisa-krefft"], [id="verity-grey"] { scroll-margin-top: 100px; }
:root {
  --navy: #1F3864;
  --navy-deep: #0D1F3C;
  --blue: #2E5FA3;
  --teal: #1A9B8A;
  --teal-light: #22C5B0;
  --white: #FFFFFF;
  --off-white: #F6F7F9;
  --gray: #8A9AB5;
  --text: #1A2540;
  --light-text: #4A5568;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.5;
}

/* ============================================================
   NAV · shared across every page
   ============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 48px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31,56,100,0.08);
}
.nav-logo a { text-decoration: none; display: block; }
.nav-logo svg { height: 44px; width: auto; }
.nav-links {
  display: flex; gap: 28px; list-style: none; align-items: center;
}
.nav-links a {
  text-decoration: none; font-size: 13px; font-weight: 500;
  color: var(--navy); letter-spacing: 0.3px; transition: color 0.2s;
  padding: 4px 0; position: relative;
}
.nav-links a:hover { color: var(--teal); }
.nav-links a.active { color: var(--teal); }
.nav-links a.active::after {
  content: ""; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--teal);
}
.nav-cta {
  background: var(--navy) !important; color: white !important;
  padding: 9px 22px !important; border-radius: 6px; font-weight: 600 !important;
}
.nav-cta:hover { background: var(--teal) !important; color: white !important; }
.nav-cta::after { display: none !important; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--navy);
}

/* ============================================================
   SHARED: Section labels, titles, buttons
   ============================================================ */
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--teal); margin-bottom: 14px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(30px,3.5vw,48px); font-weight: 700;
  color: var(--navy); line-height: 1.2; margin-bottom: 20px;
}
.section-body {
  font-size: 17px; line-height: 1.8; color: var(--light-text);
  font-weight: 300; max-width: 720px;
  margin-bottom: 20px;
}
.section-body:last-child { margin-bottom: 0; }

.btn-primary {
  background: var(--teal); color: white;
  padding: 15px 34px; border-radius: 8px;
  font-size: 15px; font-weight: 600;
  text-decoration: none; transition: all 0.2s;
  display: inline-block; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.btn-primary:hover { background: var(--teal-light); transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.75);
  padding: 15px 34px; border-radius: 8px;
  font-size: 15px; font-weight: 500;
  text-decoration: none; transition: all 0.2s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--teal-light); color: var(--teal-light); }

.btn-navy {
  background: var(--navy); color: white;
  padding: 15px 34px; border-radius: 8px;
  font-size: 15px; font-weight: 600;
  text-decoration: none; transition: all 0.2s;
  display: inline-block;
}
.btn-navy:hover { background: var(--teal); }

/* ============================================================
   PAGE HEADER (for inner pages, not home)
   ============================================================ */
.page-header {
  background: var(--navy-deep); color: white;
  padding: 150px 48px 80px;
  position: relative; overflow: hidden;
}
.page-header-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(26,155,138,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,155,138,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
.page-header-glow {
  position: absolute; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(26,155,138,0.10) 0%, transparent 70%);
  top: -100px; right: -100px; pointer-events: none;
}
.page-header-content { position: relative; z-index: 2; max-width: 820px; }
.page-header-label {
  font-size: 11px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--teal-light); margin-bottom: 16px;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(38px,4.5vw,58px); font-weight: 700;
  color: white; line-height: 1.15; margin-bottom: 20px;
}
.page-header h1 em { font-style: normal; color: var(--teal-light); }
.page-header-sub {
  font-size: 18px; line-height: 1.7; color: rgba(255,255,255,0.65);
  max-width: 680px; font-weight: 300;
}

/* ============================================================
   FOOTER · shared
   ============================================================ */
footer {
  background: var(--navy-deep); padding: 44px 48px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px;
}
.footer-logo svg { height: 36px; }
.footer-links {
  display: flex; gap: 24px; list-style: none; flex-wrap: wrap;
}
.footer-links a {
  text-decoration: none; font-size: 12px;
  color: rgba(255,255,255,0.35); transition: color 0.2s;
}
.footer-links a:hover { color: var(--teal-light); }
.footer-copy {
  font-size: 11px; color: rgba(255,255,255,0.22);
  width: 100%; text-align: center; margin-top: 12px;
}

/* ============================================================
   Shared animation
   ============================================================ */
.fade-in { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; position: fixed; top: 80px; left: 0; right: 0;
    background: white; flex-direction: column; align-items: stretch;
    padding: 20px; gap: 4px;
    border-bottom: 1px solid rgba(31,56,100,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  }
  .nav-links.open a {
    padding: 14px 18px; font-size: 15px;
    border-radius: 6px;
  }
  .nav-links.open a:hover { background: var(--off-white); }
  .nav-links.open a.active::after { display: none; }
  .nav-links.open a.active { background: rgba(26,155,138,0.08); }
  nav { padding: 14px 20px; }
  footer { padding: 28px 20px; flex-direction: column; align-items: flex-start; }
  .page-header { padding: 120px 20px 60px; }
}

/* ============================================================
   V6.4 ADDITIONS
   ============================================================ */

/* P5 · Built with QIS section (home page only) */
.built-with-section { padding: 100px 48px; background: var(--off-white); position: relative; overflow: hidden; }
.built-with-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.built-with-label { font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.built-with-inner h2 { font-family: 'Playfair Display', serif; font-size: clamp(30px,3.5vw,42px); font-weight: 700; color: var(--navy); line-height: 1.2; margin-bottom: 22px; }
.built-with-inner p { font-size: 16px; line-height: 1.75; color: var(--light-text); font-weight: 300; margin-bottom: 18px; }
.built-with-inner p strong { color: var(--navy); font-weight: 500; }
.built-with-inner a { color: var(--teal); text-decoration: none; font-weight: 500; border-bottom: 1px solid rgba(26,155,138,0.35); transition: border-color 0.2s; }
.built-with-inner a:hover { border-bottom-color: var(--teal); }
.built-with-cycle { background: white; border-radius: 14px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.built-with-cycle-title { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--teal); margin-bottom: 20px; text-align: center; }
.built-with-cycle svg { width: 100%; height: auto; display: block; }

/* P1 · Privacy consent checkbox */
.consent-group { margin-top: 6px; display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; background: var(--off-white); border-radius: 8px; border-left: 3px solid var(--teal); }
.consent-group input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; }
.consent-group label { font-size: 12px; line-height: 1.55; color: var(--light-text); cursor: pointer; font-weight: 400; }
.consent-group label a { color: var(--teal); text-decoration: none; border-bottom: 1px solid rgba(26,155,138,0.35); }
.consent-group label a:hover { border-bottom-color: var(--teal); }

/* P8 · Small-print provenance footnotes (semantic <small> markup) */
.provenance-note { display: block; margin-top: 8px; font-size: 11px; line-height: 1.5; color: var(--gray); font-style: italic; max-width: 620px; }
.provenance-note::before { content: "†  "; color: var(--teal); font-style: normal; font-weight: 600; }

/* Thanks page minimal styles */
.thanks-section { min-height: 70vh; padding: 180px 48px 100px; background: var(--off-white); display: flex; align-items: center; justify-content: center; }
.thanks-inner { max-width: 620px; text-align: center; }
.thanks-badge { display: inline-flex; align-items: center; gap: 10px; background: rgba(26,155,138,0.12); border: 1px solid rgba(26,155,138,0.3); color: var(--teal); padding: 8px 20px; border-radius: 100px; font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 32px; }
.thanks-badge-dot { width: 8px; height: 8px; background: var(--teal); border-radius: 50%; }
.thanks-inner h1 { font-family: 'Playfair Display', serif; font-size: clamp(34px,4vw,48px); color: var(--navy); line-height: 1.2; margin-bottom: 20px; }
.thanks-inner p { font-size: 16px; line-height: 1.75; color: var(--light-text); font-weight: 300; margin-bottom: 18px; }
.thanks-actions { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Privacy page */
.privacy-section { padding: 100px 48px; background: white; max-width: 860px; margin: 0 auto; }
.privacy-section h2 { font-family: 'Playfair Display', serif; font-size: 24px; color: var(--navy); margin-top: 40px; margin-bottom: 14px; }
.privacy-section h2:first-of-type { margin-top: 48px; }
.privacy-section p { font-size: 15px; line-height: 1.8; color: var(--light-text); font-weight: 300; margin-bottom: 16px; }
.privacy-section p strong { color: var(--navy); font-weight: 500; }
.privacy-section ul { margin: 10px 0 20px 20px; }
.privacy-section li { font-size: 15px; line-height: 1.8; color: var(--light-text); font-weight: 300; margin-bottom: 8px; }
.privacy-meta { margin-top: 40px; padding: 20px; background: var(--off-white); border-radius: 8px; font-size: 13px; color: var(--gray); }
.privacy-meta strong { color: var(--navy); }

/* Footer Privacy Policy link (already styled as footer-links, no new CSS needed) */

/* P11 · Faces exit link */
.faces-exit { text-align: center; margin-top: 56px; }
.faces-exit a { display: inline-block; font-size: 14px; font-weight: 600; color: var(--navy); text-decoration: none; border-bottom: 2px solid var(--teal); padding: 10px 4px; min-height: 44px; }
.faces-exit a:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 2px; }

/* P9 · Governance block on methodology.html */
.governance-block { max-width: 1080px; margin: 0 auto 80px; padding: 40px 44px; background: rgba(255,255,255,0.04); border: 1px solid rgba(26,155,138,0.3); border-left: 3px solid var(--teal-light); border-radius: 10px; }
.governance-label { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--teal-light); margin-bottom: 16px; }
.governance-block p { font-size: 15px; line-height: 1.8; color: rgba(255,255,255,0.72); font-weight: 300; margin-bottom: 14px; }
.governance-block p:last-child { margin-bottom: 0; }

/* Mobile */
@media (max-width: 900px) {
  .built-with-section, .thanks-section, .privacy-section { padding: 80px 20px; }
  .built-with-inner { grid-template-columns: 1fr; gap: 40px; }
  .built-with-cycle { padding: 30px 24px; }
  .governance-block { padding: 28px 22px; margin: 0 20px 60px; }
}

