/* ==========================================================================
   Caseload Partner — Visual system (rebuilt from scratch)
   Editorial + warm: Fraunces headlines, Inter body, terracotta + forest.
   Fonts loaded via <link> in each page's <head>.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color */
  --bg: #fbf9f6;          /* warm off-white */
  --ink: #1a1815;         /* near-black, warm */
  --ink-soft: #5c554b;    /* muted body / captions */
  --ink-faint: #8a8172;   /* faintest */
  --accent: #c4512a;      /* terracotta */
  --accent-dark: #a5421f; /* terracotta hover */
  --forest: #2d4a3e;      /* deep forest green */
  --forest-deep: #223a30; /* darker forest (footer) */
  --on-forest: #ede7dc;   /* text on forest */
  --on-forest-soft: #a9b8ac;
  --card: #ffffff;
  --line: #e7e0d4;        /* warm hairline */
  --line-strong: #d8cfbf;

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

  /* Measure & layout */
  --maxw: 1200px;
  --measure: 65ch;        /* readable line length */
  --pad: clamp(20px, 5vw, 40px);
  --section: clamp(64px, 10vw, 120px);

  /* Radius */
  --r-btn: 6px;
  --r-img: 12px;
  --r-card: 14px;

  /* Shadow (warm, ink-tinted) */
  --shadow-sm: 0 1px 2px rgba(26, 24, 21, 0.04), 0 2px 8px rgba(26, 24, 21, 0.05);
  --shadow-md: 0 8px 28px rgba(26, 24, 21, 0.08);
  --shadow-lg: 0 24px 56px rgba(26, 24, 21, 0.16);
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Headings — Fraunces, optical sizing, tight tracking */
h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
}
h3 {
  font-size: clamp(20px, 2vw, 24px);
  letter-spacing: -0.015em;
}
h4 {
  font-size: 15px;
}
p {
  margin: 0 0 1.1rem;
}
ul {
  margin: 0 0 1.1rem;
  padding-left: 1.2em;
}
li {
  margin-bottom: 0.4rem;
}
strong {
  font-weight: 600;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.section {
  padding-block: var(--section);
}
.section--forest {
  background: var(--forest);
  color: var(--on-forest);
}
.section--forest h1,
.section--forest h2,
.section--forest h3 {
  color: #fff;
}
.section--accent {
  background: var(--accent);
  color: #fdeee7;
}
.section--accent h2 {
  color: #fff;
}

/* Body copy constrained to a readable measure; left-aligned by default */
.measure {
  max-width: var(--measure);
}
.lead {
  font-size: clamp(19px, 1.4vw, 22px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: var(--measure);
}
.section--forest .lead {
  color: var(--on-forest);
}
.section--accent .lead {
  color: #fdeee7;
}

/* Eyebrow label */
.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.section--forest .eyebrow {
  color: #e6a488;
}
.section--accent .eyebrow {
  color: #fdeee7;
}

.section-head {
  max-width: 40ch;
  margin-bottom: clamp(40px, 6vw, 64px);
}

/* Placeholder marker for content the client must supply */
.placeholder {
  display: inline-block;
  background: #fdf3e3;
  border: 1px dashed #d9a441;
  color: #8a5a12;
  font-style: italic;
  font-size: 0.94em;
  padding: 2px 9px;
  border-radius: 5px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  padding: 16px 32px;
  border-radius: var(--r-btn);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease,
    border-color 0.16s ease, color 0.16s ease;
}
.btn:hover {
  text-decoration: none;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(196, 81, 42, 0.3);
}
.btn--outline {
  background: transparent;
  color: var(--forest);
  border-color: var(--line-strong);
}
.btn--outline:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
  transform: translateY(-2px);
}
.btn--light {
  background: var(--bg);
  color: var(--ink);
}
.btn--light:hover {
  background: #fff;
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn--ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* Text link with arrow */
.link-arrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.link-arrow:hover {
  text-decoration: none;
  gap: 12px;
  color: var(--accent-dark);
}

/* --------------------------------------------------------------------------
   Header (sticky, shrinks + shadow on scroll)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 246, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.28s ease, background 0.28s ease, border-color 0.28s ease;
}
.site-header.scrolled {
  background: rgba(251, 249, 246, 0.95);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(26, 24, 21, 0.07);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
  transition: min-height 0.28s ease;
}
.site-header.scrolled .header-inner {
  min-height: 64px;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: font-size 0.28s ease;
  white-space: nowrap;
}
.brand:hover {
  color: var(--ink);
  text-decoration: none;
}
.site-header.scrolled .brand {
  font-size: 22px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
}
.main-nav a:hover {
  color: var(--ink);
  text-decoration: none;
}
.main-nav a.active {
  color: var(--accent);
}
.header-contact {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
  font-size: 13.5px;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.header-contact a {
  color: var(--ink-soft);
  white-space: nowrap;
}
.header-contact a:hover {
  color: var(--accent);
  text-decoration: none;
}
.header-contact a:first-child {
  font-weight: 600;
  color: var(--ink);
}
.nav-toggle {
  display: none;
  width: 46px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Full-bleed hero (homepage)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  width: 100%;
  min-height: clamp(520px, 76vh, 780px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero::after {
  /* uniform solid scrim (not a gradient) for legibility */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 42, 36, 0.58);
  z-index: 1;
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(48px, 8vw, 96px);
}
.hero__content {
  max-width: 44rem;
}
.hero .eyebrow {
  color: #f0c3ac;
}
.hero h1 {
  color: #fff;
  font-size: clamp(40px, 6.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero__lead {
  color: #f2ede4;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.6;
  max-width: 46ch;
  margin: 0;
}
.hero .btn-row {
  margin-top: 36px;
}

/* --------------------------------------------------------------------------
   Interior page hero (forest band)
   -------------------------------------------------------------------------- */
.page-hero {
  background: var(--forest);
  color: var(--on-forest);
  padding-block: clamp(64px, 10vw, 120px);
}
.page-hero h1 {
  color: #fff;
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  max-width: 16ch;
}
.page-hero__lead {
  color: var(--on-forest);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.6;
  max-width: 60ch;
  margin: 0;
}
.breadcrumb {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--on-forest-soft);
  margin-bottom: 20px;
}
.breadcrumb a {
  color: var(--on-forest);
}
.page-hero .eyebrow {
  color: #e6a488;
}

/* --------------------------------------------------------------------------
   Alternating feature sections (image / text)
   -------------------------------------------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.feature + .feature {
  margin-top: var(--section);
}
.feature__media img {
  width: 100%;
  height: clamp(360px, 44vw, 580px);
  object-fit: cover;
  border-radius: var(--r-img);
  box-shadow: var(--shadow-lg);
}
.feature__body {
  max-width: 60ch;
}
.feature__body .btn-row,
.feature__body .link-arrow {
  margin-top: 28px;
}
/* Reverse — image on the right */
.feature--reverse .feature__media {
  order: 2;
}

/* --------------------------------------------------------------------------
   Checklist
   -------------------------------------------------------------------------- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.checklist li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
  color: var(--ink-soft);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.section--forest .checklist li {
  color: var(--on-forest);
}

/* --------------------------------------------------------------------------
   Cards / grids
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 32px 30px;
  box-shadow: var(--shadow-sm);
}
.card h3 {
  margin-bottom: 0.4rem;
}
.card p {
  margin-bottom: 0;
  color: var(--ink-soft);
}
.card__num {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  display: block;
  margin-bottom: 16px;
}

/* Cards inside forest sections (outline style) */
.section--forest .card {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}
.section--forest .card p {
  color: var(--on-forest);
}
.section--forest .card__num {
  color: #e6a488;
}

/* --------------------------------------------------------------------------
   Specialty chips
   -------------------------------------------------------------------------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.chip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.chip small {
  color: var(--ink-faint);
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   Process steps
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: 20px;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
  padding: 26px 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
}
.step__num {
  counter-increment: step;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  color: var(--accent);
  line-height: 1.2;
}
.step__num::before {
  content: counter(step, decimal-leading-zero);
}
.step h3 {
  margin-bottom: 0.25rem;
}
.step p {
  margin: 0;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Split content (e.g. text + card)
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

/* --------------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(36px, 5vw, 64px);
  align-items: start;
}
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow-md);
}
.field {
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.field .req {
  color: var(--accent);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  padding: 13px 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-faint);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 81, 42, 0.15);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.radio-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.radio-tile {
  flex: 1;
  min-width: 150px;
  position: relative;
}
.radio-tile input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.radio-tile label {
  display: block;
  margin: 0;
  padding: 15px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
  transition: 0.15s ease;
}
.radio-tile label small {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 2px;
}
.radio-tile input:checked + label {
  border-color: var(--accent);
  background: #fbeee8;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.radio-tile input:focus-visible + label {
  box-shadow: 0 0 0 3px rgba(196, 81, 42, 0.22);
}
.form-note {
  font-size: 13.5px;
  color: var(--ink-faint);
  margin-top: 6px;
}
.form-success {
  display: none;
  background: #edf3ef;
  border: 1px solid var(--forest);
  color: var(--forest);
  border-radius: var(--r-btn);
  padding: 16px 18px;
  margin-bottom: 22px;
  font-size: 15.5px;
}

/* Contact aside */
.contact-aside .card {
  margin-bottom: 22px;
}
.media-rounded img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--r-img);
  box-shadow: var(--shadow-md);
}
.contact-detail {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 20px;
}
.contact-detail:last-child {
  margin-bottom: 0;
}
.contact-detail .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-weight: 700;
  min-width: 66px;
}
.contact-detail a,
.contact-detail .value {
  font-weight: 600;
  color: var(--ink);
  font-size: 16.5px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--forest-deep);
  color: var(--on-forest);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-block: clamp(56px, 8vw, 88px) 40px;
}
.brand--footer {
  color: #fff;
  display: inline-block;
  margin-bottom: 16px;
}
.brand--footer:hover {
  color: #fff;
}
.footer-grid p {
  color: var(--on-forest-soft);
  max-width: 34ch;
  font-size: 16px;
}
.site-footer h4 {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12.5px;
  color: var(--on-forest-soft);
  margin-bottom: 16px;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li {
  margin-bottom: 10px;
  font-size: 16px;
}
.site-footer a {
  color: var(--on-forest);
}
.site-footer a:hover {
  color: #fff;
  text-decoration: none;
}
.footer-contact a {
  display: block;
  margin-bottom: 10px;
}
.footer-contact a:first-of-type {
  font-weight: 600;
  color: #fff;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 24px 30px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13.5px;
  color: var(--on-forest-soft);
}

/* --------------------------------------------------------------------------
   Scroll reveal (progressive enhancement — only active when JS present)
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  will-change: opacity, transform;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .feature,
  .split,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .feature--reverse .feature__media {
    order: -1;
  }
  .feature__media img {
    height: clamp(280px, 62vw, 440px);
  }
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .header-contact {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(84vw, 340px);
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 96px 32px 32px;
    box-shadow: -12px 0 40px rgba(26, 24, 21, 0.18);
    transform: translateX(105%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  .main-nav.open {
    transform: translateX(0);
  }
  .main-nav a {
    font-size: 20px;
    font-family: var(--serif);
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
  }
  .main-nav .mobile-contact {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .main-nav .mobile-contact a {
    font-family: var(--sans);
    font-size: 16px;
    border-bottom: none;
    padding: 2px 0;
    color: var(--accent);
    font-weight: 600;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .hero .btn,
  .btn-row .btn {
    width: auto;
  }
}

@media (min-width: 641px) {
  .mobile-contact {
    display: none;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
