/* =========================================================
   ADM – Ingeniería Electromecánica
   Paleta tomada del logotipo: naranja zorro + azul marino
   ========================================================= */
:root {
  --orange: #e2541f;
  --orange-dark: #c4441a;
  --orange-soft: #fdeee7;
  --navy: #1b2a41;
  --navy-2: #22344f;
  --navy-deep: #111c2d;
  --text: #2b3445;
  --muted: #677185;
  --line: #e4e8ef;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(17, 28, 45, .08);
  --shadow-lg: 0 24px 60px rgba(17, 28, 45, .16);
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); color: var(--navy); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 800; letter-spacing: -.015em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
svg { fill: currentColor; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.accent { color: var(--orange); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--orange);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: #ff8a5c; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  padding: .95rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .2s, background .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 8px 22px rgba(226, 84, 31, .35); }
.btn--primary:hover { background: var(--orange-dark); }
.btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn--white { background: #fff; color: var(--navy); }
.btn--white:hover { box-shadow: 0 10px 26px rgba(0,0,0,.2); }
.btn--sm { padding: .6rem 1.15rem; font-size: .85rem; }
.btn--block { width: 100%; }
.btn__icon { width: 22px; height: 22px; color: #25d366; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: box-shadow .3s, border-color .3s;
}
.header.is-scrolled { box-shadow: 0 6px 24px rgba(17,28,45,.08); border-color: var(--line); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.header__logo { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.header__logo img { height: 38px; width: auto; }
.header__tagline {
  font-family: var(--font-head); font-weight: 700; font-size: .6rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--navy); white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) {
  font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--navy);
  position: relative; padding: .3rem 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--orange); transition: width .25s;
}
.nav a:not(.btn):hover::after, .nav a.is-active::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 26px; height: 2.5px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #d7deea;
  padding: calc(var(--header-h) + 4.5rem) 0 6rem;
  background: var(--navy-deep);
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(226,84,31,.28), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(34,52,79,.9), transparent 55%),
    linear-gradient(135deg, var(--navy-deep), var(--navy) 60%, var(--navy-2));
}
.hero__bg::after { /* rejilla técnica tipo plano */
  content: ""; position: absolute; inset: 0; opacity: .08;
  background-image:
    linear-gradient(#fff 1px, transparent 1px),
    linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000 70%, transparent);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; }
.hero h1 { color: #fff; }
.hero__lead { font-size: 1.12rem; max-width: 560px; color: #c3cddd; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 2.2rem; }
.hero__badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.hero__badges li { display: flex; align-items: center; gap: .45rem; font-size: .92rem; font-weight: 500; color: #e7ecf4; }
.hero__badges svg { width: 18px; height: 18px; color: var(--orange); }

.hero__visual { position: relative; height: 520px; }
.hero__photo { position: absolute; margin: 0; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo--main { inset: 0 18% 8% 0; border: 4px solid rgba(255,255,255,.08); }
.hero__photo--secondary { width: 46%; height: 46%; right: 0; bottom: 0; border: 5px solid var(--navy); }
.hero__chip {
  position: absolute; left: -1.5rem; bottom: 2.5rem; background: #fff; color: var(--muted);
  padding: 1rem 1.3rem; border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; border-left: 4px solid var(--orange);
}
.hero__chip strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--navy); line-height: 1.1; }
.hero__chip span { font-size: .82rem; }

/* ---------- Clientes ---------- */
.clients { padding: 2.8rem 0; border-bottom: 1px solid var(--line); }
.clients__title {
  text-align: center; font-family: var(--font-head); font-weight: 600; font-size: .82rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.6rem;
}
.clients__logos { display: flex; flex-wrap: wrap; justify-content: space-around; align-items: center; gap: 2rem 3rem; }
.clients__logos img {
  height: 96px; width: 190px; object-fit: contain;
  filter: grayscale(.35); opacity: .9; transition: .3s; mix-blend-mode: multiply;
}
.clients__logos img:hover { filter: none; opacity: 1; transform: scale(1.04); }

/* ---------- Secciones ---------- */
.section { padding: 6.5rem 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 680px; margin: 0 auto 3.5rem; text-align: center; }
.section__head .eyebrow::after { content: ""; width: 28px; height: 2px; background: currentColor; }
.section__head p { color: var(--muted); font-size: 1.05rem; }
.section__head--light h2 { color: #fff; }
.section__head--light p { color: #b8c3d6; }

/* ---------- Nosotros ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about__intro p { color: var(--muted); font-size: 1.05rem; }
.about__intro strong { color: var(--navy); }
.about__cards { display: grid; gap: 1.5rem; }
.mv-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.mv-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--orange); }
.mv-card__icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--orange-soft); color: var(--orange); margin-bottom: 1rem;
}
.mv-card__icon svg { width: 26px; height: 26px; }
.mv-card p { color: var(--muted); margin: 0; }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
.service {
  position: relative; background: #fff; border-radius: var(--radius); padding: 2.2rem;
  border: 1px solid var(--line); transition: transform .3s, box-shadow .3s, border-color .3s;
}
.service:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service__num {
  position: absolute; top: 1.4rem; right: 1.8rem; font-family: var(--font-head);
  font-weight: 800; font-size: 2.6rem; color: var(--bg-alt); line-height: 1;
  -webkit-text-stroke: 1px var(--line);
}
.service__icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--navy); color: #fff; margin-bottom: 1.3rem; transition: background .3s;
}
.service:hover .service__icon { background: var(--orange); }
.service__icon svg { width: 28px; height: 28px; }
.service h3 { font-size: 1.22rem; padding-right: 3rem; }
.service ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.service li { position: relative; padding-left: 1.6rem; color: var(--muted); }
.service li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px;
  border-radius: 2px; background: var(--orange); transform: rotate(45deg);
}

/* ---------- Proceso ---------- */
.process-section { background: var(--navy); position: relative; overflow: hidden; }
.process-section::before {
  content: ""; position: absolute; inset: 0; opacity: .06;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 48px 48px;
}
.process {
  position: relative; list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem;
}
.process::before { /* línea de conexión */
  content: ""; position: absolute; top: 28px; left: 10%; right: 10%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--orange) 0 10px, transparent 10px 18px);
}
.process__step { position: relative; text-align: center; }
.process__n {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 1.2rem;
  border-radius: 50%; background: var(--orange); color: #fff; font-family: var(--font-head);
  font-weight: 800; font-size: 1.3rem; box-shadow: 0 0 0 8px var(--navy), 0 0 0 9px rgba(226,84,31,.4);
}
.process__step h3 { color: #fff; }
.process__step p { color: #aeb9cc; font-size: .93rem; margin: 0; }

/* ---------- Proyectos ---------- */
.projects { display: grid; gap: 4.5rem; }
.project { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3.5rem; align-items: center; }
.project--reverse .project__gallery { order: 2; }
.project__gallery { display: grid; gap: .8rem; }
.project__main {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); cursor: zoom-in;
}
.project__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.project__thumbs img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in;
  transition: transform .25s, opacity .25s; opacity: .85;
}
.project__thumbs img:hover { transform: scale(1.04); opacity: 1; }
.project__logo { height: 80px; width: auto; max-width: 180px; object-fit: contain; margin-bottom: 1.2rem; mix-blend-mode: multiply; }
.project__body h3 { font-size: 1.5rem; }
.project__body p { color: var(--muted); }
.project__body strong { color: var(--navy); }
.project__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.project__tags span {
  font-size: .78rem; font-weight: 600; padding: .35rem .8rem; border-radius: 999px;
  background: var(--orange-soft); color: var(--orange-dark);
}

/* ---------- Valores ---------- */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.value {
  background: #fff; border-radius: var(--radius); padding: 1.7rem; border: 1px solid var(--line);
  border-top: 3px solid var(--navy); transition: border-color .3s, transform .3s;
}
.value:hover { border-top-color: var(--orange); transform: translateY(-4px); }
.value h3 { font-size: 1.05rem; }
.value p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(120deg, var(--orange), #f07a3a); color: #fff; padding: 4rem 0; }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.cta h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 2rem); max-width: 720px; }
.cta p { margin: 0; opacity: .92; font-size: 1.05rem; }
.cta .btn { flex-shrink: 0; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.05fr; gap: 4rem; align-items: start; }
.contact > *, .hero__inner > *, .about > *, .project > * { min-width: 0; }
.contact__info > p { color: var(--muted); font-size: 1.05rem; }
.contact__people { display: grid; gap: 1.2rem; margin: 2rem 0; }
.person {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.4rem 1.6rem;
  background: var(--bg-alt); border-radius: var(--radius); border-left: 4px solid var(--orange);
}
.person h3 { margin: 0; font-size: 1.05rem; }
.person > span { font-size: .85rem; color: var(--muted); margin-bottom: .3rem; }
.person a, .contact__address {
  display: flex; align-items: center; gap: .6rem; color: var(--navy); font-weight: 500;
  overflow-wrap: anywhere; min-width: 0;
}
.person a:hover { color: var(--orange); }
.person svg, .contact__address svg { width: 18px; height: 18px; color: var(--orange); flex-shrink: 0; }

.contact__form {
  background: #fff; border-radius: 20px; padding: 2.4rem; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.contact__form h3 { font-size: 1.4rem; margin-bottom: 1.4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; }
.field span { font-size: .85rem; font-weight: 600; color: var(--navy); }
.field input, .field select, .field textarea {
  font: inherit; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg-alt); color: var(--text); transition: border-color .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange); background: #fff;
}
.field.is-invalid input, .field.is-invalid textarea { border-color: #d93025; }
.field textarea { resize: vertical; }
.form-note { font-size: .82rem; color: var(--muted); text-align: center; margin: .9rem 0 0; }
.form-note.is-error { color: #d93025; }
.form-note.is-success { color: #1e8e3e; font-weight: 600; }
.hidden-field { position: absolute; left: -9999px; }
.contact__form { position: relative; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: #9ea9bc; padding: 2.6rem 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer__brand { display: flex; align-items: center; gap: .9rem; }
.footer__brand img { width: 44px; height: auto; }
.footer__brand strong { display: block; font-family: var(--font-head); color: #fff; font-size: 1.3rem; line-height: 1; }
.footer__brand span { font-size: .82rem; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.6rem; }
.footer__nav a:hover { color: #fff; }
.footer__copy { margin: 0; font-size: .85rem; width: 100%; text-align: center; border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.5rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 40; width: 58px; height: 58px;
  border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, .45); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10, 16, 26, .94);
  display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 2rem;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox figure { margin: 0; max-width: min(1000px, 85vw); text-align: center; }
.lightbox img { max-height: 80vh; margin: 0 auto; border-radius: 10px; }
.lightbox figcaption { color: #cfd6e2; margin-top: .9rem; font-size: .95rem; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.4rem; background: none; border: 0; color: #fff;
  font-size: 2.6rem; cursor: pointer; line-height: 1;
}
.lightbox__nav {
  background: rgba(255,255,255,.1); border: 0; color: #fff; width: 52px; height: 52px; border-radius: 50%;
  font-size: 2rem; cursor: pointer; flex-shrink: 0; transition: background .2s;
}
.lightbox__nav:hover { background: var(--orange); }

/* ---------- Página de gracias ---------- */
.thanks { min-height: 100vh; display: grid; place-items: center; padding: 2rem; background: var(--bg-alt); }
.thanks__card {
  max-width: 520px; text-align: center; background: #fff; padding: 3rem 2.4rem;
  border-radius: 20px; box-shadow: var(--shadow-lg); border-top: 4px solid var(--orange);
}
.thanks__logo { height: 56px; width: auto; margin: 0 auto 1.6rem; }
.thanks h1 { font-size: 1.8rem; }
.thanks p { color: var(--muted); margin-bottom: 1.8rem; }

/* ---------- Animación de aparición ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .values { grid-template-columns: repeat(3, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); row-gap: 2.5rem; }
  .process::before { display: none; }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: #fff; padding: 1rem 1.25rem 1.5rem; box-shadow: 0 20px 30px rgba(17,28,45,.1);
    transform: translateY(-120%); transition: transform .3s; z-index: -1;
  }
  .nav.is-open { transform: none; }
  .nav a:not(.btn) { width: 100%; padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 1rem; width: 100%; }

  .hero { padding-top: calc(var(--header-h) + 3rem); }
  .hero__inner, .about, .project, .contact { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__visual { height: 380px; }
  .hero__chip { left: .8rem; }
  .project--reverse .project__gallery { order: 0; }
  .services { grid-template-columns: 1fr; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .cta__inner { flex-direction: column; text-align: center; }
  .section { padding: 4.5rem 0; }
}

@media (max-width: 560px) {
  :root { --header-h: 66px; }
  .header__logo img { height: 32px; }
  .header__tagline { font-size: .52rem; }
  .hero__visual { height: 300px; }
  .process { grid-template-columns: 1fr 1fr; }
  .values { grid-template-columns: 1fr; }
  .clients__logos { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; justify-items: center; }
  .clients__logos img { width: 100%; max-width: 150px; height: 80px; }
  .field-row { grid-template-columns: 1fr; }
  .contact__form { padding: 1.6rem; }
  .service { padding: 1.7rem; }
  .footer__inner { flex-direction: column; text-align: center; }
  .lightbox { padding: 1rem; gap: .3rem; }
  .lightbox__nav { width: 40px; height: 40px; font-size: 1.5rem; }
}
