/* ==========================================================================
   CNHL Design System
   California Nursing Home Law — Young & Wallin
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0F2336;
  --secondary: #193E72;
  --accent: #E97C2E;
  --accent-hover: #d46a1f;
  --gold: #C9A84C;
  --light: #F7F8FA;
  --white: #FFFFFF;
  --dark-text: #1a1a1a;
  --body-text: #3a3835;
  --muted: #8a8580;
  --divider: #d6d2cc;
  --overlay: rgba(15, 35, 54, 0.85);
  --card-shadow: 0 4px 24px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 12px 40px rgba(0,0,0,0.12);
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --section-pad: clamp(4rem, 8vw, 7rem);
  --container: 1200px;
  --container-narrow: 900px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark-text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding: var(--section-pad) 0; position: relative; }
.section--dark { background: var(--primary); color: var(--white); }
.section--navy { background: var(--secondary); color: var(--white); }
.section--light { background: var(--light); }

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.08; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 1rem; }
h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}
.section--dark .eyebrow,
.section--navy .eyebrow { color: var(--gold); }

.text-accent { color: var(--accent); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--muted); }
p + p { margin-top: 1rem; }

.lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.8;
  color: var(--body-text);
  max-width: 640px;
}
.section--dark .lead { color: rgba(255,255,255,0.75); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 6px;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(233,124,46,0.35);
}
.btn--outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.3); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--white { background: var(--white); color: var(--primary); }
.btn--white:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.btn--sm { padding: 0.7rem 1.5rem; font-size: 0.8rem; }
.btn--lg { padding: 1.15rem 2.5rem; font-size: 0.95rem; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  transition: all 0.4s var(--ease);
  padding: 1.25rem 0;
}
.nav.scrolled {
  background: rgba(15,35,54,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.nav__logo {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--white);
  white-space: nowrap;
  line-height: 1.2;
  margin-right: 2rem;
  flex-shrink: 0;
}
.nav__logo span { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 1.5rem; }
.nav__link {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  transition: color 0.3s;
  letter-spacing: 0.02em;
}
.nav__link:hover { color: var(--accent); }
.nav__phone {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; font-weight: 600; color: var(--white);
  margin-left: 1rem;
}
.nav__phone svg { width: 16px; height: 16px; fill: var(--accent); }
.nav__cta { margin-left: 1.5rem; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; cursor: pointer; }
.nav__toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: all 0.3s var(--ease); }

.nav__overlay {
  display: none; position: fixed; inset: 0; background: var(--primary);
  z-index: 999; flex-direction: column; align-items: center; justify-content: center;
  gap: 2rem; opacity: 0; transition: opacity 0.4s var(--ease);
}
.nav__overlay.active { display: flex; opacity: 1; }
.nav__overlay a { font-family: var(--font-heading); font-size: 2rem; color: var(--white); transition: color 0.3s; }
.nav__overlay a:hover { color: var(--accent); }
.nav__close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 32px; height: 32px; color: var(--white);
  font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
}

/* --- Hero --- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  background: var(--primary); color: var(--white); overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.45; will-change: transform;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15,35,54,0.88) 0%, rgba(15,35,54,0.65) 50%, rgba(15,35,54,0.82) 100%);
}
.hero__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  width: 100%; max-width: var(--container); margin: 0 auto;
  padding: clamp(8.5rem,14vh,11rem) clamp(1.25rem,4vw,2.5rem) clamp(4rem,8vh,6rem);
}
.hero__content { max-width: 600px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(233,124,46,0.15); border: 1px solid rgba(233,124,46,0.3);
  color: var(--accent); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 0.5rem 1.1rem; border-radius: 100px; margin-bottom: 1.75rem;
}
.hero h1 { margin-bottom: 1.5rem; }
.hero h1 em { color: var(--accent); font-style: italic; }
.hero__sub {
  font-size: clamp(1rem,2vw,1.15rem); line-height: 1.8;
  color: rgba(255,255,255,0.7); margin-bottom: 2rem; max-width: 520px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 3rem; }
.hero__phone-link {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.1rem; font-weight: 700; color: var(--white); transition: color 0.3s;
}
.hero__phone-link:hover { color: var(--accent); }
.hero__phone-link svg { width: 20px; height: 20px; fill: var(--accent); }

/* Hero form */
.hero__form-wrap {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 2.5rem;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero__form-title { font-family: var(--font-heading); font-size: 1.4rem; margin-bottom: 0.5rem; }
.hero__form-sub { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 1.5rem; }

/* --- Forms --- */
.form__group { margin-bottom: 1rem; }
.form__label {
  display: block; font-size: 0.78rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.4rem; color: rgba(255,255,255,0.6);
}
.section--light .form__label { color: var(--muted); }
.form__input, .form__textarea {
  width: 100%; padding: 0.85rem 1rem;
  font-family: var(--font-body); font-size: 0.92rem;
  color: var(--white); background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px; transition: border-color 0.3s, background 0.3s; outline: none;
}
.form__input::placeholder, .form__textarea::placeholder { color: rgba(255,255,255,0.35); }
.form__input:focus, .form__textarea:focus { border-color: var(--accent); background: rgba(255,255,255,0.12); }
.section--light .form__input, .section--light .form__textarea {
  color: var(--dark-text); background: var(--white); border-color: var(--divider);
}
.section--light .form__input::placeholder, .section--light .form__textarea::placeholder { color: var(--muted); }
.section--light .form__input:focus, .section--light .form__textarea:focus { border-color: var(--accent); }
.form__textarea { min-height: 100px; resize: vertical; }
.form__submit { width: 100%; margin-top: 0.5rem; }

/* --- Stats Bar --- */
.stats-bar { background: var(--primary); border-top: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08); padding: 3rem 0; }
.stats-bar__grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; text-align: center; }
.stats-bar__item { position: relative; }
.stats-bar__item:not(:last-child)::after {
  content: ''; position: absolute; right: 0; top: 10%; height: 80%; width: 1px; background: rgba(255,255,255,0.1);
}
.stats-bar__number {
  font-family: var(--font-body); font-size: clamp(2rem,4vw,3.2rem);
  font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 0.5rem;
}
.stats-bar__label {
  font-size: 0.75rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.1em; color: rgba(255,255,255,0.5);
}

/* --- Cards --- */
.card {
  background: var(--white); border-radius: 16px; padding: 2.5rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  will-change: transform; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.card--bordered { border: 1px solid var(--divider); }
.card--accent-left::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--gold));
  border-radius: 4px 0 0 4px;
}
.card--dark { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.card--dark:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.12); }
.card__icon {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: rgba(233,124,46,0.1); border-radius: 12px; margin-bottom: 1.25rem; color: var(--accent);
}
.card__icon svg { width: 24px; height: 24px; }

/* --- Verdict Cards --- */
.verdict-card {
  background: var(--white); border: 1px solid var(--divider);
  border-radius: 12px; padding: 2rem; text-align: center;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); will-change: transform;
}
.verdict-card:hover { transform: translateY(-6px); box-shadow: var(--card-shadow-hover); }
.verdict-card__amount {
  font-family: var(--font-body); font-size: clamp(1.8rem,3vw,2.4rem);
  font-weight: 700; color: var(--accent); margin-bottom: 0.5rem;
}
.verdict-card__type {
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--secondary); margin-bottom: 0.35rem;
}
.verdict-card__desc { font-size: 0.85rem; color: var(--muted); }

/* --- Grids --- */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; }
.grid-2-1 { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem,5vw,4rem); align-items: center; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem,5vw,4rem); align-items: center; }

/* --- Testimonials --- */
.testimonial {
  background: var(--white); border: 1px solid var(--divider);
  border-radius: 16px; padding: 2.5rem; position: relative;
}
.testimonial__stars { display: flex; gap: 0.2rem; margin-bottom: 1rem; color: var(--gold); }
.testimonial__stars svg { width: 18px; height: 18px; fill: currentColor; }
.testimonial__text {
  font-size: 1rem; line-height: 1.8; color: var(--body-text);
  margin-bottom: 1.25rem; font-style: italic;
}
.testimonial__author { font-weight: 600; font-size: 0.9rem; color: var(--dark-text); }
.testimonial__source { font-size: 0.78rem; color: var(--muted); }

/* --- Awards --- */
.awards-bar {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(2rem,5vw,4rem); flex-wrap: wrap; padding: 2rem 0;
}
.awards-bar img {
  height: 60px; width: auto; opacity: 0.7; filter: grayscale(30%);
  transition: opacity 0.3s, filter 0.3s;
}
.awards-bar img:hover { opacity: 1; filter: grayscale(0); }

/* --- Warning Signs --- */
.checklist { columns: 2; column-gap: 2rem; }
.checklist__item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  margin-bottom: 0.85rem; break-inside: avoid;
  font-size: 0.95rem; line-height: 1.6;
}
.checklist__icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); margin-top: 0.15rem; }
.checklist__icon svg { width: 100%; height: 100%; fill: currentColor; }

/* --- Dividers --- */
.divider { width: 60px; height: 2px; background: var(--accent); margin: 2rem 0; }
.divider--center { margin-left: auto; margin-right: auto; }
.divider--gold { background: var(--gold); }
.section--dark .divider { background: var(--gold); }

/* --- 3D Asset Placeholder --- */
.hero-3d-placeholder {
  position: relative; width: 100%; aspect-ratio: 1;
  background: rgba(255,255,255,0.03);
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 20px; display: flex; align-items: center;
  justify-content: center; text-align: center;
}
.hero-3d-placeholder__label {
  font-size: 0.8rem; color: rgba(255,255,255,0.3);
  text-transform: uppercase; letter-spacing: 0.1em; padding: 2rem;
}

/* --- Footer --- */
.footer { background: var(--primary); color: var(--white); padding: 5rem 0 2rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 3rem; margin-bottom: 4rem; }
.footer__brand { font-family: var(--font-heading); font-size: 1.3rem; margin-bottom: 1rem; line-height: 1.3; }
.footer__brand span { color: var(--accent); }
.footer__desc { font-size: 0.88rem; color: rgba(255,255,255,0.5); line-height: 1.7; margin-bottom: 1.5rem; }
.footer__heading {
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-bottom: 1.25rem;
}
.footer__link { display: block; font-size: 0.88rem; color: rgba(255,255,255,0.6); margin-bottom: 0.6rem; transition: color 0.3s; }
.footer__link:hover { color: var(--accent); }
.footer__phone { font-size: 1.5rem; font-weight: 700; color: var(--accent); margin-bottom: 0.5rem; display: block; }
.footer__bar {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 2rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: rgba(255,255,255,0.35);
}

/* --- Sticky Mobile CTA --- */
.sticky-cta {
  display: none; position: fixed; bottom: 0; left: 0; width: 100%;
  z-index: 900; background: var(--accent); padding: 0.85rem; text-align: center;
}
.sticky-cta a {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  color: var(--white); font-weight: 700; font-size: 1rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.sticky-cta svg { width: 20px; height: 20px; fill: currentColor; }

/* --- Inner Page Hero --- */
.page-hero {
  background: var(--primary); color: var(--white);
  padding: clamp(8rem,15vh,12rem) 0 clamp(3rem,6vh,5rem);
  text-align: center; position: relative; overflow: hidden;
}
.page-hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.15; }
.page-hero .eyebrow { color: var(--gold); }
.page-hero p { color: rgba(255,255,255,0.65); max-width: 600px; margin: 0 auto; font-size: 1.05rem; line-height: 1.8; }

/* --- Breadcrumbs --- */
.breadcrumbs { font-size: 0.78rem; color: rgba(255,255,255,0.4); margin-bottom: 1.5rem; }
.breadcrumbs a { color: rgba(255,255,255,0.5); transition: color 0.3s; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 0.4rem; }

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: var(--white); padding: clamp(3rem,6vw,5rem) 0;
  text-align: center; position: relative; overflow: hidden;
}
.cta-banner h2 { margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.65); margin-bottom: 2rem; font-size: 1.05rem; }
.cta-banner__actions { display: flex; align-items: center; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }

/* --- GSAP Animation Targets --- */
.gs-fade { opacity: 0; transform: translateY(40px); }
.gs-fade-right { opacity: 0; transform: translateX(-40px); }
.gs-fade-left { opacity: 0; transform: translateX(40px); }
.gs-scale { opacity: 0; transform: scale(0.95); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .gs-fade, .gs-fade-right, .gs-fade-left, .gs-scale { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-3d-placeholder { display: none; }
  .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav__links, .nav__phone, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
}
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stats-bar__grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .stats-bar__item:nth-child(2)::after { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .checklist { columns: 1; }
  .sticky-cta { display: block; }
  body { padding-bottom: 60px; }
}
@media (max-width: 480px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; text-align: center; }
}
