/* ═══════════════════════════════════════════════════
   MERIDIAN SEARCH — Design System
   ═══════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --ink:        #1C2B3A;
  --ink-light:  #2E4057;
  --slate-mid:  #4A6274;
  --slate-dim:  #6B8499;
  --paper:      #F4F1EB;
  --paper-dark: #EDE9E1;
  --amber:      #C8821A;
  --amber-dim:  #A06815;
  --amber-glow: rgba(200,130,26,0.12);
  --rule:       rgba(28,43,58,0.10);
  --rule-light: rgba(28,43,58,0.06);
  --serif:      'DM Serif Display', Georgia, serif;
  --sans:       'DM Sans', system-ui, -apple-system, sans-serif;
  --mono:       'Courier New', Courier, monospace;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* ── LAYOUT ── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 48px;
}

.grid-label {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0 80px;
  align-items: start;
}

/* ── TYPOGRAPHY SCALE ── */
.display-xl {
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.display-lg {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: var(--ink);
}

.display-md {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.display-sm {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.body-lg {
  font-size: 19px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--slate-mid);
}

.body-md {
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--slate-mid);
}

.body-sm {
  font-size: 14px;
  line-height: 1.65;
  font-weight: 300;
  color: var(--slate-mid);
}

.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-mid);
}

.label-amber {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}

/* ── NAVIGATION ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 66px;
  display: flex;
  align-items: center;
  background: rgba(244,241,235,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: 0 2px 24px rgba(28,43,58,0.06);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.nav-logo-name {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.nav-logo-sub {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-dim);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--slate-mid);
  letter-spacing: 0.01em;
  transition: color 0.18s;
  position: relative;
}

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

.nav-links a.active { color: var(--ink); }

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--amber);
}

.nav-cta {
  background: var(--ink) !important;
  color: var(--paper) !important;
  padding: 10px 22px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.025em !important;
  transition: background 0.18s !important;
}

.nav-cta:hover { background: var(--amber) !important; }
.nav-cta.active::after { display: none !important; }

.nav-mobile-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-mobile-btn span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--amber);
  color: var(--paper);
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
}

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

.btn-primary-dark {
  display: inline-block;
  background: var(--paper);
  color: var(--ink);
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
}

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

.btn-ghost {
  display: inline-block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  border-bottom: 1px solid rgba(28,43,58,0.25);
  padding-bottom: 2px;
  letter-spacing: 0.01em;
  transition: color 0.18s, border-color 0.18s;
}

.btn-ghost:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.btn-ghost-light {
  display: inline-block;
  color: rgba(244,241,235,0.65);
  font-size: 14px;
  font-weight: 300;
  border-bottom: 1px solid rgba(244,241,235,0.2);
  padding-bottom: 2px;
  transition: color 0.18s, border-color 0.18s;
}

.btn-ghost-light:hover {
  color: var(--paper);
  border-color: rgba(244,241,235,0.6);
}

/* ── SECTIONS ── */
.section {
  padding: 100px 0;
  border-bottom: 1px solid var(--rule);
}

.section-dark {
  padding: 100px 0;
  background: var(--ink);
  color: var(--paper);
}

.section-tint {
  padding: 100px 0;
  background: var(--paper-dark);
  border-bottom: 1px solid var(--rule);
}

/* ── HERO BASE ── */
.hero {
  padding-top: 130px;
  padding-bottom: 100px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

/* ── TERMINAL ── */
.terminal {
  background: var(--ink);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.terminal-bar {
  background: var(--ink-light);
  padding: 11px 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}

.terminal-label {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.08em;
  font-family: var(--mono);
  margin-left: 10px;
}

.terminal-body {
  padding: 28px 32px 32px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(255,255,255,0.65);
}

/* ── STAT GRID ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.stat-card {
  background: var(--paper);
  padding: 40px 40px 44px;
}

.stat-card.dark {
  background: var(--ink-light);
}

.stat-num {
  font-family: var(--serif);
  font-size: 54px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.stat-num span { color: var(--amber); }

.stat-card.dark .stat-num { color: var(--paper); }

.stat-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--slate-mid);
  font-weight: 300;
  max-width: 200px;
}

.stat-card.dark .stat-desc { color: rgba(244,241,235,0.55); }

.stat-source {
  font-size: 10px;
  color: var(--slate-dim);
  margin-top: 14px;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.stat-card.dark .stat-source { color: rgba(244,241,235,0.25); }

/* ── PROCESS GRID ── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.process-card {
  background: var(--paper);
  padding: 44px 44px 48px;
}

.process-step-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 20px;
}

.process-card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  line-height: 1.25;
}

.process-card-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--slate-mid);
  font-weight: 300;
}

.process-card-price {
  margin-top: 24px;
  font-size: 13px;
  color: var(--amber);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ── SERVICE TABLE ── */
.service-table {
  border-top: 1px solid var(--rule);
}

.service-row {
  display: grid;
  grid-template-columns: 180px 1fr 160px;
  gap: 0 64px;
  align-items: start;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s;
}

.service-row:hover {
  background: var(--paper-dark);
  margin: 0 -48px;
  padding: 36px 48px;
}

.service-cat {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-dim);
  padding-top: 4px;
}

.service-name {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.service-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--slate-mid);
  font-weight: 300;
  max-width: 480px;
}

.service-tier {
  font-size: 12px;
  color: var(--slate-dim);
  text-align: right;
  padding-top: 4px;
  line-height: 1.6;
}

.tier-pip {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  margin-right: 5px;
  vertical-align: middle;
}

/* ── VERTICAL CARDS ── */
.vertical-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.vertical-card {
  padding: 60px 56px;
}

.vertical-card.dark {
  background: var(--ink);
  color: var(--paper);
}

.vertical-card.light {
  background: var(--paper);
  color: var(--ink);
}

.vertical-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 24px;
}

.vertical-title {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
}

.vertical-desc {
  font-size: 15px;
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 32px;
  max-width: 340px;
}

.vertical-card.dark .vertical-desc { color: rgba(244,241,235,0.6); }
.vertical-card.light .vertical-desc { color: var(--slate-mid); }

.signal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signal-item {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.55;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.signal-item::before {
  content: '—';
  color: var(--amber);
  flex-shrink: 0;
  font-weight: 400;
  margin-top: 1px;
}

.vertical-card.dark .signal-item { color: rgba(244,241,235,0.55); }
.vertical-card.light .signal-item { color: var(--slate-mid); }

/* ── AUDIT CARD ── */
.audit-card {
  border: 1px solid rgba(244,241,235,0.12);
  padding: 44px 40px;
  background: rgba(244,241,235,0.04);
}

.audit-price-display {
  font-family: var(--serif);
  font-size: 52px;
  color: var(--paper);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.audit-price-sub {
  font-size: 13px;
  color: rgba(244,241,235,0.35);
  font-weight: 300;
  margin-bottom: 28px;
}

.audit-includes {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 32px;
}

.audit-item {
  font-size: 13px;
  color: rgba(244,241,235,0.6);
  font-weight: 300;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}

.audit-item::before {
  content: '→';
  color: var(--amber);
  flex-shrink: 0;
  font-weight: 400;
}

.btn-audit {
  display: block;
  background: var(--amber);
  color: var(--paper);
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  transition: background 0.18s;
  width: 100%;
}

.btn-audit:hover { background: var(--amber-dim); }

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--slate-dim);
  margin-bottom: 32px;
}

.breadcrumb a { transition: color 0.15s; }
.breadcrumb a:hover { color: var(--amber); }

.breadcrumb-sep {
  opacity: 0.4;
  font-size: 10px;
}

/* ── FOOTER ── */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 72px 0 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 280px 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--paper);
  margin-bottom: 8px;
}

.footer-brand-sub {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244,241,235,0.35);
  margin-bottom: 20px;
}

.footer-brand-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(244,241,235,0.45);
  font-weight: 300;
  max-width: 220px;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244,241,235,0.35);
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(244,241,235,0.55);
  font-weight: 300;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--amber); }

.footer-bottom {
  border-top: 1px solid rgba(244,241,235,0.08);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-legal {
  font-size: 12px;
  color: rgba(244,241,235,0.25);
  font-weight: 300;
}

.footer-schema {
  display: none;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--amber);
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
  margin-left: 2px;
}

.animate-up {
  opacity: 0;
  animation: fadeUp 0.65s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ── DIVIDER ── */
.rule-amber {
  display: block;
  width: 40px;
  height: 2px;
  background: var(--amber);
  margin: 20px 0;
}

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--rule);
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 24px 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.15s;
}

.faq-q:hover { color: var(--amber); }

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  transition: transform 0.25s, opacity 0.25s;
}

.faq-icon::before {
  width: 12px; height: 1.5px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  width: 1.5px; height: 12px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s;
}

.faq-item.open .faq-a { max-height: 400px; }

.faq-a-inner {
  font-size: 15px;
  line-height: 1.75;
  color: var(--slate-mid);
  font-weight: 300;
  padding-bottom: 28px;
  max-width: 640px;
}

/* ── CASE STUDY ── */
.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.case-card {
  background: var(--paper);
  padding: 48px 48px 52px;
}

.case-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}

.case-title {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.case-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--slate-mid);
  font-weight: 300;
  margin-bottom: 28px;
}

.case-metrics {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.case-metric-num {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 4px;
}

.case-metric-num span { color: var(--amber); }

.case-metric-label {
  font-size: 12px;
  color: var(--slate-mid);
  font-weight: 300;
  line-height: 1.4;
}

/* ── CONTACT FORM ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.form-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-mid);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid rgba(28,43,58,0.18);
  font-size: 15px;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(200,130,26,0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A6274' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .nav-inner { padding: 0 32px; }
  .grid-label { grid-template-columns: 160px 1fr; gap: 0 48px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .nav-inner { padding: 0 24px; }
  .grid-label { grid-template-columns: 1fr; gap: 8px 0; }
  .process-grid { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 1fr; gap: 8px 0; }
  .service-row:hover { margin: 0; padding: 36px 0; }
  .service-tier { text-align: left; }
  .vertical-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .section-dark { padding: 72px 0; }
  .section-tint { padding: 72px 0; }
  .nav-links { display: none; }
  .nav-mobile-btn { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .vertical-card { padding: 44px 32px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 32px 28px; }
  .process-card { padding: 32px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .animate-up { animation: none; opacity: 1; }
  .cursor-blink { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ── PRINT ── */
@media print {
  .nav, footer { display: none; }
  .section { padding: 40px 0; }
  * { background: white !important; color: black !important; }
}
