/* Vertex Organization LLC — accessible stylesheet (WCAG 2.1 AA)
   All text colour pairs below meet 4.5:1 contrast (3:1 for large text / UI). */

:root {
  --navy: #1e3a5f;          /* 11.5:1 on white */
  --navy-dark: #041f41;
  --navy-hover: #2d5a8a;
  --gold: #D4B25E;          /* decorative only on light backgrounds */
  --gold-text: #8a6510;     /* 5.3:1 on white — use for gold TEXT */
  --text: #1f2937;
  --text-muted: #475569;    /* 7.6:1 on white */
  --bg: #ffffff;
  --bg-soft: #fbf8f1;
  --surface: #ffffff;
  --border: #cbd5e1;
  --focus: #1d4ed8;
  --radius: 1rem;
  --maxw: 72rem;
}

[data-theme="dark"] {
  --navy: #e2e8f0;
  --navy-dark: #f1f5f9;
  --navy-hover: #ffffff;
  --gold-text: #D4B25E;     /* 7.2:1 on #1e293b */
  --text: #e2e8f0;
  --text-muted: #cbd5e1;
  --bg: #0f172a;
  --bg-soft: #111c33;
  --surface: #1e293b;
  --border: #475569;
  --focus: #93c5fd;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 8.5rem; }   /* keeps focused items clear of the sticky header */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  transition: background-color .3s, color .3s;
}

img { max-width: 100%; height: auto; }
a { color: var(--navy); }
a:hover { color: var(--gold-text); }

/* ---------- Focus: always visible for keyboard users ---------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: .75rem 1.25rem;
  background: #1e3a5f;
  color: #fff;
  font-weight: 700;
  border-radius: .5rem;
  text-decoration: none;
}
.skip-link:focus, .skip-link:hover { top: 1rem; color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;   /* becomes static on short viewports (high zoom) — see below */
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .site-header { background: rgba(15,23,42,.97); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 6.5rem;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: 120px; height: 120px; object-fit: contain; display: block; }
@media (max-width: 860px) { .brand img { width: 88px; height: 88px; } }

.nav-list {
  list-style: none;
  display: flex;
  gap: .25rem;
  margin: 0;
  padding: 0;
}
.nav-list a {
  display: block;
  padding: .5rem 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav-list a:hover { color: var(--gold-text); border-bottom-color: var(--gold); }
.nav-list a[aria-current="page"] { border-bottom-color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: .75rem; }

.icon-btn {
  width: 44px; height: 44px;             /* 44px minimum target size */
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--navy); }
.icon-btn svg { width: 20px; height: 20px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .65rem 1.5rem;
  border-radius: 999px;
  border: 2px solid #1e3a5f;
  background: #1e3a5f;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #2d5a8a; border-color: #2d5a8a; color: #fff; }
[data-theme="dark"] .btn { background: #D4B25E; border-color: #D4B25E; color: #1e3a5f; }
[data-theme="dark"] .btn:hover { background: #e5c36f; color: #1e3a5f; }
.btn svg { width: 18px; height: 18px; }
.btn[aria-disabled="true"] { cursor: progress; }

.menu-toggle { display: none; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .header-actions .btn-connect { display: none; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1.25rem 1.25rem;
  }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .no-js .site-nav { position: static; }   /* menu stays usable without JavaScript */
  .no-js .menu-toggle { display: none; }
  .nav-list { flex-direction: column; }
  .nav-list a { padding: .85rem 1rem; border-bottom: 0; border-left: 4px solid transparent; }
  .nav-list a[aria-current="page"] { border-left-color: var(--gold); }
}

/* At high zoom (e.g. 400%) a sticky header would cover most of the screen */
@media (max-height: 520px) { .site-header { position: relative; } html { scroll-padding-top: 0; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 8rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.25rem;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a5f, #2d5a8a 60%, #8a6510); /* shows if photo fails */
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  width: 100%;
  max-width: 44rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  color: #1e3a5f;
  font-weight: 600;
  font-size: .95rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  margin: 0;
}
.badge-dots { display: inline-flex; }
.badge-dots span {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: .75rem; font-weight: 800;
  border: 2px solid #fff;
  margin-left: -.5rem;
}
.badge-dots span:first-child { margin-left: 0; background: #1e3a5f; }
.badge-dots span:nth-child(2) { background: #8a6510; }
.badge-dots span:nth-child(3) { background: #2d5a8a; }

/* Panel is near-opaque so text contrast never depends on the photo behind it */
.hero-card {
  width: 100%;
  padding: 2.25rem 2rem;
  border-radius: 1.5rem;
  text-align: center;
  background: rgba(255,255,255,.94);
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
[data-theme="dark"] .hero-card { background: rgba(15,23,42,.94); }
[data-theme="dark"] .badge { background: rgba(15,23,42,.95); color: #f1f5f9; }

.rule {
  width: 4rem; height: 4px; margin: 0 auto 1.5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #1e3a5f, #D4B25E, #1e3a5f);
}
.rule.bottom { margin: 2rem auto 0; }

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--navy);
}
.hero h1 .accent { color: var(--gold-text); }
.hero .lead { font-size: 1.2rem; font-weight: 600; color: var(--navy-dark); margin: 0 0 1rem; }
.hero .sub { font-size: 1.05rem; color: var(--text); margin: 0 0 2rem; }
[data-theme="dark"] .hero .lead { color: #f1f5f9; }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-soft { background: var(--bg-soft); }
.section-rule {
  height: 2px; width: 90%; margin: 0 auto;
  background: linear-gradient(90deg, #1e3a5f, #2563eb, #D4B25E);
}
.prose { max-width: 60rem; margin: 0 auto; }
.prose p { font-size: 1.2rem; margin: 0 0 1.5rem; color: var(--text); }
.prose strong { color: var(--navy); }
.hl { font-weight: 700; color: var(--gold-text); }

.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--navy);
  margin: 0 0 2.5rem;
}

.page-head { text-align: center; padding: 3.5rem 0 2rem; }
.page-head h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  color: var(--navy);
  margin: .75rem 0 .75rem;
  line-height: 1.15;
}
.page-head p { color: var(--text-muted); font-size: 1.15rem; max-width: 40rem; margin: 0 auto; }

.eyebrow {
  display: inline-block;
  padding: .35rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold-text);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
.card-center { text-align: center; }
.card h3 { margin: 0 0 .5rem; font-size: 1.5rem; color: var(--navy); }
.card p { margin: 0; color: var(--text-muted); font-size: 1.1rem; }

.product-card { display: flex; flex-direction: column; gap: 1rem; }
.product-card .card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.product-card .icon {
  width: 3rem; height: 3rem;
  border-radius: .75rem;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--navy);
}
.product-card .icon svg { width: 1.4rem; height: 1.4rem; }
.product-card h2 { margin: 0; font-size: 1.75rem; color: var(--navy); }
.product-card .desc { color: var(--gold-text); font-size: 1.1rem; margin: 0; }
.product-card ul { margin: .5rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--border); list-style: none; }
.product-card li { position: relative; padding-left: 1.25rem; margin-bottom: .6rem; color: var(--text); }
.product-card li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: .45rem; height: .45rem; border-radius: 50%; background: var(--gold);
}
.product-card .card-cta { margin-top: auto; padding-top: .5rem; }
.text-link {
  display: inline-flex; align-items: center; gap: .35rem;
  min-height: 44px;
  font-weight: 700;
  color: var(--navy);
}

.subject-list {
  columns: 2 18rem;
  column-gap: 2.5rem;
  padding-left: 1.25rem;
  font-size: 1.15rem;
}
.subject-list li { margin-bottom: .5rem; break-inside: avoid; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  max-width: 60rem;
  margin: 0 auto;
}
@media (min-width: 900px) { .contact-grid { grid-template-columns: 2fr 3fr; } }
.contact-grid > * { min-width: 0; }
.contact-list a { overflow-wrap: anywhere; }
@media (max-width: 480px) { .panel { padding: 1.5rem 1.1rem; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid #1e3a5f;
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(15,23,42,.08);
}
[data-theme="dark"] .panel { border-top-color: #D4B25E; }
.panel h2 { margin: 0 0 1rem; font-size: 1.15rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-text); }

address { font-style: normal; }
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.25rem; }
.contact-list a {
  display: flex; align-items: center; gap: 1rem;
  text-decoration: none; color: var(--navy);
  font-weight: 700; font-size: 1.1rem;
  min-height: 44px;
}
.contact-list a:hover { color: var(--gold-text); }
.contact-list .ci {
  width: 3rem; height: 3rem; flex: none;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
}
.contact-list .ci svg { width: 1.25rem; height: 1.25rem; }
.contact-list .lbl { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }

.form-row { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.25rem; min-width: 0; }
.field input, .field textarea { width: 100%; min-width: 0; }
.field label { font-weight: 700; font-size: .95rem; color: var(--navy); }
.field .req { color: #b42318; }
[data-theme="dark"] .field .req { color: #fca5a5; }
.field input, .field textarea {
  font: inherit;
  font-size: 1rem;
  padding: .8rem 1rem;
  border: 2px solid #64748b;            /* 4.7:1 vs white — meets 3:1 for UI */
  border-radius: .75rem;
  background: var(--surface);
  color: var(--text);
  min-height: 48px;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--focus); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #b42318; }
[data-theme="dark"] .field input[aria-invalid="true"], [data-theme="dark"] .field textarea[aria-invalid="true"] { border-color: #fca5a5; }
.field .hint { font-size: .9rem; color: var(--text-muted); }
.field .error { font-size: .95rem; font-weight: 600; color: #b42318; }
[data-theme="dark"] .field .error { color: #fca5a5; }
.field .error:empty { display: none; }

.form-status {
  margin-top: 1rem;
  padding: 0;
  border-radius: .75rem;
  font-weight: 600;
}
.form-status.success { padding: 1rem; background: #ecfdf3; color: #05603a; border: 1px solid #6ce9a6; }
.form-status.error { padding: 1rem; background: #fef3f2; color: #b42318; border: 1px solid #fda29b; }
.hp { display: none; }
.form-note { font-size: .95rem; color: var(--text-muted); margin-top: 1.25rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: #1e3a5f;
  color: #ffffff;
  padding: 2.5rem 0;
  margin-top: 0;
}
.site-footer a { color: #ffffff; }
.site-footer a:hover { color: #f3dfa4; }
.site-footer :focus-visible { outline-color: #ffffff; }   /* 11.5:1 on navy (blue ring was 1.72:1) */
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1.5rem 3rem;
  justify-content: space-between; align-items: flex-start;
}
.footer-inner p { margin: .25rem 0; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-links a { display: inline-block; padding: .35rem 0; }
.copyright { width: 100%; border-top: 1px solid rgba(255,255,255,.3); padding-top: 1.25rem; font-size: .95rem; }

/* Windows High Contrast / forced colours */
@media (forced-colors: active) {
  .btn, .icon-btn, .card, .panel, .field input, .field textarea { border: 1px solid CanvasText; }
  .rule, .section-rule { background: CanvasText; }
}

/* ---------- Utility classes (replace former inline styles) ---------- */
.section-tight { padding-top: 1rem; }
.sub-title { text-align: left; margin: 2.5rem 0 1rem; font-size: 1.6rem; color: var(--navy); }
.sub-title-first { margin-top: 0; }
.office-name { font-size: 1.2rem; }
.form-note-top { margin-top: 0; }
.subject-list.single { columns: 1; }
.center-cta { text-align: center; padding-bottom: 4rem; }

/* ---------- Security check (hCaptcha) ---------- */
.captcha-label { font-weight: 700; font-size: .95rem; color: var(--navy); }
.h-captcha { min-height: 78px; max-width: 100%; }
.h-captcha iframe { max-width: 100%; }
