/* El ancho declarado incluye padding y borde. Sin esto, cualquier campo con
   width:100% y padding se desborda de su contenedor en pantallas angostas. */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --mkm-black: #0a0a0a;
  --mkm-white: #ffffff;
  --mkm-gray-50: #f7f7f8;
  --mkm-gray-100: #ececee;
  --mkm-gray-200: #d4d4d8;
  --mkm-gray-500: #71717a;
  --mkm-gray-700: #3f3f46;
  --mkm-gray-900: #18181b;
  --mkm-accent: #1e4e8c;        /* textos, kickers, bordes */
  --mkm-accent-hover: #163c6b;
  --mkm-cta: #1a5fb4;           /* boton primario: mas presencia */
  --mkm-cta-hover: #154c91;
  --mkm-steel: #e8eaf0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--mkm-gray-900);
  background: var(--mkm-white);
  -webkit-font-smoothing: antialiased;
}

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

.container-mkm { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* MKM Logo */
.logo-mkm { display: inline-flex; align-items: center; text-decoration: none; }
.logo-mkm img { display: block; height: 40px; width: auto; }
.logo-mkm.footer-size img { height: 52px; }

/* Navbar */
.nav-mkm {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mkm-gray-100);
}
.nav-mkm a.nav-link {
  color: var(--mkm-gray-700);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color .2s;
}
.nav-mkm a.nav-link:hover { color: var(--mkm-black); }
.nav-mkm a.nav-link.active { color: var(--mkm-black); }
.nav-mkm a.nav-link.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 3px; background: var(--mkm-accent);
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; font-weight: 700; font-size: 0.95rem; border-radius: 2px; transition: all .2s; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--mkm-cta); color: #fff; }
.btn-primary:hover { background: var(--mkm-cta-hover); transform: translateY(-1px); }
.btn-dark { background: var(--mkm-black); color: #fff; }
.btn-dark:hover { background: var(--mkm-gray-900); }
.btn-outline { background: transparent; color: var(--mkm-black); border: 2px solid var(--mkm-black); }
.btn-outline:hover { background: var(--mkm-black); color: #fff; }
.btn-outline-white { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-outline-white:hover { background: #fff; color: var(--mkm-black); }

/* Eslogan de marca en el hero */
.hero-slogan {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8ab4f0;
  line-height: 1.5;
}
.hero-slogan::after {
  content: '';
  display: block;
  width: 48px; height: 2px;
  background: #8ab4f0;
  margin-top: 0.9rem;
  opacity: 0.6;
}
@media (max-width: 600px) {
  .hero-slogan { font-size: 0.68rem; letter-spacing: 0.18em; }
}

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 70%);
}
.hero-content { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.05; font-weight: 900; letter-spacing: -0.03em; }
.hero .lead { font-size: clamp(1.1rem, 2vw, 1.375rem); color: rgba(255,255,255,0.82); line-height: 1.5; max-width: 640px; }
.hero .badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.8rem; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.9); border-radius: 2px; }

/* Sections */
.section { padding: 5rem 0; }
.section-gray { background: var(--mkm-gray-50); }
.section-dark { background: var(--mkm-black); color: #fff; }

.kicker { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--mkm-accent); margin-bottom: 0.75rem; }
.section-dark .kicker { color: #8ab4f0; }
.section-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
.section-lead { font-size: 1.125rem; color: var(--mkm-gray-500); max-width: 700px; line-height: 1.6; }
.section-dark .section-lead { color: rgba(255,255,255,0.75); }

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--mkm-gray-100);
  padding: 2rem;
  transition: all .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); border-color: var(--mkm-gray-200); }
.card .icon-box {
  width: 48px; height: 48px; background: var(--mkm-black); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.card p { color: var(--mkm-gray-500); font-size: 0.95rem; line-height: 1.6; }

/* Stats */
.stat {
  padding: 2rem 1rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.stat:last-child { border-right: 0; }
.stat .num { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 900; line-height: 1; color: #fff; }
.stat .num-accent { color: #8ab4f0; }
.stat .label { margin-top: 0.5rem; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.7); }

@media (max-width: 768px) {
  .stat { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 1.5rem; }
  .stat:last-child { border-bottom: 0; }
}

/* Process cards */
.process-card {
  background: #fff;
  border: 1px solid var(--mkm-gray-100);
  padding: 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all .25s;
}
.process-card:hover { border-color: var(--mkm-accent); box-shadow: 0 8px 24px rgba(30,78,140,0.08); }
.process-card .tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mkm-accent); margin-bottom: 0.5rem; }
.process-card h3 { font-size: 1.125rem; margin-bottom: 0.75rem; }
.process-card .spec { font-size: 0.9rem; color: var(--mkm-gray-700); line-height: 1.6; }
.process-card .placeholder-img {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #e8eaf0 0%, #c9cfd9 100%);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--mkm-gray-500);
  position: relative;
  overflow: hidden;
}
.process-card .placeholder-img::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(45deg, rgba(255,255,255,0.3) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.3) 75%, transparent 75%);
  background-size: 20px 20px;
  opacity: 0.4;
}

/* Industries */
.industry {
  background: #fff;
  border: 1px solid var(--mkm-gray-100);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all .25s;
}
.industry:hover { border-color: var(--mkm-black); transform: translateY(-3px); }
.industry .icon {
  width: 56px; height: 56px; margin: 0 auto 1rem;
  background: var(--mkm-black); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.industry h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.industry p { font-size: 0.85rem; color: var(--mkm-gray-500); }

/* Clients grid */
.client-logo {
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; background: #fff; border: 1px solid var(--mkm-gray-100);
  min-height: 100px;
  font-weight: 800; color: var(--mkm-gray-500); font-size: 0.95rem;
  text-align: center;
  transition: all .25s;
}
.client-logo img {
  max-height: 50px; max-width: 140px; width: auto; height: auto;
  filter: grayscale(1) opacity(0.7);
  transition: filter .25s;
}
.client-logo:hover img { filter: grayscale(0) opacity(1); }
.client-logo:hover { color: var(--mkm-black); border-color: var(--mkm-gray-500); }

/* Integración Vertical Diagram */
.vi-diagram-wrap {
  margin-top: 2rem;
  position: relative;
}
.vi-diagram {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: #8ab4f0 rgba(255,255,255,0.08);
  scrollbar-width: thin;
}
.vi-diagram::-webkit-scrollbar { height: 8px; }
.vi-diagram::-webkit-scrollbar-track { background: rgba(255,255,255,0.08); }
.vi-diagram::-webkit-scrollbar-thumb { background: #8ab4f0; border-radius: 4px; }

.vi-step {
  background: #fff;
  border: 2px solid var(--mkm-gray-100);
  padding: 1.25rem 0.75rem;
  text-align: center;
  position: relative;
  transition: all .25s;
  flex: 0 0 140px;
  min-width: 140px;
}
.vi-step::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -24px;
  width: 22px; height: 3px;
  background: #8ab4f0;
  z-index: 1;
  transform: translateY(-50%);
}
.vi-step::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -16px;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 12px solid #8ab4f0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  z-index: 2;
}
.vi-step:last-child::after,
.vi-step:last-child::before { display: none; }
.vi-step:hover { border-color: var(--mkm-accent); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(30,78,140,0.18); }
.vi-step .vi-num { font-size: 0.7rem; font-weight: 700; color: var(--mkm-accent); letter-spacing: 0.1em; margin-bottom: 0.4rem; }
.vi-step .vi-icon { color: var(--mkm-black); display: flex; justify-content: center; margin-bottom: 0.5rem; }
.vi-step .vi-label { font-size: 0.82rem; font-weight: 700; color: var(--mkm-gray-900); line-height: 1.25; }
.vi-step .vi-sub { font-size: 0.7rem; color: var(--mkm-gray-500); margin-top: 0.2rem; }
.vi-step.vi-accent { background: var(--mkm-black); border-color: var(--mkm-black); }
.vi-step.vi-accent .vi-num { color: #8ab4f0; }
.vi-step.vi-accent .vi-icon { color: #fff; }
.vi-step.vi-accent .vi-label { color: #fff; }
.vi-step.vi-accent .vi-sub { color: rgba(255,255,255,0.7); }

.vi-scroll-hint {
  display: none;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
  margin-top: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (max-width: 1100px) {
  .vi-scroll-hint { display: block; }
}

.vi-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.vi-summary-item {
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.05);
  border-left: 3px solid #8ab4f0;
}
.vi-summary-item .vi-s-num { font-size: 1.5rem; font-weight: 900; color: #8ab4f0; line-height: 1; }
.vi-summary-item .vi-s-label { font-size: 0.8rem; color: rgba(255,255,255,0.75); margin-top: 0.3rem; }

/* Social links */
.social-links {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.social-links a {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85);
  transition: all .2s;
  text-decoration: none;
}
.social-links a:hover {
  background: var(--mkm-accent);
  border-color: var(--mkm-accent);
  color: #fff;
  transform: translateY(-2px);
}

/* Footer */
.footer { background: var(--mkm-black); color: #fff; padding: 4rem 0 2rem; }
.footer a { color: rgba(255,255,255,0.75); text-decoration: none; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer h4 { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 1rem; color: #fff; }
.footer .footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 3rem; padding-top: 2rem; color: rgba(255,255,255,0.5); font-size: 0.85rem; }

/* Contact form */
.form-field { margin-bottom: 1.25rem; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--mkm-gray-700); }
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%; padding: 0.75rem 1rem;
  border: 1px solid var(--mkm-gray-200);
  background: #fff; font-family: inherit; font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--mkm-accent);
  box-shadow: 0 0 0 3px rgba(30,78,140,0.12);
}

/* Campo de archivo y avisos del formulario */
.form-field .field-hint { font-weight: 500; color: var(--mkm-gray-500); }
.form-field .field-note { font-size: 0.78rem; color: var(--mkm-gray-500); margin: 0.45rem 0 0; line-height: 1.5; }

.file-field input[type="file"] {
  padding: 0; border: 0; width: 100%; max-width: 100%;
  font-size: 0.88rem; color: var(--mkm-gray-700);
}
.file-field input[type="file"]::file-selector-button {
  font-family: inherit; font-size: 0.85rem; font-weight: 600;
  padding: 0.7rem 1.1rem; margin-right: 0.9rem;
  border: 1px solid var(--mkm-gray-200);
  background: var(--mkm-gray-50); color: var(--mkm-gray-700);
  cursor: pointer; transition: border-color .2s, color .2s, background .2s;
}
.file-field input[type="file"]::file-selector-button:hover {
  border-color: var(--mkm-accent); color: var(--mkm-accent); background: #fff;
}
.file-field input[type="file"]:focus { outline: none; box-shadow: none; }
.file-field input[type="file"]:focus-visible::file-selector-button {
  border-color: var(--mkm-accent); box-shadow: 0 0 0 3px rgba(30,78,140,0.12);
}

.form-status {
  margin-top: 1rem; padding: 0.9rem 1.1rem;
  font-size: 0.9rem; font-weight: 600; line-height: 1.5;
  border-left: 3px solid;
}
.form-status.is-sending { background: var(--mkm-gray-50); border-color: var(--mkm-gray-200); color: var(--mkm-gray-700); }
.form-status.is-ok      { background: #ecf4ec; border-color: #2e7d32; color: #1b5e20; }
.form-status.is-error   { background: #fdeceb; border-color: #c62828; color: #8e1b14; }

.btn[disabled] { opacity: .6; cursor: not-allowed; pointer-events: none; }

@media (max-width: 480px) {
  .file-field input[type="file"] { font-size: 0.8rem; }
  .file-field input[type="file"]::file-selector-button { padding: 0.6rem 0.85rem; margin-right: 0.6rem; }
}

/* Mobile nav */
.mobile-menu { display: none; }
.mobile-menu.open { display: block; }

/* Page hero (inner pages) */
.page-hero {
  background: var(--mkm-black);
  color: #fff;
  padding: 5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0.2));
}
.page-hero-content { position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-hero .breadcrumb { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 1rem; letter-spacing: 0.05em; }
.page-hero .breadcrumb a { color: rgba(255,255,255,0.8); text-decoration: none; }
.page-hero .breadcrumb a:hover { color: #fff; }

/* ============================================ */
/* RESPONSIVE — Tablet / Mobile / Small mobile  */
/* ============================================ */

/* Tablet & below (≤900px) */
@media (max-width: 900px) {
  .container-mkm { padding: 0 1.25rem; }
  .section { padding: 3.5rem 0; }
  .hero { padding: 0 !important; }
  .hero .container-mkm { padding-top: 4rem !important; padding-bottom: 4rem !important; }
  .page-hero { padding: 3.5rem 0 2.5rem; }
}

/* Mobile (≤720px) */
@media (max-width: 720px) {
  .container-mkm { padding: 0 1rem; }
  .section { padding: 3rem 0; }
  .hero .container-mkm { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
  .page-hero { padding: 3rem 0 2rem; }

  /* Cards más compactas */
  .card { padding: 1.5rem; }

  /* Section titles */
  .section-title { font-size: 1.5rem; line-height: 1.2; }
  .section-lead { font-size: 1rem; }

  /* Hero */
  .hero h1 { font-size: 2rem; line-height: 1.1; }
  .hero .lead { font-size: 1rem; }
  .hero .badge { font-size: 0.7rem; padding: 0.35rem 0.65rem; }

  /* Page hero */
  .page-hero h1 { font-size: 1.85rem; }
  .page-hero .lead { font-size: 1rem !important; }

  /* Logo nav más pequeño */
  .logo-mkm img { height: 32px; }
  .logo-mkm.footer-size img { height: 44px; }

  /* TOC pills más chicas */
  .toc { gap: 0.4rem; }
  .toc a { font-size: 0.75rem; padding: 0.4rem 0.7rem; }

  /* Stats */
  .stat .num { font-size: 2.25rem; }
  .stat .label { font-size: 0.75rem; }

  /* Buttons full-width en mobile cuando están en CTA stack */
  .hero .btn,
  .section-dark .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  /* Industry icons */
  .industry { padding: 1.5rem 1rem; }
  .industry .icon { width: 48px; height: 48px; margin-bottom: 0.75rem; }
  .industry h3 { font-size: 0.9rem; }

  /* Process sections */
  .proc-section { padding: 3rem 0; }
  .proc-num { font-size: 2.25rem; }
  .proc-svg-icon { width: 52px; height: 52px; }
  .proc-svg-icon svg { width: 28px; height: 28px; }

  /* Spec items */
  .spec-item { padding: 1.25rem; }

  /* Contact info card */
  .contact-info-card { padding: 1rem; }

  /* Footer */
  .footer { padding: 3rem 0 1.5rem; }
  .footer h4 { margin-bottom: 0.75rem; }

  /* Map iframe */
  iframe[title="Ubicación Maken Metal"] { height: 320px !important; }

  /* Mobile menu mejor presentación */
  [data-mobile-menu] .nav-link {
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
  }

  /* Form fields padding más compacto */
  .form-field { margin-bottom: 1rem; }
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
  .container-mkm { padding: 0 0.85rem; }

  /* Hero más compacto */
  .hero .container-mkm { padding-top: 3rem !important; padding-bottom: 3rem !important; }
  .hero h1 { font-size: 1.75rem; }
  .hero .lead { font-size: 0.95rem; }

  /* Page hero */
  .page-hero h1 { font-size: 1.6rem; }
  .page-hero { padding: 2.5rem 0 1.75rem; }

  /* Section titles */
  .section-title { font-size: 1.35rem; }

  /* Stats: stack más limpio */
  .stat { padding: 1.25rem 1rem; }
  .stat .num { font-size: 2rem; }

  /* Card padding más chico */
  .card { padding: 1.25rem; }

  /* Process headers se apilan */
  .proc-header { gap: 0.75rem; }
  .proc-num { font-size: 1.85rem; }

  /* Buttons stack vertical */
  .hero > div > div > div[style*="flex"][style*="gap"] { flex-direction: column; }
  .hero > div > div > div[style*="flex"][style*="gap"] .btn { width: 100%; }

  /* Footer columns */
  .footer h4 { font-size: 0.75rem; }
  .footer .footer-bottom { flex-direction: column; gap: 0.5rem !important; text-align: center; }

  /* Social links */
  .social-links a { width: 36px; height: 36px; }
  .social-links a svg { width: 18px; height: 18px; }

  /* Misión/Visión/Política cards */
  div[style*="border-left:4px solid"] { padding: 1.75rem !important; }
}

/* ============================================ */
/* TIMELINE EDITORIAL — Integración Vertical    */
/* ============================================ */
.timeline-section {
  background: var(--mkm-gray-50);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.timeline-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: var(--mkm-gray-100);
}
.timeline-section .ts-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 1.5rem;
}
.timeline-section .ts-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2.5rem auto 0;
  max-width: 920px;
}
.ts-stat {
  background: #fff;
  border: 1px solid var(--mkm-gray-100);
  padding: 1.25rem 1.5rem;
  text-align: center;
  transition: all .2s;
}
.ts-stat:hover { border-color: var(--mkm-accent); transform: translateY(-2px); }
.ts-stat .num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--mkm-accent);
  line-height: 1;
}
.ts-stat .label {
  font-size: 0.72rem;
  color: var(--mkm-gray-700);
  margin-top: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Timeline core */
.timeline {
  position: relative;
  max-width: 1080px;
  margin: 4rem auto 0;
  padding: 1rem 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg,
    var(--mkm-accent) 0%,
    var(--mkm-accent) 90%,
    rgba(30,78,140,0.3) 100%);
  transform: translateX(-50%);
  z-index: 0;
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 1.25rem;
  align-items: start;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 0.75rem;
  transform: translateX(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--mkm-black);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
  z-index: 2;
  border: 3px solid var(--mkm-gray-50);
  box-shadow: 0 0 0 2px var(--mkm-accent);
  transition: all .25s;
}
.timeline-item:hover .timeline-marker {
  background: var(--mkm-accent);
  transform: translateX(-50%) scale(1.05);
}

.timeline-card {
  background: #fff;
  border: 1px solid var(--mkm-gray-100);
  padding: 1rem 1.25rem;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: all .25s;
  display: block;
  max-width: 340px;
}
.timeline-card::after {
  /* Arrow tip pointing toward center line */
  content: '';
  position: absolute;
  top: 20px;
  width: 12px; height: 12px;
  background: #fff;
  border: 1px solid var(--mkm-gray-100);
  transform: rotate(45deg);
}
.timeline-card:hover {
  border-color: var(--mkm-accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(30,78,140,0.12);
}
.timeline-card:hover::after { border-color: var(--mkm-accent); }

.timeline-item.left .timeline-card {
  grid-column: 1;
  justify-self: end;
  text-align: right;
}
.timeline-item.left .timeline-card::after {
  right: -7px;
  border-left: 0; border-bottom: 0;
}
.timeline-item.right .timeline-card {
  grid-column: 2;
  justify-self: start;
  text-align: left;
}
.timeline-item.right .timeline-card::after {
  left: -7px;
  border-right: 0; border-top: 0;
}

.tc-icon {
  width: 34px; height: 34px;
  background: var(--mkm-black);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  transition: background .25s;
}
.tc-icon svg { width: 18px; height: 18px; }
.timeline-card:hover .tc-icon { background: var(--mkm-accent); }
.timeline-item.left .tc-icon { margin-left: auto; }

.timeline-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
  color: var(--mkm-gray-900);
}
.timeline-card .tc-desc {
  color: var(--mkm-gray-700);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 0.5rem;
}
.tc-specs {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  color: var(--mkm-gray-700);
}
.tc-specs li {
  padding: 0.45rem 0;
  border-top: 1px solid var(--mkm-gray-100);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tc-specs li:first-child { border-top: 0; padding-top: 0.25rem; }
.timeline-item.left .tc-specs li {
  flex-direction: row-reverse;
}
.tc-specs li::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--mkm-accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.tc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--mkm-accent);
  font-weight: 700;
  font-size: 0.72rem;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.timeline-card:hover .tc-link { color: var(--mkm-accent-hover); }

/* Endpoints (start/end of timeline) */
.timeline-endpoint {
  position: relative;
  text-align: center;
  z-index: 3;
  padding: 0;
}
.timeline-endpoint .te-circle {
  width: 64px; height: 64px;
  background: var(--mkm-accent);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border: 5px solid var(--mkm-gray-50);
  box-shadow: 0 0 0 3px var(--mkm-accent);
  position: relative;
}
.timeline-endpoint .te-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--mkm-gray-700);
  margin-top: 0.85rem;
  text-transform: uppercase;
}
.timeline-endpoint .te-sub {
  font-size: 0.85rem;
  color: var(--mkm-gray-500);
  margin-top: 0.25rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.timeline-endpoint.start { margin-bottom: 1.5rem; }
.timeline-endpoint.end { margin-top: 1.5rem; }

/* Mobile timeline (single column) */
@media (max-width: 900px) {
  .timeline { padding: 1rem 0; max-width: 100%; }
  .timeline::before { left: 28px; }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 70px;
    margin-bottom: 1.75rem;
    min-height: auto;
  }
  .timeline-item.left .timeline-card,
  .timeline-item.right .timeline-card {
    grid-column: 1;
    text-align: left;
  }
  .timeline-item.left .timeline-card::after {
    left: -8px; right: auto;
    border: 1px solid var(--mkm-gray-100);
    border-right: 0; border-top: 0;
  }
  .timeline-item.left .tc-icon { margin-left: 0; }
  .timeline-item.left .tc-specs li { flex-direction: row; }
  .timeline-marker {
    left: 28px;
    width: 44px; height: 44px;
    font-size: 0.8rem;
    border-width: 3px;
    box-shadow: 0 0 0 2px var(--mkm-accent);
  }
  .timeline-item:hover .timeline-marker { transform: translateX(-50%) scale(1); }
  .timeline-card { padding: 1.25rem 1.4rem; }

  .timeline-endpoint { text-align: left; padding-left: 0; }
  .timeline-endpoint .te-circle {
    width: 50px; height: 50px;
    margin-left: 3px;
    border-width: 4px;
  }
  .timeline-endpoint .te-text {
    display: inline-block;
    margin-left: 1.25rem;
    vertical-align: middle;
    text-align: left;
  }
  .timeline-endpoint .te-label,
  .timeline-endpoint .te-sub {
    margin-top: 0;
  }
  .timeline-endpoint .te-label { display: block; }
  .timeline-endpoint .te-sub { display: block; }
}

@media (max-width: 480px) {
  .timeline-card h3 { font-size: 1.1rem; }
  .timeline-card .tc-desc { font-size: 0.9rem; }
  .tc-specs { font-size: 0.8rem; }
  .timeline-section { padding: 3.5rem 0; }
  .ts-stat .num { font-size: 1.65rem; }
  .ts-stat .label { font-size: 0.65rem; }
}
