/*
 * AYAT — Auditoría & Abogados Tributarios S.A.
 * PRT-022 · Prototipo Fase 1 (sitio informativo)
 * Marca: isotipo "montaña A" (azul acero + grises). Toda la marca en :root.
 */

:root {
  /* Paleta AYAT (derivada del logo) */
  --azul:        #4a6c8c;   /* azul acero primario (botones, títulos, acentos) */
  --azul-900:    #35506b;   /* variante oscura */
  --acento:      #8fabc6;   /* azul acero claro del triángulo (marca) */
  --gris-claro:  #e4e4e6;
  --gris:        #c2c2c4;
  --gris-texto:  #545861;
  --blanco:      #ffffff;
  --hueso:       #f4f6f8;

  --font-display: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-body:    "Lato", "Segoe UI", Arial, sans-serif;

  --contenedor: 1180px;
  --radio: 6px;
  --sombra: 0 10px 30px rgba(53, 80, 107, 0.10);
  --sombra-fuerte: 0 18px 48px rgba(53, 80, 107, 0.18);
  --transicion: .25s ease;
}

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

body {
  font-family: var(--font-body);
  color: var(--gris-texto);
  line-height: 1.65;
  background-color: #eceef1;
  -webkit-font-smoothing: antialiased;
}
/* Marca de agua: mosaico del isotipo en gris claro (no invasivo) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: url("../brand/icono.png") repeat;
  background-size: 112px auto;
  filter: grayscale(1);
  opacity: 0.06;
  pointer-events: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--azul-900);
  line-height: 1.22; font-weight: 600; letter-spacing: .3px;
}
a { color: var(--azul); text-decoration: none; transition: color var(--transicion); }
a:hover { color: var(--azul-900); }
img { max-width: 100%; display: block; }

.contenedor { width: 100%; max-width: var(--contenedor); margin: 0 auto; padding: 0 24px; }
.seccion { padding: 88px 0; }
/* Semi-transparente para que el mosaico de fondo se perciba de forma pareja */
.seccion--hueso { background: rgba(244, 246, 248, 0.72); }
.seccion__titulo { text-align: center; font-size: 2rem; margin-bottom: 12px; text-transform: uppercase; }
.seccion__intro { text-align: center; max-width: 720px; margin: 0 auto 52px; font-size: 1.05rem; }
.linea { width: 64px; height: 3px; background: var(--acento); margin: 16px auto 0; border-radius: 3px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; padding: 13px 30px; border-radius: var(--radio);
  font-weight: 700; font-size: .95rem; letter-spacing: .3px; cursor: pointer;
  border: 2px solid var(--azul); transition: all var(--transicion); text-align: center;
  position: relative; overflow: hidden;
}
.btn--primario { background: var(--azul); color: #fff; }
.btn--primario:hover { background: var(--azul-900); border-color: var(--azul-900); color: #fff; transform: translateY(-2px); }
.btn--claro { background: transparent; color: #fff; border-color: #fff; }
.btn--claro:hover { background: #fff; color: var(--azul); }
.btn--ghost { background: transparent; color: var(--azul); }
.btn--ghost:hover { background: var(--azul); color: #fff; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn:hover::after { left: 140%; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gris-claro); transition: box-shadow var(--transicion);
}
.header.scrolled { box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 86px; }
.nav__logo img { height: 56px; transition: height var(--transicion); }
.header.scrolled .nav { height: 72px; }
.header.scrolled .nav__logo img { height: 46px; }
.nav__menu { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav__menu a { color: var(--gris-texto); font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .4px; }
.nav__menu a:hover { color: var(--azul); }
.nav__menu .btn { color: #fff; }
.nav__menu > li > a:not(.btn) { position: relative; }
.nav__menu > li > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 2px;
  background: var(--azul); transform: scaleX(0); transform-origin: right; transition: transform .3s ease;
}
.nav__menu > li > a:not(.btn):hover::after,
.nav__menu > li > a.activo::after { transform: scaleX(1); transform-origin: left; }
.nav__menu > li > a.activo { color: var(--azul); }
.nav__toggle { display: none; background: none; border: none; cursor: pointer; width: 40px; height: 40px; flex-direction: column; justify-content: center; gap: 6px; }
.nav__toggle span { display: block; height: 3px; width: 26px; background: var(--azul); border-radius: 3px; transition: var(--transicion); }

/* ---------- Hero (slider) ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center; color: #fff;
  overflow: hidden; background: var(--azul-900);
}
.hero__slider { position: absolute; inset: 0; z-index: 0; }
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.3s ease;
}
.hero__slide.activo { opacity: 1; animation: kenburns 6.5s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1.16); } }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(120deg, rgba(53,80,107,.93) 0%, rgba(74,108,140,.74) 48%, rgba(74,108,140,.42) 100%);
}
.hero__contenido { position: relative; z-index: 2; max-width: 700px; padding: 110px 0 60px; }
.hero__scroll { z-index: 2; }
.hero__dots {
  position: absolute; z-index: 2; bottom: 30px; right: 34px;
  display: flex; gap: 10px;
}
.hero__dots button {
  width: 34px; height: 4px; border-radius: 3px; border: none; cursor: pointer; padding: 0;
  background: rgba(255,255,255,.4); transition: background var(--transicion);
}
.hero__dots button.activo { background: #fff; }
.hero__contenido > * { opacity: 0; animation: heroIn .8s cubic-bezier(.22,.61,.36,1) forwards; }
.hero__badge { animation-delay: .15s; }
.hero h1 { animation-delay: .30s; }
.hero p { animation-delay: .45s; }
.hero__acciones { animation-delay: .60s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.hero__badge {
  display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35);
  padding: 7px 18px; border-radius: 30px; font-size: .82rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 24px;
}
.hero h1 { color: #fff; font-size: 3rem; line-height: 1.16; margin-bottom: 22px; text-transform: uppercase; }
.hero p { font-size: 1.16rem; max-width: 580px; margin-bottom: 34px; color: rgba(255,255,255,.92); }
.hero__acciones { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 44px; border: 2px solid rgba(255,255,255,.6); border-radius: 14px;
  display: flex; justify-content: center; animation: fadeInLate 1.4s ease forwards; opacity: 0;
}
.hero__scroll span { width: 4px; height: 9px; background: #fff; border-radius: 3px; margin-top: 8px; animation: scrollDot 1.6s ease-in-out infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes fadeInLate { to { opacity: 1; } }

/* ---------- Franja ---------- */
.franja { background: var(--azul); color: #fff; padding: 34px 0; }
.franja__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.franja__item .n { font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; color: #fff; display: block; }
.franja__item .t { font-size: .9rem; letter-spacing: .5px; opacity: .85; text-transform: uppercase; }

/* ---------- Nosotros ---------- */
.nosotros__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.nosotros__img img { border-radius: var(--radio); box-shadow: var(--sombra); }
.nosotros h2 { font-size: 2rem; text-transform: uppercase; margin-bottom: 18px; }
.nosotros p { margin-bottom: 16px; }
.nosotros__lista { list-style: none; margin-top: 22px; }
.nosotros__lista li { padding: 8px 0 8px 30px; position: relative; font-weight: 600; color: var(--azul); }
.nosotros__lista li::before { content: "▲"; position: absolute; left: 0; color: var(--acento); font-size: .8rem; top: 12px; }

/* ---------- Servicios (2 pilares) ---------- */
.pilares { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.pilar { background: #fff; border: 1px solid var(--gris-claro); border-radius: var(--radio); padding: 40px 36px; transition: all var(--transicion); }
.pilar:hover { box-shadow: var(--sombra-fuerte); transform: translateY(-4px); }
.pilar__cab { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.pilar__ic {
  width: 56px; height: 56px; border-radius: 12px; flex: 0 0 auto;
  background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
}
.pilar h3 { font-size: 1.35rem; text-transform: uppercase; }
.pilar__lista { list-style: none; }
.pilar__lista li { padding: 12px 0 12px 32px; position: relative; border-bottom: 1px solid var(--hueso); }
.pilar__lista li:last-child { border-bottom: none; }
.pilar__lista li::before { content: "✓"; position: absolute; left: 0; color: var(--acento); font-weight: 700; transition: transform var(--transicion), color var(--transicion); }
.pilar__lista li { transition: padding-left var(--transicion), background var(--transicion); }
.pilar__lista li:hover { background: var(--hueso); padding-left: 38px; border-radius: 4px; }
.pilar__lista li:hover::before { transform: translateX(4px) scale(1.2); color: var(--azul); }
/* Cascada de aparición de los ítems cuando el pilar se revela */
.pilar[data-reveal] .pilar__lista li { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease, padding-left var(--transicion), background var(--transicion); }
.pilar[data-reveal].visible .pilar__lista li { opacity: 1; transform: translateY(0); }
.pilar.visible .pilar__lista li:nth-child(1) { transition-delay: .12s; }
.pilar.visible .pilar__lista li:nth-child(2) { transition-delay: .22s; }
.pilar.visible .pilar__lista li:nth-child(3) { transition-delay: .32s; }
.pilar.visible .pilar__lista li:nth-child(4) { transition-delay: .42s; }
.pilar__lista b { color: var(--azul-900); display: block; font-family: var(--font-display); font-size: .98rem; }
.pilar__lista small { color: var(--gris-texto); font-size: .88rem; }

/* ---------- Clientes ---------- */
.clientes__wall { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px; }
.clientes__logo {
  background: #fff; border: 1px solid var(--gris-claro); border-radius: var(--radio);
  height: 110px; width: 200px; display: flex; align-items: center; justify-content: center; padding: 22px;
  transition: all var(--transicion);
}
.clientes__logo img { max-height: 100%; max-width: 100%; object-fit: contain; filter: grayscale(100%); opacity: .7; transition: all var(--transicion); }
.clientes__logo:hover { box-shadow: var(--sombra); transform: translateY(-4px); }
.clientes__logo:hover img { filter: grayscale(0); opacity: 1; }

/* ---------- Testimonios (carrusel) ---------- */
.testi { display: flex; align-items: center; gap: 14px; }
.testi__ventana { overflow: hidden; flex: 1; }
.testi__track { display: flex; transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.testi__item { min-width: 100%; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.testi__comillas { font-family: var(--font-display); font-size: 3.6rem; line-height: .6; color: var(--acento); margin-bottom: 10px; }
.testi__item blockquote { font-size: 1.25rem; line-height: 1.6; color: var(--gris-texto); max-width: 760px; margin: 0 auto 26px; font-style: italic; }
.testi__item figcaption { display: flex; align-items: center; gap: 14px; }
.testi__avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.testi__item figcaption b { color: var(--azul-900); display: block; font-family: var(--font-display); }
.testi__item figcaption small { color: var(--gris); font-size: .85rem; }
.testi__nav { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--gris); background: #fff; color: var(--azul); font-size: 1.6rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transicion); }
.testi__nav:hover { background: var(--azul); color: #fff; border-color: var(--azul); }
.testi__dots { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.testi__dots button { width: 11px; height: 11px; border-radius: 50%; border: none; cursor: pointer; background: var(--gris); transition: all var(--transicion); padding: 0; }
.testi__dots button.activo { background: var(--azul); transform: scale(1.25); }
@media (max-width: 560px) { .testi__item blockquote { font-size: 1.05rem; } .testi__nav { width: 40px; height: 40px; font-size: 1.3rem; } }

/* ---------- CTA ---------- */
.cta {
  position: relative; color: #fff; text-align: center;
  background: linear-gradient(rgba(53,80,107,.90), rgba(74,108,140,.90)), url("../img/cta.png") center/cover no-repeat;
  padding: 96px 0;
}
.cta h2 { color: #fff; font-size: 2.2rem; text-transform: uppercase; margin-bottom: 16px; }
.cta p { max-width: 620px; margin: 0 auto 30px; font-size: 1.1rem; color: rgba(255,255,255,.92); }

/* ---------- Sedes ---------- */
.sedes__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.sede { background: #fff; border: 1px solid var(--gris-claro); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); transition: all var(--transicion); }
.sede:hover { box-shadow: var(--sombra-fuerte); transform: translateY(-4px); }
.sede__mapa { height: 240px; background: var(--gris-claro); }
.sede__mapa iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.2); transition: filter var(--transicion); }
.sede:hover .sede__mapa iframe { filter: grayscale(0); }
.sede__info { padding: 26px 28px; }
.sede__info h3 { font-size: 1.25rem; margin-bottom: 14px; text-transform: uppercase; }
.sede__info p { display: flex; gap: 10px; margin-bottom: 10px; font-size: .96rem; align-items: flex-start; }
.sede__info .btn { margin-top: 12px; }

/* ---------- Contacto ---------- */
.contacto__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 52px; }
.contacto__info h3 { font-size: 1.4rem; margin-bottom: 20px; text-transform: uppercase; }
.dato { display: flex; gap: 14px; margin-bottom: 22px; align-items: flex-start; }
.dato__ic { min-width: 42px; height: 42px; border-radius: 50%; background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.dato b { color: var(--azul-900); display: block; text-transform: uppercase; font-size: .82rem; letter-spacing: .5px; }
.form { background: #fff; border: 1px solid var(--gris-claro); border-radius: var(--radio); padding: 34px; box-shadow: var(--sombra); }
.form__fila { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.campo { margin-bottom: 18px; }
.campo label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; color: var(--azul-900); text-transform: uppercase; letter-spacing: .4px; }
.campo input, .campo select, .campo textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--gris); border-radius: var(--radio);
  font-family: var(--font-body); font-size: .96rem; color: var(--gris-texto); background: #fff; transition: border-color var(--transicion);
}
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(74,108,140,.14); }
.campo textarea { resize: vertical; min-height: 110px; }
.form .btn { width: 100%; margin-top: 6px; }
.form__nota { font-size: .8rem; text-align: center; margin-top: 14px; color: var(--gris); }
.form__ok { display: none; background: #eaf3ee; border: 1px solid #b7dfc4; color: #1e7a3d; padding: 14px; border-radius: var(--radio); text-align: center; margin-top: 16px; font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: var(--azul-900); color: rgba(255,255,255,.82); padding: 56px 0 0; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer h4 { color: #fff; text-transform: uppercase; font-size: 1rem; margin-bottom: 18px; letter-spacing: .5px; }
.footer a { color: rgba(255,255,255,.82); }
.footer a:hover { color: #fff; }
.footer__logo img { height: 56px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer__logo p { font-size: .92rem; max-width: 340px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; font-size: .94rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: .85rem; }
.footer__powered { opacity: .8; }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(38px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
[data-reveal="left"] { transform: translateX(-46px); }
[data-reveal="right"] { transform: translateX(46px); }
[data-reveal].visible { opacity: 1; transform: translate(0,0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
  .hero__scroll, .wa-flotante__pulso { animation: none !important; }
}

/* ---------- WhatsApp + volver arriba ---------- */
.wa-flotante {
  position: fixed; right: 24px; bottom: 24px; z-index: 999; width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,.45); transition: transform .25s ease, box-shadow .25s ease; animation: waEntra .5s ease .8s both;
}
.wa-flotante:hover { transform: scale(1.1); color: #fff; box-shadow: 0 10px 30px rgba(37,211,102,.6); }
.wa-flotante svg { position: relative; z-index: 2; }
.wa-flotante__pulso { position: absolute; inset: 0; border-radius: 50%; background: #25D366; z-index: 1; animation: waPulso 2s ease-out infinite; }
@keyframes waPulso { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes waEntra { from { transform: scale(0); } to { transform: scale(1); } }
.volver-arriba {
  position: fixed; right: 26px; bottom: 92px; z-index: 998; width: 46px; height: 46px; border-radius: 50%;
  background: var(--azul); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sombra); opacity: 0; visibility: hidden; transform: translateY(14px); transition: all .3s ease;
}
.volver-arriba.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.volver-arriba:hover { background: var(--azul-900); transform: translateY(-3px); }

/* ---------- Preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 3000; background: var(--azul-900); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; transition: opacity .6s ease, visibility .6s ease; }
.preloader.oculto { opacity: 0; visibility: hidden; }
.preloader__caja { position: relative; width: 92px; height: 92px; display: flex; align-items: center; justify-content: center; }
.preloader__icono { width: 62px; height: auto; filter: brightness(0) invert(1); animation: latido 1.6s ease-in-out infinite; }
.preloader__anillo { position: absolute; inset: 0; border: 3px solid rgba(255,255,255,.15); border-top-color: #fff; border-radius: 50%; animation: giro 1s linear infinite; }
.preloader__texto { font-family: var(--font-display); color: rgba(255,255,255,.9); letter-spacing: 3px; font-size: .85rem; text-transform: uppercase; }
@keyframes giro { to { transform: rotate(360deg); } }
@keyframes latido { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.1); opacity: 1; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__menu { position: fixed; top: 86px; right: -100%; flex-direction: column; align-items: flex-start; background: #fff; width: 78%; max-width: 320px; height: calc(100vh - 86px); padding: 32px 28px; gap: 22px; box-shadow: -8px 0 30px rgba(0,0,0,.12); transition: right .3s ease; }
  .nav__menu.abierto { right: 0; }
  .nav__toggle { display: flex; }
  .nav__toggle.activo span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .nav__toggle.activo span:nth-child(2) { opacity: 0; }
  .nav__toggle.activo span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
  .hero h1 { font-size: 2.2rem; }
  .nosotros__grid, .pilares, .sedes__grid, .contacto__grid, .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .franja__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 560px) {
  .seccion { padding: 60px 0; }
  .hero h1 { font-size: 1.85rem; }
  .franja__grid { grid-template-columns: 1fr 1fr; }
  .form__fila { grid-template-columns: 1fr; }
  .hero__acciones { flex-direction: column; }
  .hero__acciones .btn { width: 100%; }
  .clientes__logo { width: 150px; height: 90px; }
  .wa-flotante { width: 52px; height: 52px; right: 16px; bottom: 16px; }
  .volver-arriba { right: 18px; bottom: 78px; width: 42px; height: 42px; }
}
