/*
Theme Name: Sapphire Capital
Theme URI: https://sapcapllc.com
Author: Sapphire Capital Investment
Description: Custom, from-scratch WordPress theme for Sapphire Capital Investment (sapcapllc.com). No page-builder or third-party theme framework dependency.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sapphire-capital
*/

/* ---------- Design tokens ---------- */
:root {
  --color-primary: #123b69;
  --color-primary-dark: #0b2743;
  --color-primary-light: #e8f1fb;
  --color-accent: #a8501f;
  --color-accent-dark: #8a4119;
  --color-bg: #fafaf8;
  --color-surface: #ffffff;
  --color-text: #1f2937;
  --color-text-muted: #5b6472;
  --color-border: #e5e7eb;
  --color-success: #1e7a46;

  --font-heading: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.16);

  --container-max: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 var(--space-2); color: var(--color-primary-dark); }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 var(--space-2); color: var(--color-text-muted); max-width: 65ch; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Layout ---------- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-3); }
.section { padding: var(--space-6) 0; }
.section--alt { background: var(--color-primary-light); }
.section-head { max-width: 720px; margin: 0 auto var(--space-5); text-align: center; }
.grid { display: grid; gap: var(--space-3); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  min-height: 48px;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--color-accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-accent-dark); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.6); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-secondary { background: var(--color-primary); color: #fff; }
.btn-secondary:hover { background: var(--color-primary-dark); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2) var(--space-3); max-width: var(--container-max); margin: 0 auto; }
.site-logo { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; color: var(--color-primary-dark); text-decoration: none; }
.site-logo span { color: var(--color-accent); }
.header-cta { display: flex; align-items: center; gap: var(--space-2); }
.phone-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--color-primary-dark); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 55%, #1d5c9e 100%);
  color: #fff;
  padding: var(--space-7) 0 var(--space-6);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193,98,43,0.35) 0%, rgba(193,98,43,0) 70%);
}
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-5); align-items: start; position: relative; z-index: 1; }
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: #ffd9b8; margin-bottom: var(--space-2); }
.hero h1 { color: #fff; }
.hero p.lead { color: rgba(255,255,255,0.88); font-size: 1.15rem; max-width: 52ch; }
.hero__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }
.trust-bullets { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-5); }
.trust-bullets__item { display: flex; gap: 10px; align-items: flex-start; max-width: 260px; }
.trust-bullets__item svg { flex-shrink: 0; margin-top: 3px; color: #ffd9b8; }
.trust-bullets__item strong { display: block; color: #fff; }
.trust-bullets__item span { color: rgba(255,255,255,0.78); font-size: 0.92rem; }

/* ---------- Lead form card ---------- */
.lead-form-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  color: var(--color-text);
}
.lead-form-card h3 { color: var(--color-primary-dark); margin-bottom: 4px; }
.lead-form-card .sub { color: var(--color-text-muted); font-size: 0.92rem; margin-bottom: var(--space-3); }
.form-row { margin-bottom: var(--space-2); }
.form-row label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--color-text); }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  min-height: 48px;
}
.form-row input:focus, .form-row textarea:focus {
  outline: 3px solid #9cc4ec;
  outline-offset: 1px;
  border-color: var(--color-primary);
}
.form-note { font-size: 0.78rem; color: var(--color-text-muted); margin-top: var(--space-1); }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-success, .form-error {
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  margin-bottom: var(--space-2);
  font-weight: 600;
}
.form-success { background: #e6f4ea; color: var(--color-success); }
.form-error { background: #fdeceb; color: #b3261e; }

/* ---------- Cards / audience segments ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  height: 100%;
}
.card h3 { margin-bottom: var(--space-1); }
.card .card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--color-primary); text-decoration: none; margin-top: var(--space-2); }
.card .card-link:hover { text-decoration: underline; }
.icon-badge {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-2);
}

/* ---------- Process steps ---------- */
.step { text-align: left; position: relative; padding-left: 56px; }
.step__num {
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--font-heading);
}

/* ---------- Situations list ---------- */
.situations-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
@media (max-width: 700px) { .situations-list { grid-template-columns: 1fr; } }
.situations-list li { display: flex; gap: 10px; align-items: flex-start; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-2); }
.situations-list svg { color: var(--color-success); flex-shrink: 0; margin-top: 2px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--color-border); padding: var(--space-2) 0; }
.faq-item summary { cursor: pointer; font-weight: 700; font-family: var(--font-heading); color: var(--color-primary-dark); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chevron { transition: transform 150ms ease; flex-shrink: 0; }
.faq-item[open] summary .chevron { transform: rotate(180deg); }
.faq-item p { margin-top: var(--space-2); }

/* ---------- Guarantee strip ---------- */
.guarantee-strip { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; text-align: center; }
.guarantee-strip__item { max-width: 220px; }
.guarantee-strip__item svg { color: var(--color-success); margin-bottom: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,0.85); padding: var(--space-6) 0 var(--space-4); }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer a { color: rgba(255,255,255,0.8); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-4); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: var(--space-2); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); }
.footer-legal { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.disclosure { font-size: 0.78rem; color: rgba(255,255,255,0.55); max-width: 70ch; margin-top: var(--space-2); }

/* ---------- Sticky mobile CTA bar ---------- */
.mobile-cta-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: none;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 16px rgba(15,23,42,0.12);
  padding: 10px var(--space-2);
  gap: 10px;
}
.mobile-cta-bar a { flex: 1; text-align: center; }
@media (max-width: 760px) {
  .mobile-cta-bar { display: flex; }
  body { padding-bottom: 76px; }
}

/* ---------- v1.1: accessibility, navigation, pages ---------- */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; margin: 0; overflow: visible; position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; color: var(--color-primary-dark); padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); text-decoration: none; font-weight: 700; }
html { scroll-padding-top: 88px; scroll-padding-bottom: 110px; }
body { overflow-x: clip; }
:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.btn:focus-visible { outline: 3px solid var(--color-primary-dark); outline-offset: 3px; }
.hero :focus-visible, .page-hero :focus-visible, .site-footer :focus-visible { outline-color: #ffd9b8; }
.hero .btn:focus-visible { outline-color: #fff; }
.form-row input:focus-visible, .form-row textarea:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 1px; }

/* Header + navigation */
.site-header__inner { gap: var(--space-2); max-width: 1440px; }
.nav-list a { font-size: 0.95rem; }
.site-logo { white-space: nowrap; flex-shrink: 0; }
.header-cta { flex-shrink: 0; }
.header-cta .btn { white-space: nowrap; padding: 12px 20px; }
.primary-nav { margin-left: auto; }
.nav-list { display: flex; flex-wrap: nowrap; gap: 2px; }
.nav-list a { white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 600; text-decoration: none; color: var(--color-primary-dark); border-radius: var(--radius-sm); }
.nav-list a:hover { background: var(--color-primary-light); }
.nav-list .current-menu-item > a, .nav-list .current_page_item > a { color: var(--color-accent); }
.phone-link { min-height: 44px; white-space: nowrap; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: auto; background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-primary-dark); cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: ""; }
.nav-toggle__bars::before { position: absolute; top: -7px; left: 0; }
.nav-toggle__bars::after { position: absolute; top: 7px; left: 0; }
@media (max-width: 1439px) { .header-cta .btn { display: none; } }
@media (max-width: 1240px) {
	.site-header__inner { flex-wrap: wrap; }
	.primary-nav { order: 3; width: 100%; margin-left: 0; }
	.has-js .nav-toggle { display: inline-flex; }
	.has-js .primary-nav { display: none; }
	.has-js .primary-nav.is-open { display: block; }
	.nav-list { flex-direction: column; padding-bottom: var(--space-1); }
	.nav-list a { width: 100%; }
}
@media (max-width: 760px) {
	.header-cta { display: none; }
}
@media (max-width: 480px) {
	.site-logo { font-size: 1.05rem; }
	.site-header__inner { padding: 12px var(--space-2); }
}

/* Footer */
.site-footer .nav-list, .site-footer .footer-nav { display: block; }
.site-footer .nav-list a, .site-footer .footer-nav a, .footer-legal a, .site-footer p a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }

/* Page hero + content */
.container--narrow { max-width: 820px; }
.page-hero { background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%); padding: var(--space-6) 0 var(--space-5); }
.page-hero h1 { color: #fff; margin: 0; }
.page-content > *:first-child { margin-top: 0; }
.page-content h2 { margin-top: var(--space-5); }
.page-content h3 { margin-top: var(--space-4); }
.page-content ul, .page-content ol { padding-left: 1.4rem; margin: 0 0 var(--space-3); color: var(--color-text-muted); max-width: 65ch; }
.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li { margin-bottom: 8px; }
.page-content a { color: var(--color-primary); text-decoration: underline; }
.page-content a.btn { color: #fff; text-decoration: none; }
.page-content .grid { margin: var(--space-3) 0; }
.page-content .situations-list { margin: var(--space-3) 0; padding-left: 0; list-style: none; max-width: none; }
.page-content .situations-list li { margin-bottom: 0; }
.notice-box { border-left: 4px solid var(--color-primary); background: var(--color-primary-light); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); margin: var(--space-3) 0; }
.notice-box p { margin: 0; color: var(--color-text); }
.card .card-link { min-height: 44px; }
.faq-item summary { min-height: 44px; }
.testimonial-placeholder { max-width: 520px; margin: 0 auto var(--space-4); border: 2px dashed var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); padding: var(--space-3); text-align: center; display: flex; flex-direction: column; gap: 4px; }
.testimonial-placeholder strong { font-family: var(--font-heading); color: var(--color-primary-dark); }
.testimonial-placeholder span { color: var(--color-text-muted); font-size: 0.92rem; }

/* Form states */
.consent-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: var(--space-2); }
.consent-row input { width: 24px; height: 24px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--color-primary); }
.consent-row label { font-size: 0.85rem; line-height: 1.45; color: var(--color-text); }
.field-error { color: #b3261e; font-size: 0.85rem; font-weight: 600; margin: 6px 0 0; }
.form-row input[aria-invalid="true"] { border-color: #b3261e; }
.form-note a { color: var(--color-primary); text-decoration: underline; }
.form-success:focus, .form-error:focus { outline: 3px solid var(--color-primary); outline-offset: 2px; }
#lead-form { scroll-margin-top: 96px; }

/* Sticky call bar: hidden while the lead form is on screen */
.mobile-cta-bar { transition: transform 150ms ease, visibility 150ms; }
.mobile-cta-bar.is-hidden { transform: translateY(110%); visibility: hidden; }

/* Cookie banner (CookieAdmin): fit small screens, 44px tap targets */
.cookieadmin_consent_inside { max-width: calc(100vw - 16px); box-sizing: border-box; }
#cookieadmin_accept_button, #cookieadmin_reject_button, #cookieadmin_customize_button,
#cookieadmin_accept_modal_button, #cookieadmin_reject_modal_button, #cookieadmin_prf_modal_button { min-height: 44px; }
.site-logo { display: inline-flex; align-items: center; gap: 0.28em; min-height: 44px; }
@media (max-width: 600px) {
	.cookieadmin_law_container { left: 0 !important; right: 0 !important; width: 100% !important; max-width: 100vw; box-sizing: border-box; padding: 0 8px; }
	.cookieadmin_consent_inside { max-width: 100%; margin: 0 auto; }
}

/* Cookie banner "powered by" link: 44px tap target */
.cookieadmin-poweredby a{display:inline-flex;align-items:center;min-height:44px;}

/* Consent checkbox: extend the label hit area so the tap target is 44px+ */
.consent-row label{position:relative;}
.consent-row label::before{content:"";position:absolute;top:-12px;bottom:-12px;left:-46px;right:0;}
