/* ==========================================================================
   Austin Healthcare Advisory — main.css
   Single stylesheet for the whole site. Design tokens are fixed brand
   values (do not adjust hex codes without updating internal tools too).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --navy:         #232963;
  --navy-dark:    #1a1f4a;
  --navy-light:   #e8eaf5;
  --navy-mid:     #6b72a8;
  --crimson:      #d03d47;
  --crimson-dark: #a8303a;
  --crimson-bg:   #fbecec;
  --white:        #ffffff;
  --bg:           #f7f8fc;
  --border:       #e3eafa;
  --text-primary: #232963;
  --text-body:    #3d3d5c;
  --text-muted:   #949494; /* large text only — 3:1, fails AA at body sizes */

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;

  --radius: 7px;
  --radius-lg: 11px;
  --shadow: 0 1px 2px rgba(30, 35, 75, .04), 0 2px 10px rgba(30, 35, 75, .05);

  --container: 71.25rem;   /* 1140px */
  --header-h: 4.5rem;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;      /* 17px */
  line-height: 1.7;
  color: var(--text-body);
  background: var(--white);
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  color: var(--text-primary);
  line-height: 1.15;
}

h1, h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.005em;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 3.625rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.375rem); line-height: 1.2; }
h3 { font-size: 1.1875rem; font-weight: 650; }
h4 { font-size: 1.0625rem; font-weight: 650; }

p, ul, ol { margin: 0 0 1.2em; }

a {
  color: var(--navy);
  text-decoration-color: var(--navy-mid);
  text-underline-offset: 3px;
}

a:hover { color: var(--crimson-dark); }

strong { color: var(--text-primary); font-weight: 650; }

::selection { background: var(--navy); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
  border-radius: 2px;
}

img { max-width: 100%; height: auto; display: block; }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section--tight { padding-block: clamp(3rem, 6vw, 4.5rem); }
.section--bg { background: var(--bg); }

.measure { max-width: 44em; }      /* comfortable reading width */
.measure-narrow { max-width: 36em; }

.grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 44em) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 64em) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --------------------------------------------------------------------------
   4. Shared components
   -------------------------------------------------------------------------- */

/* Eyebrow — small uppercase section label (internal-tools idiom) */
.eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--crimson-dark); /* crimson-dark: 4.5:1+ at label sizes; base crimson falls just short on tinted bg */
  margin-bottom: 1rem;
}

/* Accent rule — the short crimson dash from AHA collateral */
.accent-rule {
  width: 2.25rem;
  height: 3px;
  background: var(--crimson);
  border: 0;
  margin: 1.5rem 0;
}

.lede {
  font-size: 1.1875rem;
  line-height: 1.65;
  color: var(--text-body);
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.875rem 1.625rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-primary { background: var(--crimson); color: var(--white); }
.btn-primary:hover { background: var(--crimson-dark); color: var(--white); }
.btn-primary:focus-visible { outline-color: var(--navy); }

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

.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--navy-light); color: var(--navy); }
.btn-light:focus-visible { outline-color: var(--white); }

/* Arrow text link */
.link-arrow {
  font-weight: 600;
  text-decoration: none;
  color: var(--navy);
  white-space: nowrap;
}

.link-arrow::after { content: "\2009\2192"; }
.link-arrow:hover { color: var(--crimson-dark); }

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.card h3 { margin-bottom: 0.5em; }
.card p:last-child { margin-bottom: 0; }

.card .step-num {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--crimson-dark);
  margin-bottom: 0.75rem;
}

/* Quote — serif italic, from the one-pager tagline register */
.pull-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.375rem, 2.6vw, 1.75rem);
  line-height: 1.45;
  color: var(--text-primary);
  border-left: 3px solid var(--crimson);
  padding-left: 1.5rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   5. Header & navigation
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
  color: var(--white);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

/* Wordmark lockup — matches internal AHA tools */
.brand {
  text-decoration: none;
  line-height: 1.25;
  padding-block: 0.75rem;
}

.brand-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--navy);
}

.brand-sub {
  display: block;
  font-size: 0.5625rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-mid);
  margin-top: 2px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 1.8vw, 1.75rem);
}

.site-nav a:not(.btn) {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  padding-block: 0.4rem;
  white-space: nowrap; /* labels never wrap — keeps the ribbon on one line */
}

.site-nav a:not(.btn):hover { color: var(--crimson-dark); }

/* Active page: color + underline only. No weight change — bolder text is
   wider and shifts the whole ribbon when navigating between pages. */
.site-nav a[aria-current="page"]:not(.btn) {
  color: var(--navy);
  box-shadow: inset 0 -2px 0 var(--crimson);
}

.site-nav .btn { padding: 0.625rem 1.125rem; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.625rem;
  margin-right: -0.625rem;
  cursor: pointer;
}

.nav-toggle-bars {
  display: block;
  position: relative;
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: background .15s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: transform .2s ease;
}

.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 66.24em) {
  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(30, 35, 75, .08);
    display: none;
    padding: 0.5rem 0 1.25rem;
  }

  .site-nav.open { display: block; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-inline: clamp(1.25rem, 5vw, 2.5rem);
  }

  .site-nav a:not(.btn) {
    display: block;
    padding: 0.75rem 0;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--border);
  }

  .site-nav a[aria-current="page"]:not(.btn) {
    box-shadow: none;
    border-left: 3px solid var(--crimson);
    padding-left: 0.75rem;
  }

  .site-nav li:last-child { margin-top: 1rem; }
  .site-nav .btn { display: block; text-align: center; }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(4.5rem, 11vw, 8.5rem) clamp(4rem, 9vw, 7rem);
}

.hero h1 { max-width: 15em; }

.hero .lede { max-width: 40em; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.25rem;
}

/* Page hero (inner pages) */
.page-hero {
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2.5rem, 5vw, 4rem);
}

/* --------------------------------------------------------------------------
   7. Page-specific patterns
   -------------------------------------------------------------------------- */

/* Numbered service / phase blocks */
.flow-block {
  display: grid;
  gap: 1rem 3rem;
  padding-block: clamp(2.25rem, 5vw, 3.25rem);
  border-top: 1px solid var(--border);
}

.flow-block:last-of-type { border-bottom: 1px solid var(--border); }

@media (min-width: 56em) {
  .flow-block { grid-template-columns: 11rem 1fr; }
}

.flow-marker .step-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.25rem;
  color: var(--navy-mid);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.flow-marker .step-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--crimson-dark);
}

.flow-body h2, .flow-body h3 { margin-bottom: 0.4em; }

.flow-meta {
  display: grid;
  gap: 0.35rem 2rem;
  margin: 1.25rem 0 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.flow-meta div { display: flex; gap: 0.6rem; }

.flow-meta dt {
  flex-shrink: 0;
  width: 7.5rem;
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  padding-top: 0.2em;
}

.flow-meta dd { margin: 0; }

/* Definition-style list (ethos, doctrine) */
.tenet + .tenet { margin-top: 2.5rem; }
.tenet h3 { margin-bottom: 0.35em; }
.tenet p:last-child { margin-bottom: 0; }

/* CTA band */
.cta-band {
  background: var(--navy);
  color: var(--navy-light);
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
}

.cta-band h2 { color: var(--white); }

.cta-band p {
  color: var(--navy-light);
  max-width: 38em;
}

.cta-band .hero-actions { margin-top: 2rem; }

.cta-band a:not(.btn) { color: var(--white); text-decoration-color: var(--navy-mid); }
.cta-band a:not(.btn):hover { color: var(--navy-light); }

.cta-contact-line {
  font-size: 0.9375rem;
  margin-top: 1.75rem;
}

/* Founder panel (About page) — works without a headshot; see HEADSHOT SLOT
   comment in about/index.html for the swap */
.founder-mark {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.founder-role {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-mid);
  margin: 0.25rem 0 1rem;
}

/* Pending-review notice styling (About page) */
.pending-review {
  border: 1px dashed var(--navy-mid);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  background: var(--bg);
}

.pending-review p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   8. Forms
   -------------------------------------------------------------------------- */
.form-grid { display: grid; gap: 1.25rem; }

@media (min-width: 44em) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
}

.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.field .optional {
  font-weight: 400;
  color: var(--navy-mid);
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text-body);
  background: var(--white);
  border: 1px solid var(--navy-mid);
  border-radius: var(--radius);
  padding: 0.75rem 0.875rem;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 0;
  border-color: var(--navy);
}

.field textarea { min-height: 10rem; resize: vertical; }

/* Honeypot — hidden from humans, present for bots */
.hp-field {
  position: absolute;
  left: -5000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  display: none;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  margin-top: 1.25rem;
}

.form-status.success {
  display: block;
  background: var(--navy-light);
  color: var(--navy);
  border: 1px solid var(--navy-mid);
}

.form-status.error {
  display: block;
  background: var(--crimson-bg);
  color: var(--crimson-dark);
  border: 1px solid var(--crimson-dark);
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-dark);
  color: var(--navy-light);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 56em) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.site-footer .brand-name { color: var(--white); }
.site-footer .brand-sub { color: rgba(232, 234, 245, 0.72); } /* navy-mid fails contrast on navy-dark */

.footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.0625rem;
  margin: 1.25rem 0 0;
  max-width: 24em;
}

.footer-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 234, 245, 0.72);
  margin: 0 0 1rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-footer a {
  color: var(--navy-light);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-contact p { margin: 0 0 0.5rem; }

.footer-bottom {
  border-top: 1px solid rgba(232, 234, 245, 0.16);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  font-size: 0.8125rem;
}

.footer-bottom p { margin: 0; }

.footer-geo {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.6875rem;
  color: rgba(232, 234, 245, 0.72);
}

/* --------------------------------------------------------------------------
   10. Motion — subtle reveal on scroll, JS-gated, honors reduced motion
   -------------------------------------------------------------------------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease-out, transform .55s ease-out;
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   11. Insights
   -------------------------------------------------------------------------- */
.post-meta {
  font-size: 0.875rem;
  color: var(--navy-mid);
  margin: 0 0 1.5rem;
}

.insight-item {
  padding-block: 2.25rem;
  border-top: 1px solid var(--border);
}

.insight-item:last-child { border-bottom: 1px solid var(--border); }

.insight-item h2 {
  font-size: 1.5rem;
  margin-bottom: 0.35em;
}

.insight-item h2 a { text-decoration: none; }
.insight-item h2 a:hover { color: var(--crimson-dark); }
.insight-item .post-meta { margin-bottom: 0.65rem; }
.insight-item p:not(.post-meta) { margin-bottom: 0.9em; }

.article-body h2 {
  font-size: 1.4375rem;
  margin-top: 2.25em;
}

.article-body ul { padding-left: 1.25rem; }
.article-body li { margin-bottom: 0.6em; }

/* --------------------------------------------------------------------------
   12. Utilities
   -------------------------------------------------------------------------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media print {
  .site-header, .site-footer, .cta-band, .nav-toggle { display: none; }
}
