@import url("grids.css");

:root {
  --blue: #3ac0ef;
  --blue-dark: #43a8f1;
  --blue-deep: #1a9fd4;
  --ink: #0d1117;
  --muted: #5f6b7a;
  --line: rgba(13, 17, 23, 0.08);
  --surface: #ffffff;
  --surface-soft: #f4f9fc;
  --surface-blue: #eef8fd;
  --radius: 20px;
  --radius-lg: 32px;
  --shadow: 0 24px 60px rgba(58, 192, 239, 0.12);
  --shadow-soft: 0 12px 40px rgba(13, 17, 23, 0.06);
  --header-h: 84px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Montserrat", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 9999;
  background: var(--blue);
  color: #fff;
  padding: 12px 20px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ── Header ── */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s;
}

.header.is-scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo img {
  height: 42px;
  width: auto;
}

.menu-button {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-soft);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.menu-button[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.25s, background 0.25s;
}

.nav a:hover,
.nav a.is-active {
  color: var(--ink);
  background: rgba(58, 192, 239, 0.1);
}

.nav .lang {
  margin-left: 8px;
  border: 1px solid var(--line);
  color: var(--blue-deep);
}

.nav-cta {
  margin-left: 12px;
  padding: 12px 20px !important;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff !important;
  box-shadow: 0 10px 30px rgba(58, 192, 239, 0.35);
}

.nav-cta:hover {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-deep)) !important;
  color: #fff !important;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--header-h) + 48px) 0 80px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(58, 192, 239, 0.18), transparent 42%),
    radial-gradient(circle at 85% 10%, rgba(67, 168, 241, 0.14), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - var(--header-h) - 128px);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(58, 192, 239, 0.12);
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(58, 192, 239, 0.18);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rotator {
  display: inline-block;
  min-width: 0.3em;
  color: var(--blue-deep);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.hero-lead {
  max-width: 520px;
  margin: 0 0 32px;
  font-size: 1.08rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  box-shadow: 0 16px 40px rgba(58, 192, 239, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 20px 48px rgba(58, 192, 239, 0.45);
}

.btn-ghost {
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.hero-stage {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
  will-change: transform;
}

.shape-1 {
  width: 280px;
  height: 280px;
  top: 8%;
  left: 10%;
  background: radial-gradient(circle, rgba(58, 192, 239, 0.35), rgba(58, 192, 239, 0));
}

.shape-2 {
  width: 180px;
  height: 180px;
  bottom: 18%;
  right: 8%;
  border-radius: 38% 62% 63% 37% / 42% 36% 64% 58%;
  background: linear-gradient(135deg, rgba(67, 168, 241, 0.28), rgba(58, 192, 239, 0.08));
}

.shape-3 {
  width: 120px;
  height: 120px;
  top: 42%;
  left: 4%;
  border-radius: 30px;
  transform: rotate(24deg);
  background: rgba(58, 192, 239, 0.14);
  border: 1px solid rgba(58, 192, 239, 0.22);
}

.isotipo-orbit {
  position: relative;
  z-index: 2;
  width: min(360px, 72vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(58, 192, 239, 0.35);
}

.orbit-ring:nth-child(2) {
  inset: 12%;
}

.orbit-ring:nth-child(3) {
  inset: 24%;
}

.isotipo-core {
  width: 42%;
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.orbit-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 8px rgba(58, 192, 239, 0.15);
}

.orbit-dot:nth-child(5) { top: 6%; left: 50%; }
.orbit-dot:nth-child(6) { bottom: 10%; right: 14%; }
.orbit-dot:nth-child(7) { bottom: 22%; left: 8%; }

.hero-card {
  position: absolute;
  z-index: 3;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.95);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.hero-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
  margin-top: 4px;
}

.hero-card-a { top: 12%; right: 0; }
.hero-card-b { bottom: 14%; left: -4%; }

.cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  margin: -160px 0 0 -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 192, 239, 0.16), transparent 68%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s;
}

body.has-pointer .cursor-glow {
  opacity: 1;
}

/* ── Marquee ── */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  padding: 18px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 48px;
  animation: marquee 28s linear infinite;
}

.marquee-track span {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(13, 17, 23, 0.45);
  white-space: nowrap;
}

.marquee-track span::after {
  content: "◆";
  margin-left: 48px;
  color: var(--blue);
  font-size: 0.65rem;
  vertical-align: middle;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Sections ── */
.section {
  padding: 100px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 56px;
}

.section-head.centered {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Stats */
.stats {
  background: var(--surface-soft);
}

/* Stats — layout en grids.css */

.stat-card {
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.stat-value {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: center;
}

.about-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  box-shadow: var(--shadow);
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(13, 17, 23, 0.35));
}

.about-badge {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 1;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.about-badge span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.about-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 600;
  color: var(--ink);
}

.about-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

/* Services — grid inicio (2 columnas) */
.services {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-blue) 100%);
}

/* Services home — layout en grids.css */

.service-home-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
  color: inherit;
  min-height: 240px;
}

.service-home-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(58, 192, 239, 0.35);
}

.service-home-card.featured {
  background: linear-gradient(145deg, rgba(58, 192, 239, 0.1), rgba(255, 255, 255, 0.98));
}

.service-link {
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue-deep);
}

.services-home-foot {
  margin-top: 28px;
  text-align: center;
}

/* Services bento — layout en grids.css */

.service-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.service-card.featured {
  background: linear-gradient(145deg, rgba(58, 192, 239, 0.12), rgba(255, 255, 255, 0.96));
}

.service-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  padding: 10px;
  border-radius: 16px;
  background: var(--surface-soft);
}

.service-icon.emoji {
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  padding: 0;
}

.service-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.service-card .tag {
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-deep);
}

/* Blog — layout en grids.css */

.blog-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.blog-thumb {
  height: 180px;
  background: linear-gradient(135deg, rgba(58, 192, 239, 0.25), rgba(67, 168, 241, 0.12));
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  overflow: hidden;
}

.blog-thumb.has-image {
  padding: 0;
}

.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-body {
  padding: 24px;
}

.blog-meta {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin-bottom: 10px;
}

.blog-body h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.blog-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* CTA band */
.cta-band {
  padding: 72px 0;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
}

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

.cta-inner h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.cta-inner p {
  margin: 0;
  opacity: 0.9;
}

.btn-light {
  background: #fff;
  color: var(--blue-deep);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* Footer */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand img {
  height: 40px;
  margin-bottom: 16px;
}

.footer-brand p {
  margin: 0;
  max-width: 280px;
  font-size: 0.92rem;
}

.footer-col h4 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-col a,
.footer-col p {
  display: block;
  margin: 0 0 10px;
  font-size: 0.92rem;
  transition: color 0.25s;
}

.footer-col a:hover {
  color: var(--blue);
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.socials {
  display: flex;
  gap: 12px;
}

.socials a {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.socials a:hover {
  background: rgba(58, 192, 239, 0.25);
}

/* WhatsApp float */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s var(--ease);
}

.wa-float:hover {
  transform: scale(1.06);
}

/* Reveal helper — SIEMPRE visible.
   GSAP puede animar desde JS (fromTo) sin ocultar el contenido con CSS.
   Nunca usar opacity:0 aquí: si falla el JS el sitio parece “vacío”. */
.reveal {
  opacity: 1;
  transform: none;
}

/* Artículos: prioridad máxima de visibilidad */
.article-page .reveal,
.article-body,
.article-hero-media,
.page-hero .reveal {
  opacity: 1 !important;
  transform: none !important;
}

/* Listados del blog: nunca semi-transparentes por animación GSAP */
.blog-grid,
.blog-grid .blog-card,
.blog-grid .reveal,
[data-blog-list],
[data-blog-list] .blog-card,
[data-blog-list] .reveal,
.blog-topics-grid,
.blog-topics-grid .blog-topic,
.blog-topics-grid .reveal {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 380px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .menu-button {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 24px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 14px 16px;
  }

  .nav-cta {
    margin-left: 0;
    text-align: center;
  }

  .hero-card-b {
    left: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
