/* ============================================================
   Meridian & Co. — Global Styles
   ============================================================ */

/* CSS Custom Properties */
:root {
  --ink: #0a1628;
  --ink-light: #111f35;
  --accent: #c27a4e;
  --accent-hover: #a66840;
  --cream: #faf8f5;
  --warm-100: #f3efe9;
  --warm-200: #e8e2da;
  --warm-300: #c9bfb3;
  --text: #172136;
  --text-muted: #5a6578;
  --text-light: #8a95a8;
  --white: #ffffff;
  --max-content: 1200px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --radius: 2px;
  --shadow-subtle: 0 2px 12px rgba(10,22,40,0.06);
  --shadow-medium: 0 8px 32px rgba(10,22,40,0.10);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.65; color: var(--text); background: var(--cream);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition), opacity var(--transition); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* Typography */
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
h1 { font-size: clamp(2.5rem, 5vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.125rem, 1.8vw, 1.375rem); }
p { color: var(--text-muted); }
.overline {
  display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-2);
}

/* Container */
.container { width: 100%; max-width: var(--max-content); margin: 0 auto; padding: 0 var(--space-3); }

/* Skip Link */
.skip-link {
  position: absolute; top: -40px; left: 0; background: var(--ink); color: var(--white);
  padding: var(--space-1) var(--space-2); font-size: 0.875rem; z-index: 10000; border-radius: var(--radius);
}
.skip-link:focus { top: var(--space-1); left: var(--space-1); }

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000; background: rgba(250,248,245,0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--warm-200);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-size: 1.375rem; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.logo span { color: var(--accent); }

.desktop-nav { display: flex; gap: calc(var(--space-1)*4); }
.desktop-nav a {
  font-size: 0.875rem; font-weight: 500; letter-spacing: 0.01em;
  color: var(--text-muted); position: relative; padding: 4px 0;
}
.desktop-nav a::after {
  content: ""; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
  background: var(--accent); transition: width var(--transition);
}
.desktop-nav a:hover { color: var(--ink); }
.desktop-nav a:hover::after, .desktop-nav a.active::after { width: 100%; }
.desktop-nav a.active { color: var(--ink); font-weight: 600; }

.mobile-menu-btn {
  display: none; width: 28px; height: 28px; flex-direction: column; justify-content: center; gap: 5px;
}
.mobile-menu-btn span { display: block; width: 100%; height: 2px; background: var(--ink); border-radius: 1px; transition: var(--transition); }

/* Mobile Nav */
.mobile-nav {
  display: none; position: fixed; inset: 72px 0 0 0; background: var(--cream);
  padding: var(--space-4); flex-direction: column; gap: var(--space-3); z-index: 999;
  border-top: 1px solid var(--warm-200);
}
.mobile-nav a { font-size: 1.125rem; font-weight: 500; color: var(--text-muted); padding: var(--space-1) 0; }
.mobile-nav a.active { color: var(--ink); font-weight: 600; }
.mobile-nav.open { display: flex; }

/* Hero Section Dark */
.hero-dark {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-light) 100%);
  color: var(--cream); padding: calc(var(--space-7)*1.2) 0 var(--space-7);
}
.hero-dark h1 { color: var(--white); }
.hero-dark p { color: var(--warm-300); font-size: clamp(1rem, 1.4vw, 1.25rem); max-width: 640px; }
.hero-dark .overline { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1);
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.02em; padding: 14px 28px;
  border-radius: var(--radius); transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-medium); }
.btn-secondary { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.25); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline-dark { background: transparent; color: var(--ink); border: 1px solid var(--warm-200); }
.btn-outline-dark:hover { border-color: var(--accent); color: var(--accent); }

/* Section Utils */
.section { padding: var(--space-7) 0; }
.section-light { background: var(--cream); }
.section-warm { background: var(--warm-100); }
.section-dark { background: var(--ink); color: var(--cream); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: var(--warm-300); }
.section-header { max-width: 720px; margin-bottom: var(--space-6); }
.section-header h2 { margin-bottom: var(--space-2); }
.section-header p { font-size: 1.125rem; }

/* Cards */
.card {
  background: var(--white); border: 1px solid var(--warm-200); border-radius: var(--radius);
  padding: var(--space-4); transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-medium); border-color: var(--warm-300); }
.card h3 { color: var(--ink); margin-bottom: var(--space-1); }
.card p { font-size: 0.9375rem; line-height: 1.6; }

/* Stats Band */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.stat-item { text-align: center; }
.stat-number { font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: var(--space-1); }
.stat-label { font-size: 0.875rem; color: var(--text-muted); letter-spacing: 0.02em; }

/* Grid Layouts */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }

/* Testimonial */
.testimonial { padding: var(--space-4); border-left: 3px solid var(--accent); }
.testimonial blockquote { font-size: 1.125rem; font-style: italic; color: var(--text); margin-bottom: var(--space-3); line-height: 1.55; }
.testimonial cite { font-style: normal; }
.testimonial .name { font-weight: 600; color: var(--ink); display: block; }
.testimonial .title { font-size: 0.875rem; color: var(--text-muted); }

/* Footer */
.site-footer { background: var(--ink); color: var(--warm-300); padding: var(--space-7) 0 var(--space-4); }
.site-footer .logo { color: var(--white); margin-bottom: var(--space-2); display: inline-block; }
.site-footer .footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--space-5); margin-bottom: var(--space-6); }
.site-footer h4 { color: var(--white); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--space-3); }
.site-footer ul li { margin-bottom: var(--space-1); }
.site-footer ul a { color: var(--text-light); font-size: 0.875rem; }
.site-footer ul a:hover { color: var(--accent); }
.site-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: var(--space-4); display: flex; justify-content: space-between; align-items: center; font-size: 0.8125rem; color: var(--text-light); }
.site-footer .footer-bottom a { color: var(--text-light); margin-left: var(--space-3); }
.site-footer .footer-bottom a:hover { color: var(--accent); }

/* Service Card Large */
.service-large { padding: var(--space-5); border-bottom: 1px solid var(--warm-200); }
.service-large:last-child { border-bottom: none; }
.service-large h3 { font-size: 1.5rem; margin-bottom: var(--space-2); }
.service-large p { max-width: 760px; margin-bottom: var(--space-2); }
.service-meta { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.service-meta span { font-size: 0.8125rem; font-weight: 500; color: var(--text-muted); background: var(--warm-100); padding: 4px 12px; border-radius: var(--radius); }

/* Case Study Card */
.case-study { position: relative; overflow: hidden; background: var(--white); border: 1px solid var(--warm-200); border-radius: var(--radius); }
.case-study-body { padding: var(--space-4); }
.case-study .client-sector { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: var(--space-1); }
.case-study h3 { font-size: 1.25rem; margin-bottom: var(--space-1); }
.case-study .result { font-size: 1.75rem; font-weight: 700; color: var(--accent); margin-top: var(--space-3); }
.case-study .result-label { font-size: 0.8125rem; color: var(--text-muted); }

/* Leadership */
.leader { text-align: center; }
.leader-avatar { width: 160px; height: 160px; border-radius: 50%; background: var(--warm-200); margin: 0 auto var(--space-3); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--warm-300); overflow: hidden; border: 3px solid var(--warm-100); }
.leader h3 { margin-bottom: 2px; }
.leader .role { font-size: 0.875rem; color: var(--accent); font-weight: 500; margin-bottom: var(--space-2); }
.leader p { font-size: 0.9375rem; padding: 0 var(--space-2); }

/* Office */
.office-card { padding: var(--space-4); border: 1px solid var(--warm-200); background: var(--white); border-radius: var(--radius); }
.office-card h4 { font-size: 1.125rem; color: var(--ink); margin-bottom: var(--space-1); }
.office-card p { font-size: 0.9375rem; }

/* Insight Article */
.article-card { display: block; padding: var(--space-4) 0; border-bottom: 1px solid var(--warm-200); transition: padding-left var(--transition); }
.article-card:last-child { border-bottom: none; }
.article-card:hover { padding-left: var(--space-2); }
.article-card:hover h3 { color: var(--accent); }
.article-card .meta { display: flex; gap: var(--space-3); margin-bottom: var(--space-1); font-size: 0.8125rem; color: var(--text-muted); }
.article-card .meta .category { font-weight: 600; color: var(--accent); }
.article-card h3 { font-size: 1.25rem; margin-bottom: var(--space-1); transition: color var(--transition); }
.article-card p { font-size: 0.9375rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--space-6); }
.contact-info h3 { margin-bottom: var(--space-2); }
.contact-info p { margin-bottom: var(--space-3); }
.contact-detail { display: flex; align-items: flex-start; gap: var(--space-2); margin-bottom: var(--space-3); }
.contact-detail .icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--warm-100); border-radius: var(--radius); flex-shrink: 0; font-size: 0.875rem; color: var(--accent); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 14px 18px; border: 1px solid var(--warm-200);
  border-radius: var(--radius); font-size: 0.9375rem; font-family: inherit;
  background: var(--white); color: var(--text); margin-bottom: var(--space-3);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194,122,78,0.12);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.02em; }

/* Focus States (Accessibility) */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius);
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .grid-3, .grid-4, .grid-2, .stats-band { grid-template-columns: 1fr; }
  .hero-dark { padding: var(--space-6) 0; }
  .section { padding: var(--space-5) 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr !important; gap: var(--space-4) !important; }
  .site-footer .footer-bottom { flex-direction: column; gap: var(--space-2); text-align: center; }
  .site-footer .footer-bottom a { margin: 0 var(--space-2); }
}
@media (max-width: 480px) {
  :root { --space-3: 16px; --space-4: 20px; --space-5: 32px; --space-6: 40px; --space-7: 56px; }
  .container { padding: 0 var(--space-2); }
  .service-large { padding: var(--space-4) 0; }
  .testimonial { padding: var(--space-3); }
}

/* Details / FAQ */
details.card { padding: var(--space-4); }
details.card summary { list-style: none; cursor: pointer; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary > span { color: var(--accent); font-size: 1.25rem; transition: transform var(--transition); }
details[open].card summary > span { transform: rotate(45deg); }
details.card p { margin-top: var(--space-2); }

/* Screen reader only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Utility spacing */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.max-w-640 { max-width: 640px; margin-left: auto; margin-right: auto; }
.max-w-720 { max-width: 720px; margin-left: auto; margin-right: auto; }
.max-w-800 { max-width: 800px; margin-left: auto; margin-right: auto; }
.max-w-900 { max-width: 900px; margin-left: auto; margin-right: auto; }