/* ============================================
   MERCAN DX — Design tokens
   Palette:
     --bg        #0a0a0e  (near-black base)
     --surface   #131319  (card surface)
     --surface-2 #191922  (raised surface)
     --border    #26262f
     --red       #e11d2e  (primary accent)
     --red-dim   #7a0f18
     --text      #f3f3f6
     --muted     #93939f
   Type:
     Display/headings: 'Archivo' (geometric, technical, confident)
     Body + labels/data: 'IBM Plex Mono' for small caps/stat labels only
   ============================================ */

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

:root {
  --bg: #0a0a0e;
  --surface: #131319;
  --surface-2: #191922;
  --border: #26262f;
  --red: #e11d2e;
  --red-bright: #ff3b47;
  --red-dim: #58131a;
  --text: #f3f3f6;
  --muted: #93939f;
  --muted-2: #5c5c68;
  --radius: 4px;
  --container: 1180px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Archivo', 'Segoe UI', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.mono { font-family: 'IBM Plex Mono', monospace; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.3rem; }

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

section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 56px 0; } }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--red-bright);
  display: inline-block;
  margin-bottom: 14px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 48px;
}
.section-head p { color: var(--muted); max-width: 46ch; margin-top: 12px; }
.section-head .see-all { color: var(--red-bright); white-space: nowrap; font-weight: 600; font-size: 0.95rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-bright); }
.btn-outline { border-color: var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--muted); }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: rgba(10,10,14,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-accent { color: var(--red); }
.logo-reg { font-size: 0.5em; vertical-align: super; color: var(--red-bright); }
.logo small {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  font-weight: 500;
  margin-top: 4px;
}
.main-nav { display: flex; gap: 16px; }
.nav-link { font-size: 0.92rem; color: var(--muted); font-weight: 500; transition: color .15s ease; position: relative; white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -18px;
  height: 2px; background: var(--red);
}
.header-actions { display: flex; align-items: center; gap: 18px; }
.lang-switch { display: flex; gap: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; color: var(--muted); }
.lang-active { color: var(--text); font-weight: 600; }
.lang-sep { color: var(--border); }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); transition: transform .25s ease, opacity .2s 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); }

@media (max-width: 980px) {
  .site-header {
    z-index: 10000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #08090d;
  }

  .main-nav {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;

    width: 100%;
    height: calc(100dvh - 73px);

    z-index: 9999;

    background: #08090d;

    display: flex;
    flex-direction: column;

    padding: 20px 32px 40px;
    gap: 0;

    overflow-y: auto;
    overflow-x: hidden;

    transform: translateX(100%);
    transition: transform .3s ease;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav a {
    position: relative;
    z-index: 10000;
    display: block;
    width: 100%;
    padding: 18px 0;
    font-size: 1.05rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }

  .main-nav a.active {
    color: #ffffff;
  }

  .main-nav a.active::after {
    display: none;
  }

  .lang-switch {
    display: none;
  }

  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 10001;
  }

  .btn-sm {
    display: none;
  }
}

/* ===== Hero (globe) ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 70px;
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}
.hero-globe {
  position: absolute;
  top: 50%; right: -10%;
  width: 780px; height: 780px;
  transform: translateY(-50%);
  z-index: 1;
  opacity: 0.9;
  pointer-events: none;
}
@media (max-width: 980px) { .hero-globe { opacity: 0.18; right: -30%; } }

.hero-tag { color: var(--red-bright); font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; letter-spacing: 0.14em; margin-bottom: 18px; }
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  max-width: 12ch;
}
.hero h1 .grad { color: var(--red-bright); }
.hero p.lead { color: var(--muted); max-width: 46ch; margin: 22px 0 34px; font-size: 1.05rem; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  max-width: 720px;
}
.stat-strip .num { font-size: 2rem; font-weight: 800; color: var(--red-bright); font-family: 'IBM Plex Mono', monospace; }
.stat-strip .label { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
@media (max-width: 720px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }

/* ===== Solution / feature cards ===== */
.grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.grid-6 .card { background: var(--surface); padding: 32px 28px; transition: background .2s ease; }
.grid-6 .card:hover { background: var(--surface-2); }
@media (max-width: 900px) { .grid-6 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-6 { grid-template-columns: 1fr; } }

.card-icon {
  width: 46px; height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--red-bright);
  margin-bottom: 20px;
  font-size: 1.2rem;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.92rem; }
.card .card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 0.88rem; color: var(--red-bright); font-weight: 600; }

/* ===== Partner strip ===== */
.partner-strip {
  display: flex; align-items: center; gap: 48px;
  overflow-x: auto;
  padding: 8px 0;
}
.partner-strip .p-name {
  font-weight: 700; font-size: 1.1rem; color: var(--muted); white-space: nowrap;
  opacity: 0.75; transition: opacity .2s ease;
}
.partner-strip .p-name:hover { opacity: 1; color: var(--text); }

/* ===== Why us ===== */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.why-visual {
  aspect-ratio: 4/3.2;
  background: linear-gradient(145deg, var(--surface) 0%, #1c0507 120%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: flex; align-items: flex-end; padding: 32px;
}
.why-visual::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 75% 20%, rgba(225,29,46,0.35), transparent 55%);
}
.why-visual h3 { position: relative; font-size: 1.5rem; max-width: 10ch; }
.why-list { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.why-item .card-icon { margin-bottom: 14px; }
.why-item h4 { font-size: 1.02rem; margin-bottom: 6px; }
.why-item p { color: var(--muted); font-size: 0.88rem; }
@media (max-width: 860px) { .why-grid, .why-list { grid-template-columns: 1fr; } }

/* ===== Sectors ===== */
.sector-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.sector-card {
  aspect-ratio: 3/3.6;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%), var(--surface);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.sector-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(225,29,46,0.2), transparent 60%);
}
.sector-card span { position: relative; font-weight: 700; font-size: 0.95rem; }
.sector-card small { position: relative; color: var(--red-bright); font-size: 0.78rem; margin-top: 4px; }
@media (max-width: 900px) { .sector-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .sector-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== CTA banner ===== */
.cta-banner {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse at 20% 100%, rgba(225,29,46,0.14), transparent 60%);
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
}
.cta-banner h2 { max-width: 14ch; }
.cta-banner p { color: var(--muted); max-width: 40ch; }

/* ===== Blog / cards list ===== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.blog-thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(150deg, var(--surface-2), #1c0507);
  position: relative;
}
.blog-thumb .tag {
  position: absolute; top: 14px; left: 14px;
  background: var(--red); color: #fff;
  font-size: 0.7rem; font-weight: 700; padding: 5px 10px; border-radius: 3px;
}
.blog-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.blog-date { color: var(--muted-2); font-size: 0.78rem; font-family: 'IBM Plex Mono', monospace; margin-bottom: 10px; }
.blog-body h3 { font-size: 1.05rem; margin-bottom: 10px; }
.blog-body p { color: var(--muted); font-size: 0.88rem; flex: 1; }
.blog-body .read-more { margin-top: 16px; color: var(--red-bright); font-weight: 600; font-size: 0.88rem; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .blog-grid { grid-template-columns: 1fr; } }

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-pill {
  border: 1px solid var(--border); padding: 8px 16px; border-radius: 20px;
  font-size: 0.85rem; color: var(--muted); cursor: pointer; background: transparent;
}
.filter-pill.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ===== Page hero (inner pages) ===== */
.page-hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse at 85% 0%, rgba(225,29,46,0.16), transparent 55%);
}
.breadcrumb { color: var(--muted-2); font-size: 0.85rem; margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--red-bright); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); max-width: 20ch; }
.page-hero p.lead { color: var(--muted); max-width: 54ch; margin-top: 16px; }

/* ===== Team / values ===== */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 40px; }
.value-grid .card { background: var(--surface); padding: 30px; }
@media (max-width: 760px) { .value-grid { grid-template-columns: 1fr; } }

.quote-block {
  border-left: 3px solid var(--red);
  padding: 8px 0 8px 28px;
  font-size: 1.4rem;
  font-weight: 600;
  max-width: 40ch;
  margin: 56px 0;
}

.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.check-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.check-list li::before { content: '✓'; color: var(--red-bright); font-weight: 700; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.contact-item .card-icon { flex-shrink: 0; margin-bottom: 0; }
.contact-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-item p { color: var(--muted); font-size: 0.9rem; }

.form-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.85rem; color: var(--muted); }
.field input, .field textarea, .field select {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; color: var(--text); font-family: inherit; font-size: 0.92rem;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--red); }
.form-note { font-size: 0.8rem; color: var(--muted-2); margin-top: 14px; }
.form-alert { padding: 14px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.9rem; }
.form-alert.success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.35); color: #4ade80; }
.form-alert.error { background: rgba(225,29,46,0.1); border: 1px solid var(--red-dim); color: var(--red-bright); }

.map-block { margin-top: 60px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); padding: 64px 0 0; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.3fr 2fr 1fr; gap: 48px; padding-bottom: 48px; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin: 16px 0 20px; max-width: 32ch; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: var(--muted);
}
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col h4 { font-size: 0.85rem; margin-bottom: 16px; color: var(--muted-2); }
.footer-col a { display: block; color: var(--muted); font-size: 0.9rem; padding: 6px 0; }
.footer-col a:hover { color: var(--red-bright); }
.footer-tagline { display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-start; font-weight: 700; text-align: right; }
.footer-tagline span:first-child { color: var(--text); }
.footer-tagline span:last-child { color: var(--red-bright); }
.footer-bottom { border-top: 1px solid var(--border); padding: 22px 0; color: var(--muted-2); font-size: 0.82rem; }
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-tagline { align-items: flex-start; text-align: left; }
}

/* Utility */
.text-center { text-align: center; }
.mt-lg { margin-top: 56px; }
