/* ==========================================================================
   MERIDIAN ADVISORY - EXECUTIVE CONSULTING STYLESHEET
   Palette: Warm Ivory (#F7F6F2), Midnight Navy (#0E1B2C), Brass (#A8834A)
   Typography: Fraunces (Headings), Manrope (Body), IBM Plex Mono (Technical)
   Zero heavy dependencies. Strict Zero-Overflow responsive design.
   ========================================================================== */

:root {
  --bg-ivory: #F7F6F2;
  --bg-ivory-alt: #EFECE4;
  --bg-surface: #FFFFFF;
  --border-light: #E4E1D8;
  --border-strong: #CFCAC0;

  --navy: #0E1B2C;
  --navy-elevated: #14253B;
  --navy-border: rgba(243, 241, 234, 0.14);
  --primary: #12305A;
  --primary-hover: #0B2245;

  --brass: #A8834A;
  --brass-light: #C6A268;
  --brass-soft: rgba(168, 131, 74, 0.12);

  --ink: #0E1B2C;
  --text-secondary: #4A5568;
  --text-muted: #7A8394;
  --ivory-ink: #F3F1EA;
  --ivory-muted: #B8C0CC;

  --success: #166534;
  --success-bg: #DCFCE7;

  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', Menlo, Monaco, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --shadow-card: 0 1px 2px rgba(14, 27, 44, 0.06), 0 8px 24px rgba(14, 27, 44, 0.06);
  --shadow-hover: 0 4px 12px rgba(14, 27, 44, 0.08), 0 16px 36px rgba(14, 27, 44, 0.09);

  --transition-fast: 0.18s ease;
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1220px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-ivory);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

img {
  height: auto;
}

button, input, select, textarea {
  font-family: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 32;
}

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

/* TYPOGRAPHY & TAG HELPERS */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.9rem;
}

.section-tag::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background-color: var(--brass);
  flex-shrink: 0;
}

.text-brass {
  color: var(--brass-light);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg-ivory-alt);
  color: var(--ink);
  border: 1px solid var(--border-light);
}

.hero-section .badge {
  background: rgba(168, 131, 74, 0.14);
  color: var(--ivory-ink);
  border: 1px solid rgba(168, 131, 74, 0.4);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brass-light);
  flex-shrink: 0;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.88rem 1.75rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.hero-section .btn-primary,
.calculator-section .btn-primary {
  background: var(--brass);
  color: #FFFFFF;
}

.hero-section .btn-primary:hover,
.calculator-section .btn-primary:hover {
  background: #94723D;
}

.btn-secondary {
  background: transparent;
  color: var(--ivory-ink);
  border-color: rgba(243, 241, 234, 0.28);
}

.btn-secondary:hover {
  background: rgba(243, 241, 234, 0.08);
  border-color: rgba(243, 241, 234, 0.55);
}

.btn-sm {
  padding: 0.55rem 1.15rem;
  font-size: 0.84rem;
}

/* HEADER & NAVBAR (LIGHT STICKY) */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(247, 246, 242, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: var(--primary);
}

.site-footer .brand-mark {
  color: var(--brass-light);
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 3px;
}

.site-footer .brand-name {
  color: var(--ivory-ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.85rem;
  list-style: none;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary);
}

/* HERO SECTION (DARK NAVY) */
.hero-section {
  background-color: var(--navy);
  color: var(--ivory-ink);
  padding: 5rem 0 4.5rem;
  border-bottom: 1px solid rgba(168, 131, 74, 0.25);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3.5rem;
}

.hero-content {
  text-align: left;
  min-width: 0;
}

.hero-badge-wrap {
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 2.95rem;
  font-weight: 500;
  line-height: 1.12;
  color: var(--ivory-ink);
  margin-bottom: 1.35rem;
}

.hero-title .text-brass {
  font-style: italic;
  font-weight: 500;
}

.hero-subtitle {
  font-size: 1.06rem;
  color: var(--ivory-muted);
  line-height: 1.7;
  margin-bottom: 2.1rem;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--navy-border);
  background: var(--navy-elevated);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
}

/* METRICS STRIP */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--navy-elevated);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-lg);
}

.metric-item {
  text-align: left;
  padding: 1.4rem 1.5rem;
  border-right: 1px solid var(--navy-border);
}

.metric-item:last-child {
  border-right: none;
}

.metric-number {
  font-family: var(--font-serif);
  font-size: 1.95rem;
  font-weight: 600;
  color: var(--brass-light);
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ivory-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* SECTION HEADERS */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-title {
  font-size: 2.35rem;
  font-weight: 500;
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.68;
}

/* SERVICES GRID */
.services-section {
  padding: 5.5rem 0;
  background-color: var(--bg-ivory);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.service-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: var(--bg-ivory-alt);
  border-bottom: 1px solid var(--border-light);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}

.service-card:hover .card-img-wrap img {
  transform: scale(1.02);
}

.card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  background: rgba(14, 27, 44, 0.9);
  padding: 0.32rem 0.72rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ivory-ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.card-text {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.4rem;
}

.card-features {
  list-style: none;
  margin-bottom: 1.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.card-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.87rem;
  color: var(--ink);
  line-height: 1.45;
}

.card-feature-icon {
  width: 16px;
  height: 16px;
  color: var(--brass);
  flex-shrink: 0;
  margin-top: 2px;
}

.card-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary);
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.card-link:hover {
  gap: 0.6rem;
  color: var(--brass);
}

/* MATRIX SECTION */
.matrix-section {
  padding: 5.5rem 0;
  background: var(--bg-ivory-alt);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.matrix-table-wrap {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}

.matrix-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.93rem;
}

.matrix-table th,
.matrix-table td {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.matrix-table th {
  background: var(--bg-ivory);
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.matrix-table td {
  color: var(--text-secondary);
}

.matrix-table td strong {
  color: var(--ink);
  font-weight: 700;
}

.matrix-table th.col-highlight {
  background: var(--navy);
  color: var(--brass-light);
}

.matrix-table td.col-highlight {
  background: rgba(18, 48, 90, 0.035);
  font-weight: 600;
  color: var(--ink);
}

.matrix-table tr:last-child td {
  border-bottom: none;
}

/* CALCULATOR SECTION (DARK NAVY) */
.calculator-section {
  padding: 5.5rem 0;
  background-color: var(--navy);
  color: var(--ivory-ink);
}

.calculator-section .section-title {
  color: var(--ivory-ink);
}

.calculator-section .section-description {
  color: var(--ivory-muted);
}

.calc-card {
  background: var(--navy-elevated);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 920px;
  margin: 0 auto;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ivory-muted);
}

.form-select,
.form-input {
  width: 100%;
  background: var(--navy);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--ivory-ink);
  font-size: 0.94rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-select:focus,
.form-input:focus {
  border-color: var(--brass-light);
}

.calc-summary-box {
  background: rgba(243, 241, 234, 0.04);
  border: 1px solid rgba(168, 131, 74, 0.35);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.calc-metric {
  display: flex;
  flex-direction: column;
}

.calc-metric-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ivory-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.calc-metric-val {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ivory-ink);
}

.calc-metric-val.text-brass {
  color: var(--brass-light);
}

/* FAQ SECTION */
.faq-section {
  padding: 5.5rem 0;
  background: var(--bg-ivory);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1040px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  box-shadow: var(--shadow-card);
}

.faq-q {
  font-size: 1.12rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
  color: var(--ink);
  line-height: 1.3;
}

.faq-a {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* FOOTER (DARK NAVY) */
.site-footer {
  background: var(--navy);
  color: var(--ivory-muted);
  border-top: 1px solid rgba(168, 131, 74, 0.28);
  padding: 4.25rem 0 2.25rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  margin-top: 1rem;
  max-width: 390px;
  color: var(--ivory-muted);
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass-light);
  margin-bottom: 1.2rem;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--ivory-muted);
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--ivory-ink);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--navy-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ivory-muted);
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (992px, 768px, 420px)
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .hero-content {
    text-align: left;
  }
  .hero-title {
    font-size: 2.45rem;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-item:nth-child(2) {
    border-right: none;
  }
  .metric-item:nth-child(1),
  .metric-item:nth-child(2) {
    border-bottom: 1px solid var(--navy-border);
  }
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero-section {
    padding: 3.5rem 0;
  }
  .hero-title {
    font-size: 2.05rem;
  }
  .hero-subtitle {
    font-size: 0.98rem;
  }
  .section-title {
    font-size: 1.85rem;
  }
  .services-section,
  .matrix-section,
  .calculator-section,
  .faq-section {
    padding: 4rem 0;
  }
  .calc-card {
    padding: 1.75rem;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .metrics-strip {
    grid-template-columns: 1fr;
  }
  .metric-item {
    border-right: none !important;
    border-bottom: 1px solid var(--navy-border);
  }
  .metric-item:last-child {
    border-bottom: none;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .container {
    padding: 0 1rem;
  }
  .nav-container {
    height: 64px;
  }
  .brand-name {
    font-size: 1.02rem;
  }
  .brand-sub {
    font-size: 0.56rem;
    letter-spacing: 0.2em;
  }
  .nav-container .btn-sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.76rem;
  }
  .hero-title {
    font-size: 1.72rem;
  }
  .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
  }
  .nav-container .btn-sm {
    width: auto;
  }
  .card-img-wrap {
    height: 210px;
  }
  .card-body {
    padding: 1.35rem;
  }
  .calc-card {
    padding: 1.25rem;
  }
}
