:root {
  /* JustApp Elegant Law Palette */
  --justapp-navy: #0b1f3a;
  --justapp-gold: #c5a572;
  --justapp-cream: #f7f5f0;
  --justapp-slate: #2c3e50;
  --justapp-white: #ffffff;
  
  /* USWDS Token Overrides */
  --usa-primary: var(--justapp-navy);
  --usa-accent-warm: var(--justapp-gold);
  --usa-base-lightest: var(--justapp-cream);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: var(--justapp-cream);
  color: var(--justapp-slate);
  -webkit-font-smoothing: antialiased;
}

/* =================================================================
   HEADER CUSTOM
   ================================================================= */
.usa-header {
  background-color: var(--justapp-white);
  border-bottom: 3px solid var(--justapp-gold);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(11, 31, 58, 0.08);
}

.usa-logo__text a {
  color: var(--justapp-navy);
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.usa-nav__primary > li > a {
  color: var(--justapp-slate);
  font-weight: 600;
  padding: 1rem 1.25rem;
}

.usa-nav__primary > li > a:hover,
.usa-nav__primary > li > a.usa-current {
  color: var(--justapp-navy);
  border-bottom: 3px solid var(--justapp-gold);
}

/* =================================================================
   BUTTONS
   ================================================================= */
.usa-button {
  background-color: var(--justapp-navy);
  border-radius: 0.375rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
}

.usa-button:hover {
  background-color: #0a1a30;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11, 31, 58, 0.25);
}

.usa-button--outline {
  background-color: transparent;
  box-shadow: inset 0 0 0 2px var(--justapp-gold);
  color: var(--justapp-navy);
}

.usa-button--outline:hover {
  background-color: var(--justapp-gold);
  color: var(--justapp-navy);
  box-shadow: none;
}

.usa-button--accent {
  background-color: var(--justapp-gold);
  color: var(--justapp-navy);
}

.usa-button--accent:hover {
  background-color: #b89560;
}

.usa-button--inverse {
    color: var(--justapp-white);
}

/* =================================================================
   HERO SECTION
   ================================================================= */
.justapp-hero {
  background: linear-gradient(135deg, var(--justapp-navy) 0%, #162d4d 100%);
  color: var(--justapp-white);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.justapp-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(197,165,114,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.justapp-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--justapp-white);
}

.justapp-hero p {
  font-size: 1.25rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
  max-width: 60ch;
}

/* =================================================================
   CARDS
   ================================================================= */
.usa-card__container {
  border: 1px solid rgba(44, 62, 80, 0.12);
  border-radius: 0.75rem;
  box-shadow: 0 4px 16px rgba(11, 31, 58, 0.06);
  transition: all 0.3s ease;
  background: var(--justapp-white);
  height: 100%;
}

.usa-card__container:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(11, 31, 58, 0.12);
  border-color: var(--justapp-gold);
}

.usa-card__heading {
  color: var(--justapp-navy);
  font-weight: 700;
}

.justapp-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--justapp-gold) 0%, #d4b885 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(197,165,114,0.3);
}

/* =================================================================
   SECTIONS
   ================================================================= */
.usa-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.usa-section--dark {
  background-color: var(--justapp-navy);
  color: var(--justapp-white);
}

.usa-section--light {
  background-color: var(--justapp-white);
}

.usa-section--cream {
  background-color: var(--justapp-cream);
}

.section-heading {
  color: var(--justapp-navy);
  font-weight: 800;
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.usa-section--dark .section-heading {
  color: var(--justapp-white);
}

/* =================================================================
   FOOTER
   ================================================================= */
.usa-footer {
  background-color: var(--justapp-navy);
  color: rgba(255,255,255,0.85);
}

.usa-footer__primary-section {
  background-color: var(--justapp-navy);
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.usa-footer__secondary-section {
  background-color: #081627;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.6);
}

.usa-footer__secondary-section p {
  color: rgba(255, 255, 255, 0.6);
}

.usa-footer a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.usa-footer a:hover {
  color: var(--justapp-gold);
  text-decoration: underline;
}

.usa-footer__logo-heading {
  color: var(--justapp-white);
  font-weight: 700;
}

/* =================================================================
   STYLE GUIDE SWATCHES
   ================================================================= */
.sg-swatch {
  height: 80px;
  border-radius: 0.5rem;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

/* =================================================================
   UTILITIES
   ================================================================= */
.text-gold { color: var(--justapp-gold); }
.text-navy { color: var(--justapp-navy); }
.text-slate { color: var(--justapp-slate); }
.max-w-prose { max-width: 65ch; }
.flex-gap-2 { gap: 1rem; }

/* =================================================================
   DASHBOARD & BOXED LAYOUTS
   ================================================================= */
.justapp-boxed {
    background: var(--justapp-white);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(11, 31, 58, 0.05);
    padding: 2.5rem;
    border: 1px solid rgba(44, 62, 80, 0.08);
}

.justapp-stat-card {
    background: var(--justapp-cream);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(44, 62, 80, 0.05);
}

/* =================================================================
   ACCENT COOL BUTTON FIX (Contrast)
   ================================================================= */
.usa-button.usa-button--accent-cool {
    background-color: #adfff3; /* USWDS Accent Cool Lighter */
    color: var(--justapp-navy) !important;
    font-weight: 700;
}

.usa-button.usa-button--accent-cool:hover {
    background-color: #70ffeb;
    color: var(--justapp-navy) !important;
}

/* Specific Inverse Button overrides */
.usa-button--inverse {
    border-color: var(--justapp-gold) !important;
    color: var(--justapp-white) !important;
}

.usa-button--inverse:hover {
    background-color: var(--justapp-gold) !important;
    color: var(--justapp-navy) !important;
}

/* USWDS Summary Box Overrides */
.usa-summary-box {
    border-radius: 1rem;
    border: 1px solid rgba(44, 62, 80, 0.1);
    background-color: var(--justapp-white);
}

.bg-primary-dark {
    background-color: var(--justapp-navy) !important;
}
