/* ==========================================================================
   DeShazo Advisory — Design System
   Typography-led, navy + gold, generous white space, connection motifs.
   ========================================================================== */

:root {
  /* Brand color */
  --navy-950: #0a1a30;
  --navy-900: #0d2140;
  --navy-800: #14304f;
  --navy-700: #1d4066;
  --navy-100: #e7edf4;
  --navy-050: #f3f6fa;

  --gold-600: #8f6417;
  --gold-500: #c19a3f;
  --gold-400: #cfae5c;
  --gold-100: #f3e9d2;

  /* Secondary blues, sampled from the DeShazo Advisory logo — accents only */
  --blue-light: #4f80b4;
  --blue-slate: #3c4c5c;

  --paper: #fbfaf7;
  --paper-alt: #f4f1ea;
  --ink: #1c2530;
  --ink-soft: #4a5568;
  --ink-faint: #616d79;
  --line: #e1dfd8;
  --white: #ffffff;

  --danger: #a3352b;
  --success: #1f6b4d;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.375rem);
  --step-2: clamp(1.5rem, 1.35rem + 0.7vw, 1.875rem);
  --step-3: clamp(1.9rem, 1.65rem + 1.1vw, 2.5rem);
  --step-4: clamp(2.4rem, 2rem + 1.8vw, 3.4rem);
  --step-5: clamp(2.9rem, 2.3rem + 2.8vw, 4.4rem);

  /* Layout */
  --container-max: 1180px;
  --container-narrow: 780px;
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(10, 26, 48, 0.06), 0 1px 1px rgba(10, 26, 48, 0.04);
  --shadow-md: 0 8px 24px rgba(10, 26, 48, 0.08);
  --transition: 180ms ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; color: var(--navy-900); }
h1 { font-size: var(--step-5); font-weight: 500; }
h2 { font-size: var(--step-3); font-weight: 500; }
h3 { font-size: var(--step-2); font-weight: 600; }
h4 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0 0 1.1em; color: var(--ink-soft); }
ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 600; }

/* ---------- Skip link / focus ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--navy-900);
  color: var(--white);
  padding: 0.75em 1.25em;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}
:focus-visible {
  outline: 2px solid var(--gold-600);
  outline-offset: 3px;
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: clamp(3.5rem, 3rem + 3vw, 7rem) 0;
}
.section-tight {
  padding: clamp(2.5rem, 2rem + 2vw, 4.5rem) 0;
}
.section-alt { background: var(--navy-050); }
.section-navy { background: var(--navy-900); color: var(--navy-100); }
.section-navy h1, .section-navy h2, .section-navy h3, .section-navy h4 { color: var(--white); }
.section-navy p { color: var(--navy-100); }
.section-navy strong { color: var(--white); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 0.9em;
}
.section-navy .eyebrow { color: var(--gold-400); }
.lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 62ch;
}
.section-navy .lede { color: var(--navy-100); }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.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;
}

/* ---------- Connection motif (subtle SVG backgrounds) ---------- */
.motif-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: min(420px, 60%);
  max-height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.motif-lines svg { width: 100%; height: 100%; display: block; }
.has-motif { position: relative; overflow: hidden; }
.has-motif > .container, .has-motif > .container-narrow { position: relative; z-index: 1; }
@media (max-width: 640px) {
  .motif-lines { height: min(260px, 45%); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.01em;
  padding: 0.95em 1.7em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--gold-500);
  color: var(--navy-950);
  border-color: var(--gold-500);
}
.btn-primary:hover { background: var(--gold-400); border-color: var(--gold-400); }
.btn-outline {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--navy-800);
}
.btn-outline:hover { background: var(--navy-900); color: var(--white); }
.section-navy .btn-outline,
.hero .btn-outline,
.page-hero .btn-outline {
  color: var(--white);
  border-color: rgba(255,255,255,0.55);
}
.section-navy .btn-outline:hover,
.hero .btn-outline:hover,
.page-hero .btn-outline:hover {
  background: var(--white);
  color: var(--navy-900);
}
.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--navy-800);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.98);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy-900);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand span { color: var(--gold-600); }
.brand-logo {
  display: inline-flex;
  align-items: center;
}
.brand-logo .logo-img {
  display: block;
  height: 42px;
  width: auto;
}
@media (max-width: 400px) {
  .brand-logo .logo-img { height: 36px; }
}
.nav-primary {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}
.nav-primary a:not(.btn) {
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.4em 0.1em;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav-primary a:not(.btn):hover,
.nav-primary a:not(.btn)[aria-current="page"] {
  color: var(--navy-900);
  border-bottom-color: var(--blue-light);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--navy-900);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-primary {
    position: fixed;
    top: 84px;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 24px 2rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    overflow-y: auto;
  }
  .nav-primary.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
  .nav-primary a:not(.btn) {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-primary .btn { margin-top: 1.25rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3.5rem, 3rem + 4vw, 8rem) 0 clamp(3rem, 2.5rem + 3vw, 6rem);
  background: var(--navy-900);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero h1 { color: var(--white); max-width: 18ch; }
.hero .lede { color: var(--navy-100); margin-top: 0.6em; margin-bottom: 2em; }
.hero-content { position: relative; z-index: 1; max-width: 760px; }
.page-hero {
  padding: clamp(2.75rem, 2.25rem + 3vw, 5.5rem) 0 clamp(2.25rem, 2rem + 2vw, 3.75rem);
  background: var(--navy-900);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.page-hero h1 { color: var(--white); max-width: 22ch; }
.page-hero .lede { color: var(--navy-100); }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 2rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}
.service-card {
  padding-top: 1.75rem;
  border-top: 3px solid var(--gold-500);
  background: var(--white);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.85rem 2rem;
}
.service-card h3 { font-size: var(--step-1); margin-bottom: 0.55em; }
.service-card p:last-child { margin-bottom: 0; }

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: process;
}
@media (max-width: 900px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .process-grid { grid-template-columns: 1fr; }
}
.process-step {
  position: relative;
  padding-top: 0.25rem;
}
.process-step .num {
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--blue-light);
  display: block;
  margin-bottom: 0.15em;
}
.process-step h4 { margin-bottom: 0.4em; }
.process-step p { font-size: var(--step--1); margin-bottom: 0; }

/* ---------- Pull quote ---------- */
.pull-quote {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  color: var(--navy-900);
  line-height: 1.35;
  max-width: 32ch;
  margin: 0;
  border-left: 3px solid var(--gold-500);
  padding-left: 1.1em;
}
.section-navy .pull-quote { color: var(--white); }

.stat-line {
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--navy-900);
  max-width: 22ch;
  line-height: 1.3;
}

/* ---------- Two column layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 4vw, 5rem);
  align-items: center;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}
.split.reverse .split-media { order: -1; }
@media (max-width: 860px) {
  .split.reverse .split-media { order: 0; }
}

/* ---------- Forms ---------- */
.form-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 2vw, 2.75rem);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 100px; /* clears the sticky 84px header when jumped to via #contact-form */
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--navy-900);
}
.field .hint {
  font-size: 0.8rem;
  color: var(--ink-faint);
  font-weight: 400;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: var(--step-0);
  padding: 0.8em 0.9em;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--navy-700);
  outline: none;
  box-shadow: 0 0 0 3px var(--navy-100);
}
.field textarea { resize: vertical; min-height: 120px; }
.checkbox-group, .radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-size: var(--step--1);
  color: var(--ink-soft);
  font-weight: 400;
}
.checkbox-item input { width: 17px; height: 17px; accent-color: var(--navy-800); }
.required-mark { color: var(--gold-600); margin-left: 0.15em; }
.form-footnote {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 1.25rem;
  margin-bottom: 0;
}
.form-footnote a { color: var(--ink-faint); text-decoration: underline; }

/* honeypot field — hidden from sighted users and screen readers, visible to bots */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: var(--step--1);
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-success {
  background: #eaf5ef;
  color: var(--success);
  border: 1px solid #bfe2cd;
}
.form-status.is-error {
  background: #fbecea;
  color: var(--danger);
  border: 1px solid #f0c6c1;
}
.form[hidden], .form-success[hidden] { display: none; }

/* ---------- Book page specifics ---------- */
.book-cover-media {
  display: flex;
  justify-content: center;
}
.book-cover-image {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
}
@media (max-width: 860px) {
  .book-cover-image { max-width: 300px; }
}
.trf-panel {
  background: var(--navy-050);
  border: 1px solid var(--navy-100);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 2vw, 2.75rem);
}
.trf-fine-print {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 1rem;
  margin-bottom: 0;
}
.trf-fine-print + .trf-fine-print { margin-top: 0.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: var(--navy-100);
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  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);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}
.footer-brand .brand { color: var(--white); }
.footer-logo { display: inline-flex; align-items: center; }
.footer-logo-img { display: block; height: 46px; width: auto; }
.footer-brand p { color: rgba(231,237,244,0.75); max-width: 40ch; margin-top: 0.9em; }
.footer-col h5 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 1em;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a { color: rgba(231,237,244,0.85); text-decoration: none; font-size: var(--step--1); }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.75rem;
  font-size: 0.82rem;
  color: rgba(231,237,244,0.6);
}
.footer-bottom a { color: rgba(231,237,244,0.6); }

/* ---------- Utility spacing ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.max-prose { max-width: 62ch; }
.stack { display: flex; flex-direction: column; gap: 1.5rem; }
.divider {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 2.5rem 0;
}
