/* Apex Credit Capital LLC — Website Version 3 (Institutional Editorial) */

:root {
  --navy-deep: #0e1b30;
  --navy: #13233c;
  --royal: #1a4b7f;
  --cerulean: #3370a4;
  --ink: #141920;
  --body: #2c3440;
  --muted: #5a6370;
  --rule: #d8dee6;
  --rule-soft: #e8ecf1;
  --white: #ffffff;
  --paper: #f6f8fb;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 1160px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-h: 88px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--cerulean);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.2s ease;
}

.header.is-scrolled {
  box-shadow: 0 2px 18px rgba(14, 27, 48, 0.07);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: block;
  flex: none;
}

.logo img {
  display: block;
  height: 62px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--royal);
  border-bottom-color: var(--royal);
}

.nav-cta {
  padding: 9px 18px;
  font-size: 0.9rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
}

/* ---------- Buttons & Links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--navy);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--royal);
  border-color: var(--royal);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--rule);
}

.btn-outline:hover {
  background: var(--paper);
  border-color: var(--navy);
  color: var(--navy);
}

.btn-light {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn-light:hover {
  background: #e6edf5;
  border-color: #e6edf5;
}

.text-link {
  font-weight: 500;
  color: var(--royal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--navy);
}

/* ---------- Typography & Sections ---------- */
.label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--royal);
  margin-bottom: 14px;
}

h1,
h2,
h3 {
  color: var(--ink);
}

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 4.1vw, 3.35rem);
  line-height: 1.13;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h3 {
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
}

.section {
  padding: clamp(60px, 7.5vw, 96px) 0;
}

.section-paper {
  background: var(--paper);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}

.section-head {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-head p {
  margin-top: 16px;
}

/* ---------- Executive Hero (index.html) ---------- */
.hero {
  padding: clamp(56px, 7vw, 92px) 0 clamp(52px, 6.5vw, 84px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: end;
}

.hero-lead {
  margin-top: 22px;
  max-width: 680px;
  font-size: 1.14rem;
  line-height: 1.65;
  color: var(--body);
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.hero-aside {
  border-top: 1.5px solid var(--navy);
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
}

.hero-aside h2 {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 12px;
}

.hero-aside p {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--body);
}

.hero-aside p + p {
  margin-top: 10px;
}

/* ---------- Editorial Rows (Mandate / What We Acquire) ---------- */
.rows {
  border-top: 1.5px solid var(--navy);
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

.row h2,
.row h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.38rem;
  line-height: 1.25;
}

.row p {
  max-width: 680px;
}

/* ---------- Two-Column Splits & Definition Lists ---------- */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 84px);
  align-items: start;
}

.columns h2 {
  font-size: 1.6rem;
  margin-bottom: 18px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(36px, 6vw, 84px);
  align-items: start;
}

.split p + p {
  margin-top: 18px;
}

.practice {
  border-top: 1.5px solid var(--navy);
}

.practice div {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

.practice dt {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.practice dd {
  font-size: 0.99rem;
  line-height: 1.6;
}

/* ---------- Horizontal-Rule Callout Band (White Surface, Zero Fill) ---------- */
.rule-band {
  margin-top: 48px;
  padding: 26px 0;
  border-top: 1.5px solid var(--navy);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 36px;
}

.rule-band-copy {
  max-width: 740px;
}

.rule-band-copy strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Closing Navy Band ---------- */
.cta-band {
  background: var(--navy-deep);
  color: rgba(232, 237, 244, 0.9);
  padding: clamp(52px, 6.5vw, 80px) 0;
}

.cta-band .label {
  color: #9cb6d4;
}

.cta-band h2 {
  color: var(--white);
  max-width: 680px;
}

.cta-band p {
  margin-top: 14px;
  max-width: 660px;
  font-size: 1.05rem;
}

.cta-band .text-link {
  color: #c4d6ea;
}

.cta-band .text-link:hover {
  color: var(--white);
}

.cta-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

/* ---------- 4-Step Process ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 36px;
  counter-reset: step;
}

.step {
  counter-increment: step;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}

.step::before {
  content: counter(step);
  display: block;
  font-family: var(--serif);
  font-size: 2.05rem;
  line-height: 1;
  color: var(--royal);
  margin-bottom: 14px;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ---------- Contact Form (Atomic .field-group Hygiene) ---------- */
.form-panel {
  border-top: 1.5px solid var(--navy);
  padding-top: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.field-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.field-group .optional {
  font-weight: 400;
  color: var(--muted);
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #b9c2ce;
  border-radius: 2px;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(51, 112, 164, 0.18);
}

.field-group textarea {
  min-height: 132px;
  resize: vertical;
}

/* Visually hidden bot honeypot (zero off-screen mobile viewport stretch) */
.hp-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
}

.form-foot span {
  font-size: 0.88rem;
  color: var(--muted);
}

.form-status {
  display: none;
  margin-top: 22px;
  padding: 16px 0;
  border-top: 1.5px solid var(--navy);
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}

.form-status.is-visible {
  display: block;
}

.form-status strong {
  display: block;
  margin-bottom: 2px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1.5px solid var(--navy);
  padding: 44px 0 48px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
  background: var(--white);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--rule);
}

.footer-brand {
  display: block;
  height: 76px;
  width: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  list-style: none;
}

.footer-links a {
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer p {
  max-width: 920px;
  margin-top: 22px;
}

/* ---------- Legal & Privacy Pages ---------- */
.doc {
  max-width: 760px;
  padding: clamp(48px, 7vw, 88px) 0;
}

.doc h1 {
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  margin-bottom: 28px;
}

.doc h2 {
  font-family: var(--sans);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0;
  margin: 28px 0 6px;
}

.doc p + p {
  margin-top: 14px;
}

.doc .back {
  display: inline-block;
  margin-top: 36px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px;
  }
}

@media (max-width: 920px) {
  :root {
    --header-h: 72px;
  }

  .logo img {
    height: 50px;
  }

  .nav-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
  }

  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 20px var(--gutter) 24px;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px rgba(14, 27, 48, 0.08);
  }

  .hero-grid,
  .columns,
  .split {
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .steps,
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row {
    gap: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
