/* ==========================================================================
   Lawbridge — Design System
   Outsourced legal services for healthcare companies.

   Structure:
     1. Design tokens (custom properties)
     2. Base / reset
     3. Layout primitives (container, section, grid)
     4. Typography
     5. Components (buttons, cards, nav, footer, badges, forms...)
     6. Utilities
     7. Responsive
   ========================================================================== */

/* 1. DESIGN TOKENS ========================================================= */
:root {
  /* --- Color: brand ------------------------------------------------------ */
  --color-navy-900: #0b1f3a;   /* darkest — footers, hero overlays */
  --color-navy-800: #12294a;
  --color-navy-700: #1b3860;   /* primary brand */
  --color-navy-600: #274a7a;
  --color-navy-500: #3a5f92;

  --color-teal-700: #0f6e6a;
  --color-teal-600: #12857f;   /* accent / links */
  --color-teal-500: #17a29a;
  --color-teal-400: #37b8b0;
  --color-teal-100: #d7f0ee;   /* accent tint */

  --color-gold-500: #c9962f;   /* sparing highlight */
  --color-gold-100: #f6ecd4;

  /* --- Color: neutrals --------------------------------------------------- */
  --color-ink:      #14202e;   /* body text */
  --color-slate-700:#33465c;
  --color-slate-500:#5f7186;   /* muted text */
  --color-slate-300:#aab7c6;
  --color-slate-200:#d5dde5;   /* borders */
  --color-slate-100:#eef2f6;   /* subtle fills */
  --color-mist:     #f6f9fb;   /* alt section bg */
  --color-white:    #ffffff;

  /* --- Semantic ---------------------------------------------------------- */
  --color-bg:        var(--color-white);
  --color-bg-alt:    var(--color-mist);
  --color-bg-invert: var(--color-navy-900);
  --color-text:      var(--color-ink);
  --color-text-muted:var(--color-slate-500);
  --color-primary:   var(--color-navy-700);
  --color-accent:    var(--color-teal-600);
  --color-border:    var(--color-slate-200);
  --color-focus:     var(--color-teal-500);

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

  --text-xs:   0.75rem;    /* 12 */
  --text-sm:   0.875rem;   /* 14 */
  --text-base: 1rem;       /* 16 */
  --text-lg:   1.125rem;   /* 18 */
  --text-xl:   1.375rem;   /* 22 */
  --text-2xl:  1.75rem;    /* 28 */
  --text-3xl:  2.25rem;    /* 36 */
  --text-4xl:  2.9rem;     /* ~46 */
  --text-5xl:  3.6rem;     /* ~58 */

  --leading-tight: 1.15;
  --leading-snug:  1.3;
  --leading-normal:1.6;

  --tracking-wide: 0.08em;

  /* --- Spacing scale (8pt-ish) ------------------------------------------ */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10:8rem;

  /* --- Radius / shadow / motion ----------------------------------------- */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.06), 0 1px 3px rgba(11, 31, 58, 0.08);
  --shadow-md: 0 4px 12px rgba(11, 31, 58, 0.08), 0 2px 4px rgba(11, 31, 58, 0.06);
  --shadow-lg: 0 18px 40px rgba(11, 31, 58, 0.14);

  --ring: 0 0 0 3px rgba(23, 162, 154, 0.35);

  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);

  /* --- Layout ------------------------------------------------------------ */
  --container: 1160px;
  --container-narrow: 760px;
  --header-h: 76px;
}

/* 2. BASE / RESET ========================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-teal-700); }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}

/* 3. LAYOUT PRIMITIVES ===================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-9); }
.section--tight { padding-block: var(--space-7); }
.section--alt { background: var(--color-bg-alt); }
.section--invert {
  background: var(--color-bg-invert);
  color: var(--color-slate-200);
}
.section--invert h1, .section--invert h2, .section--invert h3 { color: var(--color-white); }

.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-8);
  align-items: center;
}

/* 4. TYPOGRAPHY ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--color-primary);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); font-weight: 600; }
h4 { font-size: var(--text-lg); }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--text-lg);
  color: var(--color-slate-700);
  line-height: var(--leading-normal);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.section--invert .eyebrow { color: var(--color-teal-400); }

.muted { color: var(--color-text-muted); }

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-7);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}

/* 5. COMPONENTS ============================================================ */

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition),
              color var(--transition), border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--color-accent); color: var(--color-white); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--color-teal-700); color: var(--color-white); box-shadow: var(--shadow-md); }

.btn--dark { background: var(--color-navy-700); color: var(--color-white); }
.btn--dark:hover { background: var(--color-navy-800); color: var(--color-white); }

.btn--ghost { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.btn--ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn--on-dark { background: var(--color-white); color: var(--color-navy-800); }
.btn--on-dark:hover { background: var(--color-teal-100); color: var(--color-navy-900); }

.btn--lg { font-size: var(--text-lg); padding: 1rem 1.9rem; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
}
.btn-link .arrow { transition: transform var(--transition); }
.btn-link:hover .arrow { transform: translateX(4px); }

/* --- Badge / pill -------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--color-teal-100);
  color: var(--color-teal-700);
}
.badge--gold { background: var(--color-gold-100); color: #8a6413; }
.badge--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--color-teal-100);
}

/* --- Card ---------------------------------------------------------------- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card h3 { margin-bottom: var(--space-3); }
.card p { color: var(--color-text-muted); }

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-teal-100);
  color: var(--color-teal-700);
  margin-bottom: var(--space-5);
}
.card__icon svg { width: 26px; height: 26px; }

.card--dark {
  background: var(--color-navy-800);
  border-color: rgba(255,255,255,0.08);
  color: var(--color-slate-200);
}
.card--dark h3 { color: var(--color-white); }
.card--dark p { color: var(--color-slate-300); }

/* --- Feature list (checks) ---------------------------------------------- */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.check-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--color-slate-700);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--color-teal-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230f6e6a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.section--invert .check-list li { color: var(--color-slate-200); }

/* --- Stats --------------------------------------------------------------- */
.stat { text-align: center; }
.stat__num {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1;
}
.section--invert .stat__num { color: var(--color-teal-400); }
.stat__label {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.section--invert .stat__label { color: var(--color-slate-300); }

/* --- Steps / numbered ---------------------------------------------------- */
.step { position: relative; padding-left: 4rem; }
.step__num {
  position: absolute;
  left: 0; top: 0;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--color-navy-700);
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 600;
}

/* --- Logo cloud / trust bar --------------------------------------------- */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-7);
}
.logo-row span {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-slate-300);
  letter-spacing: -0.01em;
}

/* --- Quote / testimonial ------------------------------------------------- */
.quote {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  color: var(--color-primary);
  margin: 0 0 var(--space-5);
}
.section--invert .quote { color: var(--color-white); }
.quote-meta { display: flex; align-items: center; gap: var(--space-4); }
.avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--color-teal-100);
  color: var(--color-teal-700);
  display: grid; place-items: center;
  font-weight: 700;
  font-family: var(--font-sans);
}

/* --- Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-primary);
}
.brand:hover { color: var(--color-primary); }
.brand__mark { width: 34px; height: 34px; flex: none; }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0; padding: 0;
}
.nav__links a {
  font-weight: 500;
  color: var(--color-slate-700);
  font-size: var(--text-base);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--color-accent); }

.nav__actions { display: flex; align-items: center; gap: var(--space-4); }

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--color-primary);
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(23,162,154,0.14), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(27,56,96,0.08), transparent 50%),
    var(--color-white);
  overflow: hidden;
}
.hero__inner { padding-block: var(--space-9); }
.hero h1 { margin-bottom: var(--space-5); }
.hero .lead { margin-bottom: var(--space-6); max-width: 34ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.hero__aside {
  background: linear-gradient(160deg, var(--color-navy-800), var(--color-navy-900));
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  box-shadow: var(--shadow-lg);
}
.hero__aside .stat__num { color: var(--color-teal-400); }

/* --- Panel (bordered feature block) ------------------------------------- */
.panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  background: var(--color-white);
}
.panel--accent {
  background: linear-gradient(160deg, var(--color-teal-100), #eafaf8);
  border-color: transparent;
}

/* --- CTA band ------------------------------------------------------------ */
.cta-band {
  background: linear-gradient(140deg, var(--color-navy-700), var(--color-navy-900));
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
}
.cta-band h2 { color: var(--color-white); }
.cta-band .lead { color: var(--color-slate-200); margin-inline: auto; max-width: 46ch; }

/* --- Forms --------------------------------------------------------------- */
.field { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.field label { font-size: var(--text-sm); font-weight: 600; color: var(--color-slate-700); }
.field input, .field textarea, .field select {
  font: inherit;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: var(--ring);
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  background: var(--color-navy-900);
  color: var(--color-slate-300);
  padding-block: var(--space-8) var(--space-6);
}
.site-footer a { color: var(--color-slate-300); }
.site-footer a:hover { color: var(--color-white); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-7);
}
.footer__brand .brand { color: var(--color-white); }
.footer__brand p { color: var(--color-slate-300); max-width: 34ch; margin-top: var(--space-4); }
.footer__col h4 { color: var(--color-white); font-family: var(--font-sans); font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide); text-transform: uppercase; margin-bottom: var(--space-4); }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.footer__col a { font-size: var(--text-base); }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-slate-500);
}

/* 6. UTILITIES ============================================================= */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.mb-0 { margin-bottom: 0; }
.gap-3 { gap: var(--space-3); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.hidden { display: none; }
.full { width: 100%; }
.max-narrow { max-width: var(--container-narrow); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy-900);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* 7. RESPONSIVE ============================================================ */
@media (max-width: 940px) {
  :root { --text-5xl: 2.9rem; --text-4xl: 2.4rem; --text-3xl: 2rem; }
  .split { grid-template-columns: 1fr; gap: var(--space-6); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }

  .nav__toggle { display: inline-flex; }
  .nav__links, .nav__actions { display: none; }
  .nav[data-open="true"] .nav__links,
  .nav[data-open="true"] .nav__actions {
    display: flex;
    position: absolute;
    left: 0; right: 0;
    top: var(--header-h);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-5);
    box-shadow: var(--shadow-md);
  }
  .nav[data-open="true"] .nav__actions { top: auto; box-shadow: none; border: 0; padding-top: 0; }
}

@media (max-width: 680px) {
  :root { --text-5xl: 2.4rem; --space-9: 4rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero .lead { max-width: none; }
  .cta-band { padding: var(--space-7) var(--space-5); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
