/* =========================================================
   SENIORCONNEX — SHARED DESIGN SYSTEM
   Inter editorial aesthetic · White & Blue palette
   ========================================================= */

/* ---------- TOKENS ---------- */
:root {
  --bg-dark:    #4773BA;
  --bg-dark-2:  #3a609d;
  --bg-light:   #f5f3ee;
  --bg-paper:   #ffffff;
  --ink:        #111111;
  --ink-soft:   #4a4a4a;
  --ink-mute:   #8a8a8a;
  --ink-line:   #d8d2c4;

  --brand-50:   #eef2f9;
  --brand-100:  #dde6f1;
  --brand-200:  #c0d0e3;
  --brand-300:  #93b0d0;
  --brand-400:  #6890bf;
  --brand-500:  #4773BA;
  --brand-600:  #3a609d;
  --brand-700:  #2f4e80;
  --brand-800:  #233a60;
  --brand-900:  #182947;

  --status-critical: #c2410c;
  --status-warning:  #a16207;
  --status-success:  #166534;
  --status-info:     #4773BA;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --max: 1240px;
  --max-narrow: 880px;
  --gutter: clamp(20px, 4vw, 56px);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg-light);
  line-height: 1.5;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
p { margin: 0 0 1em; }

/* ---------- TYPOGRAPHY ---------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-mute);
  margin: 0 0 24px;
}
.display {
  font-weight: 200;
  font-size: clamp(36px, 6.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
}
.display-md {
  font-weight: 200;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.028em;
  margin: 0;
}
.h2 {
  font-weight: 200;
  font-size: clamp(28px, 4.2vw, 56px);
  line-height: 1.07;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}
.h3 {
  font-weight: 400;
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.h4 {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin: 0 0 10px;
}
.lede {
  font-weight: 300;
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}
.section-dark .lede   { color: rgba(255,255,255,0.84); }
.section-dark .eyebrow{ color: rgba(255,255,255,0.7); }

/* ---------- LAYOUT HELPERS ---------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}
.container-narrow {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}
.section {
  padding: clamp(80px, 12vh, 140px) 0;
  position: relative;
}
.section-dark {
  background: var(--bg-dark);
  color: #fff;
}
.section-cream { background: var(--bg-light); }
.section-paper { background: var(--bg-paper); }

/* ---------- TEXTURE BACKGROUNDS ---------- */
@keyframes tex-drift {
  from { background-position: 0% 100%; }
  to   { background-position: 100% 0%; }
}

.tex {
  position: relative;
  isolation: isolate;
}
.tex::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: 200% 200%;
  background-position: 0% 100%;
  z-index: -2;
  animation: tex-drift 50s linear infinite;
}
.tex::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* Blue textures — for dark sections */
.tex-blue-1::before { background-image: url('../images/blue-texture-1.jpg'); }
.tex-blue-2::before { background-image: url('../images/blue-texture-2.webp'); }
.tex-blue-4::before { background-image: url('../images/blue-texture-4.webp'); }
.tex-blue-5::before { background-image: url('../images/blue-texture-5.webp'); }
.tex-blue-6::before { background-image: url('../images/blue-texture-6.webp'); }

.tex-blue-1::after,
.tex-blue-2::after,
.tex-blue-4::after,
.tex-blue-5::after,
.tex-blue-6::after {
  background: linear-gradient(135deg, rgba(35,58,96,0.78) 0%, rgba(71,115,186,0.72) 100%);
}

/* White textures — for light sections */
.tex-white-3::before { background-image: url('../images/white-texture-3.webp'); }
.tex-white-7::before { background-image: url('../images/white-texture-7.webp'); }
.tex-white-8::before { background-image: url('../images/white-texture-8.webp'); }

.tex-white-3::after,
.tex-white-7::after,
.tex-white-8::after {
  background: linear-gradient(180deg, rgba(245,243,238,0.55) 0%, rgba(245,243,238,0.85) 100%);
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color .35s ease, backdrop-filter .35s ease, color .35s ease;
  color: #fff;
}
.nav.scrolled {
  background: rgba(10,10,10,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav.on-light { color: var(--ink); }
.nav.on-light.scrolled { background: rgba(245,243,238,0.88); }
.brand {
  font-weight: 500;
  letter-spacing: 0.18em;
  font-size: 14px;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.nav-links a { opacity: 0.85; transition: opacity .2s ease; }
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-cta {
  border: 1px solid currentColor;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: background-color .2s ease, color .2s ease;
}
.nav-cta:hover { background: currentColor; }
.nav-cta:hover span { color: var(--bg-light); }
.nav .menu-toggle { display: none; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding: 28px var(--gutter) 36px;
    background: rgba(10,10,10,0.94);
    backdrop-filter: blur(18px);
    color: #fff;
  }
  .nav.on-light .nav-links.open { background: rgba(245,243,238,0.97); color: var(--ink); }
  .menu-toggle {
    display: inline-flex !important;
    width: 32px; height: 32px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
  }
  .menu-toggle span { width: 22px; height: 1px; background: currentColor; }
}

/* ---------- HERO (inner page) ---------- */
.hero-inner {
  min-height: 78vh;
  position: relative;
  color: #fff;
  display: flex;
  align-items: flex-end;
  padding: clamp(120px, 18vh, 180px) var(--gutter) clamp(64px, 10vh, 110px);
  overflow: hidden;
}
.hero-inner .hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}
.hero-inner .eyebrow { color: rgba(255,255,255,0.72); }
.hero-inner h1 {
  font-weight: 200;
  font-size: clamp(38px, 6.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  max-width: 18ch;
}
.hero-inner p.lede {
  color: rgba(255,255,255,0.86);
  max-width: 58ch;
  margin: 0 0 36px;
}

/* ---------- SPLIT SECTIONS ---------- */
/* Sections that contain a full-bleed split layout need no extra padding —
   the split itself handles height and spacing internally. */
.section:has(.split) {
  padding: 0;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100vh;
}
.split .media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
}
.split .media img {
  width: 100%; height: 100%;
  min-height: 100vh;
  object-fit: cover;
  object-position: center;
}
.split .copy {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 7vh, 96px) clamp(28px, 5vw, 80px);
  min-height: 100vh;
}
.split .copy-inner {
  max-width: 52ch;
  width: 100%;
  text-align: left;
}
.split.image-right .media { order: 2; }
.split.image-right .copy  { order: 1; }

/* ---------- FEATURE / CARD GRIDS ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(40px, 5vh, 72px);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(40px, 5vh, 72px);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
  margin-top: clamp(40px, 5vh, 72px);
}

.card {
  background: var(--bg-paper);
  border: 1px solid var(--ink-line);
  border-radius: 18px;
  padding: clamp(28px, 3vw, 40px);
  position: relative;
  transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(35,58,96,0.25);
  border-color: var(--brand-200);
}
.card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.card-icon svg { width: 22px; height: 22px; }
.card p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}
.section-dark .card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
}
.section-dark .card p { color: rgba(255,255,255,0.82); }
.section-dark .card .num,
.section-dark .card-icon {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* ---------- AUDIENCE TAG ---------- */
.audience-tag {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px 8px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  margin-bottom: 28px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.95;
}
.audience-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: currentColor;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--bg-light);
}
.section-dark .audience-num { color: var(--bg-dark); }

/* ---------- BULLETED POINT LIST ---------- */
.audience-points {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}
.audience-points li {
  position: relative;
  padding-left: 22px;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.55;
  color: var(--ink-soft);
}
.section-dark .audience-points li { color: rgba(255,255,255,0.82); }
.audience-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 10px; height: 1px;
  background: currentColor;
  opacity: 0.55;
}

/* ---------- PULL QUOTE ---------- */
.pull-quote {
  font-weight: 200;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 26ch;
}
.pull-quote::before {
  content: "\201C";
  font-family: Georgia, serif;
  font-size: 1.2em;
  line-height: 0;
  vertical-align: -0.05em;
  margin-right: 0.06em;
  opacity: 0.45;
}

/* ---------- STATS ---------- */
.stat {
  text-align: left;
}
.stat-num {
  font-weight: 200;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0 0 10px;
  color: var(--brand-600);
}
.section-dark .stat-num { color: #fff; }
.stat-label {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.section-dark .stat-label { color: rgba(255,255,255,0.68); }

/* ---------- BUTTONS / CTA ---------- */
.btn {
  padding: 16px 30px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--brand-500);
  color: #fff;
  border-color: var(--brand-500);
}
.btn-primary:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  transform: translateY(-1px);
}
.btn-on-dark {
  background: #fff;
  color: var(--brand-700);
  border-color: #fff;
}
.btn-on-dark:hover { background: var(--brand-50); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: currentColor;
  border-color: currentColor;
}
.btn-ghost:hover {
  background: currentColor;
}
.btn-ghost:hover span { color: var(--bg-light); }
.section-dark .btn-ghost { border-color: rgba(255,255,255,0.6); }
.section-dark .btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: #fff; }

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(80px, 12vh, 140px) var(--gutter);
  position: relative;
}
.cta-inner { max-width: 760px; width: 100%; position: relative; z-index: 2; }
.cta .lede { margin: 28px auto 16px; }
.cta .sub  { margin: 0 auto 40px; max-width: 52ch; opacity: 0.85; }
.cta .btn-row { justify-content: center; }

/* ---------- FOOTER ---------- */
footer {
  background: #0e1115;
  color: rgba(255,255,255,0.7);
  padding: 64px var(--gutter) 36px;
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-brand {
  font-weight: 500;
  letter-spacing: 0.18em;
  font-size: 14px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}
.footer-tag { font-size: 14px; max-width: 30ch; line-height: 1.55; }
.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer-col ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col a { font-size: 14px; transition: color .2s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max);
  margin: 28px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
}

/* ---------- FORMS ---------- */
.form {
  display: grid;
  gap: 22px;
  background: var(--bg-paper);
  border: 1px solid var(--ink-line);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 48px);
}
.field { display: grid; gap: 8px; }
.field label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-mute);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg-light);
  border: 1px solid var(--ink-line);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(71,115,186,0.12);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
}
.form .btn { justify-self: start; }
.form-note {
  font-size: 12px;
  color: var(--ink-mute);
  margin: 0;
}

/* ---------- FAQ ACCORDION ---------- */
.faq {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ink-line);
}
.faq details {
  border-bottom: 1px solid var(--ink-line);
  padding: 22px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-weight: 400;
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--ink);
  letter-spacing: -0.01em;
  padding-right: 8px;
  transition: color .2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-weight: 200;
  font-size: 28px;
  line-height: 1;
  color: var(--brand-600);
  transition: transform .3s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--brand-700); }
.faq .answer {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
  max-width: 70ch;
}

/* ---------- STEPS ---------- */
.steps {
  display: grid;
  gap: clamp(32px, 4vh, 56px);
  margin-top: clamp(40px, 5vh, 72px);
  counter-reset: stepCount;
}
.step {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
  padding-bottom: clamp(32px, 4vh, 56px);
  border-bottom: 1px solid var(--ink-line);
  counter-increment: stepCount;
}
.step:last-child { border-bottom: none; padding-bottom: 0; }
.step-num {
  font-weight: 200;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1;
  color: var(--brand-500);
  letter-spacing: -0.02em;
}
.step-num::before { content: "0" counter(stepCount); }
.step-body h3 {
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.step-body p {
  color: var(--ink-soft);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.65;
  max-width: 64ch;
  margin: 0;
}
.section-dark .step { border-color: rgba(255,255,255,0.18); }
.section-dark .step-num { color: rgba(255,255,255,0.9); }
.section-dark .step-body p { color: rgba(255,255,255,0.78); }

@media (max-width: 700px) {
  .step { grid-template-columns: 1fr; gap: 12px; }
  .step-num { font-size: 36px; }
}

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .tex::before { animation: none; background-size: cover; background-position: center center; }
  html { scroll-behavior: auto; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 880px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }

  .split { grid-template-columns: 1fr; grid-template-rows: auto auto; min-height: auto; }
  .split .media, .split.image-right .media { order: 1; }
  .split .copy,  .split.image-right .copy  { order: 2; }
  .split .media { width: 100%; height: 50vh; min-height: 320px; }
  .split .media img { min-height: 0; }
  .split .copy {
    min-height: auto;
    padding: clamp(36px, 7vh, 64px) clamp(22px, 6vw, 36px) clamp(48px, 9vh, 80px);
    align-items: flex-start;
    justify-content: flex-start;
  }

  .display { font-size: clamp(30px, 8vw, 48px); }
  .h2      { font-size: clamp(24px, 6.5vw, 38px); }
}
@media (max-width: 540px) {
  .grid-4 { grid-template-columns: 1fr; }
}
