/* Eboluzio — estilos
   Colores originales: azul oscuro #1A2539, azul marino #012169, amarillo #F1C400, dorado #DC9E14.
   Tipografías del tema original (Hestia): Roboto Slab en títulos y Roboto en textos. */

@font-face { font-family: "Roboto Slab"; font-weight: 400; font-display: swap; src: url("../fonts/roboto-slab-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-weight: 700; font-display: swap; src: url("../fonts/roboto-slab-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 300; font-display: swap; src: url("../fonts/roboto-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: url("../fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-display: swap; src: url("../fonts/roboto-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-display: swap; src: url("../fonts/roboto-latin-700-normal.woff2") format("woff2"); }

:root {
  --oscuro: #1a2539;
  --marino: #012169;
  --amarillo: #f1c400;
  --dorado: #dc9e14;
  --texto: #3c4858;
  --slab: "Roboto Slab", Georgia, serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t: .4s;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hh, 70px); }
body {
  margin: 0;
  font-family: "Roboto", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7;
  color: var(--texto); background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.container { width: min(100% - 32px, 1176px); margin-inline: auto; }
.narrow { max-width: 858px; }

/* ---------- Botón amarillo (estilo original: esquinas rectas) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px;
  background: var(--amarillo); color: var(--oscuro);
  font-size: .95rem; font-weight: 500; letter-spacing: .5px; text-transform: uppercase; text-decoration: none;
  border: 2px solid var(--amarillo);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.btn--lg { padding: 16px 42px; font-size: 1.15rem; }
@media (hover: hover) {
  .btn:hover { background: transparent; color: var(--amarillo); transform: translateY(-2px); }
  .accede .btn:hover { background: var(--oscuro); color: var(--amarillo); border-color: var(--oscuro); box-shadow: 0 10px 22px rgba(26, 37, 57, .25); }
}

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--oscuro); transition: box-shadow var(--t) var(--ease); }
.header.is-scrolled { box-shadow: 0 6px 22px rgba(0, 0, 0, .3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.logo img { width: clamp(140px, 15vw, 190px); transition: opacity var(--t) var(--ease); }
.logo:hover img { opacity: .85; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative; padding: 10px 14px;
  color: #fff; font-size: .8rem; font-weight: 400; letter-spacing: .4px; text-transform: uppercase; text-decoration: none;
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--amarillo); transform: scaleX(0); transform-origin: right;
  transition: transform var(--t) var(--ease);
}
.nav a:not(.nav-cta):hover { color: var(--amarillo); }
.nav a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { margin-left: 8px; background: var(--amarillo); color: var(--oscuro) !important; font-weight: 500 !important; }
.nav-cta:hover { background: #fff; }
.menu-btn { display: none; }

/* ---------- Portada ---------- */
.hero {
  position: relative;
  aspect-ratio: 1900 / 548;           /* proporción real de la foto: nunca se recorta */
  display: flex; align-items: center;
  background: var(--oscuro) url("../img/portada.jpg") center / 100% 100% no-repeat;
}
.hero-inner { display: flex; justify-content: flex-end; }
.hero-box {
  width: min(100%, 660px);
  padding: 44px clamp(24px, 4vw, 56px);
  background: var(--oscuro); color: #fff; text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.hero-box { width: min(100%, 600px); padding: clamp(26px, 3vw, 44px) clamp(24px, 3.5vw, 52px); }
.hero-box p { margin-bottom: 22px; font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.75; font-weight: 300; }

/* ---------- Secciones ---------- */
.section { padding: clamp(56px, 7vw, 84px) 0; }
.title {
  text-align: center;
  font-family: var(--slab); font-weight: 400; font-size: clamp(1.6rem, 3vw, 1.9rem); line-height: 1.25;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--marino);
}
.title--yellow { color: var(--amarillo); }
.title--left { text-align: left; text-transform: none; letter-spacing: 0; }

.intro { text-align: center; }
.intro .title { margin-bottom: 18px; }
.intro .title::after { content: ""; display: block; width: 70px; height: 2px; margin: 16px auto 0; background: var(--amarillo); }
.intro p { font-size: 1.02rem; }

/* Ejes de negocio */
.ejes { background: var(--marino); }
.ejes .title { margin-bottom: 44px; }
.ejes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.eje { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 12px; border-radius: 6px; transition: background-color var(--t) var(--ease), transform var(--t) var(--ease); }
.eje img { width: 140px; transition: transform .6s var(--ease); }
.eje h3 { margin-top: 22px; font-family: var(--slab); font-weight: 700; font-size: 1.2rem; line-height: 1.15; text-transform: uppercase; color: var(--amarillo); }
@media (hover: hover) {
  .eje:hover { background: rgba(255, 255, 255, .06); transform: translateY(-6px); }
  .eje:hover img { transform: scale(1.06); }
}

/* Accede */
.accede-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px 60px; }
.accede .title { margin-bottom: 10px; }
.accede p { font-size: 1.02rem; }
.accede .btn { flex: none; }

/* ---------- Footer ---------- */
.footer { background: var(--oscuro); color: #fff; padding: 40px 0; font-size: .9rem; line-height: 1.6; }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 30px; align-items: center; }
.footer-col p { margin-bottom: 12px; }
.footer-title { font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.footer a { text-decoration: none; transition: color var(--t) var(--ease); }
.footer-col a:hover, .footer-powered p a:hover { color: var(--amarillo); }
.social { display: flex; gap: 8px; margin-top: 6px; }
.social a {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--dorado); color: #fff;
  transition: background-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.social a:hover { background: var(--amarillo); color: var(--oscuro); transform: translateY(-3px); }
.social svg { width: 17px; height: 17px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-weight: 700; text-transform: uppercase; font-size: .85rem; }
.footer-links a:hover { color: var(--amarillo); }
.footer-powered { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; justify-self: end; }
.footer-powered img { width: 44px; }

/* ---------- Botones flotantes ---------- */
.float-menu { position: fixed; right: 14px; top: 50%; translate: 0 -50%; z-index: 60; display: flex; flex-direction: column; gap: 12px; }
.fm {
  position: relative; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%; color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.fm svg { width: 28px; height: 28px; }
.fm--wa { background: #00c33a; }
.fm--mail { background: #005b96; }
.fm-label {
  position: absolute; right: calc(100% + 10px); top: 50%; translate: 8px -50%;
  padding: 5px 12px; border-radius: 4px; white-space: nowrap;
  background: var(--oscuro); color: #fff; font-size: .8rem;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t) var(--ease), translate var(--t) var(--ease);
}
.fm:hover { transform: scale(1.08); }
.fm:hover .fm-label, .fm:focus-visible .fm-label { opacity: 1; translate: 0 -50%; }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border: 0;
  background: var(--amarillo); color: var(--oscuro); cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
  opacity: 0; visibility: hidden; translate: 0 12px;
  transition: opacity var(--t) var(--ease), translate var(--t) var(--ease), visibility 0s linear var(--t), background-color var(--t) var(--ease);
}
.to-top svg { width: 20px; height: 20px; }
.to-top.is-visible { opacity: 1; visibility: visible; translate: 0 0; transition: opacity var(--t) var(--ease), translate var(--t) var(--ease), visibility 0s, background-color var(--t) var(--ease); }
.to-top:hover { background: #fff; }

/* ---------- Aparición suave ---------- */
.reveal { opacity: 0; }
.reveal.is-visible { animation: up .8s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes up { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
.no-js .reveal { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero { aspect-ratio: auto; flex-direction: column; align-items: stretch; background-image: none; }
  .hero::before { content: ""; display: block; aspect-ratio: 1900 / 548; background: url("../img/portada.jpg") center / 100% 100% no-repeat; }
  .hero-inner { width: 100%; }
  .hero-box { width: 100%; box-shadow: none; padding: 34px 8px 40px; }
  .hero-box p { max-width: 640px; margin-inline: auto; font-size: 1.1rem; }
}
@media (max-width: 1024px) {
  .ejes-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-links { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 900px) {
  .menu-btn {
    display: grid; gap: 5px; place-content: center;
    width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  }
  .menu-btn span { display: block; width: 24px; height: 2px; background: #fff; transition: transform var(--t) var(--ease), opacity var(--t) var(--ease); }
  .menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  .menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 18px; background: var(--oscuro);
    box-shadow: 0 14px 24px rgba(0, 0, 0, .3);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path var(--t) var(--ease), visibility 0s linear var(--t);
  }
  .menu-open .nav { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path var(--t) var(--ease), visibility 0s; }
  .nav a { padding: 12px 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav a:not(.nav-cta)::after { display: none; }
  .nav-cta { margin: 12px 0 0; text-align: center; border-bottom: 0 !important; }
}
@media (max-width: 767px) {
  .header-inner { min-height: 62px; }
  .ejes-grid { gap: 14px; }
  .eje img { width: 96px; }
  .eje h3 { font-size: 1rem; }
  .accede-inner { flex-direction: column; align-items: flex-start; }
  .accede .btn { align-self: stretch; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-col .social { justify-content: center; }
  .footer-powered { justify-self: center; }
  .float-menu { top: auto; bottom: 76px; translate: none; right: 16px; }
  .fm { width: 48px; height: 48px; }
  .fm svg { width: 24px; height: 24px; }
  .fm-label { display: none; }
  .to-top { right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; }
  html { scroll-behavior: auto; }
}
