/* ============================================================
   KOBRA — Estilos compartidos
   Colores: Naranja #F23827, Negro #3F3F3E, Blanco #D4D8DA
   Tipografía: Archivo (títulos) + Source Sans 3 (cuerpo)
   ============================================================ */

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* VARIABLES */
:root {
  /* Brand */
  --kobra-naranja: #F23827;
  --kobra-naranja-dark: #c92d1e;
  --kobra-negro: #3F3F3E;
  --kobra-blanco: #D4D8DA;

  /* UI */
  --ink: #0e0e0e;
  --ink-soft: #1a1a1a;
  --ink-mid: #272726;
  --accent: var(--kobra-naranja);
  --accent-hover: var(--kobra-naranja-dark);
  --paper: #f0edea;
  --text-primary: var(--kobra-blanco);
  --text-muted: #8a8886;
  --text-warm: #b5b1ac;
  --border: rgba(255,255,255,0.07);

  /* Tipografía */
  --font-display: 'Archivo', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;

  /* Espaciado */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;
  --max-width: 1200px;
  --radius: 6px;
}

/* BASE */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* LAYOUT */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* SECTION HEADINGS */
.section-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  color: var(--paper);
  margin-bottom: var(--space-md);
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.6;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.75rem 0;
  transition: background 0.3s;
}
.nav.scrolled {
  background: rgba(14,14,14,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img { height: 30px; width: auto; }
.nav-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--paper); }
.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--accent-hover) !important; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--paper);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--paper); border: 1.5px solid rgba(255,255,255,0.15); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1fb855; transform: translateY(-1px); }
.wa-icon { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }


/* ============================================================
   HERO — VIDEO INTRO
   ============================================================ */
.hero-intro {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: clamp(380px, 65vh, 680px);
}

.hero-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-intro::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to bottom, transparent, var(--ink));
  pointer-events: none;
  z-index: 2;
}

.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}

/* Tablet */
@media (max-width: 1080px) {
  .hero-intro {
    height: clamp(300px, 55vh, 500px);
  }
}

/* Móvil — casi pantalla completa, logo centrado */
@media (max-width: 640px) {
  .hero-intro {
    height: 60svh;   /* casi toda la pantalla */
  }
  .hero-video {
    height: 100%;    /* llena el contenedor, object-fit centra el logo */
  }
}

/* ============================================================
   HERO-PUSH — Espaciador igual al alto del video
   Empuja el hero content para que quede debajo del video
   ============================================================ */
.hero-push {
  display: block;
  height: clamp(1px, 65vh, 1px);
}
@media (max-width: 640px) {
  .hero-push {
    height: 1px; /* 9/16 × 100vw = proporción exacta 16:9 */
  }
}

/* ============================================================
   HERO — Contenido (Querétaro, h1, párrafo, botones)
   ============================================================ */
.hero {
  padding-top: var(--space-sm);
  padding: var(--space-xl) 0;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}
/* Grid pattern decorativo */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(242,56,39,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242,56,39,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
/* Glow naranja */
.hero::after {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 50%; height: 70%;
  background: radial-gradient(ellipse, rgba(242,56,39,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before { content: ''; width: 2rem; height: 2px; background: var(--accent); }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  color: var(--paper);
  margin-bottom: var(--space-md);
  max-width: 720px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-warm);
  max-width: 540px;
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }


/* ============================================================
   PROBLEM CARDS (BIM, DRO, etc.)
   ============================================================ */
.problem { padding: var(--space-xl) 0; border-top: 1px solid var(--border); }
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.problem-card {
  background: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: border-color 0.3s;
}
.problem-card:hover { border-color: rgba(242,56,39,0.25); }
.problem-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  width: 48px; height: 48px;
  background: rgba(242,56,39,0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.problem-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--paper);
  margin-bottom: 0.5rem;
}
.problem-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   SERVICE ITEMS (alternating image/text)
   ============================================================ */
.services { padding: var(--space-xl) 0; border-top: 1px solid var(--border); }
.service-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.service-item:last-child { border-bottom: none; }
.service-item.reverse { direction: rtl; }
.service-item.reverse > * { direction: ltr; }
.service-number {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 4rem;
  color: rgba(242,56,39,0.12);
  line-height: 1;
  margin-bottom: var(--space-xs);
}
.service-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  color: var(--paper);
  margin-bottom: var(--space-sm);
}
.service-desc { color: var(--text-muted); margin-bottom: var(--space-md); line-height: 1.7; }
.service-features { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.service-tag {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  background: rgba(242,56,39,0.08);
  color: var(--accent);
  border-radius: 100px;
  border: 1px solid rgba(242,56,39,0.18);
}
.service-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--ink-mid);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.service-image img { width: 100%; height: 100%; object-fit: cover; }
.service-image .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--ink-mid) 0%, var(--ink-soft) 100%);
}

/* ============================================================
   PROJECTS / PORTFOLIO
   ============================================================ */
.projects { padding: var(--space-xl) 0; border-top: 1px solid var(--border); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--ink-mid);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.3s;
}
.project-card:hover { transform: translateY(-4px); }
.project-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.project-card:hover img { transform: scale(1.04); }
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14,14,14,0.9) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-md);
}
.project-type {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.project-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--paper);
}
.project-location { font-size: 0.85rem; color: var(--text-muted); }

/* ============================================================
   PROCESS STEPS
   ============================================================ */
.process { padding: var(--space-xl) 0; border-top: 1px solid var(--border); }
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: var(--space-lg);
  border-radius: var(--radius);
  overflow: hidden;
}
.step { background: var(--ink-soft); padding: var(--space-md); }
.step-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.5rem;
  color: rgba(242,56,39,0.15);
  line-height: 1;
  margin-bottom: var(--space-sm);
}
.step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--paper);
  margin-bottom: 0.5rem;
}
.step p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; }

/* ============================================================
   WHY KOBRA / DIFFERENTIATOR
   ============================================================ */
.why { padding: var(--space-xl) 0; border-top: 1px solid var(--border); }
.why-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-top: var(--space-lg);
}
.why-text p { color: var(--text-warm); margin-bottom: var(--space-md); line-height: 1.75; }
.why-text p strong { color: var(--paper); font-weight: 500; }
.why-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.stat {
  padding: var(--space-md);
  background: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-number {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta {
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(242,56,39,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.cta-inner { position: relative; z-index: 2; }
.cta h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--paper);
  margin-bottom: var(--space-sm);
}
.cta p {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.05rem;
}
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding: var(--space-lg) 0; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: var(--space-lg);
}
.footer-brand { max-width: 300px; }
.footer-brand img { height: 22px; width: auto; margin-bottom: var(--space-sm); opacity: 0.7; }
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.footer-col h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--paper);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-col p,
.footer-col a { font-size: 0.85rem; color: var(--text-muted); line-height: 1.8; display: block; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   FLOATING WHATSAPP
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 90;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.35);
  transition: transform 0.3s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* ============================================================
   HOME: TRUST BAR
   ============================================================ */
.tb { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 3rem 0; }
.tg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; }
.ti { background: var(--ink); padding: 1.5rem 1rem; text-align: center; }
.tn { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--accent); line-height: 1; margin-bottom: 0.35rem; }
.tl { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

/* ============================================================
   HOME: SERVICES GRID
   ============================================================ */
.svc { padding: 5rem 0; }
.sg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; }
.sc { background: var(--ink-soft); padding: clamp(1.5rem, 3vw, 2.5rem); transition: background 0.3s; display: flex; flex-direction: column; min-height: 280px; }
.sc:hover { background: var(--ink-mid); }
.si2 { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; background: rgba(242,56,39,0.1); color: var(--accent); }
.sc h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--paper); margin-bottom: 0.5rem; }
.sc p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 1.5rem; flex: 1; }
.scl { font-family: var(--font-display); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 0.4rem; transition: gap 0.2s; }
.sc:hover .scl { gap: 0.7rem; }
.scl svg { width: 14px; height: 14px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; }

/* ============================================================
   HOME: DIFFERENTIATOR
   ============================================================ */
.diff { padding: 5rem 0; border-top: 1px solid var(--border); }
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; margin-top: 3rem; }
.dd { background: var(--ink-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 3rem; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.dc { width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; }
.dc img { width: 80px; height: auto; opacity: 0.9; }
.db { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.db span { padding: 0.5rem 1rem; border-radius: 100px; font-family: var(--font-display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; background: rgba(242,56,39,0.08); color: var(--accent); border: 1px solid rgba(242,56,39,0.18); }
.dt h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--paper); margin-bottom: 1.5rem; line-height: 1.2; }
.dt p { color: var(--text-warm); margin-bottom: 1.5rem; line-height: 1.75; }
.dt p strong { color: var(--paper); font-weight: 500; }

/* ============================================================
   HOME: HOW WE WORK
   ============================================================ */
.hww { padding: 5rem 0; border-top: 1px solid var(--border); }
.hws { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); margin-top: 3rem; border-radius: var(--radius); overflow: hidden; }
.hw { background: var(--ink-soft); padding: 1.5rem; }
.hwn { font-family: var(--font-display); font-weight: 900; font-size: 2.5rem; color: rgba(242,56,39,0.15); line-height: 1; margin-bottom: 1rem; }
.hw h3 { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--paper); margin-bottom: 0.5rem; }
.hw p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .fade-in.visible { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .service-item { grid-template-columns: 1fr; gap: var(--space-md); }
  .service-item.reverse { direction: ltr; }
  .why-content { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .sg, .dl { grid-template-columns: 1fr; }
  .hws { grid-template-columns: 1fr; }
  .tg { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(14,14,14,0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 200;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.1rem; }
  .nav-toggle { display: block; z-index: 201; }
  .process-steps { grid-template-columns: 1fr; }
  .why-stats { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; }
  .tg { grid-template-columns: 1fr 1fr; }
}
