/* ==========================================================================
   ATI Construction — hoja de estilos principal
   Reconstruido a partir del sitio original (Hostinger Website Builder)
   ========================================================================== */

:root {
  /* Paleta original */
  --navy: #1d3557;
  --steel: #457b9d;
  --steel-dark: #375f7a;
  --aqua: #a8dadc;
  --ink: #0d141a;
  --ink-2: #0a1015;
  --muted: #56585e;
  --services-bg: #eceff3;
  --border: #b8c0cc;
  --white: #ffffff;

  /* Tipografía */
  --font-primary: 'Outfit', sans-serif;
  --font-secondary: 'Inter', sans-serif;

  /* Layout */
  --container: 1224px;
  --gutter: 16px;
  --radius: 20px;
  --header-h: 91px;
}

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

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

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

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

a { color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

h1 { font-size: 64px; }
h2 { font-size: 56px; }
h3 { font-size: 48px; }
h5 { font-size: 26px; }
h6 { font-size: 18px; }

p { margin: 0; }

.body-large { font-size: 18px; }
.body-small {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}
.muted { color: var(--muted); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 2px 12px rgba(13, 20, 26, .08); }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding-top: 20px;
  padding-bottom: 20px;
}

.logo {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 23px;
  letter-spacing: .2px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav { display: flex; gap: 32px; }
.nav a {
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav a:hover,
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Botones y formularios
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-secondary);
  font-size: 16px;
  line-height: 1;
  padding: 16px 40px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: wait; }

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); }

.btn-steel {
  background: var(--steel);
  color: var(--white);
}
.btn-steel:hover { background: var(--steel-dark); }

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: var(--radius);
}
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-size: 14px; }

.form input,
.form textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  transition: border-color .2s ease;
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:hover,
.form textarea:hover,
.form input:focus,
.form textarea:focus { border-color: var(--ink); outline: none; }

.form .is-invalid { border-color: #d63163; }
.field-error { font-size: 13px; color: #ffd5df; min-height: 0; }
.form--light .field-error { color: #b0163f; }

.form-status { font-size: 14px; min-height: 1.2em; }
.form-status.is-success { font-weight: 600; }

/* Formulario sobre el video (hero) */
.form--glass {
  background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 32px;
  gap: 15px;
  color: var(--white);
}
.form--glass .btn { align-self: center; }

/* Formulario aqua (sección contacto) */
.form--light {
  background: var(--aqua);
  padding: 40px;
  color: var(--ink);
}
.form--light .btn { align-self: flex-start; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 851px;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
  background: #2a2f36 url("../img/hero-poster.jpg") center / cover no-repeat;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 503px) minmax(0, 519px);
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  padding-top: 80px;
  padding-bottom: 80px;
}
.hero-stars { font-size: 16px; letter-spacing: 1px; margin-bottom: 6px; }
.hero-tagline { font-size: 14px; line-height: 1.3; margin-bottom: 14px; }
.hero h1 { font-size: 72px; line-height: 1.2; margin-bottom: 12px; }
.hero-lead { max-width: 400px; }

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */
.section { padding: 96px 0; }

/* About */
.about .container {
  display: grid;
  grid-template-columns: minmax(0, 366px) minmax(0, 812px);
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}
.about h3 { margin-bottom: 20px; }
.about img {
  width: 100%;
  aspect-ratio: 812 / 516;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Services */
.services { background: var(--services-bg); }
.services-inner { max-width: 912px; margin: 0 auto; }
.services-head { margin-bottom: 72px; }
.services-head h3 { margin-bottom: 12px; color: var(--ink); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 400px));
  justify-content: space-between;
  row-gap: 64px;
  column-gap: 48px;
}
.service-card img {
  width: 100%;
  aspect-ratio: 400 / 304;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: transform .35s ease, box-shadow .35s ease;
}
.service-card:hover img {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(13, 20, 26, .14);
}
.service-card h6 { font-size: 20px; color: #000; margin-bottom: 8px; }
.service-card p { color: #000; }

/* Featured projects */
.projects h3 { margin-bottom: 16px; }
.projects-lead { max-width: 477px; margin-bottom: 52px; }
.project {
  display: grid;
  grid-template-columns: minmax(0, 606px) minmax(0, 503px);
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}
.project img {
  width: 100%;
  aspect-ratio: 606 / 404;
  object-fit: cover;
  border-radius: var(--radius);
}
.project h5 { color: var(--ink); margin-bottom: 20px; }

/* Contact CTA */
.cta-head { max-width: 606px; margin: 0 auto 48px; text-align: center; }
.cta-head h3 { margin-bottom: 18px; }
.cta-head p { max-width: 435px; margin: 0 auto; }

.cta-body {
  display: grid;
  grid-template-columns: 568px 503px;
  justify-content: center;
  align-items: start;
  max-width: 1018px;
  margin: 0 auto;
}
.cta-body .form { position: relative; z-index: 1; }
.cta-body img {
  width: 100%;
  aspect-ratio: 503 / 337;
  object-fit: cover;
  border-radius: var(--radius);
  margin-top: 42px;
  margin-left: -53px;
  position: relative;
  z-index: 0;
}

/* --------------------------------------------------------------------------
   Reseñas (widget original conectado a Google Apps Script)
   -------------------------------------------------------------------------- */
.reviews-section {
  width: 100%;
  padding: 60px 20px;
  background: #f5f5f5;
  font-family: Arial, sans-serif;
}
.reviews-container { max-width: 1150px; margin: 0 auto; }
.reviews-header { text-align: center; margin-bottom: 32px; }
.reviews-header h2 {
  font-family: Arial, sans-serif;
  font-size: 34px;
  margin: 0 0 10px;
  color: #1f1f1f;
  font-weight: 800;
}
.reviews-header p { font-size: 15px; color: #666; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 45px;
}
.review-card {
  background: #fff;
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
  border: 1px solid rgba(0, 0, 0, .06);
}
.review-stars { color: #f5b400; font-size: 23px; margin-bottom: 14px; letter-spacing: 2px; }
.review-text { font-size: 15px; line-height: 1.65; color: #333; margin-bottom: 18px; }
.review-name { font-weight: 700; color: #111; font-size: 15px; }
.review-date { font-size: 12px; color: #888; margin-top: 5px; }
.reviews-loading { grid-column: 1 / -1; text-align: center; color: #666; }

.review-form-card {
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  padding: 28px;
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
  border: 1px solid rgba(0, 0, 0, .06);
  text-align: center;
}
.review-form-card h3 {
  font-family: Arial, sans-serif;
  font-size: 26px;
  margin: 0 0 8px;
  color: #1f1f1f;
}
.review-form-card > p { font-size: 14px; color: #666; margin: 0 0 20px; }
.review-form-card input,
.review-form-card select,
.review-form-card textarea {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 14px;
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  font-size: 14px;
  font-family: Arial, sans-serif;
  background: #fff;
}
.review-form-card textarea { min-height: 110px; resize: vertical; }
.review-form-card button {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: #111;
  color: #fff;
}
.review-form-card button:hover { background: #333; }
.review-form-card .form-message { margin-top: 12px; font-size: 13px; color: #1b7f3a; }

/* --------------------------------------------------------------------------
   Página de contacto
   -------------------------------------------------------------------------- */
.contact-intro .container {
  display: grid;
  grid-template-columns: minmax(0, 606px) minmax(0, 612px);
  justify-content: space-between;
  align-items: start;
  gap: 40px;
}
.contact-intro h1 { color: var(--ink-2); margin-bottom: 24px; }
.contact-intro .body-large { color: var(--ink-2); }

.contact-list { margin-top: 52px; }
.contact-list h6 { margin-bottom: 4px; }
.contact-list p { margin-bottom: 24px; }
.contact-list a { text-decoration: none; border-bottom: 1px solid currentColor; }

.contact-logo {
  width: 100%;
  aspect-ratio: 612 / 448;
  object-fit: contain;
  margin-top: 40px;
}

.map-wrap {
  border-radius: 0;
  overflow: hidden;
  height: 504px;
  background: var(--services-bg);
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

.follow .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 48px;
}
.follow h6 { color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Iconos sociales
   -------------------------------------------------------------------------- */
.social { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.social a {
  display: block;
  width: 24px; height: 24px;
  color: inherit;
  transition: opacity .2s ease, transform .2s ease;
}
.social a:hover { opacity: .75; transform: translateY(-2px); }
.social svg { width: 100%; height: 100%; }
.social--sm a { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--navy); color: var(--white); }
.site-footer .container { padding-top: 70px; padding-bottom: 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 515fr 309fr 400fr;
  gap: 24px;
}
.footer-brand h5 { margin-bottom: 20px; }
.footer-brand p { font-size: 14px; line-height: 1.3; max-width: 297px; margin-bottom: 46px; }
.footer-col .body-small { margin: 9px 0 18px; }
.footer-col p { margin-bottom: 2px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-copy { font-size: 14px; line-height: 1.3; margin-top: 54px; }

/* --------------------------------------------------------------------------
   Botón flotante de WhatsApp
   -------------------------------------------------------------------------- */
.whatsapp {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.whatsapp:hover { transform: scale(1.06); }
.whatsapp svg { width: 30px; height: 30px; }

/* --------------------------------------------------------------------------
   Animación de entrada (equivalente al "slide" del original)
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); 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: 1100px) {
  .hero h1 { font-size: 60px; }
  .cta-body { grid-template-columns: minmax(0, 1fr); max-width: 568px; }
  .cta-body img { margin: -32px 0 0 32px; width: calc(100% - 32px); }
}

@media (max-width: 900px) {
  :root { --header-h: 80px; }
  h1 { font-size: 40px; }
  h2 { font-size: 36px; }
  h3 { font-size: 32px; }
  h5 { font-size: 20px; }

  .section { padding: 64px 0; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
    padding: 20px var(--gutter) 28px;
    background: var(--white);
    box-shadow: 0 12px 20px rgba(13, 20, 26, .08);
    display: none;
  }
  .nav-open .nav { display: flex; }

  .hero { min-height: 0; }
  .hero .container { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 64px; }
  .hero h1 { font-size: 44px; }

  .about .container,
  .project,
  .contact-intro .container { grid-template-columns: 1fr; }
  .about img { order: -1; }

  .services-head { margin-bottom: 40px; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { margin-bottom: 28px; }

  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .map-wrap { height: 380px; }
  .contact-logo { max-width: 420px; margin: 0 auto; }
}

@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .form--glass { padding: 24px; }
  .form--light { padding: 28px 22px; }
  .cta-body img { margin: 16px 0 0; width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .follow .container { flex-direction: column; align-items: flex-start; }
  .reviews-section { padding: 45px 16px; }
  .reviews-grid { grid-template-columns: 1fr; }
  .reviews-header h2 { font-size: 28px; }
  .review-form-card { padding: 24px 18px; }
  .whatsapp { right: 16px; bottom: 16px; }
}
