/* Algianis — hoja de estilos principal
   Paleta tomada del logo: azul marino #03162E y degradado azul #0161BE → #00388D */

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #03162e;
  --navy-2: #0a2547;
  --navy-3: #12335e;
  --blue: #0161be;
  --blue-dark: #00388d;
  --blue-light: #4ea0f0;
  --ink: #0f1b2d;
  --muted: #4a5a70;
  --muted-on-dark: #b7c4d6;
  --bg: #ffffff;
  --surface: #f4f7fb;
  --line: #dce3ec;
  --whatsapp: #1fa855;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(3, 22, 46, .06), 0 8px 24px rgba(3, 22, 46, .08);
  --header-h: 68px;
  --max: 1160px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 12px 22px;
  font: 600 1rem/1.2 var(--font); text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-outline { border-color: var(--line); color: var(--navy); background: #fff; }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #178a45; color: #fff; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .95rem; }

/* ---------- Encabezado fijo ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(3, 22, 46, .05);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; }
.brand-word { width: 128px; height: auto; }

.nav-toggle, .nav-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  color: var(--navy); text-decoration: none;
}
.nav-toggle svg, .nav-close svg { width: 26px; height: 26px; }
.nav-close { display: none; }

.site-nav { display: none; }

/* Menú móvil: se abre con #menu (:target) y se cierra al seguir cualquier ancla */
.site-nav:target {
  display: block;
  position: fixed; inset: var(--header-h) 0 0 0;
  background: #fff; padding: 12px 20px 32px; overflow-y: auto;
}
.site-header:has(.site-nav:target) .nav-toggle { display: none; }
.site-header:has(.site-nav:target) .nav-close { display: inline-flex; }

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: 14px 4px; min-height: 48px;
  font-weight: 600; font-size: 1.1rem; color: var(--navy); text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav-list a:hover { color: var(--blue); }
.nav-actions { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }

.lang-switch { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .95rem; }
.lang-switch a, .lang-switch span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 40px; padding: 0 6px; border-radius: 6px; text-decoration: none;
}
.lang-switch span[aria-current] { color: var(--navy); background: var(--surface); }
.lang-switch a { color: var(--muted); }
.lang-switch a:hover { color: var(--blue); }
.lang-switch .sep { min-width: 0; padding: 0; color: var(--line); }

@media (min-width: 960px) {
  .nav-toggle, .nav-close, .site-header:has(.site-nav:target) .nav-close { display: none; }
  .site-nav, .site-nav:target {
    display: flex; align-items: center; gap: 28px;
    position: static; padding: 0; background: none; overflow: visible;
  }
  .nav-list { display: flex; gap: 4px; }
  .nav-list a { border: 0; padding: 10px 12px; min-height: 0; font-size: .98rem; border-radius: 6px; }
  .nav-actions { flex-direction: row; align-items: center; margin: 0; gap: 16px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + 56px) 0 72px;
  color: #fff;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(1, 97, 190, .35), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 60%, var(--navy-3) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("../img/grid.svg") center / 48px 48px repeat;
  opacity: .5; pointer-events: none;
}
.hero .container { position: relative; display: grid; gap: 48px; align-items: center; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted-on-dark); max-width: 56ch; margin-bottom: 32px; }
.eyebrow {
  display: inline-block; margin-bottom: 18px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue);
}
.hero .eyebrow { color: var(--blue-light); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { width: 100%; max-width: 300px; margin: 0 auto; }
@media (min-width: 960px) { .hero-art { max-width: 460px; } }
.trust {
  display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 40px 0 0; padding: 0; list-style: none;
  font-size: .9rem; font-weight: 600; color: var(--muted-on-dark);
}
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--blue-light); }

@media (min-width: 960px) {
  .hero { padding: calc(var(--header-h) + 96px) 0 112px; }
  .hero .container { grid-template-columns: 1.15fr .85fr; }
}

/* ---------- Secciones ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* Por qué Algianis */
.about-grid { display: grid; gap: 40px; }
.about-copy p { color: var(--muted); font-size: 1.05rem; }
.creds { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.cred {
  padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.cred strong { display: block; font-size: 1.5rem; line-height: 1.2; color: var(--navy); letter-spacing: -0.01em; }
.cred span { display: block; margin-top: 6px; color: var(--muted); font-size: .95rem; }
.cred-icon { width: 40px; height: 40px; margin-bottom: 14px; color: var(--blue); }
.certcademy {
  display: flex; gap: 16px; align-items: flex-start;
  margin-top: 28px; padding: 22px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(1, 97, 190, .08), rgba(0, 56, 141, .04));
  border: 1px solid rgba(1, 97, 190, .2);
}
.certcademy svg { width: 32px; height: 32px; flex: none; color: var(--blue); }
.certcademy p { margin: 0; color: var(--ink); }
.certcademy a { font-weight: 700; }

@media (min-width: 960px) {
  .about-grid { grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
}

/* Servicios: 5 áreas */
.areas { display: grid; gap: 20px; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; counter-reset: area; }
.area {
  position: relative; padding: 28px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.area-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px;
  border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}
.area-icon svg { width: 26px; height: 26px; }
.area p { margin: 0; color: var(--muted); }
@media (min-width: 640px) { .areas { grid-template-columns: repeat(2, 1fr); } .area:last-child { grid-column: 1 / -1; } }
@media (min-width: 1000px) {
  .areas { grid-template-columns: repeat(6, 1fr); }
  .area { grid-column: span 2; }
  .area:nth-child(4), .area:last-child { grid-column: span 3; }
}
.area-num { position: absolute; top: 24px; right: 26px; font-weight: 700; font-size: .85rem; color: var(--line); letter-spacing: .08em; }

.outcome {
  display: flex; gap: 20px; align-items: flex-start;
  margin-top: 28px; padding: 28px; border-radius: var(--radius);
  background: var(--navy); color: #fff;
}
.outcome svg { width: 40px; height: 40px; flex: none; color: var(--blue-light); }
.outcome p { margin: 0; font-size: 1.12rem; color: var(--muted-on-dark); }
.outcome strong { color: #fff; }

/* Proceso */
.steps { display: grid; gap: 20px; margin: 0 0 40px; padding: 0; list-style: none; }
.step {
  position: relative; padding: 28px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.step-icon { width: 64px; height: 64px; }
.step-num { font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--surface); -webkit-text-stroke: 1px var(--line); }
.step p { margin: 0; color: var(--muted); }
.steps-cta { text-align: center; }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step:not(:last-child)::after {
    content: ""; position: absolute; top: 60px; right: -21px; width: 22px; height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
  }
}

/* Contacto */
.contact-grid { display: grid; gap: 40px; }
.contact-copy p { color: var(--muted); font-size: 1.08rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.contact-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.contact-item svg { width: 24px; height: 24px; flex: none; margin-top: 2px; color: var(--blue); }
.contact-item h3 { margin: 0 0 2px; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-item p { margin: 0; font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
.contact-item a { color: var(--navy); text-decoration-color: var(--line); text-underline-offset: 3px; }
.contact-item a:hover { color: var(--blue); }

@media (min-width: 960px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--muted-on-dark); padding: 56px 0 32px; font-size: .95rem; }
.footer-top { display: grid; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-brand img { width: 150px; height: auto; }
.footer-brand p { margin: 16px 0 0; max-width: 36ch; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-nav a, .site-footer a { color: #fff; text-decoration: none; }
.footer-nav a { display: inline-block; padding: 8px 0; }
.site-footer a:hover { color: var(--blue-light); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-top: 24px; }
.footer-bottom p { margin: 0; }
.social { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); }
.social svg { width: 20px; height: 20px; }
.social:hover { border-color: var(--blue-light); }
.site-footer .lang-switch span[aria-current] { color: #fff; background: rgba(255, 255, 255, .1); }
.site-footer .lang-switch a { color: var(--muted-on-dark); }
.site-footer .lang-switch .sep { color: rgba(255, 255, 255, .25); }

@media (min-width: 900px) {
  .footer-top { grid-template-columns: 1.4fr 1fr auto; align-items: start; }
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--whatsapp); color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transition: transform .2s;
}
.wa-float svg { width: 28px; height: 28px; }
.wa-float:hover { color: #fff; transform: scale(1.06); }

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

/* ---------- Página de links ---------- */
.links-page {
  min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(700px 400px at 50% -10%, rgba(1, 97, 190, .35), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
}
.links-wrap { width: 100%; max-width: 480px; margin: 0 auto; padding: 48px 20px 40px; }
.links-head { text-align: center; margin-bottom: 32px; }
.links-logo { width: 200px; height: auto; margin: 0 auto 18px; }
.links-head p { margin: 0; font-size: 1.05rem; color: var(--muted-on-dark); }
.links-lang { display: flex; justify-content: center; margin-bottom: 24px; }
.links-lang .lang-switch span[aria-current] { color: #fff; background: rgba(255, 255, 255, .12); }
.links-lang .lang-switch a { color: var(--muted-on-dark); }
.links-lang .lang-switch .sep { color: rgba(255, 255, 255, .25); }
.links-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.link-btn {
  display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 12px 18px;
  font-weight: 600; font-size: 1.02rem; color: #fff; text-decoration: none;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius);
  transition: background-color .2s, border-color .2s, transform .2s;
}
.link-btn:hover { color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); transform: translateY(-1px); }
.link-btn svg { width: 22px; height: 22px; flex: none; }
.link-btn .arrow { margin-left: auto; width: 18px; height: 18px; opacity: .6; }
.link-btn-featured {
  min-height: 64px; justify-content: center; font-size: 1.1rem;
  background: var(--blue); border-color: var(--blue); box-shadow: 0 10px 30px rgba(1, 97, 190, .4);
}
.link-btn-featured:hover { background: #0270d8; border-color: #0270d8; }
.links-sep { height: 8px; }
.links-foot { margin-top: 36px; text-align: center; font-size: .85rem; color: var(--muted-on-dark); }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; background: var(--surface); }
.notfound img { width: 72px; margin: 0 auto 24px; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
