/* ============================================================
   SIAPP · Sistemas · IA · Desarrollo
   Hoja de estilos del sitio corporativo
   Paleta extraída de los logos oficiales de la marca
   ============================================================ */

/* ---------- Tokens de marca ---------- */
:root {
  /* Colores SIAPP — rellenos exactos medidos en las láminas del manual de marca */
  --azul: #01235E;        /* Navy del logotipo (relleno exacto del logo azul) */
  --azul-vivo: #012D84;   /* Azul del isotipo */
  --celeste: #3EAAFC;     /* Tinte claro derivado del azul, para acentos UI */
  --rojo: #E7011E;        /* Rojo del isotipo */
  --amarillo: #FED001;    /* Amarillo del isotipo */
  --azul-noche: #011A4F;  /* Navy profundo del manual de marca */

  /* Neutros */
  --tinta: #0A1B36;
  --gris: #55647E;
  --gris-suave: #F4F7FC;
  --borde: #DFE6F1;
  --blanco: #FFFFFF;

  /* Tipografía */
  --fuente-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --fuente-cuerpo: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Sistema */
  --radio: 18px;
  --radio-sm: 12px;
  --sombra: 0 12px 32px rgba(4, 37, 98, 0.10);
  --sombra-suave: 0 4px 14px rgba(4, 37, 98, 0.06);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--fuente-cuerpo);
  font-size: 16px;
  line-height: 1.65;
  color: var(--tinta);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--fuente-display);
  color: var(--azul);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--amarillo); color: var(--azul); }

:focus-visible {
  outline: 3px solid var(--celeste);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  background: var(--azul);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.btn-lg { padding: 15px 28px; font-size: 1rem; }

.btn-primary {
  background: var(--azul);
  color: #fff;
  box-shadow: 0 8px 20px rgba(4, 37, 98, 0.22);
}
.btn-primary:hover {
  background: var(--azul-vivo);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(9, 95, 216, 0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--azul);
  border-color: var(--borde);
}
.btn-ghost:hover {
  border-color: var(--azul-vivo);
  color: var(--azul-vivo);
  transform: translateY(-2px);
}

.btn-amarillo {
  background: var(--amarillo);
  color: var(--azul);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.btn-amarillo:hover {
  background: #ffdb4d;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--borde);
  box-shadow: 0 6px 24px rgba(4, 37, 98, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

.brand-logo { width: 148px; height: auto; }

.main-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--tinta);
  padding: 6px 2px;
  position: relative;
  transition: color 0.18s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--azul-vivo), var(--celeste));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.main-nav a:hover { color: var(--azul-vivo); }
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--azul);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 104px;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.blob-azul {
  width: 520px; height: 520px;
  top: -160px; right: -120px;
  background: rgba(9, 95, 216, 0.16);
}
.blob-amarillo {
  width: 300px; height: 300px;
  bottom: -80px; left: -60px;
  background: rgba(249, 205, 40, 0.20);
}
.blob-celeste {
  width: 380px; height: 380px;
  top: 30%; left: 42%;
  background: rgba(62, 170, 252, 0.14);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--azul-vivo);
  margin-bottom: 14px;
}

.hero h1 { margin-bottom: 20px; }
.hero h1 em {
  font-style: normal;
  color: var(--azul-vivo);
}

.lead {
  font-size: 1.13rem;
  color: var(--gris);
  max-width: 34em;
  margin-bottom: 30px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 0.88rem;
  color: var(--gris);
}
.hero-meta li { position: relative; padding-left: 16px; }
.hero-meta li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--celeste);
}

/* ---------- Mock del hero ---------- */
.hero-visual { position: relative; }

.mock-window {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(4, 37, 98, 0.14);
  overflow: hidden;
}

.mock-topbar {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--borde);
  background: var(--gris-suave);
}
.mock-topbar span { width: 11px; height: 11px; border-radius: 50%; }
.mock-topbar span:nth-child(1) { background: var(--rojo); }
.mock-topbar span:nth-child(2) { background: var(--amarillo); }
.mock-topbar span:nth-child(3) { background: var(--celeste); }

.mock-body { display: flex; min-height: 320px; }

.mock-side {
  width: 68px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--borde);
  background: var(--blanco);
}
.mock-side i {
  height: 10px;
  border-radius: 6px;
  background: var(--borde);
}
.mock-side i.on { background: var(--azul-vivo); width: 80%; }

.mock-main {
  flex: 1;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--gris-suave);
}

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mock-title { width: 120px; height: 14px; border-radius: 8px; background: var(--azul); opacity: 0.85; }
.mock-chip { width: 58px; height: 22px; border-radius: 999px; background: rgba(62, 170, 252, 0.35); }

.mock-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.mock-stat {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio-sm);
  padding: 14px 16px;
  box-shadow: var(--sombra-suave);
}
.mock-stat b {
  display: block;
  font-family: var(--fuente-display);
  font-size: 1.25rem;
  color: var(--azul);
}
.mock-stat small { color: var(--gris); font-size: 0.75rem; }
.mock-stat.alt { border-color: rgba(62, 170, 252, 0.5); }
.mock-stat.alt b { color: var(--azul-vivo); }

.mock-chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio-sm);
  padding: 16px 18px 14px;
  min-height: 110px;
  box-shadow: var(--sombra-suave);
}
.mock-chart span {
  flex: 1;
  height: var(--h, 50%);
  border-radius: 6px 6px 2px 2px;
  background: var(--azul-vivo);
  opacity: 0.9;
}
.mock-chart .b-azul { background: var(--azul-vivo); }
.mock-chart .b-celeste { background: var(--celeste); }
.mock-chart .b-amarillo { background: var(--amarillo); }
.mock-chart .b-rojo { background: var(--rojo); }

.mock-rows { display: flex; flex-direction: column; gap: 10px; }
.mock-rows i {
  height: 9px;
  border-radius: 6px;
  background: var(--borde);
}
.mock-rows i:nth-child(1) { width: 92%; }
.mock-rows i:nth-child(2) { width: 78%; }
.mock-rows i:nth-child(3) { width: 85%; }

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 16px 40px rgba(4, 37, 98, 0.16);
  animation: flotar 6s ease-in-out infinite alternate;
}
.float-card b {
  display: block;
  font-family: var(--fuente-display);
  font-size: 0.92rem;
  color: var(--azul);
  line-height: 1.2;
}
.float-card small { color: var(--gris); font-size: 0.75rem; }

.float-a { top: -18px; left: -26px; }
.float-b { bottom: -22px; right: -14px; animation-delay: 3s; }

@keyframes flotar {
  from { transform: translateY(-6px); }
  to   { transform: translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .float-card { animation: none; }
}

/* ---------- Puntos de color de marca ---------- */
.dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-azul { background: var(--azul-vivo); }
.dot-rojo { background: var(--rojo); }
.dot-amarillo { background: var(--amarillo); }
.dot-celeste { background: var(--celeste); }

/* ---------- Secciones ---------- */
.section { padding: 92px 0; }
.section-alt { background: var(--gris-suave); }

.section-head {
  max-width: 680px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head h2 { margin-bottom: 10px; }
.section-lead { color: var(--gris); font-size: 1.05rem; margin: 0; }

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

/* ---------- Tarjetas ---------- */
.card {
  position: relative;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 28px 26px;
  box-shadow: var(--sombra-suave);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sombra);
  border-color: rgba(9, 95, 216, 0.35);
}

.card-accent {
  display: block;
  width: 44px;
  height: 5px;
  border-radius: 4px;
  margin-bottom: 18px;
}
.accent-azul { background: var(--azul-vivo); }
.accent-rojo { background: var(--rojo); }
.accent-amarillo { background: var(--amarillo); }
.accent-celeste { background: var(--celeste); }

.card h3 { margin-bottom: 8px; }
.card p { color: var(--gris); font-size: 0.95rem; margin: 0; }

/* Tarjetas de soluciones */
.card-solution { display: flex; flex-direction: column; gap: 10px; }
.card-solution p { flex: 1; }

.solution-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.tag-azul { background: #E6EDFB; color: var(--azul); }
.tag-amarillo { background: #FDF3CD; color: #8A6D00; }
.tag-celeste { background: #E2F1FF; color: #0468B8; }
.tag-rojo { background: #FDE3E6; color: var(--rojo); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--azul-vivo);
}
.card-link span { transition: transform 0.2s ease; }
.card-link:hover span { transform: translateX(4px); }
.card-link:hover { color: var(--azul); }

/* ---------- Pasos ---------- */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px;
}
.steps::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 10%;
  right: 10%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    var(--azul-vivo), var(--celeste), var(--amarillo), var(--rojo));
  opacity: 0.3;
}
.steps li { position: relative; z-index: 1; }
.steps h3 { margin: 14px 0 6px; font-size: 1.05rem; }
.steps p { color: var(--gris); font-size: 0.92rem; margin: 0; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--azul);
  color: #fff;
  font-family: var(--fuente-display);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 0 0 7px var(--blanco), 0 10px 22px rgba(4, 37, 98, 0.22);
}

/* ---------- Nosotros ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.about-copy p { color: var(--gris); }
.about-copy strong { color: var(--azul); }

.about-values { margin-top: 26px; display: grid; gap: 14px; }
.about-values li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--tinta);
}

.founder-card {
  background: linear-gradient(160deg, var(--azul) 0%, var(--azul-noche) 100%);
  border-radius: 22px;
  padding: 36px 32px;
  color: #fff;
  box-shadow: 0 24px 56px rgba(4, 37, 98, 0.28);
  position: relative;
  overflow: hidden;
}
.founder-card::after {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(62, 170, 252, 0.16);
  filter: blur(50px);
  right: -70px; bottom: -70px;
}
.founder-logo {
  width: 76px;
  height: auto;
  margin-bottom: 18px;
}
.founder-card h3 { color: #fff; margin-bottom: 4px; }
.founder-role {
  color: var(--amarillo);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.founder-bio { color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; margin: 0; }

/* ---------- Banda de contacto ---------- */
.cta-band {
  background:
    radial-gradient(720px 320px at 85% 10%, rgba(62, 170, 252, 0.22), transparent 65%),
    radial-gradient(520px 280px at 8% 90%, rgba(249, 205, 40, 0.10), transparent 60%),
    linear-gradient(150deg, var(--azul) 0%, var(--azul-noche) 100%);
  padding: 76px 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.cta-copy { max-width: 560px; }
.cta-copy h2 { color: #fff; }
.cta-copy p { color: rgba(255, 255, 255, 0.82); font-size: 1.05rem; margin: 0; }

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.cta-social {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}
.cta-social a { font-weight: 600; }
.cta-social a:hover { color: var(--amarillo); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--azul-noche);
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 44px;
}

.footer-brand p {
  margin: 16px 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 0.94rem;
  transition: color 0.18s ease;
}
.footer-col a:hover { color: var(--amarillo); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 26px;
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom a {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.footer-bottom a:hover { color: var(--amarillo); }

/* ---------- Animaciones de aparición ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease var(--d, 0s), transform 0.7s ease var(--d, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 70px; }
  .hero { padding: 64px 0 80px; }
  .lead { max-width: 40em; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    background: var(--blanco);
    border-bottom: 1px solid var(--borde);
    box-shadow: 0 18px 36px rgba(4, 37, 98, 0.10);
    padding: 12px 24px 18px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 4px; font-size: 1rem; }
  .main-nav a::after { display: none; }
  .nav-toggle { display: flex; }
  .header-inner { position: relative; }
}

@media (max-width: 640px) {
  .section { padding: 68px 0; }
  .hero { padding: 48px 0 64px; }
  .hero-cta .btn { width: 100%; }
  .float-a { left: -6px; top: -14px; }
  .float-b { right: -6px; bottom: -16px; }
  .float-card { padding: 10px 12px; }
  .steps::before { display: none; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { width: 100%; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
