/* ============================================================
   Qualeris — Design System
   Deep navy foundation, restrained teal, muted gold.
   Editorial, spacious, book-like. Slow, minimal motion.
   ============================================================ */

:root {
  --navy-950: #061527;
  --navy-900: #0A2247;
  --navy: #0C2F55;
  --navy-700: #16407A;
  --blue-mist: #7FA0C4;
  --teal: #2E6E70;
  --gold: #A9824A;
  --ink: #16202B;
  --ink-soft: #4B5A68;
  --paper: #FFFFFF;
  --mist: #F4F6F8;
  --mist-deep: #EAEEF1;
  --border: #E1E6EA;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --container: 1160px;
  --gap: clamp(1.5rem, 3vw, 3rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 500; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; text-transform: none; }

p { margin: 0 0 1.2em; color: var(--ink-soft); }
p.lede { font-size: 1.2rem; color: var(--ink); line-height: 1.65; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--teal); }

ul { padding-left: 1.2em; color: var(--ink-soft); }
li { margin-bottom: 0.5em; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.9em;
  display: block;
}

.eyebrow.on-dark { color: var(--blue-mist); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.6em;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--teal); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
  z-index: -1;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand { display: flex; align-items: center; gap: 0.6em; }
.brand-wordmark {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.03em;
}

nav.main-nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.2rem); }
nav.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}
nav.main-nav a:hover { color: var(--navy); }
nav.main-nav a.active { color: var(--navy); font-weight: 600; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5em; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(150deg, var(--navy-950) 0%, var(--navy) 62%, var(--navy-700) 100%);
  color: #fff;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--gap);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  min-height: 460px;
}
.hero .eyebrow { margin-bottom: 0.3em; }
.hero h1 { color: #fff; margin-bottom: 0.2em; }
.hero p.lede { color: rgba(255,255,255,0.82); margin-bottom: 0.3em; }
.hero .cta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.6rem; }
.hero-figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-figure img {
  max-height: 560px;
  width: auto;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.45));
}
.hero-figure .visual-panel {
  max-height: 560px;
  height: 520px;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.45));
}
.hero-figure img.hero-figure-logo {
  width: 100%;
  height: auto;
  max-width: 420px;
  filter: brightness(0) invert(1) drop-shadow(0 30px 60px rgba(0,0,0,0.45));
}
.hero-logo {
  height: 240px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 0.25rem;
}
.hero-kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--blue-mist);
  margin-top: 0.5rem;
}

/* ---------- Sections ---------- */
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
section.alt { background: var(--mist); }
section.navy { background: var(--navy); color: #fff; }
section.navy h2, section.navy h3 { color: #fff; }
section.navy p { color: rgba(255,255,255,0.78); }

.section-head { max-width: 720px; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: center;
}
.two-col.reverse .col-media { order: 2; }
.two-col .col-media img {
  border-radius: 4px;
  max-height: 520px;
  width: 100%;
  object-fit: cover;
}
.two-col .col-media .visual-panel { height: 440px; }

/* ---------- Visual panels (abstract, license-free stand-ins for photography) ---------- */
.visual-panel {
  position: relative;
  width: 100%;
  border-radius: 58% 42% 51% 49% / 41% 44% 56% 59%;
  overflow: hidden;
  display: block;
}
.visual-panel svg { width: 100%; height: 100%; display: block; }

.founder-monogram {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, var(--navy-950) 0%, var(--navy) 70%, var(--navy-700) 100%);
  border: 2px solid var(--gold);
  box-shadow: 0 20px 50px rgba(6,21,39,0.35);
}
.founder-monogram span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 4.4rem;
  color: #fff;
  letter-spacing: 0.02em;
}
.founder-hero .founder-monogram { width: 220px; height: 220px; }
.founder-hero .founder-monogram span { font-size: 3.6rem; }

.founder-photo {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(150deg, var(--navy-950) 0%, var(--navy) 70%, var(--navy-700) 100%);
  border: 2px solid var(--gold);
  box-shadow: 0 20px 50px rgba(6,21,39,0.35);
}
.founder-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.founder-hero .founder-photo { width: 220px; height: 220px; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
}
.card h3 { margin-bottom: 0.5em; }
.card p { margin-bottom: 0; font-size: 0.96rem; }
section.navy .card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.14); }

.pillar {
  padding-top: 1.6rem;
  border-top: 2px solid var(--gold);
}
.pillar h4 { color: var(--navy); margin-bottom: 0.4em; font-size: 1.05rem; }
.pillar p { font-size: 0.94rem; margin-bottom: 0; }

/* Numbered model list */
.model-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.model-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1.1rem;
  align-items: start;
  color: var(--ink);
  font-size: 1.05rem;
}
.model-list .num {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
}

/* Quote */
blockquote.pull-quote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 500;
  color: var(--navy);
  line-height: 1.4;
  border-left: 3px solid var(--gold);
  padding-left: 1.6rem;
}
blockquote.pull-quote cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}
section.navy blockquote.pull-quote { color: #fff; border-left-color: var(--blue-mist); }
section.navy blockquote.pull-quote cite { color: rgba(255,255,255,0.7); }

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.95rem;
}
.compare-table th, .compare-table td {
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.compare-table thead th {
  background: var(--navy);
  color: #fff;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1rem;
}
.compare-table thead th:first-child { background: var(--mist-deep); color: var(--ink); }
.compare-table tbody th {
  font-weight: 600;
  color: var(--navy);
  background: var(--mist);
}
.compare-table tbody td.highlight { background: #F3F7F4; color: var(--teal); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* Value chain grid */
.chain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.chain-item {
  padding: 1.8rem;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--teal);
}
.chain-item h4 { margin-bottom: 0.5em; }
.chain-item p { font-size: 0.92rem; margin: 0; }

/* Founder split */
.founder-hero {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--gap);
  align-items: center;
}
.founder-hero img { max-width: 340px; margin: 0 auto; }

/* Promise list */
.promise-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.promise-list li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--ink);
}
.promise-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
}
section.navy .promise-list li { color: #fff; }

/* CTA band */
.cta-band {
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.78); max-width: 620px; margin: 0 auto 1.8rem; }

/* Footer */
footer.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.65);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  font-size: 0.9rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand img { height: 60px; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 0.88rem; max-width: 260px; }
footer h5 {
  color: #fff;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 600;
}
footer.site-footer a { color: rgba(255,255,255,0.65); }
footer.site-footer a:hover { color: #fff; }
footer.site-footer ul { list-style: none; padding: 0; margin: 0; }
footer.site-footer li { margin-bottom: 0.6em; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.6rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.42);
}
.footer-disclaimer {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  max-width: 900px;
  margin-top: 1.6rem;
  line-height: 1.6;
}

/* Page hero (interior pages) */
.page-hero {
  background: var(--mist);
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  border-bottom: 1px solid var(--border);
}
.page-hero .container { max-width: 820px; }

/* ---------- Lead capture modal ---------- */
.lead-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6,21,39,0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
}
.lead-modal-overlay.is-open { opacity: 1; visibility: visible; }
.lead-modal {
  background: #fff;
  max-width: 460px;
  width: 100%;
  border-radius: 6px;
  padding: 2.2rem;
  position: relative;
  box-shadow: 0 30px 70px rgba(6,21,39,0.4);
  transform: translateY(16px);
  transition: transform 0.35s ease;
}
.lead-modal-overlay.is-open .lead-modal { transform: translateY(0); }
.lead-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--mist);
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.lead-modal-close:hover { background: var(--mist-deep); }
.lead-modal h3 { margin-bottom: 0.5em; }
.lead-modal p.lead-modal-intro { font-size: 0.98rem; margin-bottom: 1.4rem; }
.lead-field { margin-bottom: 1rem; }
.lead-field-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.lead-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4em;
}
.lead-field input {
  width: 100%;
  padding: 0.7em 0.85em;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 0.96rem;
  color: var(--ink);
  background: #fff;
}
.lead-field input:focus { outline: 2px solid var(--blue-mist); outline-offset: 1px; }
.lead-modal-privacy { font-size: 0.78rem; color: var(--ink-soft); margin: 0.9rem 0 0; }
.lead-modal-error {
  font-size: 0.86rem;
  color: #A03A3A;
  margin: 0.2rem 0 1rem;
  display: none;
}
.lead-modal-error.is-visible { display: block; }
.lead-modal-success { display: none; text-align: center; }
.lead-modal-success.is-visible { display: block; }
.lead-modal-success h3 { color: var(--navy); }
.lead-modal-form.is-hidden { display: none; }
.lead-modal button[type="submit"] { width: 100%; justify-content: center; }
.lead-modal button[type="submit"]:disabled { opacity: 0.6; cursor: default; }

/* Inline (non-popup) trigger banner */
.lead-banner {
  background: var(--mist);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.6rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}
.lead-banner p { margin: 0; max-width: 480px; }
.lead-banner h4 { margin-bottom: 0.3em; }

@media (max-width: 560px) {
  .lead-modal { padding: 1.6rem; }
  .lead-banner { flex-direction: column; align-items: flex-start; }
}

/* Fade-in on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; min-height: auto; }
  .hero-figure img.hero-figure-logo { max-width: 220px; }
  .hero-logo { height: 130px; }
  .two-col .col-media .visual-panel { height: 300px; }
  .two-col, .two-col.reverse { grid-template-columns: 1fr; }
  .two-col.reverse .col-media { order: -1; }
  .founder-hero { grid-template-columns: 1fr; text-align: center; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .chain-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  nav.main-nav {
    position: fixed;
    top: 84px; left: 0; right: 0; bottom: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  nav.main-nav.open { transform: translateX(0); }
  .nav-toggle { display: block; }
  nav.main-nav a { font-size: 1.1rem; }
  .chain-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}
