:root {
  --navy: #1B2A4A;
  --navy-dark: #0F1A30;
  --navy-light: #2C3E6B;
  --gold: #C9A84C;
  --gold-light: #E0C66A;
  --white: #FFFFFF;
  --off-white: #F8F7F4;
  --gray-100: #F0F0F0;
  --gray-200: #E0E0E0;
  --gray-400: #999;
  --gray-600: #666;
  --gray-800: #333;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --shadow: 0 2px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 8px;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section-dark { background: var(--navy); color: var(--white); }
.section-light { background: var(--off-white); }
.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--navy);
  margin-bottom: 16px;
  text-align: center;
}
.section-dark .section-title { color: var(--white); }
.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray-600);
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}
.section-dark .section-subtitle { color: var(--gray-400); }

/* Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: background var(--transition);
}
.header.scrolled { background: rgba(255,255,255,0.98); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.logo span { color: var(--gold); }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-800);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: var(--transition);
}

/* Hero */
.hero {
  padding: 160px 0 100px;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 120px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath fill='%23ffffff' d='M0,32L60,42.7C120,53,240,75,360,80C480,85,600,75,720,64C840,53,960,43,1080,48C1200,53,1320,75,1380,85.3L1440,96L1440,120L1380,120C1320,120,1200,120,1080,120C960,120,840,120,720,120C600,120,480,120,360,120C240,120,120,120,60,120L0,120Z'/%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
}
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 800px; margin: 0 auto; }
.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--gold); }
.hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
}
.hero-stat { text-align: center; }
.hero-stat .number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
}
.hero-stat .label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
}
.btn-primary:hover { background: var(--gold-light); color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--navy); }

/* Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.value-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.value-card .number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}
.value-card h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 10px;
}
.value-card p { font-size: 0.92rem; color: var(--gray-600); line-height: 1.7; }

/* Practice Areas Cards */
.practice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.practice-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.practice-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.practice-card-body { padding: 36px; }
.practice-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 12px;
}
.practice-card-body p { color: var(--gray-600); margin-bottom: 20px; line-height: 1.7; }
.practice-card-body ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.92rem;
  color: var(--gray-800);
}
.practice-card-body ul li:last-child { border-bottom: none; }
.practice-card-body ul li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}

/* Grants sub-sections (practice-areas page) */
.grant-section { margin-bottom: 48px; }
.grant-section:last-child { margin-bottom: 0; }
.grant-section h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--gold);
}
.grant-section ul { columns: 2; column-gap: 40px; }
.grant-section ul li {
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--gray-800);
  break-inside: avoid;
}
.grant-section ul li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.team-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  text-align: center;
}
.team-card:hover { transform: translateY(-4px); }
.team-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}
.team-card-body { padding: 24px 20px 28px; }
.team-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 4px;
}
.team-card-body .title {
  font-size: 0.85rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 12px;
}
.team-card-body p { font-size: 0.88rem; color: var(--gray-600); line-height: 1.6; margin-bottom: 14px; }
.team-card-body .email {
  font-size: 0.85rem;
  color: var(--navy-light);
  font-weight: 500;
}

/* Insights */
.insights-list { display: flex; flex-direction: column; gap: 24px; }
.insight-item {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.insight-item:hover { transform: translateX(4px); }
.insight-item .date {
  font-size: 0.8rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.insight-item h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.insight-item p { font-size: 0.92rem; color: var(--gray-600); line-height: 1.6; }

/* Contact */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-info h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 24px;
}
.contact-info p {
  font-size: 1rem;
  color: var(--gray-600);
  margin-bottom: 12px;
  line-height: 1.6;
}
.contact-info p strong { color: var(--navy); }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: border-color var(--transition);
  background: var(--white);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.contact-form textarea { min-height: 140px; resize: vertical; }

/* Live News Feed */
.news-feed { margin-top: 32px; }
.news-loader {
  text-align: center;
  padding: 40px;
  color: var(--gray-600);
  font-size: 0.95rem;
}
.news-loader .spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.news-error {
  text-align: center;
  padding: 40px;
  color: var(--gray-400);
  font-size: 0.9rem;
}
.news-source {
  text-align: right;
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 16px;
}
.news-source a { color: var(--gray-400); text-decoration: underline; }

/* What We Do Page */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  padding: 28px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 10px;
}
.service-card p { font-size: 0.9rem; color: var(--gray-600); line-height: 1.65; }

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.sector-tag {
  background: var(--off-white);
  padding: 16px 20px;
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  transition: all var(--transition);
}
.sector-tag:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

/* Footer allowed states */
.footer-states {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 32px;
  padding-top: 20px;
}
.footer-states p {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.8;
  text-align: center;
}

/* Page header (inner pages) */
.page-header {
  padding: 140px 0 60px;
  background: var(--navy);
  color: var(--white);
  text-align: center;
}
.page-header h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
}
.page-header p {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  margin-top: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%230F1A30' d='M0,48L60,42.7C120,37,240,27,360,32C480,37,600,59,720,64C840,69,960,59,1080,48C1200,37,1320,27,1380,21.3L1440,16L1440,80L1380,80C1320,80,1200,80,1080,80C960,80,840,80,720,80C600,80,480,80,360,80C240,80,120,80,60,80L0,80Z'/%3E%3C/svg%3E") no-repeat top;
  background-size: cover;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-top: 20px;
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-col p { font-size: 0.9rem; line-height: 1.7; color: rgba(255,255,255,0.65); }
.footer-col a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 40px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: background var(--transition);
}
.footer-social a:hover { background: var(--gold); color: var(--navy); }

/* Responsive */
@media (max-width: 1024px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .practice-grid { grid-template-columns: 1fr; }
  .grant-section ul { columns: 1; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .hero { padding: 140px 0 60px; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .hero-stat .number { font-size: 1.6rem; }

  .section { padding: 56px 0; }
  .section-title { font-size: 1.8rem; }
  .values-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .page-header h1 { font-size: 2rem; }
  .services-grid { grid-template-columns: 1fr; }
  .sectors-grid { grid-template-columns: 1fr; }
}
