/* ==========================================================================
   F. Benavides IngenierÃ­a â€” Hoja de estilos principal
   Mobile-first Â· sin dependencias externas
   ========================================================================== */

:root {
  --teal-900: #0b4549;
  --teal-800: #0f5f66;
  --teal-700: #13737c;
  --teal-600: #1a8a93;
  --teal-500: #249ea6;
  --teal-100: #e3f3f4;
  --ink: #1b2b2d;
  --ink-soft: #4a5c5e;
  --line: #dfe7e7;
  --paper: #ffffff;
  --paper-alt: #f4f8f8;
  --accent: #c9a227;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 69, 73, .08), 0 2px 8px rgba(11, 69, 73, .06);
  --shadow-md: 0 8px 28px rgba(11, 69, 73, .12);
  --container: 1180px;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.22; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: clamp(1.12rem, 2vw, 1.35rem); }
p  { margin: 0 0 1em; }
a  { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-500); text-decoration: underline; }
ul { margin: 0 0 1em; padding-left: 1.15em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--teal-800); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark { width: 38px; height: auto; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.06rem; letter-spacing: -.02em; }
.brand-text small { font-size: .72rem; color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 42px; padding: 0 11px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--teal-800); border-radius: 2px; transition: transform .22s ease, opacity .18s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.primary-nav {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 14px 20px 22px; box-shadow: var(--shadow-md);
}
.primary-nav.is-open { display: block; }
.primary-nav ul { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; }
.primary-nav a {
  display: block; padding: 12px 6px; color: var(--ink); font-weight: 600; font-size: .98rem;
  border-bottom: 1px solid var(--paper-alt);
}
.primary-nav a:hover { color: var(--teal-700); text-decoration: none; }
.primary-nav a.is-active { color: var(--teal-700); }
.primary-nav .nav-cta { display: inline-flex; width: 100%; justify-content: center; }

.topbar { display: none; background: var(--teal-900); color: #cfe4e5; font-size: .84rem; }
.topbar-inner { display: flex; align-items: center; gap: 26px; min-height: 38px; }
.topbar a { color: #e7f4f4; }
.topbar-loc { margin-left: auto; opacity: .85; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .82rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  font-weight: 650; font-size: .95rem; line-height: 1; cursor: pointer;
  transition: transform .16s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: #fff; color: var(--teal-800); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.btn-primary:hover { background: #eefafa; color: var(--teal-900); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }
.btn-outline { background: #fff; color: var(--teal-700); border-color: var(--teal-700); }
.btn-outline:hover { background: var(--teal-700); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; isolation: isolate;
  background: var(--teal-900);
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, rgba(11, 69, 73, .93) 0%, rgba(11, 69, 73, .82) 42%, rgba(11, 69, 73, .55) 100%);
}
.hero-inner { padding: 68px 0 72px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
  color: #9fd6d9; margin-bottom: 1.1rem;
}
.hero .eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); }
.hero h1 { max-width: 20ch; }
.hero p.lead { font-size: clamp(1rem, 1.6vw, 1.16rem); color: #d6eaea; max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid rgba(255, 255, 255, .18);
}
.hero-stats div strong { display: block; font-size: 1.28rem; color: #fff; }
.hero-stats div span { font-size: .83rem; color: #b9d9db; }

/* ---------- Secciones ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--paper-alt); }
.section-head { max-width: 72ch; margin-bottom: 2.4rem; }
.section-head .eyebrow {
  display: inline-block; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; color: var(--teal-600); margin-bottom: .6rem;
}
.section-head p { color: var(--ink-soft); font-size: 1.03rem; }

/* ---------- Grids y tarjetas ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--ink-soft); margin-bottom: .8rem; font-size: .96rem; }
.card ul { color: var(--ink-soft); font-size: .94rem; padding-left: 1.05em; margin-bottom: 0; }
.card ul li { margin-bottom: .35rem; }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin-bottom: 1rem;
  background: var(--teal-100); color: var(--teal-700); border-radius: 14px;
}
.card-icon svg { width: 26px; height: 26px; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--teal-500); }
.card-num {
  display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--teal-800); color: #fff; font-size: .82rem; font-weight: 700;
  margin-bottom: .7rem;
}

/* ---------- Split (imagen + texto) ---------- */
.split { display: grid; gap: 30px; align-items: center; }
.split img { border-radius: var(--radius); width: 100%; box-shadow: var(--shadow-md); }
.split-text p { color: var(--ink-soft); }

/* ---------- Lista con checks ---------- */
.checks { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.checks li { position: relative; padding-left: 30px; margin-bottom: .65rem; color: var(--ink-soft); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--teal-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l3 3 6-6.4' fill='none' stroke='%2313737c' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* ---------- Sectores ---------- */
.sector {
  display: grid; grid-template-columns: 54px 1fr; gap: 18px;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal-600);
  border-radius: var(--radius-sm); padding: 22px; box-shadow: var(--shadow-sm);
}
.sector h3 { margin-bottom: .35rem; }
.sector p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Stats / valores ---------- */
.value { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.value .dot {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: var(--teal-700); color: #fff;
  font-weight: 700;
}
.value h3 { margin-bottom: .2rem; font-size: 1.06rem; }
.value p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--teal-800), var(--teal-600));
  color: #fff; border-radius: var(--radius); padding: 40px 28px;
  display: grid; gap: 20px; align-items: center;
}
.cta-band h2 { margin-bottom: .3rem; color: #fff; }
.cta-band p { margin: 0; color: #d9f0f1; }
.cta-band .btn-primary { background: #fff; color: var(--teal-800); box-shadow: none; }
.cta-band .btn-primary:hover { background: #eefafa; color: var(--teal-900); }

/* ---------- Formulario ---------- */
.form-wrap { display: grid; gap: 28px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: .35rem; }
.field .req { color: #c0392b; }
.field input, .field select, .field textarea {
  width: 100%; padding: .78rem .9rem; font: inherit; font-size: .96rem; color: var(--ink);
  background: #fbfdfd; border: 1px solid #cfdcdc; border-radius: var(--radius-sm);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(36, 158, 166, .16); background: #fff;
}
.field textarea { min-height: 128px; resize: vertical; }
.field .hint { font-size: .8rem; color: var(--ink-soft); margin-top: .3rem; }
.field-row { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-soft); }
.consent input { width: auto; margin-top: .3rem; }

.alert { border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; font-size: .94rem; }
.alert-success { background: #e8f7ee; border: 1px solid #b7e3c8; color: #1c6b3c; }
.alert-error { background: #fdecea; border: 1px solid #f5c2bd; color: #922b21; }
.alert ul { margin: .4rem 0 0; }

/* ---------- Contacto info ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.contact-list li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: start; }
.contact-list .ico {
  width: 42px; height: 42px; border-radius: 12px; background: var(--teal-100); color: var(--teal-700);
  display: flex; align-items: center; justify-content: center;
}
.contact-list strong { display: block; font-size: .92rem; }
.contact-list span, .contact-list a { font-size: .95rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-900); color: #c9e0e1; margin-top: 0; }
.footer-grid { display: grid; gap: 30px; padding: 52px 0 34px; grid-template-columns: 1fr; }
.site-footer h3 { font-size: .82rem; letter-spacing: .13em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; font-size: .92rem; }
.site-footer a { color: #c9e0e1; }
.site-footer a:hover { color: #fff; }
.footer-brand img { width: 52px; margin-bottom: 14px; background: #fff; border-radius: 6px; padding: 4px; }
.footer-brand p { margin: 0; font-size: .94rem; color: #e3f1f1; }
.muted { color: #8fb3b5; font-size: .86rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 16px 0; font-size: .84rem; }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ---------- PÃ¡gina interior (banner) ---------- */
.page-banner {
  background: linear-gradient(120deg, var(--teal-900), var(--teal-700));
  color: #fff; padding: 54px 0;
}
.page-banner h1 { margin-bottom: .35rem; }
.page-banner p { margin: 0; color: #cfe7e8; max-width: 62ch; }
.breadcrumb { font-size: .82rem; color: #a9cdcf; margin-bottom: .7rem; }
.breadcrumb a { color: #d9eded; }

/* ---------- PÃ¡gina de gracias ---------- */
.thanks { text-align: center; padding: 80px 0; max-width: 620px; margin-inline: auto; }
.thanks .check {
  width: 84px; height: 84px; margin: 0 auto 24px; border-radius: 50%;
  background: #e8f7ee; color: #1c8a4e; display: flex; align-items: center; justify-content: center; font-size: 2.4rem;
}

/* ---------- Aviso de privacidad ---------- */
.prose { max-width: 78ch; }
.prose h2 { margin-top: 2rem; font-size: 1.3rem; }
.prose p, .prose li { color: var(--ink-soft); }

/* ---------- ApariciÃ³n progresiva ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card-hover:hover { transform: none; }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 620px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 32px 30px; }
}

@media (min-width: 900px) {
  body { font-size: 17px; }
  .topbar { display: block; }
  .header-inner { min-height: 76px; }
  .nav-toggle { display: none; }
  .primary-nav {
    display: flex; position: static; align-items: center; gap: 22px;
    background: none; border: 0; padding: 0; box-shadow: none;
  }
  .primary-nav ul { flex-direction: row; margin: 0; gap: 4px; }
  .primary-nav a { border: 0; padding: 9px 12px; border-radius: 8px; font-size: .94rem; }
  .primary-nav a:hover { background: var(--paper-alt); }
  .primary-nav a.is-active { background: var(--teal-100); color: var(--teal-800); }
  .primary-nav .nav-cta { width: auto; padding: .7rem 1.2rem; font-size: .9rem; }
  .hero-inner { padding: 96px 0 104px; }
  .section { padding: 84px 0; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .split { grid-template-columns: 1fr 1fr; gap: 48px; }
  .split.reverse .split-text { order: 2; }
  .cta-band { grid-template-columns: 1fr auto; padding: 52px 48px; }
  .form-wrap { grid-template-columns: 1.25fr .75fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.3fr; gap: 44px; }
  .hero-stats { gap: 34px; }
}

@media (min-width: 1100px) {
  .hero h1 { max-width: 22ch; }
}

/* Botón flotante de WhatsApp */
.wa-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(11, 69, 73, .28);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.wa-fab:hover {
  background: #1ebe5b;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(11, 69, 73, .34);
}
.wa-fab:active { transform: translateY(0); }
.wa-fab svg { flex: 0 0 auto; }
.wa-fab-label { font-weight: 700; font-size: .95rem; letter-spacing: .01em; }

@media (max-width: 640px) {
  .wa-fab { right: 16px; bottom: 16px; padding: 14px; border-radius: 50%; }
  .wa-fab-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-fab { transition: none; }
  .wa-fab:hover { transform: none; }
}
