/* =========================================================
   INGELAT — Sistema de diseño
   ========================================================= */

:root {
  --navy-950: #0a1017;
  --navy-900: #0e1620;
  --navy-800: #16212e;
  --navy-700: #223244;
  --ink: #1a222c;
  --ink-soft: #57626f;
  --paper: #ffffff;
  --paper-soft: #f4f6f8;
  --line: #e3e7eb;
  --line-dark: rgba(255, 255, 255, 0.12);
  --blue: #1c5e99;
  --blue-deep: #0f3d63;
  --blue-light: #4f9fdb;
  --copper: #b98a4a;
  --copper-light: #d7ac72;

  --font-head: "Manrope", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.65;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}

p { margin: 0; }

a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- Reveal on scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* --- Section label / eyebrow --- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--copper);
}

.section-heading {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.12;
  max-width: 720px;
  margin-bottom: 20px;
}

.section-intro {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 620px;
}

section { position: relative; }
.section-pad { padding: clamp(64px, 9vw, 120px) 0; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header.is-scrolled {
  background: rgba(10, 16, 23, 0.92);
  backdrop-filter: blur(10px);
  padding: 14px 0;
  box-shadow: 0 1px 0 var(--line-dark);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img { height: 34px; width: auto; }
.brand span {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
  font-size: 15px;
}

.main-nav { display: flex; align-items: center; gap: 40px; }
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 4px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--copper-light);
  transition: width 0.3s var(--ease);
}
.main-nav a:hover::after { width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 12px 26px;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-2px); }
.btn-outline {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 32px;
  height: 22px;
  position: relative;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle::before { top: 0; }
.nav-toggle span { top: 10px; }
.nav-toggle::after { top: 20px; }
.nav-toggle.is-open::before { transform: translateY(10px) rotate(45deg); }
.nav-toggle.is-open::after { transform: translateY(-10px) rotate(-45deg); }
.nav-toggle.is-open span { opacity: 0; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/hero-cerro-negro.jpg");
  background-size: cover;
  background-position: center 60%;
  transform: scale(1.06);
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 16, 23, 0.55) 0%, rgba(10, 16, 23, 0.55) 40%, rgba(10, 16, 23, 0.92) 100%),
    linear-gradient(90deg, rgba(10, 16, 23, 0.75) 0%, rgba(10, 16, 23, 0.15) 62%);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding-top: 80px;
  max-width: 760px;
}
.hero__eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.3em;
  font-size: 13px;
  color: var(--copper-light);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.06;
  color: #fff;
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: normal;
  color: var(--blue-light);
}
.hero p {
  font-size: clamp(16px, 1.6vw, 19px);
  color: rgba(255, 255, 255, 0.8);
  max-width: 540px;
  margin-bottom: 40px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero__scroll::after {
  content: "";
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), transparent);
  animation: scrollcue 2.2s ease-in-out infinite;
}
@keyframes scrollcue {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* =========================================================
   Nosotros
   ========================================================= */
.about { background: var(--paper); }
.about__inner {
  display: grid;
  grid-template-columns: 0.9fr 1.5fr;
  gap: 60px;
  align-items: start;
}
.about__lede {
  font-family: var(--font-head);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy-900);
}
.about__body p {
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 20px;
}
.about__body p:last-child { margin-bottom: 0; }

/* =========================================================
   Clientes
   ========================================================= */
.clients { background: var(--paper-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.clients .eyebrow { justify-content: center; }
.clients .eyebrow::before { display: none; }
.clients h2 { text-align: center; font-size: 15px; letter-spacing: 0.1em; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; margin-bottom: 44px; }
.clients__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.clients__logo {
  background: var(--paper);
  aspect-ratio: 3 / 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 30px;
}
.clients__logo img {
  max-width: 100%;
  max-height: 56px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) opacity(0.55);
  transition: filter 0.4s var(--ease);
}
.clients__logo:hover img { filter: grayscale(0) opacity(1); }

/* =========================================================
   Servicios
   ========================================================= */
.services { background: var(--paper); }
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 56px;
}
.service-card {
  background: var(--paper);
  padding: 40px 34px;
  transition: background 0.35s var(--ease);
}
.service-card:hover { background: var(--paper-soft); }
.service-card__num {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--copper);
  letter-spacing: 0.1em;
  margin-bottom: 22px;
  display: block;
}
.service-card h3 {
  font-size: 19px;
  margin-bottom: 14px;
  color: var(--navy-900);
}
.service-card p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

/* =========================================================
   Proyectos
   ========================================================= */
.projects { background: var(--navy-950); color: #fff; }
.projects .eyebrow { color: var(--copper-light); }
.projects .section-heading { color: #fff; }
.projects .section-intro { color: rgba(255,255,255,0.6); }

.projects__grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 40px;
}
.project-group__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-dark);
}
.project-group__head img { width: 22px; height: 22px; filter: invert(70%) sepia(20%) saturate(400%) hue-rotate(340deg) brightness(1.1); }
.project-group__head h3 {
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #fff;
  font-weight: 600;
}
.project-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.project-group li { font-size: 14.5px; color: rgba(255,255,255,0.68); line-height: 1.55; padding-left: 16px; position: relative; }
.project-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  background: var(--blue-light);
  border-radius: 50%;
}
.project-group li strong { color: #fff; font-weight: 500; }

/* =========================================================
   Mapa
   ========================================================= */
.map { background: var(--paper-soft); }
.map__frame {
  margin-top: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(14, 22, 32, 0.35);
}
.map__frame iframe { width: 100%; height: 520px; border: 0; display: block; }

/* =========================================================
   Galería
   ========================================================= */
.gallery { background: var(--paper); }
.gallery__track {
  margin-top: 48px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 20px;
  scrollbar-width: thin;
}
.gallery__item {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: min(72vw, 420px);
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  cursor: zoom-in;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery__item:hover img { transform: scale(1.06); }
.gallery__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 18px;
  background: linear-gradient(0deg, rgba(10,16,23,0.85), transparent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.gallery__lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 18, 0.94);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.gallery__lightbox.is-open { display: flex; }
.gallery__lightbox img { max-width: 90vw; max-height: 82vh; object-fit: contain; border-radius: 4px; }
.gallery__lightbox-close {
  position: absolute;
  top: 28px;
  right: 32px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}
.gallery__lightbox-caption { position: absolute; bottom: 34px; color: rgba(255,255,255,0.7); font-size: 14px; }

/* =========================================================
   Contacto
   ========================================================= */
.contact { background: var(--navy-950); color: #fff; }
.contact .eyebrow { color: var(--copper-light); }
.contact .section-heading { color: #fff; }
.contact .section-intro { color: rgba(255,255,255,0.6); }

.contact__inner {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
}
.contact__info { display: flex; flex-direction: column; gap: 26px; }
.contact__info-item { display: flex; align-items: center; gap: 16px; }
.contact__info-item img { width: 20px; height: 20px; filter: invert(1) opacity(0.85); }
.contact__info-item a, .contact__info-item span { color: rgba(255,255,255,0.82); text-decoration: none; font-size: 15.5px; }
.contact__info-item a:hover { color: var(--blue-light); }

.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.03em;
}
.contact-form input, .contact-form textarea {
  font: inherit;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 3px;
  padding: 13px 14px;
  color: #fff;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(255,255,255,0.35); }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--blue-light);
  background: rgba(255,255,255,0.09);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form__honeypot { position: absolute; left: -9999px; }
.contact-form__msg { font-size: 14px; min-height: 20px; }
.contact-form__msg.ok { color: #7fd4a3; }
.contact-form__msg.err { color: #e08585; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.55);
  border-top: 1px solid var(--line-dark);
  padding: 36px 0;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
}
.site-footer a { color: rgba(255,255,255,0.75); text-decoration: none; }
.site-footer a:hover { color: var(--blue-light); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .about__inner { grid-template-columns: 1fr; gap: 28px; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .projects__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__inner { grid-template-columns: 1fr; gap: 40px; }
  .clients__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .main-nav ul, .main-nav .btn-outline { display: none; }
  .nav-toggle { display: block; }
  .main-nav.is-open {
    position: fixed;
    inset: 0 0 0 auto;
    top: 0;
    width: min(320px, 82vw);
    height: 100vh;
    background: var(--navy-900);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 32px;
    gap: 28px;
  }
  .main-nav.is-open ul { display: flex; flex-direction: column; gap: 22px; }
  .main-nav.is-open .btn-outline { display: inline-flex; }

  .services__grid { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .contact-form__row { grid-template-columns: 1fr; }
  .clients__grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer .container { flex-direction: column; text-align: center; }
}
