/* ==========================================================================
   Merix Global — Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --navy: #0b1e3f;
  --navy-2: #122a52;
  --navy-3: #17335e;
  --navy-dark: #060f22;
  --teal: #00c2a8;
  --teal-dark: #00a893;
  --teal-light: #5eead4;
  --teal-soft: #e3faf6;

  --white: #ffffff;
  --off-white: #f6f8fb;
  --gray-100: #eef1f6;
  --gray-200: #dde3ec;
  --gray-300: #c3cbd9;
  --gray-500: #6b7690;
  --gray-600: #4d5872;
  --gray-700: #333d55;

  --text-on-navy: #cfd8ec;
  --text-on-navy-strong: #ffffff;

  --radius-xl: 64px;
  --radius-lg: 40px;
  --radius-md: 26px;
  --radius-sm: 16px;
  --radius-pill: 999px;

  --shadow-soft: 0 24px 60px -24px rgba(11, 30, 63, 0.22);
  --shadow-card: 0 14px 40px -18px rgba(11, 30, 63, 0.18);
  --shadow-teal: 0 18px 40px -16px rgba(0, 194, 168, 0.45);

  --container: 1200px;
  --pad: clamp(20px, 5vw, 64px);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--navy);
  background: var(--off-white);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--teal-soft);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.section-navy .eyebrow,
.hero .eyebrow {
  color: var(--teal-light);
  background: rgba(0, 194, 168, 0.12);
}

h1 { font-size: clamp(38px, 6vw, 72px); }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: clamp(19px, 2.4vw, 24px); }

p { color: var(--gray-600); }
.section-navy p, .hero p { color: var(--text-on-navy); }

.lead {
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 640px;
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 30px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal);
  color: var(--navy-dark);
  box-shadow: var(--shadow-teal);
}
.btn-primary:hover { background: var(--teal-light); transform: translateY(-3px); }

.btn-outline-light {
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
}
.btn-outline-light:hover { border-color: var(--white); background: rgba(255,255,255,0.08); transform: translateY(-3px); }

.btn-outline-dark {
  border-color: var(--gray-300);
  color: var(--navy);
}
.btn-outline-dark:hover { border-color: var(--navy); background: var(--navy); color: var(--white); transform: translateY(-3px); }

.btn-block { width: 100%; }

.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 36px;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header.scrolled {
  background: rgba(11, 30, 63, 0.85);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 8px 30px -14px rgba(0,0,0,0.35);
  padding: 12px 0;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 36px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px;
  border-radius: var(--radius-pill);
}
.nav-links a {
  color: var(--text-on-navy);
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-links a.active { color: var(--navy-dark); background: var(--teal); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px;
  z-index: 1100;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--white); border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--navy-dark);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  padding: 14px 0;
}
.mobile-menu a.active { color: var(--teal); }
.mobile-menu .btn { margin-top: 24px; }

body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(120% 140% at 15% 0%, var(--navy-3) 0%, var(--navy) 45%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 200px 0 140px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  overflow: hidden;
  isolation: isolate;
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
}
.hero::before {
  width: 420px; height: 420px;
  background: rgba(0, 194, 168, 0.35);
  top: -140px; right: -100px;
}
.hero::after {
  width: 320px; height: 320px;
  background: rgba(0, 194, 168, 0.18);
  bottom: -160px; left: 8%;
}
.hero-inner { max-width: 760px; }
.hero h1 { color: var(--white); }
.hero .lead { margin-top: 22px; max-width: 620px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 28px;
  margin-top: 72px;
  max-width: 820px;
}
.hero-stats .stat-num {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: var(--teal-light);
}
.hero-stats .stat-label {
  font-size: 13.5px;
  color: var(--text-on-navy);
  margin-top: 4px;
}

/* Page hero (shorter, used on inner pages) */
.page-hero {
  position: relative;
  background: radial-gradient(120% 160% at 85% 0%, var(--navy-3) 0%, var(--navy) 45%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 180px 0 110px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: '';
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: rgba(0, 194, 168, 0.3);
  filter: blur(100px);
  top: -120px; left: -80px;
  z-index: -1;
}
.page-hero h1 { color: var(--white); max-width: 780px; }
.page-hero .lead { margin-top: 18px; max-width: 620px; }

/* ---------- Sections ---------- */
section { position: relative; }
.section-pad { padding: 110px 0; }
.section-light { background: var(--off-white); }
.section-white { background: var(--white); }
.section-navy {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-xl);
  margin: 0 var(--pad);
}
.section-navy .container { max-width: calc(var(--container) - 0px); padding: 0 clamp(20px, 4vw, 48px); }

/* ---------- Cards & Grids ---------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 38px 32px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--gray-100);
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-soft); }

.icon-badge {
  width: 56px; height: 56px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: var(--white);
  font-size: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-teal);
}
.card h3 { margin-bottom: 12px; }
.card p { font-size: 15px; }

.card-dark {
  background: var(--navy-2);
  border: 1px solid rgba(255,255,255,0.06);
}
.card-dark p { color: var(--text-on-navy); }
.card-dark .icon-badge { background: rgba(0,194,168,0.15); color: var(--teal-light); box-shadow: none; }

/* Service card w/ number */
.service-card { position: relative; }
.service-card .index {
  position: absolute;
  top: 30px; right: 32px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-300);
}

/* ---------- Positioning / Split ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.split-reverse .split { grid-template-columns: 0.9fr 1.1fr; }

.stat-block {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.stat-row { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--gray-100); padding-bottom: 20px; }
.stat-row:last-child { border-bottom: none; padding-bottom: 0; }
.stat-row .num { font-size: 30px; font-weight: 800; color: var(--navy); }
.stat-row .label { font-size: 14px; color: var(--gray-500); max-width: 160px; text-align: right; }

/* ---------- Numbered Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 26px;
}
.step .step-num {
  width: 48px; height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: var(--navy-dark);
  font-weight: 800;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-teal);
}
.step h3 { margin-bottom: 10px; font-size: 18px; }
.step p { font-size: 14.5px; }

/* ---------- Team ---------- */
.team-card { text-align: left; }
.avatar {
  width: 84px; height: 84px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 120%);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 24px;
}

.avatar-photo {
  width: 84px; height: 84px;
  border-radius: 22px;
  object-fit: cover;
  object-position: top center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-100);
}
.team-card .role {
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  display: block;
}
.team-card p { font-size: 14.5px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 8px 0;
}
.section-navy .faq-item { border-color: rgba(255,255,255,0.12); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4px;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  color: inherit;
}
.faq-q .plus {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.section-navy .faq-q .plus { border-color: rgba(255,255,255,0.3); }
.faq-q .plus::before, .faq-q .plus::after {
  content: '';
  position: absolute;
  background: currentColor;
}
.faq-q .plus::before { width: 12px; height: 1.6px; }
.faq-q .plus::after { width: 1.6px; height: 12px; transition: transform 0.3s ease; }
.faq-item.open .faq-q .plus { background: var(--teal); border-color: var(--teal); color: var(--navy-dark); }
.faq-item.open .faq-q .plus::after { transform: scaleY(0); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease;
  opacity: 0;
}
.faq-item.open .faq-a { opacity: 1; }
.faq-a p { padding: 0 4px 24px; font-size: 15px; max-width: 680px; }

/* ---------- Callout ---------- */
.callout {
  border-radius: var(--radius-md);
  padding: 44px;
  background: linear-gradient(135deg, var(--teal-soft) 0%, #ffffff 100%);
  border: 1px solid rgba(0,194,168,0.25);
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.callout h3 { max-width: 520px; }
.callout p { max-width: 520px; }

/* ---------- Roles / Filter ---------- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 44px;
}
.filter-pill {
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-600);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.filter-pill.active, .filter-pill:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }

.role-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px 32px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.role-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.role-card .role-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.role-tag {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--teal-soft);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
}

/* ---------- Value list (about) ---------- */
.value-row {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--gray-200);
}
.value-row:first-child { padding-top: 0; }
.value-row .value-num {
  font-size: 15px;
  font-weight: 800;
  color: var(--teal-dark);
  min-width: 46px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gray-700);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 15px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-family: inherit;
  font-size: 15px;
  color: var(--navy);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0,194,168,0.15);
}
.field textarea { resize: vertical; min-height: 130px; }

.contact-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 40px;
}
.contact-card .contact-item { margin-bottom: 28px; }
.contact-card .contact-item h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal-light); margin-bottom: 8px; }
.contact-card .contact-item a, .contact-card .contact-item p { color: var(--text-on-navy-strong); font-size: 16px; }
.contact-card hr { border: none; border-top: 1px solid rgba(255,255,255,0.12); margin: 28px 0; }

.form-note {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--gray-500);
}
.form-success {
  display: none;
  background: var(--teal-soft);
  color: var(--teal-dark);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-weight: 600;
  font-size: 14.5px;
  margin-top: 20px;
}
.form-success.show { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: var(--text-on-navy);
  padding: 90px 0 30px;
  margin-top: -1px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .brand { margin-bottom: 20px; }
.footer-brand p { max-width: 320px; font-size: 14.5px; }
.footer-col h4 {
  color: var(--white);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 22px;
}
.footer-col li { margin-bottom: 14px; font-size: 14.5px; }
.footer-col a:hover { color: var(--teal-light); }
.footer-col .addr { font-size: 14.5px; margin-bottom: 22px; }
.footer-col .addr strong { display: block; color: var(--white); margin-bottom: 4px; font-size: 14.5px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 13.5px;
  color: var(--gray-500);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }

/* ---------- Misc ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--gray-100);
  color: var(--gray-600);
}
.section-navy .tag { background: rgba(255,255,255,0.08); color: var(--text-on-navy); }

.divider-space { height: 1px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split, .split-reverse .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .header-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero, .page-hero { padding-top: 150px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  .section-navy { margin: 0 12px; border-radius: var(--radius-lg); }
  .footer-grid { grid-template-columns: 1fr; gap: 44px; }
  .callout { flex-direction: column; align-items: flex-start; }
  .role-card { flex-direction: column; align-items: flex-start; }
  .section-pad { padding: 72px 0; }
}
