/* ============================================================
   Grupo AGA — sitio estático (HTML/CSS/JS puro)
   Construcción, Gerencia y Desarrollo de Obra — Mérida, Yucatán
   ============================================================ */

:root {
  --negro: #111418;
  --gris-osc: #2b2f36;
  --gris: #6b7280;
  --gris-claro: #f4f5f7;
  --linea: #e5e7eb;
  --blanco: #ffffff;
  --acento: #b8902f;          /* dorado arena, tono arquitectónico */
  --acento-osc: #9a7726;
  --sombra: 0 10px 30px rgba(0,0,0,.12);
  --max: 1200px;
  --radio: 4px;
  --trans: .35s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--negro);
  line-height: 1.65;
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; }

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

.section { padding: 90px 0; }
.section--gris { background: var(--gris-claro); }

.eyebrow {
  display: inline-block; font-size: .8rem; letter-spacing: .25em;
  text-transform: uppercase; color: var(--acento); font-weight: 700;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem); text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 18px;
}
.section-intro { max-width: 720px; color: var(--gris); font-size: 1.05rem; }
.center { text-align: center; }
.center .section-intro { margin-left: auto; margin-right: auto; }

.btn {
  display: inline-block; padding: 14px 32px; background: var(--acento);
  color: #fff; text-transform: uppercase; letter-spacing: .08em;
  font-weight: 600; font-size: .85rem; border-radius: var(--radio);
  transition: var(--trans); border: 2px solid var(--acento); cursor: pointer;
}
.btn:hover { background: var(--acento-osc); border-color: var(--acento-osc); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: #fff; border-color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--negro); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--linea);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.logo img { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 38px; }
.nav a {
  text-transform: uppercase; letter-spacing: .08em; font-size: .9rem;
  font-weight: 600; color: var(--gris-osc); position: relative; padding: 6px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--acento); transition: var(--trans);
}
.nav a:hover, .nav a.active { color: var(--negro); }
.nav a:hover::after, .nav a.active::after { width: 100%; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--negro); margin: 5px 0; transition: var(--trans); }

/* ---------- Hero slider ---------- */
.hero { position: relative; height: calc(100vh - 84px); min-height: 480px; overflow: hidden; background: #000; }
.slides { height: 100%; }
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease;
  background-size: cover; background-position: center; }
.slide.is-active { opacity: 1; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55)); }
.hero-caption {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; color: #fff; padding: 0 24px;
}
.hero-caption h1 {
  font-size: clamp(2rem, 6vw, 4.2rem); text-transform: uppercase; letter-spacing: .03em;
  text-shadow: 0 2px 20px rgba(0,0,0,.4); }
.hero-caption p { margin-top: 16px; font-size: clamp(1rem,2.2vw,1.3rem); max-width: 680px; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.hero-caption .btn { margin-top: 30px; }

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 52px; height: 52px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.18); color: #fff; font-size: 1.6rem; line-height: 1;
  transition: var(--trans); backdrop-filter: blur(4px);
}
.slider-arrow:hover { background: rgba(255,255,255,.4); }
.slider-arrow.prev { left: 22px; } .slider-arrow.next { right: 22px; }
.slider-dots { position: absolute; bottom: 26px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 10px; }
.slider-dots button { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; transition: var(--trans); padding: 0; }
.slider-dots button.is-active { background: #fff; }

/* ---------- Page banner (subpáginas) ---------- */
.page-banner {
  position: relative; padding: 110px 0; text-align: center; color: #fff;
  background: var(--negro) center/cover no-repeat; }
.page-banner::after { content: ""; position: absolute; inset: 0; background: rgba(17,20,24,.6); }
.page-banner .container { position: relative; z-index: 2; }
.page-banner h1 { font-size: clamp(2rem,5vw,3.4rem); text-transform: uppercase; letter-spacing: .05em; }
.breadcrumbs { margin-top: 10px; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.8); }

/* ---------- Servicios ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.service-card {
  position: relative; min-height: 360px; border-radius: var(--radio); overflow: hidden;
  display: flex; align-items: flex-end; color: #fff; background: #333 center/cover;
  box-shadow: var(--sombra); }
.service-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15) 35%, rgba(0,0,0,.85)); transition: var(--trans); }
.service-card:hover::after { background: linear-gradient(180deg, rgba(184,144,47,.25) 10%, rgba(0,0,0,.9)); }
.service-card .body { position: relative; z-index: 2; padding: 30px; }
.service-card h3 { font-size: 1.5rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.service-card p { font-size: .98rem; opacity: .92; }

/* ---------- Portafolio ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project {
  position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radio);
  background: #222; display: block; }
.project img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project:hover img { transform: scale(1.08); }
.project::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.8)); }
.project .meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px; color: #fff; transform: translateY(8px); transition: var(--trans); }
.project:hover .meta { transform: translateY(0); }
.project h3 { font-size: 1.25rem; text-transform: uppercase; letter-spacing: .04em; }
.project .loc { font-size: .85rem; opacity: .85; margin-top: 4px; display: flex; align-items: center; gap: 6px; }

/* ---------- Nosotros ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: var(--radio); box-shadow: var(--sombra); width: 100%; height: 100%; object-fit: cover; }
.lead { font-size: 1.05rem; color: var(--gris-osc); margin-bottom: 18px; }

.mv { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.mv-card { background: var(--blanco); padding: 40px; border-radius: var(--radio); border-top: 4px solid var(--acento); box-shadow: var(--sombra); }
.mv-card h3 { text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; font-size: 1.4rem; }

.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.value h4 { text-transform: uppercase; letter-spacing: .05em; color: var(--acento); margin-bottom: 10px; font-size: 1.05rem; }
.value p { font-size: .95rem; color: var(--gris); }
.value .num { font-size: 2.2rem; font-weight: 800; color: var(--linea); line-height: 1; margin-bottom: 12px; }

.clients { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 50px; }
.clients img { height: 60px; width: auto; filter: grayscale(1); opacity: .65; transition: var(--trans); }
.clients img:hover { filter: grayscale(0); opacity: 1; }

/* ---------- Contacto ---------- */
.contact { position: relative; color: #fff; background: var(--negro) center/cover; }
.contact::after { content: ""; position: absolute; inset: 0; background: rgba(17,20,24,.82); }
.contact .container { position: relative; z-index: 2; }
.contact-form { display: grid; gap: 16px; max-width: 560px; margin-top: 26px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 15px 18px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.07); color: #fff; border-radius: var(--radio); font: inherit; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(255,255,255,.6); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--acento); }

/* ---------- Footer ---------- */
.site-footer { background: #0c0e11; color: rgba(255,255,255,.7); padding: 56px 0 28px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-logo img { height: 56px; filter: brightness(0) invert(1); }
.socials { display: flex; gap: 16px; }
.socials a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; transition: var(--trans); }
.socials a:hover { background: var(--acento); border-color: var(--acento); }
.socials svg { width: 20px; height: 20px; fill: #fff; }
.footer-bottom { padding-top: 26px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; }
.footer-bottom a { color: var(--acento); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .portfolio-grid, .values { grid-template-columns: repeat(2, 1fr); }
  .split, .mv { grid-template-columns: 1fr; gap: 30px; }
  .nav {
    position: fixed; inset: 84px 0 auto 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--linea); padding: 10px 0;
    transform: translateY(-130%); transition: var(--trans); box-shadow: var(--sombra);
  }
  .nav.open { transform: translateY(0); }
  .nav a { width: 100%; text-align: center; padding: 16px; border-top: 1px solid var(--linea); }
  .nav a::after { display: none; }
  .nav-toggle { display: block; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 560px) {
  .grid-3, .portfolio-grid, .values { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .slider-arrow { display: none; }
}
