/* =========================================================
   REA INGENIERÍA — Estilos principales
   ========================================================= */

:root {
  --navy:      #0D1E35;
  --navy-mid:  #1A3357;
  --blue:      #1E5FA8;
  --accent:    #E8A020;
  --steel:     #4A6FA5;
  --light:     #F0F4FA;
  --white:     #FFFFFF;
  --text:      #1C2B3A;
  --muted:     #5A7080;
  --border:    #D0DCE8;
  --gap: 2rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── LOGOS ── */
.nav-logo-img {
  height: 42px !important;
  width: auto !important;
  max-width: 180px !important;
  max-height: 42px !important;
  display: block !important;
  object-fit: contain !important;
}
.nav-logo {
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  max-height: 68px !important;
}
.footer-logo-img {
  height: 34px !important;
  width: auto !important;
  max-width: 150px !important;
  max-height: 34px !important;
  display: block !important;
  object-fit: contain !important;
  opacity: 0.85;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13,30,53,0.97);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem;
  height: 68px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--accent);
  color: var(--navy) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-weight: 600 !important;
}

/* ── SECCIONES ── */
section { scroll-margin-top: 68px; }

/* ── HERO ── */
#inicio {
  min-height: 100vh;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-mid) 55%, #163660 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 3rem;
  padding-top: 68px;
  position: relative;
  overflow: hidden;
}
#inicio::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 75% 50%, rgba(30,95,168,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-text { position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(232,160,32,0.35);
  border-radius: 2px;
}
.hero-h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.5rem, 4vw, 3.6rem);
  line-height: 1.18;
  color: var(--white);
  margin-bottom: 1.25rem;
  max-width: 14ch;
}
.hero-h1 em { font-style: italic; color: #7FB3E8; }
.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  max-width: 42ch;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
  background: var(--accent);
  color: var(--navy);
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: opacity 0.2s;
  display: inline-block;
}
.btn-primary:hover { opacity: 0.9; color: var(--navy); }
.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.8);
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.25);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  display: inline-block;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.6); color: #fff; }

.hero-visual {
  position: relative; z-index: 2;
  display: flex; justify-content: center; align-items: center;
}
.hero-stats-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  backdrop-filter: blur(4px);
  width: 100%;
  max-width: 420px;
}
.stat-item { text-align: center; }
.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2.6rem;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.stat-num span { color: var(--accent); font-size: 1.6rem; }
.stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

/* ── QUIÉNES SOMOS ── */
.section-quienes {
  padding: 6rem 3rem;
  background: var(--white);
}
.quienes-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center;
}
.img-placeholder {
  background: linear-gradient(135deg, var(--light) 0%, var(--border) 100%);
  border-radius: 8px;
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem;
  border: 2px dashed var(--border);
}
.quienes-img {
  border-radius: 8px;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: 1.25rem;
}
.section-body {
  color: var(--muted);
  font-size: 0.975rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  max-width: 52ch;
}
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.5rem; }
.mv-card {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  background: var(--light);
  border-radius: 0 6px 6px 0;
}
.mv-card strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.mv-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.55; }

/* ── SERVICIOS ── */
#servicios {
  background: var(--light);
  padding: 6rem 3rem;
}
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header .section-h2 { margin: 0 auto 0.75rem; }
.section-header .section-body { margin: 0 auto; text-align: center; }
.servicios-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.srv-card {
  background: var(--white);
  border-radius: 8px;
  padding: 1.75rem;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.srv-card:hover {
  box-shadow: 0 8px 32px rgba(13,30,53,0.10);
  transform: translateY(-3px);
}
.srv-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy-mid) 100%);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}
.srv-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.srv-desc {
  font-size: 0.845rem;
  color: var(--muted);
  line-height: 1.6;
}
.srv-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.srv-link:hover { color: var(--navy); }
.servicios-more {
  text-align: center;
  margin-top: 2.5rem;
}
.btn-outline {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 2px solid var(--blue);
  color: var(--blue);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-outline:hover { background: var(--blue); color: #fff; }

/* ── PORTAFOLIO ── */
#portafolio {
  padding: 6rem 3rem;
  background: var(--white);
}
.portafolio-inner { max-width: 1100px; margin: 0 auto; }
.portafolio-filters {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  margin-bottom: 2.5rem; justify-content: center;
}
.filter-btn {
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.portafolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.proy-card {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
  transition: box-shadow 0.2s;
}
.proy-card:hover { box-shadow: 0 8px 28px rgba(13,30,53,0.10); }
.proy-img {
  background: linear-gradient(135deg, #C5D5E8 0%, #8AABCE 100%);
  height: 180px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-mid);
  font-size: 0.8rem;
  font-weight: 500;
  overflow: hidden;
}
.proy-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.proy-body { padding: 1.5rem; }
.proy-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.5rem;
}
.proy-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.proy-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.proy-desc {
  font-size: 0.845rem;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── CONTACTO ── */
#contacto {
  background: var(--navy);
  padding: 6rem 3rem;
  color: var(--white);
}
.contacto-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 5rem; align-items: start;
}
#contacto .section-h2 { color: var(--white); }
#contacto .section-body { color: rgba(255,255,255,0.6); }
.contacto-info { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 1.75rem; }
.info-item { display: flex; gap: 1rem; align-items: flex-start; }
.info-icon {
  width: 38px; height: 38px; min-width: 38px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.info-item strong { display: block; font-size: 0.8rem; font-weight: 600; color: var(--accent); margin-bottom: 0.2rem; }
.info-item span { font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.contact-form {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 2.25rem;
  display: flex; flex-direction: column; gap: 1.1rem;
}
.contact-form h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 0.25rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.6); letter-spacing: 0.04em; }
.form-group input, .form-group select, .form-group textarea {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 5px;
  padding: 0.65rem 0.9rem;
  color: var(--white);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: rgba(232,160,32,0.6);
}
.form-group select option { background: var(--navy); }
.form-group textarea { resize: vertical; min-height: 100px; }
.btn-submit {
  background: var(--accent);
  color: var(--navy);
  border: none;
  padding: 0.85rem;
  border-radius: 5px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
  width: 100%;
}
.btn-submit:hover { opacity: 0.9; }

/* ── FOOTER ── */
footer {
  background: #080F1A;
  padding: 2.5rem 3rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--white);
}
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 0.8rem; color: rgba(255,255,255,0.35); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.8rem; color: rgba(255,255,255,0.4); text-decoration: none; }
.footer-links a:hover { color: rgba(255,255,255,0.7); }

/* ── DIVISOR ACCENT ── */
.accent-rule {
  width: 48px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 0.75rem 0 1.25rem;
}
.section-header .accent-rule { margin: 0.75rem auto 1.25rem; }

/* ── WHATSAPP FLOAT ── */
.wa-float {
  position: fixed;
  bottom: 2rem; right: 2rem;
  background: #25D366;
  color: #fff;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  text-decoration: none;
  z-index: 200;
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.08); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  #inicio { grid-template-columns: 1fr; padding: 6rem 1.5rem 3rem; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-visual { margin-top: 3rem; }
  .quienes-inner, .contacto-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .servicios-grid, .portafolio-grid { grid-template-columns: 1fr 1fr; }
  nav { padding: 0 1.5rem; }
  .nav-links { display: none; }
  section, #servicios, #portafolio, #contacto { padding: 4rem 1.5rem; }
  .section-quienes { padding: 4rem 1.5rem; }
  footer { padding: 2rem 1.5rem; }
}
@media (max-width: 600px) {
  .servicios-grid, .portafolio-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .mv-grid { grid-template-columns: 1fr; }
}

/* ── Mensaje éxito formulario ── */
.contacto-exito {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  padding: 2rem 2.5rem;
  background: linear-gradient(135deg, #0f2a4a 0%, #1a3a5c 100%);
  border: 1px solid var(--accent, #f5a623);
  border-radius: 12px;
  text-align: center;
  color: #fff;
}
.contacto-exito .exito-icon {
  width: 56px;
  height: 56px;
  background: var(--accent, #f5a623);
  color: #0f2a4a;
  font-size: 1.8rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.contacto-exito h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}
.contacto-exito p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  margin: 0;
}
