/* ============================================================
   STYLE.CSS — diseño y estética. No hay texto aquí.
   Dirección: editorial suiza + glossy glass Apple.
   ============================================================ */

:root {
  --bg-top: #F4F5F7;
  --bg-bottom: #E8E9EC;
  --ink: #151719;
  --ink-soft: #5C6167;
  --ink-fade: #A6ABB2;                      /* gris del statement editorial */
  --line: rgba(21, 23, 25, 0.12);
  --wire: #C3C7CD;
  --glass-bg: rgba(255, 255, 255, 0.60);
  --glass-bg-hover: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.45);
  --glass-highlight: rgba(255, 255, 255, 0.95);
  --accent: #C7DAF7;          /* azul clarito — fondos y brillos */
  --accent-ink: #7FA3DE;      /* azul medio — iconos, números, detalles */
  --accent-glow: rgba(127, 163, 222, 0.28);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* El atributo hidden SIEMPRE gana, aunque el elemento tenga display propio */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1400px 800px at 75% -10%, #FBFBFC 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
::selection { background: var(--accent); }
button { font: inherit; color: inherit; background: none; border: none; }

/* ---------- Glass ---------- */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.55) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-top: 1.5px solid rgba(255, 255, 255, 1);
  box-shadow:
    0 12px 36px rgba(20, 25, 35, 0.12),
    0 2px 6px rgba(20, 25, 35, 0.05),
    inset 0 2px 2px rgba(255, 255, 255, 1),
    inset 0 -12px 20px -12px rgba(20, 25, 35, 0.14);
  border-radius: 28px;
}

/* ---------- Tipografía utilitaria ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow { margin-bottom: 1rem; color: var(--accent-ink); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.015em; }
h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 2rem; }
h3 { font-size: 1.05rem; margin-bottom: 0.9rem; }

/* ---------- Botones pill ---------- */
.btn-pill {
  position: relative;
  display: inline-block;
  padding: 0.95rem 2.4rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
/* Reflejo superior — el "gloss" del vidrio */
.btn-pill::before {
  content: "";
  position: absolute;
  left: 8%; right: 8%; top: 2px;
  height: 45%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.btn-pill:hover, .btn-pill:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 18px 44px rgba(20, 25, 35, 0.14),
    0 6px 24px var(--accent-glow),
    inset 0 2px 3px rgba(255, 255, 255, 1),
    inset 0 -12px 20px -12px rgba(20, 25, 35, 0.18);
}
.btn-pill:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ============================================================
   NAVEGACIÓN
   ============================================================ */
.nav-btn {
  position: fixed;
  top: 1.3rem;
  right: 4vw;
  z-index: 60;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-btn span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-btn.abierto span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-btn.abierto span:nth-child(2) { opacity: 0; }
.nav-btn.abierto span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 245, 247, 0.72);
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
}
.menu-inner { text-align: center; }
.menu-links { display: flex; flex-direction: column; gap: 1.4rem; margin-bottom: 3rem; }
.menu-links a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}
.menu-links a:hover { color: var(--accent-ink); }
.menu-idioma { display: flex; gap: 0.9rem; justify-content: center; align-items: center; }
.menu-idioma button {
  font: inherit;
  letter-spacing: inherit;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0.3rem 0.5rem;
}
.menu-idioma button.activo { color: var(--accent-ink); border-bottom: 2px solid var(--accent-ink); }

/* ============================================================
   1. HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem 4vw 4rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* --- Workflow abstracto de fondo (solo estético) --- */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.75;
}
.caja {
  fill: rgba(255, 255, 255, 0.5);
  stroke: var(--wire);
  stroke-width: 1.2;
  animation: respirar 5s ease-in-out infinite;
}
.caja:nth-of-type(2n) { animation-delay: 1.4s; }
.caja:nth-of-type(3n) { animation-delay: 2.6s; }
@keyframes respirar {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.95; }
}
.ruta {
  fill: none;
  stroke: var(--wire);
  stroke-width: 1.2;
  stroke-dasharray: 3 6;
}
.flujo {
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 4 44;
  animation: flujo 3.4s linear infinite;
  opacity: 0.5;
}
.f2 { animation-delay: 0.5s; } .f3 { animation-delay: 1s; }
.f4 { animation-delay: 1.5s; } .f5 { animation-delay: 2s; }
.f6 { animation-delay: 2.5s; } .f7 { animation-delay: 3s; }
.f8 { animation-delay: 0.8s; }
@keyframes flujo { to { stroke-dashoffset: -48; } }
.punto {
  fill: #fff;
  stroke: var(--wire);
  stroke-width: 1.2;
  animation: conectar 3.4s ease-in-out infinite;
}
.p2 { animation-delay: 0.5s; } .p3 { animation-delay: 1s; }
.p4 { animation-delay: 1.5s; } .p5 { animation-delay: 2s; }
.p6 { animation-delay: 2.5s; } .p7 { animation-delay: 3s; }
.p8 { animation-delay: 0.8s; }
@keyframes conectar {
  0%, 55%, 100% { fill: #fff; stroke: var(--wire); r: 4; }
  70% { fill: var(--accent); stroke: var(--accent-ink); r: 6; }
}

/* --- Contenido del hero encima del fondo --- */
.hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.hero-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0 1rem;
}
.hero-texto {
  text-align: center;
  max-width: 900px;
}

.hero-rotator {
  font-size: clamp(2.4rem, 6.2vw, 5.2rem);
  min-height: 2.3em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.25rem 0 1.5rem;
}
#hero-rotativa { display: inline-block; animation: entrada 0.5s ease both; }
@keyframes entrada {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-frase {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 44ch;
  margin: 0 auto 2.25rem;
}

.hero-ctas { display: flex; gap: 0.9rem; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   Secciones
   ============================================================ */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6.5rem 4vw;
  border-bottom: 1px solid var(--line);
}

/* ---------- About editorial ---------- */
.section-about { max-width: 1200px; }

.about-top {
  display: flex;
  gap: 3rem;
  margin-bottom: 3rem;
}

.statement {
  font-size: clamp(1.9rem, 4.6vw, 3.6rem);
  line-height: 1.12;
  max-width: 24ch;
  margin-bottom: 4.5rem;
}
.statement .soft { color: var(--ink-fade); }

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: start;
}
.about-foto img {
  width: 100%;
  max-width: 560px;
  filter: grayscale(1);
}
.about-cuerpo {
  margin-top: 6rem;               /* desplazado — retícula asimétrica */
  max-width: 42ch;
}
.about-cuerpo p:first-child {
  font-size: 1.1rem;
  margin-bottom: 2.25rem;
}


/* ---------- Carrusel de logos (loop infinito) ---------- */
.carrusel {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--line);
}
.carrusel-titulo {
  max-width: 1100px;
  margin: 0 auto 2.25rem;
  padding: 0 4vw;
  color: var(--accent-ink);
}
.carrusel-cinta { overflow: hidden; }
.carrusel-track {
  display: flex;
  align-items: center;
  gap: 6rem;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.carrusel-track img {
  height: 96px;
  width: auto;
  mix-blend-mode: multiply;   /* renders glass: se funden con el fondo */
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Capacidades: filas editoriales ---------- */
.capacidades-lista {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 4rem;
}
.capacidad {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.capacidad svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: var(--accent-ink);
}
.capacidad .titulo {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.4;
}


/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}
.skill {
  position: relative;
  padding: 1.6rem 1.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 500;
  cursor: default;
  border-radius: 999px;
  overflow: visible;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
/* Gloss superior de la pill */
.skill::before {
  content: "";
  position: absolute;
  left: 8%; right: 8%; top: 3px;
  height: 42%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.skill:hover, .skill:focus-within {
  transform: translateY(-3px);
  box-shadow:
    0 18px 44px rgba(20, 25, 35, 0.12),
    0 6px 24px var(--accent-glow),
    inset 0 2px 3px rgba(255, 255, 255, 1),
    inset 0 -12px 20px -12px rgba(20, 25, 35, 0.16);
}
.skill .tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: 250px;
  padding: 1rem 1.2rem;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink);
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  border-radius: 16px;
  z-index: 20;
  /* Fondo casi opaco + blur fuerte: legible sobre cualquier cosa */
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(21, 23, 25, 0.06);
  box-shadow: 0 18px 44px rgba(20, 25, 35, 0.18);
}
.skill:hover .tip, .skill:focus-within .tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Timeline (edad al lado del punto, sin superposición) ---------- */
.timeline { position: relative; margin: 2rem 0 3rem; padding-left: 8rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5.4rem;
  top: 0.5rem; bottom: 0.5rem;
  width: 1px;
  background: var(--line);
}
.hito { position: relative; padding: 0 0 2.75rem; }
.hito:last-child { padding-bottom: 0; }
.hito-anio {
  position: absolute;
  left: -8rem; top: 0;
  width: 4rem;
  text-align: right;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
}
.hito::before {
  content: "";
  position: absolute;
  left: -2.9rem; top: 0.5rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--accent-ink);
  box-shadow: 0 2px 8px var(--accent-glow);
}
.hito h3 { margin-bottom: 0.2rem; }
.hito .cargo {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 0.5rem;
}
.hito p { font-size: 0.92rem; color: var(--ink-soft); max-width: 56ch; }

.extras { margin-top: 3rem; }
.fila-extra {
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: baseline;
  gap: 2rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}
.fila-extra h3 { margin-bottom: 0; }
.fila-extra ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
}
.fila-extra li { font-size: 0.95rem; }
.cert-botones { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.cert-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.7rem 0.7rem 0.7rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cert-btn .flecha {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.cert-btn:hover, .cert-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 14px 34px rgba(20, 25, 35, 0.14),
    0 5px 20px var(--accent-glow),
    inset 0 2px 3px rgba(255, 255, 255, 1);
}
.cert-btn:hover .flecha, .cert-btn:focus-visible .flecha {
  background: var(--accent-ink);
  color: #fff;
  transform: translate(2px, -2px);
}

/* ---------- Modal de certificados ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(21, 23, 25, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem;
}
.modal-caja { position: relative; max-width: min(920px, 94vw); }
.modal-caja img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  margin: 0 auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.4);
}
.modal-caption { text-align: center; margin-top: 1.1rem; color: #E8E9EC; letter-spacing: 0.18em; }
.modal-cerrar, .modal-nav {
  position: absolute;
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.modal-cerrar { top: -20px; right: -14px; }
.modal-prev { left: -18px; top: 50%; transform: translateY(-50%); }
.modal-next { right: -18px; top: 50%; transform: translateY(-50%); }
.modal-nav:hover, .modal-cerrar:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.25), 0 4px 18px var(--accent-glow); }

/* ---------- Footer ---------- */
.footer { max-width: 1100px; margin: 0 auto; padding: 4.5rem 4vw 2.5rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.footer-datos p { margin: 0.2rem 0; letter-spacing: 0.14em; text-transform: none; }
.footer-acciones { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.footer-copy { text-align: center; margin-top: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-cuerpo { margin-top: 0; }
  .capacidades-lista { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .hide-mobile { display: none; }
  .modal { padding: 1rem; }
  .modal-prev { left: 4px; }
  .modal-next { right: 4px; }
  .modal-cerrar { right: 4px; top: -22px; }
  .capacidades-lista { grid-template-columns: 1fr; }
  .hero-bg { opacity: 0.45; }
  .carrusel-track { gap: 4.5rem; }
  .carrusel-track img { height: 76px; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 0.9rem; }
  .skill { padding: 1.15rem 0.9rem; font-size: 0.85rem; }
  .timeline { padding-left: 6rem; }
  .hito-anio { left: -6rem; font-size: 1.05rem; width: 3.2rem; }
  .timeline::before { left: 4.2rem; }
  .hito::before { left: -2.1rem; }
  .skill .tip { width: 200px; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flujo, .caja, .punto, #hero-rotativa, .carrusel-track { animation: none; }
  .btn-pill, .skill { transition: none; }
}
