/* ==========================================================
   MAIN — Empathy Agency
   Layout, componentes, páginas y animaciones.
   Usa: capas (@layer), nesting nativo, anchor positioning,
   scroll-driven animations y oklch().
   ========================================================== */

@layer base, layout, components, pages, motion;

/* ------------------------- textura / fondo ------------------------- */
body {
  background-image:
    radial-gradient(1200px 800px at 85% -5%, color-mix(in oklab, var(--brand) 26%, transparent), transparent 60%),
    radial-gradient(900px 700px at -10% 25%, color-mix(in oklab, var(--brand-deep) 22%, transparent), transparent 55%);
  background-attachment: fixed;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.06'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Progreso de scroll (barra superior) */
.scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 2000;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--brand-bright), var(--brand-soft));
  opacity: 0.9;
}
@supports (animation-timeline: scroll()) {
  .scroll-bar {
    animation: grow-progress auto linear;
    animation-timeline: scroll();
    scale: 1 1;
  }
}
@keyframes grow-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Glow que sigue al cursor */
.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklab, var(--brand-bright) 9%, transparent), transparent 65%);
}
@media (hover: none) { .cursor-glow { display: none; } }

/* ============================ LAYOUT =============================== */
@layer layout {

  .section { padding-block: var(--space-section); }

  header.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
    border-bottom: 1px solid transparent;
  }

  header.site-header.is-scrolled {
    background: color-mix(in oklab, var(--bg) 72%, transparent);
    backdrop-filter: blur(16px) saturate(1.4);
    border-bottom-color: var(--line);
  }

  .header-inner {
    max-width: var(--container);
    margin-inline: auto;
    padding: 0.9rem var(--gutter);
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }

  .logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    flex: none;
    z-index: 1201;
  }
  .logo img {
    height: 42px;
    width: auto;
  }
  .logo .logo-mark {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-s);
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand-bright), var(--brand));
    box-shadow: 0 8px 22px -8px rgba(61, 107, 255, 0.9);
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
  }

  nav.site-nav {
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .nav-link {
    padding: 0.45rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.2s, background 0.2s;
    position: relative;
  }
  .nav-link:hover { color: var(--ink); background: var(--glass); }
  .nav-link.is-active { color: var(--ink); }
  .nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.2rem;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand-bright);
    translate: -50% 0;
  }

  /* Dropdown de servicios anclado al item (sin puentes de hover globales) */
  .nav-item { position: relative; }
  .nav-item > .nav-link::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 3.5px solid currentColor;
    margin-left: 4px;
    vertical-align: middle;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
  }
  .nav-item:hover > .nav-link::before,
  .nav-item > .nav-link:focus::before {
    opacity: 0.8;
    transform: rotate(180deg);
  }

  .nav-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    translate: -50% 0;
    min-width: 340px;
    background: color-mix(in oklab, var(--panel) 88%, transparent);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.7rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform-origin: top;
    transform: translateY(4px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
    z-index: 1100;
  }
  /* Puente de hover: franja invisible hasta el panel, solo del ancho del link */
  .nav-dropdown::before {
    content: "";
    position: absolute;
    top: -14px; left: 50%;
    translate: -50% 0;
    width: 160px; height: 14px;
  }
  .nav-item:hover .nav-dropdown,
  .nav-item:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(10px);
  }

  @supports (position-area: bottom center) {
    .nav-item { anchor-name: --nav-drop; }
    .nav-dropdown {
      position-anchor: --nav-drop;
      position-area: bottom center;
      top: auto; left: auto;
      translate: 0 0;
    }
  }
  .nav-dropdown a {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-s);
    transition: background 0.2s;
  }
  .nav-dropdown a:hover { background: var(--panel-2); }
  .nav-dropdown .dd-ico {
    width: 32px; height: 32px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: var(--radius-s);
    background: color-mix(in oklab, var(--brand-bright) 16%, var(--panel-2));
    color: var(--brand-soft);
  }
  .nav-dropdown .dd-ico svg { width: 18px; height: 18px; }
  .nav-dropdown .dd-t { font-weight: 600; font-size: 0.86rem; }
  .nav-dropdown .dd-d {
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  @supports (anchor-name: --d) {
    .nav-item { anchor-name: --nav-drop; }
    .nav-dropdown {
      position: fixed;
      position-anchor: --nav-drop;
      position-area: bottom center;
      translate: 0 8px;
      top: auto; left: auto;
    }
    .nav-item:hover .nav-dropdown,
    .nav-item:focus-within .nav-dropdown { translate: 0 14px; }
  }

  /* User dropdown */
  .nav-item-user { position: relative; }
  .nav-dropdown-user {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    min-width: 200px;
    background: color-mix(in oklab, var(--panel) 92%, transparent);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.5rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform-origin: top right;
    transform: translateY(4px) scale(.96);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
    z-index: 1100;
  }
  .nav-dropdown-user::before {
    content: "";
    position: absolute;
    top: -10px; right: 0;
    width: 100%; height: 10px;
  }
  .nav-item-user:hover .nav-dropdown-user,
  .nav-item-user:focus-within .nav-dropdown-user {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  .nav-dropdown-user a {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-s);
    transition: background 0.2s;
  }
  .nav-dropdown-user a:hover { background: var(--panel-2); }
  .nav-dropdown-user .dd-ico {
    width: 28px; height: 28px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: var(--radius-s);
    background: color-mix(in oklab, var(--brand-bright) 14%, var(--panel-2));
    color: var(--brand-soft);
  }
  .nav-dropdown-user .dd-ico svg { width: 16px; height: 16px; }
  .nav-dropdown-user .dd-t { font-weight: 600; font-size: 0.82rem; color: var(--ink); }
  .nav-dropdown-user .dd-logout { margin-top: 0.3rem; border-top: 1px solid var(--line); padding-top: 0.5rem; }
  .nav-dropdown-user .dd-logout .dd-ico {
    background: color-mix(in oklab, #ef4444 12%, var(--panel-2));
    color: #ef4444;
  }
  .nav-dropdown-user .dd-logout .dd-t { color: #ef4444; }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
  }
  .header-actions .btn { white-space: nowrap; }
  .header-actions .btn-sm {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
  }
  .header-actions .btn-user svg { width: 18px; height: 18px; }
  .header-actions .btn-user {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    position: relative;
    overflow: visible;
  }
  .header-actions .btn-user svg { display: none; }
  .btn-user-float {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: user-float 3s ease-in-out infinite;
    pointer-events: none;
  }
  .btn-user-float svg {
    display: block !important;
    filter: drop-shadow(0 2px 6px rgba(59,71,245,.45));
    flex-shrink: 0;
  }
  .user-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    margin-top: -1px;
    border: 1.5px solid var(--bg);
    animation: dot-pulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
  }
  @keyframes user-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
  }
  @keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
    50% { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
  }
  .header-actions .btn-cta {
    font-size: 0.78rem;
    padding: 0.3rem 0.6rem !important;
    font-weight: 600;
    box-shadow: none !important;
    letter-spacing: 0;
    transform: none !important;
  }
  .header-actions .btn-cta::after { display: none !important; }

  /* Anchos medios: evita que el CTA se parta en dos líneas */
  @media (max-width: 1180px) and (min-width: 961px) {
    .header-inner { gap: 1rem; }
    .nav-link { padding-inline: 0.6rem; font-size: 0.8rem; }
    .header-actions .btn-sm { font-size: 0.76rem; padding-inline: 0.6rem; }
    .header-actions .btn-cta { font-size: 0.76rem; padding-inline: 0.65rem; }
  }
  @media (max-width: 1080px) and (min-width: 961px) {
    .header-actions .btn-xsm { display: inline-flex; }
    .header-actions .btn-xsm-hide { display: none; }
  }

  /* Modo claro / oscuro — botón de tema */
  .theme-toggle {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--line-strong);
    background: var(--glass);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s, background 0.25s;
  }
  .theme-toggle:hover { border-color: var(--brand-bright); box-shadow: var(--glow); }
  .theme-toggle svg { width: 17px; height: 17px; }
  .theme-toggle .t-sun { display: none; }
  .theme-toggle .t-moon { display: block; }
  html[data-theme="dark"] .theme-toggle .t-sun { display: block; }
  html[data-theme="dark"] .theme-toggle .t-moon { display: none; }

  /* Admin: switch en la topbar y en el login */
  .a-top .theme-toggle { flex: none; }
  .login-wrap > .theme-toggle { position: fixed; top: 1rem; right: 1rem; z-index: 60; }

  .burger {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-s);
    border: 1px solid var(--line);
    background: var(--glass);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    z-index: 1201;
  }
  .burger span {
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.3s;
  }
  body.nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .burger span:nth-child(2) { opacity: 0; }
  body.nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: color-mix(in oklab, var(--bg) 92%, transparent);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem var(--gutter) 3rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
  }
  body.nav-open .mobile-drawer { opacity: 1; visibility: visible; }
  .mobile-drawer a {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    font-weight: 700;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    opacity: 0;
    translate: 0 18px;
    transition: opacity 0.4s var(--ease), translate 0.4s var(--ease), color 0.2s;
  }
  body.nav-open .mobile-drawer a { opacity: 1; translate: 0; }
  .mobile-drawer a:hover { color: var(--brand-soft); }
  .mobile-drawer .md-cta {
    margin-top: 1.6rem;
    border-bottom: 0;
  }

  @media (max-width: 960px) {
    nav.site-nav { display: none; }
    .burger { display: flex; }
    header.site-header {
      background: color-mix(in oklab, var(--bg) 84%, transparent);
      backdrop-filter: blur(14px) saturate(1.3);
      border-bottom-color: var(--line);
    }
    .header-inner {
      gap: 0.4rem;
      padding: 0.5rem clamp(0.8rem, 3vw, 1.5rem);
      flex-wrap: nowrap;
      max-width: 100%;
    }
    .logo { flex: 0 0 auto; min-width: 0; }
    .logo img {
      max-width: 110px;
      height: 28px;
    }
    .header-actions {
      margin-left: auto;
      gap: 0.3rem;
      flex-shrink: 0;
    }
    .header-actions .btn-label { display: none; }
    .header-actions .btn,
    .header-actions .btn-sm {
      padding: 0;
      font-size: 0;
      overflow: visible;
      color: var(--ink);
    }
    .header-actions .btn-icon,
    .header-actions .btn-cta.btn-icon {
      width: 28px;
      height: 28px;
      min-width: 0;
      min-height: 0;
      border-radius: 50%;
      justify-content: center;
      overflow: visible;
    }
    .theme-toggle {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .theme-toggle svg { width: 13px; height: 13px; }
    .burger {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .burger span { width: 13px; }
    .cookie-banner { display: none !important; }
  }

  /* ------------------------- Footer ------------------------- */
  footer.site-footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--line);
    background:
      radial-gradient(700px 400px at 90% 110%, color-mix(in oklab, var(--brand) 22%, transparent), transparent 60%),
      var(--bg-2);
  }

  .footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 3rem;
    padding-block: 4.5rem 3rem;
  }
  .footer-brand img { height: 46px; width: auto; margin-bottom: 1.1rem; }
  .footer-brand p { font-size: 0.92rem; margin-bottom: 1.2rem; }

  .footer-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted-2);
    margin-bottom: 1.1rem;
    font-weight: 600;
  }
  .footer-col ul li { margin-bottom: 0.55rem; }
  .footer-col ul a {
    color: var(--muted);
    font-size: 0.94rem;
    transition: color 0.2s, padding-left 0.25s var(--ease);
  }
  .footer-col ul a:hover { color: var(--brand-soft); padding-left: 4px; }

  .social-row {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.4rem;
  }
  .social-row a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-s);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--muted);
    transition: all 0.25s var(--ease);
  }
  .social-row a:hover {
    color: var(--brand);
    border-color: var(--brand-bright);
    background: color-mix(in oklab, var(--brand-bright) 12%, transparent);
    translate: 0 -3px;
    box-shadow: var(--glow);
  }
  .social-row svg { width: 19px; height: 19px; }

  .newsletter-box form {
    display: flex;
    gap: 0.5rem;
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-full);
    padding: 0.3rem;
  }
  .newsletter-box form:focus-within { border-color: var(--brand-bright); }
  .newsletter-box input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: none;
    padding: 0.55rem 1rem;
    color: var(--ink);
    min-width: 0;
  }
  .newsletter-box button {
    white-space: nowrap;
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
  }

  .footer-bottom {
    border-top: 1px solid var(--line);
    padding-block: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.84rem;
    color: var(--muted-2);
  }
  .footer-bottom nav { display: flex; gap: 1.4rem; }
  .footer-bottom a:hover { color: var(--brand-soft); }

  @media (max-width: 880px) {
    .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  }
  @media (max-width: 540px) {
    .footer-top { grid-template-columns: 1fr; }
  }

  /* -------------------- Cookie consent banner -------------------- */
  .cookie-banner {
    position: fixed;
    left: var(--gutter);
    right: var(--gutter);
    bottom: calc(var(--gutter) * 0.6);
    z-index: 1500;
    max-width: 780px;
    margin-inline: auto;
    padding: 1.2rem 1.4rem;
    border-radius: var(--radius);
    background: color-mix(in oklab, var(--panel) 92%, transparent);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow);
    display: flex;
    gap: 1.2rem;
    align-items: center;
    opacity: 0;
    translate: 0 24px;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), translate 0.4s var(--ease), visibility 0.4s;
  }
  .cookie-banner.show { opacity: 1; translate: 0; visibility: visible; }
  .cookie-banner p { font-size: 0.88rem; flex: 1; color: var(--muted); }
  .cookie-banner .btn { padding: 0.6rem 1.2rem; font-size: 0.86rem; }
  .cookie-banner .cb-skip { color: var(--muted-2); font-size: 0.84rem; }

  .back-top {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 900;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-s);
    background: color-mix(in oklab, var(--panel) 90%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line-strong);
    display: grid;
    place-items: center;
    color: var(--ink);
    opacity: 0;
    visibility: hidden;
    translate: 0 12px;
    transition: all 0.3s var(--ease);
  }
  .back-top.show { opacity: 1; visibility: visible; translate: 0; }
  .back-top:hover { border-color: var(--brand-bright); box-shadow: var(--glow); }
.back-top svg { width: 20px; height: 20px; }
}

/* Fix lead visibility in hero for dark mode */
html[data-theme="dark"] .hero .lead {
  color: var(--ink);
}

/* =========================== COMPONENTS ============================ */
@layer components {

  /* --------------------------- Hero --------------------------- */
  .hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-block: clamp(7.5rem, 14vh, 9.5rem) var(--space-section);
  }

  .hero-copy { max-width: 640px; }

  .hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.9;
  }

  /* ------------------- Video de fondo del hero ------------------- */
  .hero-video-wrap {
    position: absolute;
    inset: -22% 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    will-change: transform, opacity;
  }
  .hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
    animation: hero-kenburns 26s ease-in-out infinite alternate;
    will-change: transform;
  }
  .hero-video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(247, 246, 242, 0.58);
    background:
      linear-gradient(180deg, color-mix(in oklab, var(--bg) 82%, transparent), color-mix(in oklab, var(--bg) 36%, transparent) 30%, color-mix(in oklab, var(--bg) 12%, transparent) 42%, var(--bg) 97%),
      radial-gradient(110% 130% at 18% 6%, color-mix(in oklab, var(--brand-bright) 15%, transparent), transparent 62%);
  }
  @keyframes hero-kenburns {
    from { transform: scale(1.06) translate3d(0, 0, 0); }
    to { transform: scale(1.16) translate3d(-1.6%, 1.4%, 0); }
  }
  @keyframes hero-parallax {
    from { transform: scale(1) translate3d(0, 0, 0); }
    to   { transform: scale(1.55) translate3d(0, 9vh, 0); }
  }
  @supports (animation-timeline: scroll()) {
    .hero-video-wrap {
      animation: hero-parallax linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
  }

  .hero-mesh {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
  }
  .hero-mesh .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    mix-blend-mode: normal;
    will-change: transform;
  }
  .hero-mesh .blob-1 {
    width: 560px; height: 560px;
    top: -12%;
    right: -6%;
    background: radial-gradient(closest-side, color-mix(in oklab, var(--brand-bright) 55%, transparent), transparent);
    animation: blob-drift 16s ease-in-out infinite alternate;
  }
  .hero-mesh .blob-2 {
    width: 440px; height: 440px;
    bottom: -18%;
    left: -4%;
    background: radial-gradient(closest-side, color-mix(in oklab, var(--brand) 50%, transparent), transparent);
    opacity: 0.45;
    animation: blob-drift 19s ease-in-out infinite alternate-reverse;
  }
  .hero-mesh .blob-3 {
    width: 260px; height: 260px;
    top: 38%;
    left: 42%;
    background: radial-gradient(closest-side, color-mix(in oklab, var(--red) 34%, transparent), transparent);
    opacity: 0.3;
    animation: blob-drift 23s ease-in-out infinite alternate;
  }

  @keyframes blob-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(6%, -8%, 0) scale(1.15); }
  }

  .hero-grid {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
  }

  .hero .hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--line);
    background: var(--glass);
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    backdrop-filter: blur(6px);
  }
  .hero .hero-kicker .pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--brand-bright);
    box-shadow: 0 0 0 0 color-mix(in oklab, var(--brand-bright) 70%, transparent);
    animation: pulse 2.2s infinite;
  }
  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--brand-bright) 60%, transparent); }
    70% { box-shadow: 0 0 0 9px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
  }

  .hero h1 {
    margin-bottom: 1.4rem;
  }
  .hero h1 .text-gradient { white-space: nowrap; }

  .hero-cta {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 2rem;
  }

  .hero-socials {
    display: flex;
    gap: 0.55rem;
    margin-top: 2.2rem;
    flex-wrap: wrap;
  }
  .hero-socials a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--line);
    font-size: 0.82rem;
    color: var(--muted);
    transition: all 0.25s var(--ease);
  }
  .hero-socials a:hover { color: var(--ink); border-color: var(--brand-bright); background: var(--glass); }
  .hero-socials svg { width: 15px; height: 15px; }

  /* Panel visual del hero */
  .hero-visual {
    position: relative;
  }
  .hero-card {
    position: relative;
    border-radius: var(--radius-l);
    border: 1px solid var(--line);
    background: color-mix(in oklab, var(--panel) 72%, transparent);
    backdrop-filter: blur(14px);
    padding: 1.6rem;
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  .hero-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, var(--brand-bright), transparent 40%, transparent 60%, var(--brand) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
  }
  .hero-card .hc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
  }
  .hero-card .hc-head .dots { display: flex; gap: 5px; }
  .hero-card .hc-head .dots i {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--line-strong);
  }
  .hero-card .hc-head .dots i:first-child { background: var(--red); }
  .hero-card .hc-head .dots i:nth-child(2) { background: #f5b301; }
  .hero-card .hc-head .dots i:nth-child(3) { background: #22c55e; }
  .hero-card .hc-tag {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-2);
  }

  .hc-lines {
    display: grid;
    gap: 0.8rem;
  }
  .hc-line {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0.95rem;
    border-radius: var(--radius-s);
    background: var(--panel-2);
    border: 1px solid var(--line);
    font-size: 0.88rem;
    animation: hc-in 0.6s var(--ease) both;
  }
  .hc-line svg { width: 20px; height: 20px; color: var(--brand-soft); flex: none; }
  .hc-line .hc-msg { flex: 1; }
  .hc-line .hc-msg b { color: var(--ink); }
  .hc-line .hc-msg span { color: var(--muted); }
  .hc-line .hc-time { font-size: 0.72rem; color: var(--muted-2); flex: none; }
  .hc-line:nth-child(2) { animation-delay: 0.12s; }
  .hc-line:nth-child(3) { animation-delay: 0.24s; }

  @keyframes hc-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }

  .hc-chart {
    display: flex;
    align-items: end;
    gap: 8px;
    height: 84px;
    margin-top: 1.1rem;
  }
  .hc-chart i {
    flex: 1;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, var(--brand-bright), var(--brand-deep));
    transform-origin: bottom;
    animation: chart-grow 1s var(--ease) both;
  }
  .hc-chart i:nth-child(1) { height: 32%; animation-delay: 0.1s; }
  .hc-chart i:nth-child(2) { height: 48%; animation-delay: 0.2s; }
  .hc-chart i:nth-child(3) { height: 44%; animation-delay: 0.3s; }
  .hc-chart i:nth-child(4) { height: 66%; animation-delay: 0.4s; }
  .hc-chart i:nth-child(5) { height: 58%; animation-delay: 0.5s; }
  .hc-chart i:nth-child(6) { height: 86%; animation-delay: 0.6s; }
  .hc-chart i:nth-child(7) { height: 74%; animation-delay: 0.7s; }
  .hc-chart i:nth-child(8) { height: 100%; animation-delay: 0.8s; }
  .hc-chart i:nth-child(9) { height: 90%; animation-delay: 0.9s; }
  .hc-chart i:nth-child(10) { height: 108%; animation-delay: 1s; }
  .hc-chart i:nth-child(11) { height: 96%; animation-delay: 1.1s; }

  @keyframes chart-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

  .hero-float {
    position: absolute;
    bottom: -1.4rem;
    left: -1.2rem;
    background: color-mix(in oklab, var(--panel) 92%, transparent);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.85rem 1.15rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 0.9rem;
    align-items: center;
    animation: float-y 5s ease-in-out infinite;
  }
  .hero-float .hf-ico {
    width: 42px; height: 42px;
    border-radius: var(--radius-s);
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand-bright), var(--brand));
    color: #fff;
  }
  .hero-float .hf-t { font-size: 0.8rem; font-weight: 700; }
  .hero-float .hf-s { font-size: 0.74rem; color: var(--muted); }
  @keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }

  /* Indicador de scroll */
  .scroll-cue {
    position: absolute;
    bottom: 1.6rem;
    left: 50%;
    translate: -50% 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-2);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
  }
  .scroll-cue i {
    width: 22px; height: 36px;
    border: 2px solid var(--line-strong);
    border-radius: 12px;
    position: relative;
  }
  .scroll-cue i::after {
    content: "";
    position: absolute;
    top: 6px; left: 50%;
    width: 4px; height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    background: var(--brand-bright);
    animation: wheel 1.8s infinite;
  }
  @keyframes wheel {
    0% { opacity: 1; transform: translateY(0); }
    70% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 0; }
  }

  @media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .hero { padding-top: 6.5rem; overflow: hidden; }
    .hero-copy { max-width: 100%; padding-inline: var(--gutter); }
    .hero h1 .text-gradient { white-space: normal; }
    .hero h1 { font-size: clamp(1.8rem, 8vw, 2.8rem); }
    .hero .lead { font-size: clamp(0.92rem, 2.5vw, 1.1rem); }
    .hero-cta { gap: 0.6rem; }
    .hero-cta .btn { font-size: 0.82rem; padding: 0.55rem 1rem; }
    .hero-kicker { font-size: 0.72rem; margin-bottom: 1.2rem; }
    .section-head h2,
    .section-head h3 { word-break: break-word; }
  }

  /* --------------------------- Marquee --------------------------- */
  .marquee {
    position: relative;
    z-index: 2;
    border-block: 1px solid var(--line);
    background:
      linear-gradient(180deg, var(--bg-2), color-mix(in oklab, var(--brand-pale) 14%, var(--bg-2)) 55%, var(--bg-2));
    overflow: hidden;
    padding-block: 1.25rem;
    perspective: 900px;
    -webkit-perspective: 900px;
  }
  /* Resplandor que barre la cinta al hacer scroll (unidade --mq-glow) */
  .marquee-sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--brand-bright) 9%, transparent), transparent);
    background-size: 200% 100%;
    background-position: calc(var(--mq-glow, 0) * 100%) 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
  }
  .marquee:hover .marquee-sheen { opacity: 1; }
  .marquee-stage {
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transform: perspective(900px) rotateX(var(--mq-rx, 9deg));
    transform-origin: 50% 50%;
    will-change: transform;
  }
  .marquee-track {
    display: flex;
    width: max-content;
    transform: translate3d(var(--mq-x, 0px), 0, 0) translateZ(0);
    will-change: transform;
  }
  .marquee:hover .marquee-stage { --mq-rx: 5deg; }
  .marquee-run {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
  }
  .mq-item {
    --z: 0;
    display: inline-flex;
    align-items: center;
    gap: 3.4rem;
    padding: 0 1.7rem;
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2.4vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--muted);
    transform: translateZ(var(--z));
    transition: color 0.3s, text-shadow 0.3s, transform 0.45s var(--ease);
    will-change: transform;
  }
  .mq-item[data-depth="far"] { --z: -46px; }
  .mq-item[data-depth="mid"] { --z: 0px; }
  .mq-item[data-depth="near"] { --z: 52px; }
  .mq-inner {
    padding: 0.28rem 0.9rem;
    border-radius: 99px;
    border: 1px solid var(--line);
    background: color-mix(in oklab, var(--panel) 55%, transparent);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  }
  .mq-item:hover .mq-inner {
    color: var(--brand-deep);
    border-color: color-mix(in oklab, var(--brand-bright) 45%, transparent);
    box-shadow: var(--glow);
  }
  .mq-item:hover {
    color: var(--brand-deep);
    transform: translateZ(calc(var(--z) + 30px)) scale(1.02);
  }
  .mq-item .sep {
    color: var(--brand-bright);
    font-size: 0.7em;
    opacity: 0.85;
  }
  .mq-item .sep svg { width: 15px; height: 15px; display: block; }

  /* ------------------------ Section head ------------------------ */
  .section-head { position: relative; z-index: 1; }
  .section-head h2 { margin-top: 0.9rem; }
  .section-head .lead { margin-top: 1rem; }

  /* Separador sutil entre secciones */
  .section + .section { border-top: 1px solid var(--line); }

  /* Secciones con lavado de fondo alterno */
  .band-alt { background: linear-gradient(180deg, transparent, var(--bg-2) 16%, var(--bg-2) 84%, transparent); }

  /* ----------------------- Servicios cards ----------------------- */
  .s-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.7rem; }
  @media (max-width: 1080px) { .s-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 640px) { .s-grid { grid-template-columns: 1fr; } }

  .s-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 2rem 1.9rem;
    border-radius: var(--radius);
    background: color-mix(in oklab, var(--panel) 82%, transparent);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(6px);
  }
  .s-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in oklab, var(--brand-bright) 50%, transparent);
    box-shadow: var(--glow);
  }
  .s-card .s-glow {
    position: absolute;
    inset: auto -30% -40% -30%;
    height: 60%;
    background: radial-gradient(60% 100% at 50% 100%, color-mix(in oklab, var(--brand-bright) 30%, transparent), transparent);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
  }
  .s-card:hover .s-glow { opacity: 1; }

  .s-ico {
    width: 52px; height: 52px;
    border-radius: var(--radius-s);
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, color-mix(in oklab, var(--brand-bright) 30%, var(--panel-2)), var(--panel-2));
    border: 1px solid var(--line-strong);
    color: var(--brand-soft);
  }
  .s-ico svg { width: 26px; height: 26px; }
  .s-card:nth-child(3n) .s-ico,
  .s-card[data-accent="red"] .s-ico { color: var(--red); }

  .s-card h3 { font-size: 1.13rem; }
  .s-card p { font-size: 0.9rem; color: var(--muted); flex: 1; }

  .s-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.6rem;
    border-top: 1px solid var(--line);
  }
  .s-foot a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--brand-soft);
    transition: color 0.2s, gap 0.2s var(--ease);
  }
  .s-foot a:hover { color: var(--brand); gap: 0.7rem; }
  .s-foot svg { width: 15px; height: 15px; }
  .s-foot .chip { font-size: 0.72rem; padding: 0.28rem 0.7rem; }

  /* ------------------- Panel "ecosistema" ------------------- */
  .eco {
    position: relative;
    border-radius: var(--radius-l);
    border: 1px solid var(--line);
    overflow: hidden;
    background:
      radial-gradient(80% 70% at 20% 0%, color-mix(in oklab, var(--brand) 26%, transparent), transparent),
      var(--panel);
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .eco-visual {
    position: relative;
    min-height: 480px;
  }
  .eco-visual canvas,
  .eco-visual .eco-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .eco-visual .eco-img {
    object-fit: cover;
    object-position: center;
    filter: saturate(1.05) contrast(1.02);
  }
  .eco-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 58%, transparent), transparent 42%);
  }
  .eco-visual .eco-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 2;
  }
  .eco-list {
    padding: clamp(1.8rem, 4vw, 3.2rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
  }
  .eco-list .eyebrow { margin-bottom: 1rem; }
  .eco-list h2 { margin-bottom: 0.6rem; }
  .eco-list > p { color: var(--muted); margin-bottom: 1.4rem; max-width: 46ch; }

  .eco-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
  }
  .eco-item:last-child { border-bottom: 0; }
  .eco-item .ei-n {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--brand-bright);
    line-height: 2.2;
    flex: none;
  }
  .eco-item .ei-t { font-weight: 600; margin-bottom: 0.2rem; }
  .eco-item .ei-d { font-size: 0.9rem; color: var(--muted); }

  @media (max-width: 900px) {
    .eco { grid-template-columns: 1fr; }
    .eco-visual { min-height: 300px; order: 2; }
  }

  /* ------------------------- Proceso ------------------------- */
  .process { position: relative; }
  .process-track {
    --step: 25%;
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.8rem;
    counter-reset: step;
  }
  .process-step {
    position: relative;
    padding: 2.1rem 1.8rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    transition: transform 0.3s var(--ease), border-color 0.3s;
  }
  .process-step:hover { transform: translateY(-4px); border-color: var(--line-strong); }
  .process-step .p-num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--brand-bright);
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
  }
  .process-step h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
  .process-step p { font-size: 0.9rem; color: var(--muted); }

  @media (max-width: 900px) { .process-track { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 560px) { .process-track { grid-template-columns: 1fr; } }

  /* ---------------------------- Stats ---------------------------- */
  .stats-band {
    position: relative;
    overflow: hidden;
    padding-block: clamp(2.6rem, 6vw, 4.4rem);
    background:
      radial-gradient(70% 150% at 85% 0%, color-mix(in oklab, var(--brand-bright) 45%, transparent), transparent 60%),
      linear-gradient(120deg, var(--brand-deep), var(--ink));
    border-block: none;
    border-radius: var(--radius-l);
    margin-inline: auto;
    width: 100%;
    max-width: calc(var(--container) - 2 * var(--gutter));
  }
  .stats-band::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 46%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in oklab, var(--brand-bright) 30%, transparent), transparent);
    filter: blur(40px);
  }
  .stats-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.2rem;
    text-align: center;
  }
  .stat-num {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, var(--white), var(--brand-bright));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .stats-band .stat-label { color: var(--brand-pale); font-size: 0.92rem; margin-top: 0.2rem; }
  @media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

  /* ------------------------- Portafolio ------------------------- */
  .filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; align-items: center; }
  .p-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  @media (max-width: 1100px) { .p-grid { grid-template-columns: repeat(3, 1fr); } }
  @media (max-width: 860px) { .p-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 520px) { .p-grid { grid-template-columns: 1fr; } }

  .p-card {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(.22,1,.36,1), border-color 0.3s, box-shadow 0.4s;
  }
  .p-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in oklab, var(--brand-bright) 40%, var(--line-strong));
    box-shadow: 0 12px 32px -8px color-mix(in oklab, var(--brand-bright) 18%, rgba(0,0,0,.18)), 0 0 0 1px color-mix(in oklab, var(--brand-bright) 12%, transparent);
  }

  .p-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: radial-gradient(80% 80% at 30% 20%, color-mix(in oklab, var(--brand-bright) 40%, transparent), color-mix(in oklab, var(--brand-deep) 70%, var(--bg-2)));
  }
  .p-thumb img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
    transition: transform 0.6s cubic-bezier(.22,1,.36,1), filter 0.5s;
    filter: brightness(1) saturate(1);
  }
  .p-card:hover .p-thumb img {
    transform: scale(1.08);
    filter: brightness(1.05) saturate(1.1);
  }
  .p-thumb .p-letter { position: relative; z-index: 1; }
  .p-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 45%, transparent 100%);
    opacity: 0;
    transition: opacity 0.45s cubic-bezier(.22,1,.36,1);
    z-index: 1;
    pointer-events: none;
  }
  .p-card:hover .p-thumb::before { opacity: 1; }
  .p-thumb::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-bright), var(--brand-soft), var(--brand-bright));
    background-size: 200% 100%;
    z-index: 2;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.5s cubic-bezier(.22,1,.36,1), opacity 0.4s;
  }
  .p-card:hover .p-thumb::after { opacity: 1; transform: scaleX(1); }
  .p-thumb .p-letter {
    font-family: var(--font-display);
    font-size: 4.4rem;
    font-weight: 800;
    color: var(--brand-deep);
    text-shadow: 0 10px 30px color-mix(in oklab, var(--white) 60%, transparent);
    transition: transform 0.5s cubic-bezier(.22,1,.36,1);
  }
  .p-card:hover .p-thumb .p-letter { transform: scale(1.08); }
  .p-card:nth-child(2) .p-thumb, .p-card:nth-child(5) .p-thumb {
    background: radial-gradient(80% 80% at 30% 20%, color-mix(in oklab, var(--gray) 30%, transparent), color-mix(in oklab, var(--brand-deep) 55%, var(--bg-2)));
  }
  .p-card:nth-child(3) .p-thumb, .p-card:nth-child(6) .p-thumb {
    background: radial-gradient(80% 80% at 30% 20%, color-mix(in oklab, var(--red) 34%, transparent), color-mix(in oklab, var(--brand-deep) 60%, var(--bg-2)));
  }
  .p-card .p-tag {
    position: absolute;
    top: .75rem;
    left: .75rem;
    z-index: 2;
    background: color-mix(in oklab, var(--panel) 85%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid color-mix(in oklab, var(--white) 12%, transparent);
    color: var(--ink);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 600;
    transition: background 0.3s, border-color 0.3s;
  }
  .p-card:hover .p-tag {
    background: color-mix(in oklab, var(--brand-bright) 20%, var(--panel));
    border-color: color-mix(in oklab, var(--brand-bright) 30%, transparent);
  }

  .p-body {
    padding: 1.2rem 1.3rem 1.3rem;
    transition: background 0.3s;
  }
  .p-card:hover .p-body {
    background: color-mix(in oklab, var(--brand-bright) 3%, var(--panel));
  }
  .p-body h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    transition: color 0.3s;
  }
  .p-card:hover .p-body h3 { color: var(--brand-bright); }
  .p-body .p-client {
    font-size: 0.78rem;
    color: var(--brand-soft);
    margin-bottom: 0.5rem;
    transition: color 0.3s;
  }
  .p-card:hover .p-body .p-client { color: var(--brand-bright); }
  .p-body p { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.8rem; line-height: 1.5; }
  .p-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
  .p-tags span {
    font-size: 0.68rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--line);
    color: var(--muted);
    transition: border-color 0.3s, color 0.3s, background 0.3s;
  }
  .p-card:hover .p-tags span {
    border-color: color-mix(in oklab, var(--brand-bright) 25%, var(--line));
    color: var(--ink);
    background: color-mix(in oklab, var(--brand-bright) 6%, transparent);
  }

  /* --------------------------- Planes --------------------------- */
  .plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; align-items: start; }
  @media (max-width: 980px) { .plan-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

  .plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 2.2rem 2rem;
    border-radius: var(--radius-l);
    border: 1px solid var(--line);
    background: var(--panel);
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
  }
  .plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
  .plan .plan-name { font-size: 1.2rem; }
  .plan .plan-d { font-size: 0.88rem; color: var(--muted); }
  .plan .plan-price { display: flex; align-items: baseline; gap: 0.4rem; margin-top: 0.2rem; }
  .plan .plan-price .pp { font-family: var(--font-display); font-size: 2.3rem; font-weight: 800; letter-spacing: -0.02em; }
  .plan .plan-price .pp-suf, .plan .plan-price .p-periodo { font-size: 0.85rem; color: var(--muted); }
  .plan ul { display: grid; gap: 0.6rem; margin-block: 0.4rem; }
  .plan ul li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    color: var(--muted);
  }
  .plan ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--brand-soft);
    font-weight: 700;
  }
  .plan .btn { margin-top: auto; }

  .plan-featured {
    background:
      radial-gradient(90% 60% at 50% 0%, color-mix(in oklab, var(--brand-bright) 26%, transparent), transparent),
      var(--panel);
    border-color: color-mix(in oklab, var(--brand-bright) 45%, transparent);
    box-shadow: 0 30px 80px -30px rgba(61, 107, 255, 0.4);
    transform: scale(1.03);
  }
  .plan-featured:hover { transform: scale(1.03) translateY(-8px); }
  .plan-recommended {
    position: absolute;
    top: -0.85rem;
    left: 50%;
    translate: -50% 0;
    background: linear-gradient(120deg, var(--brand-bright), var(--brand));
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4rem 1.1rem;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 24px -8px rgba(61, 107, 255, 0.8);
  }

  /* ------------------------ Testimonios ------------------------ */
  .t-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.9rem; }
  @media (max-width: 1000px) { .t-grid { grid-template-columns: 1fr; } }

  .t-card {
    padding: 2rem 1.9rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    transition: transform 0.3s var(--ease), border-color 0.3s;
  }
  .t-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
  .t-card .t-quote { font-size: 1.05rem; color: var(--ink); line-height: 1.65; flex: 1; }
  .t-card .t-quote::before { content: "“"; color: var(--brand-bright); font-family: serif; }
  .t-stars { display: flex; gap: 3px; color: #f5b301; }
  .t-stars svg { width: 16px; height: 16px; }
  .t-who { display: flex; align-items: center; gap: 0.9rem; }
  .t-ava {
    width: 46px; height: 46px;
    border-radius: var(--radius-s);
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand-bright), var(--brand));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    flex: none;
  }
  .t-who b { display: block; font-size: 0.95rem; }
  .t-who span { font-size: 0.8rem; color: var(--muted); }

  /* --------------------------- Equipo --------------------------- */
  .team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
  @media (max-width: 1000px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 620px) { .team-grid { grid-template-columns: 1fr; } }

  .team-card {
    display: flex;
    gap: 1.1rem;
    align-items: center;
    padding: 1.5rem 1.6rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    transition: transform 0.3s var(--ease), border-color 0.3s;
  }
  .team-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
  .team-ava {
    width: 54px; height: 54px;
    border-radius: var(--radius-s);
    display: grid; place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.9rem;
    flex: none;
    color: #fff;
  }
  .team-ava.azul { background: linear-gradient(135deg, var(--brand-bright), var(--brand-deep)); }
  .team-ava.claro { background: linear-gradient(135deg, #8ba2ff, #3d6bff); }
  .team-ava.blanco { background: linear-gradient(135deg, #e8ecff, #9aa3c4); color: #0b0b19; }
  .team-ava.rojo { background: linear-gradient(135deg, #ff5d5d, var(--red) 70%); }
  .team-ava.gris { background: linear-gradient(135deg, #cfd3e6, var(--gray)); color: #0b0b19; }
  .team-card b { font-size: 0.98rem; }
  .team-card span { font-size: 0.82rem; color: var(--muted); }

  /* ---------------------------- Blog ---------------------------- */
  .b-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
  @media (max-width: 1100px) { .b-grid { grid-template-columns: repeat(3, 1fr); } }
  @media (max-width: 820px) { .b-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 520px) { .b-grid { grid-template-columns: 1fr; } }

  .b-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    overflow: hidden;
    transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  }
  .b-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
  .b-thumb {
    aspect-ratio: 16 / 10;
    background:
      radial-gradient(90% 120% at 80% 0%, color-mix(in oklab, var(--brand-bright) 36%, transparent), transparent 60%),
      radial-gradient(80% 100% at 10% 100%, color-mix(in oklab, var(--brand-deep) 40%, transparent), transparent 55%),
      var(--bg-2);
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative;
  }
  .b-thumb svg { width: 40px; height: 40px; color: color-mix(in oklab, var(--brand-soft) 70%, transparent); }
  .b-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .b-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
  .b-meta { display: flex; gap: 0.8rem; font-size: 0.72rem; font-weight: 600; color: var(--brand-soft); text-transform: uppercase; letter-spacing: 0.04em; }
  .b-meta b { color: var(--brand); }
  .b-meta span { color: var(--muted-2); }
  .b-body h3 { font-size: 1rem; line-height: 1.4; font-weight: 700; color: var(--ink); }
  .b-body h3 a { color: inherit; transition: color 0.2s; }
  .b-body h3 a:hover { color: var(--brand-soft); }
  .b-body p { font-size: 0.84rem; color: var(--muted); line-height: 1.55; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .b-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-soft);
    margin-top: auto;
    padding-top: 0.4rem;
    border-top: 1px solid var(--line);
    transition: color 0.2s;
  }
  .b-link:hover { color: var(--brand); }
  .b-link svg { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
  .b-card:hover .b-link svg { transform: translateX(4px); }

  /* Paginación blog */
  .pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 3rem; }
  .pagination a, .pagination span {
    min-width: 42px; height: 42px;
    display: grid; place-items: center;
    padding-inline: 0.8rem;
    border-radius: var(--radius-s);
    border: 1px solid var(--line);
    font-size: 0.9rem;
    color: var(--muted);
    transition: all 0.25s;
  }
  .pagination .cur, .pagination a:hover {
    background: linear-gradient(120deg, var(--brand-bright), var(--brand));
    color: #fff;
    border-color: transparent;
  }

  .a-hero-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; max-height: 420px; }
  .a-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

  /* Artículo único */
  .article { max-width: 780px; margin-inline: auto; }
  .article .a-meta { display: flex; gap: 1.4rem; color: var(--muted-2); font-size: 0.85rem; margin: 1.2rem 0 2rem; }
  .article .a-body { color: var(--muted); font-size: 1.05rem; line-height: 1.85; }
  .article .a-body h2, .article .a-body h3 {
    color: var(--ink);
    margin: 2rem 0 0.8rem;
  }
  .article .a-body p, .article .a-body ul, .article .a-body ol { margin-bottom: 1.2rem; }
  .article .a-body ul, .article .a-body ol { padding-left: 1.4rem; }
  .article .a-body ul { list-style: disc; }
  .article .a-body ul li, .article .a-body ol li { margin-bottom: 0.5rem; }
  .article .a-body strong { color: var(--ink); }

  /* ---------------------------- FAQ ---------------------------- */
  .faq { max-width: 820px; margin-inline: auto; }
  .faq-item {
    margin-bottom: 0.8rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    overflow: hidden;
    transition: border-color 0.3s;
  }
  .faq-item[open] { border-color: color-mix(in oklab, var(--brand-bright) 40%, transparent); }
  .faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1.15rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    font-size: 1rem;
  }
  .faq-item summary::-webkit-details-marker { display: none; }
  .faq-item summary .fq-ic {
    width: 30px; height: 30px;
    flex: none;
    border-radius: var(--radius-s);
    border: 1px solid var(--line-strong);
    display: grid; place-items: center;
    color: var(--brand-soft);
    transition: transform 0.3s var(--ease), background 0.3s, color 0.3s;
  }
  .faq-item summary .fq-ic svg { width: 15px; height: 15px; }
  .faq-item[open] summary .fq-ic {
    transform: rotate(45deg);
    background: linear-gradient(135deg, var(--brand-bright), var(--brand));
    border-color: transparent;
    color: #fff;
  }
  .faq-item .fq-a { padding: 0 1.4rem 1.3rem; color: var(--muted); font-size: 0.95rem; }

  /* ---------------------------- CTA band ---------------------------- */
  .cta-band {
    position: relative;
    border-radius: var(--radius-l);
    overflow: hidden;
    padding: clamp(2.6rem, 6vw, 4.5rem);
    background:
      radial-gradient(80% 140% at 85% 0%, color-mix(in oklab, var(--brand-bright) 50%, transparent), transparent 62%),
      radial-gradient(70% 120% at 0% 100%, color-mix(in oklab, var(--brand-bright) 32%, transparent), transparent 55%),
      linear-gradient(130deg, var(--brand-deep), var(--ink));
    border: 1px solid color-mix(in oklab, var(--brand-bright) 25%, transparent);
    text-align: center;
    color: var(--white);
  }
  .cta-band .eyebrow { color: var(--brand-pale); }
  .cta-band .eyebrow::before { background: linear-gradient(90deg, var(--brand-bright), transparent); }
  .cta-band .lead { max-width: 560px; margin-inline: auto; color: var(--brand-pale); }
  .cta-band .btn-ghost { color: var(--white); border-color: color-mix(in oklab, var(--white) 45%, transparent); background: color-mix(in oklab, var(--white) 8%, transparent); }
  .cta-band .btn-ghost:hover { border-color: var(--white); box-shadow: 0 14px 40px -12px color-mix(in oklab, var(--brand-deep) 70%, transparent); }
  .cta-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

  /* --------------------------- Formularios --------------------------- */
  .contact-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: start; }
  @media (max-width: 900px) { .contact-wrap { grid-template-columns: 1fr; } }
  .contact-info { display: grid; gap: 1rem; }
  .info-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
  }
  .info-card .ic {
    width: 44px; height: 44px;
    flex: none;
    border-radius: var(--radius-s);
    display: grid; place-items: center;
    background: linear-gradient(135deg, color-mix(in oklab, var(--brand-bright) 30%, var(--panel-2)), var(--panel-2));
    border: 1px solid var(--line-strong);
    color: var(--brand-soft);
  }
  .info-card .ic svg { width: 21px; height: 21px; }
  .info-card b { display: block; margin-bottom: 0.2rem; font-size: 0.95rem; }
  .info-card a, .info-card span { color: var(--muted); font-size: 0.9rem; }
  .info-card a:hover { color: var(--brand-soft); }

  .form-card {
    padding: clamp(1.5rem, 3vw, 2.2rem);
    border-radius: var(--radius-l);
    border: 1px solid var(--line);
    background: color-mix(in oklab, var(--panel) 82%, transparent);
    backdrop-filter: blur(10px);
  }
  .form-card .form-head { margin-bottom: 1.5rem; }
  .form-card .form-head h3 { margin-bottom: 0.3rem; }
  .form-card .form-head p { font-size: 0.9rem; color: var(--muted); }

  /* ----------------------------- 404 ----------------------------- */
  .notfound {
    min-height: 92svh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 6rem var(--gutter);
    position: relative;
  }
  .notfound .nf-code {
    font-family: var(--font-display);
    font-size: clamp(6rem, 22vw, 11rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(120deg, var(--brand-soft), transparent 60%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
  }
  .notfound .nf-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.8rem;
  }
  .notfound .nf-orbit {
    display: inline-block;
    width: 0.82em;
    height: 0.82em;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #fff, var(--brand-bright) 70%);
    box-shadow: 0 0 26px 8px color-mix(in oklab, var(--brand-bright) 55%, transparent);
    animation: nf-pulse 2.4s var(--ease) infinite;
  }
  @keyframes nf-pulse { 50% { transform: scale(1.3); opacity: 0.7; } }

  /* --------------------- Valores (nosotros) --------------------- */
  .values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.7rem; }
  @media (max-width: 860px) { .values-grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 560px) { .values-grid { grid-template-columns: 1fr; } }
  .value-card {
    padding: 1.8rem 1.7rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    transition: transform 0.3s var(--ease), border-color 0.3s;
  }
  .value-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
  .value-card .v-n {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--brand-bright);
    letter-spacing: 0.1em;
    margin-bottom: 0.7rem;
  }
  .value-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
  .value-card p { font-size: 0.88rem; color: var(--muted); }

  /* Timeline nosotros */
  .timeline { max-width: 760px; margin-inline: auto; position: relative; }
  .timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent);
  }
  .tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.4rem 0;
  }
  .tl-item .tl-dot {
    position: absolute;
    left: 50%;
    top: 1.8rem;
    translate: -50% 0;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--brand-bright);
    box-shadow: 0 0 0 5px color-mix(in oklab, var(--brand-bright) 22%, transparent);
  }
  .tl-item .tl-card {
    padding: 1.3rem 1.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
  }
  .tl-item:nth-child(even) .tl-card { grid-column: 2; }
  .tl-item:nth-child(odd) .tl-card { grid-column: 1; }
  .tl-item .tl-year { color: var(--brand-bright); font-family: var(--font-display); font-weight: 800; }
  .tl-item h3 { font-size: 1.05rem; margin: 0.3rem 0; }
  .tl-item p { font-size: 0.88rem; color: var(--muted); }
  @media (max-width: 680px) {
    .timeline::before { left: 14px; }
    .tl-item { grid-template-columns: 1fr; gap: 0; }
    .tl-item .tl-card, .tl-item:nth-child(even) .tl-card, .tl-item:nth-child(odd) .tl-card { grid-column: 1; margin-left: 44px; }
    .tl-item .tl-dot { left: 14px; }
  }

  /* Snippet legal */
  .legal { max-width: 800px; margin-inline: auto; padding-top: var(--space-section); }
  .legal :is(h2, h3, h4) { font-size: 1.35rem; margin: 2rem 0 0.6rem; }
  .legal :is(p, li) { color: var(--muted); font-size: 0.98rem; line-height: 1.8; }
  .legal :is(ul, ol) { list-style: disc; padding-left: 1.3rem; margin-bottom: 1rem; }
  .legal a { color: var(--brand-bright); }
  .legal .cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.4rem;
    font-size: 0.88rem;
  }
  .legal .cookie-table th,
  .legal .cookie-table td {
    border: 1px solid var(--line);
    padding: 0.6rem 0.8rem;
    text-align: left;
    vertical-align: top;
  }
  .legal .cookie-table th { background: var(--panel); }
  @media (max-width: 640px) { .legal .cookie-table { font-size: 0.8rem; } }
}

/* ===================== Servicios · detalle (8 áreas) ===================== */
.detail-row {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.2rem, 5vw, 4.2rem);
  align-items: center;
}

.detail-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.detail-intro .chip { margin-bottom: 1.1rem; }
.detail-intro .s-ico {
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-bright), var(--brand));
  color: #fff;
  box-shadow: 0 14px 30px -14px color-mix(in oklab, var(--brand) 80%, transparent);
  animation: icon-bob 6s ease-in-out infinite;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.detail-intro .s-ico svg { width: 26px; height: 26px; }
.detail-intro .s-ico:hover { transform: translateY(-4px) rotate(-4deg); box-shadow: 0 20px 40px -14px color-mix(in oklab, var(--brand) 90%, transparent); }
.detail-intro h2 {
  margin-top: 1.1rem;
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  line-height: 1.15;
  max-width: 22ch;
}
.detail-intro .lead {
  margin-top: 1.05rem;
  max-width: 36rem;
  color: var(--muted);
}
.detail-intro .hero-cta { margin-top: 1.9rem; }

/* Panel de características */
.detail-feats {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: color-mix(in oklab, var(--panel) 74%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  padding: 1.55rem;
  overflow: hidden;
}
.detail-feats::before {
  content: "";
  position: absolute;
  top: -90px; right: -90px;
  width: 210px; height: 210px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--brand-bright) 26%, transparent), transparent);
  pointer-events: none;
}

.feats-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.feats-grid-3 { grid-template-columns: repeat(3, 1fr); }

.feat-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--panel-2);
  font-size: 0.88rem;
  line-height: 1.45;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.feat-item:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--brand-bright) 45%, var(--line));
  background: var(--panel);
  box-shadow: 0 10px 24px -16px color-mix(in oklab, var(--brand) 60%, transparent);
}
.feat-item .fi-ico {
  flex: none;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in oklab, var(--brand-bright) 16%, var(--panel-2));
  color: var(--brand-soft);
}
.feat-item .fi-ico svg { width: 14px; height: 14px; }

@media (max-width: 960px) {
  .detail-row { grid-template-columns: 1fr; }
  .detail-feats { order: 2; }
  .feats-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .feats-grid, .feats-grid-3 { grid-template-columns: 1fr; }
}

/* ================== Servicios · Showcase de redes sociales ================== */
.redes-showcase {
  position: relative;
  padding-block: 2.1rem;
}
.redes-showcase::before {
  content: "";
  position: absolute;
  inset: 0.4rem -1.2rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-l);
  opacity: 0.5;
  pointer-events: none;
}

.rs-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: color-mix(in oklab, var(--panel) 66%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.35rem;
}
.rs-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--brand-bright), transparent 35%, transparent 65%, var(--brand) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.rs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.05rem;
}
.rs-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.rs-live {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand-bright);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--brand-bright) 70%, transparent);
  animation: pulse 2.2s infinite;
}
.rs-head .dots { display: flex; gap: 5px; }
.rs-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.rs-head .dots i:first-child { background: var(--red); }
.rs-head .dots i:nth-child(2) { background: #f5b301; }
.rs-head .dots i:nth-child(3) { background: #22c55e; }

/* Publicación tipo feed */
.rs-post {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "ava user more"
    "photo photo photo"
    "acts acts acts"
    "likes likes likes"
    "caption caption caption";
  gap: 0.5rem 0.7rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.8rem;
}
.rs-ava {
  grid-area: ava;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-bright), var(--brand));
  color: #fff;
}
.rs-ava svg { width: 16px; height: 16px; }
.rs-user { grid-area: user; line-height: 1.25; }
.rs-user b { font-size: 0.84rem; color: var(--ink); }
.rs-user span { display: block; font-size: 0.72rem; color: var(--muted-2); }
.rs-more { grid-area: more; justify-self: end; color: var(--muted-2); }
.rs-more svg { width: 16px; height: 16px; }

.rs-photo {
  grid-area: photo;
  position: relative;
  height: 148px;
  border-radius: var(--radius-s);
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 130% at 15% 10%, rgba(255, 255, 255, 0.35), transparent 45%),
    linear-gradient(135deg, #5b6bff 0%, #8a4fff 45%, #ff5fa2 100%);
}
.rs-ph-ico { color: rgba(255, 255, 255, 0.92); filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.28)); transform: rotate(-8deg); transition: transform 0.4s var(--ease); }
.rs-photo:hover .rs-ph-ico { transform: rotate(0deg) scale(1.12); }
.rs-ph-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.28) 50%, transparent 60%);
  transform: translateX(-130%);
  animation: rs-shine 5.5s ease-in-out 1.2s infinite;
}
@keyframes rs-shine {
  0% { transform: translateX(-130%); }
  55% { transform: translateX(130%); }
  100% { transform: translateX(130%); }
}

.rs-actions { grid-area: acts; display: flex; align-items: center; gap: 0.95rem; margin-top: 0.2rem; }
.rs-actions svg { width: 19px; height: 19px; }
.rs-like { display: inline-grid; place-items: center; color: var(--red); animation: heart-pop 2.4s ease-in-out 0.6s infinite; }
.rs-like:not(:hover) { color: var(--red); }
.rs-action { color: var(--muted-2); transition: color 0.2s, transform 0.2s var(--ease); cursor: pointer; }
.rs-action:hover { color: var(--ink); transform: scale(1.15); }
@keyframes heart-pop {
  0%, 34%, 100% { transform: scale(1); }
  8% { transform: scale(1.32); }
  18% { transform: scale(0.92); }
  26% { transform: scale(1.1); }
}
.rs-likes { grid-area: likes; font-size: 0.8rem; color: var(--muted); }
.rs-likes b { color: var(--ink); font-weight: 700; }
.rs-caption { grid-area: caption; font-size: 0.78rem; color: var(--muted); line-height: 1.4; }
.rs-caption b { color: var(--ink); }
.rs-caption i { font-style: normal; color: var(--brand-soft); }

/* KPIs + gráfico de engagement */
.rs-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: end;
  margin-top: 1.15rem;
}
.rs-kpi { display: flex; flex-direction: column; line-height: 1.15; }
.rs-kpi b { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); }
.rs-kpi b.up { color: #16a34a; }
.rs-kpi span { font-size: 0.64rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.2rem; }
.rs-chart {
  display: flex;
  align-items: end;
  gap: 6px;
  height: 72px;
}
.rs-chart i {
  flex: 1;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--brand-bright), var(--brand-deep));
  transform-origin: bottom;
  animation: chart-grow 0.9s var(--ease) both;
  height: calc(14% + (var(--h) - 1) * 10%);
}
.rs-chart i:nth-child(2) { animation-delay: 0.08s; }
.rs-chart i:nth-child(3) { animation-delay: 0.16s; }
.rs-chart i:nth-child(4) { animation-delay: 0.24s; }
.rs-chart i:nth-child(5) { animation-delay: 0.32s; }
.rs-chart i:nth-child(6) { animation-delay: 0.4s; }
.rs-chart i:nth-child(7) { animation-delay: 0.48s; }
.rs-chart i:nth-child(8) { animation-delay: 0.56s; }
.rs-chart i:nth-child(9) { animation-delay: 0.64s; }

/* Chips flotantes */
.rs-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: color-mix(in oklab, var(--panel) 94%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 0.5rem 0.95rem;
  font-size: 0.8rem;
  color: var(--muted);
  box-shadow: var(--shadow);
  z-index: 2;
  animation: float-y 5s ease-in-out infinite;
}
.rs-chip svg { width: 15px; height: 15px; color: var(--brand-soft); }
.rs-chip b { color: var(--ink); }
.rs-chip-a { bottom: -0.4rem; left: -1.4rem; animation-delay: 0s; }
.rs-chip-a svg { color: var(--red); }
.rs-chip-b { top: -0.3rem; right: -1rem; animation-delay: 1.1s; }
.rs-chip-b svg { color: #16a34a; }
.rs-chip-c { bottom: 5.6rem; right: -1rem; animation-delay: 2.2s; }
.rs-chip-c svg { color: var(--brand-bright); }

/* Lista de características del servicio redes (full width) */
.redes-feats {
  margin-top: 2.4rem;
}
.redes-feats .feats-grid {
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: color-mix(in oklab, var(--panel) 55%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

@media (max-width: 960px) {
  .redes-showcase { padding-block: 1.4rem; }
  .rs-chip-c { bottom: 4rem; right: -0.2rem; }
}
@media (max-width: 640px) {
  .rs-chip-a { left: -0.2rem; }
  .rs-chip-b, .rs-chip-c { right: 0; }
  .rs-stats { grid-template-columns: 1fr; }
  .rs-chart { height: 56px; order: 3; grid-column: 1 / -1; }
}

/* ========================== E-COMMERCE / TIENDA =========================== */
.cat-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 2rem;
}
.ec-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 860px;
}
.ec-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 240px;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.4rem 0.85rem;
  color: var(--muted);
  transition: border-color 0.2s;
}
.ec-search:focus-within {
  border-color: var(--brand-bright);
}
.ec-search input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font-size: 0.875rem;
  width: 100%;
}
.ec-sort {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  border-radius: 99px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
}
.ec-count {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.ec-cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
}
.ec-cat-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.52rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}
.ec-cat-card:hover {
  border-color: var(--brand-bright);
  transform: translateY(-1px);
}
.ec-cat-card.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 5px 16px -8px var(--brand);
}
.ec-cat-card.ec-cat-more { display: none; }
.ec-cat-grid.expanded .ec-cat-card.ec-cat-more { display: inline-flex; }
.ec-cat-card.ec-cat-toggle {
  border-style: dashed;
  color: var(--brand-bright, var(--brand));
}
.ec-cat-card.ec-cat-toggle:hover {
  border-color: var(--brand-bright);
  background: var(--panel);
  transform: none;
}
.ec-filtros {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
  max-width: 960px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s, 14px);
  padding: 0.9rem 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.ec-cats {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ec-cats-label {
  flex: none;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ec-activos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  max-width: 960px;
}
.ec-activos-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.ec-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.7rem;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.ec-chip:hover { border-color: var(--brand-bright); background: var(--bg-2); }
.ec-chip i { font-style: normal; color: var(--muted); }
.ec-chip b { color: inherit; font-weight: 700; }
.ec-limpiar-todo {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--brand-bright, var(--brand));
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.1rem 0.2rem;
}
.ec-esenciales-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius-s);
}
.ec-veh-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius-s);
  padding: 0.6rem 0.85rem;
  margin: 0 auto 0.5rem;
  max-width: 860px;
  width: 100%;
}
.ec-veh-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.ec-veh-sel {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  border-radius: 99px;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  cursor: pointer;
  min-width: 130px;
}
.ec-veh-sel:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.ec-vehicles {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.18rem 0.55rem;
}
.ec-vehicles svg {
  flex: none;
  color: var(--brand-bright);
}
.ec-esenciales {
  width: 100%;
  max-width: 960px;
  margin-top: 1.25rem;
}
.ec-esenciales-head {
  text-align: center;
  margin-bottom: 0.9rem;
}
.ec-esenciales-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0 0 0.25rem;
}
.ec-esenciales-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}
.ec-esenciales-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}
.ec-ess-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-s);
  cursor: pointer;
  font: inherit;
  color: var(--fg);
  text-align: left;
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.ec-ess-card:hover {
  border-color: var(--brand-bright);
  transform: translateY(-1px);
}
.ec-ess-card.on {
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 1px var(--brand-bright), 0 6px 16px -8px rgba(0, 0, 0, 0.25);
}
@keyframes ess-pop {
  from { opacity: 0; transform: scale(0.85) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.ec-esenciales[style*="block"] .ec-ess-card {
  animation: ess-pop 0.4s var(--ease) both;
}
.ec-esenciales[style*="block"] .ec-ess-card:nth-child(1)  { animation-delay: 0.00s; }
.ec-esenciales[style*="block"] .ec-ess-card:nth-child(2)  { animation-delay: 0.04s; }
.ec-esenciales[style*="block"] .ec-ess-card:nth-child(3)  { animation-delay: 0.08s; }
.ec-esenciales[style*="block"] .ec-ess-card:nth-child(4)  { animation-delay: 0.12s; }
.ec-esenciales[style*="block"] .ec-ess-card:nth-child(5)  { animation-delay: 0.16s; }
.ec-esenciales[style*="block"] .ec-ess-card:nth-child(6)  { animation-delay: 0.20s; }
.ec-esenciales[style*="block"] .ec-ess-card:nth-child(7)  { animation-delay: 0.24s; }
.ec-esenciales[style*="block"] .ec-ess-card:nth-child(8)  { animation-delay: 0.28s; }
.ec-esenciales[style*="block"] .ec-ess-card:nth-child(9)  { animation-delay: 0.32s; }
.ec-esenciales[style*="block"] .ec-ess-card:nth-child(10) { animation-delay: 0.36s; }
.ec-ess-ico {
  flex: none;
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  color: var(--brand-bright);
  transition: background 0.2s, color 0.2s;
}
.ec-ess-card.on .ec-ess-ico {
  background: var(--gradient, linear-gradient(135deg, #0008ff, #059669));
  color: #fff;
}
.ec-ess-name {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
}
.ec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.ec-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--panel);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  padding: 0.5rem;
}
.ec-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.ec-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: var(--line);
  overflow: hidden;
}
.ec-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.ec-card:hover .ec-thumb img {
  transform: scale(1.05);
}
.ec-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 48px;
  opacity: 0.5;
}
.ec-badge-sale {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ec-badge-tipo {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.ec-body {
  padding: 1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.ec-cat {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ec-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}
.ec-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0.1rem 0 0;
}
.ec-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}
.ec-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ec-old-price {
  font-size: 0.65rem;
  color: var(--muted);
  text-decoration: line-through;
}
.ec-current {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
  gap: 4px;
}
.ec-more {
  margin-top: 2.4rem;
}

.cart-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  margin-top: 1.4rem;
  align-items: start;
}
.cart-grid__left {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.cart-checkout-card {
  padding: 1.6rem 2rem;
}
@media (max-width: 860px) {
  .cart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .ec-grid { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
}
@media (max-width: 720px) {
  .ec-esenciales-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .ec-grid { grid-template-columns: 1fr; }
}

/* ================== MOTOR DE ENTRADA AL CARGAR ==================
     Las animaciones empiezan nada más cargar la página.
     No dependen de scroll ni de reduced-motion. */
  /* --- Hero: entrada escalonada al cargar --- */
  .hero .hero-kicker { animation: hero-kicker-in 0.8s ease forwards; }
  .hero .display { animation: display-in 0.9s ease forwards 0.1s; }
  .hero .lead { animation: lead-in 1s ease forwards 0.2s; }
  .hero .hero-cta { animation: cta-in 1.1s ease forwards 0.3s; }
  .hero .hero-socials { animation: social-in 1.2s ease forwards 0.4s; }
  .hero .hero-visual { animation: visual-in 1s ease forwards 0.5s; }

  @keyframes hero-kicker {
    from { opacity: 0; transform: translateY(20px) rotateX(10deg); }
    to { opacity: 1; transform: translateY(0) rotateX(0); }
  }
  @keyframes display-in {
    from { opacity: 0; transform: perspective(900px) translate3d(0, -50px, -50px) rotateX(15deg); }
    to { opacity: 1; transform: none; }
  }
  @keyframes lead-in {
    from { opacity: 0; transform: perspective(900px) translate3d(0, 30px, -60px) rotateX(10deg); }
    to { opacity: 1; transform: none; }
  }
  @keyframes cta-in {
    from { opacity: 0; transform: perspective(900px) translate3d(0, 30px, -60px) scale(0.9); }
    to { opacity: 1; transform: none; }
  }
  @keyframes social-in {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes visual-in {
    from { opacity: 0; transform: perspective(800px) translate3d(0, 40px, -80px) rotateX(12deg); }
    to { opacity: 1; transform: none; }
  }

/* --- Secciones: sin transform 3D agresivo (el reveal lo maneja JS) --- */

  @keyframes reveal-rise {
    from { opacity: 0; transform: perspective(900px) translate3d(0, 36px, -80px) rotateX(11deg); }
    to { opacity: 1; transform: none; }
  }
  @keyframes reveal-left {
    from { opacity: 0; transform: perspective(900px) translate3d(-40px, 0, -76px) rotateY(10deg); }
    to { opacity: 1; transform: none; }
  }
  @keyframes reveal-right {
    from { opacity: 0; transform: perspective(900px) translate3d(40px, 0, -76px) rotateY(-10deg); }
    to { opacity: 1; transform: none; }
  }
  @keyframes reveal-zoom {
    from { opacity: 0; transform: perspective(900px) translate3d(0, 0, -108px) scale(0.9); }
    to { opacity: 1; transform: none; }
  }
  @keyframes reveal-blur {
    from { opacity: 0; transform: perspective(900px) translate3d(0, 14px, -64px); filter: blur(8px); }
    to { opacity: 1; transform: none; filter: none; }
  }

  /* ---- Marquee: sin JS (fallback) o con movimiento reducido ---- */
  html:not(.js) .marquee-track {
    transform: translate3d(var(--mq-x, 0px), 0, 0);
    animation: marquee 32s linear infinite;
  }
  html:not(.js) .marquee-stage { --mq-rx: 0deg; }
  @keyframes marquee {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
  }
  @media (prefers-reduced-motion: reduce) {
    .marquee-stage,
    .marquee-track,
    .mq-item { animation: none !important; transition: none !important; }
    .marquee-stage { --mq-rx: 3deg; }
  }

  /* ---- Scroll continuo por sección (la cinta avanza con el scroll) ---- */
  /* El JS marca secciones visibles; un gradiente de marca tiñe el borde */
  .section { position: relative; }
  .section + .section::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 2px;
    background: linear-gradient(90deg,
      transparent,
      color-mix(in oklab, var(--brand-bright) calc(var(--sec-border-glow, 0) * 78%), transparent) 50%,
      transparent);
    background-size: 200% 100%;
    background-position: calc(var(--sec-border-glow, 0) * 100%) 0;
    opacity: 0;
    transition: opacity 0.45s;
    pointer-events: none;
    z-index: 1;
  }
  .section.is-glow::before { opacity: 1; }

  /* ---- Revelado escalonado genérico por item (data-item) ----
     Estado base: lo anima el motor JS (computeMotion) en vivo. */
  html.js:not(.scroll-anim) [data-item] { opacity: 0; transform: none; will-change: opacity, transform; }
  html.js:not(.scroll-anim) [data-item].item-in { opacity: 1; transform: none; }

/* ---- Profundidad de sección: sin film-scroll (JS no setea --sec-prog) ---- */

  /* iconos de las tarjetas: desafío/reel al entrar */
  @keyframes icon-spring {
    0%   { transform: translateY(0) scale(1); }
    34%  { transform: translateY(-3px) rotate(-6deg) scale(1.08); }
    66%  { transform: translateY(0) rotate(4deg) scale(0.99); }
    100% { transform: none; }
  }
  html.scroll-anim .s-card .s-ico,
  html.scroll-anim .info-card .ic,
  html.scroll-anim .t-card .t-ava {
    animation: icon-spring 0.6s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }

  /* parallax sutil de la imagen del ecosistema (scroll-timeline) */
  @supports (animation-timeline: scroll()) {
    html.scroll-anim .eco-visual .eco-img {
      animation: eco-parallax linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
  }
  @keyframes eco-parallax {
    from { transform: scale(1.12) translateY(-40px); }
    to { transform: scale(1.12) translateY(40px); }
  }
  .eco-visual .eco-img { will-change: transform; }

  /* ---- Números del proceso / stats: acento que se ilumina al pasar ---- */
  html.scroll-anim .p-num,
  html.scroll-anim .stat-num {
    animation: num-pop linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
  @keyframes num-pop {
    0%   { opacity: 0.4; transform: scale(0.9); }
    55%  { opacity: 1; transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
  }

  /* ---- Títulos de sección: shake del gradiente (muy sutil) ---- */
  html.scroll-anim .section-head .text-gradient {
    background-size: 200% 100%;
    animation: grad-sheen linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 50%;
  }
  @keyframes grad-sheen {
    0% { background-position: 0% 0; }
    100% { background-position: 100% 0; }
  }

  /* ---- Plan destacado: leve flotación continua (solo el destacado) ---- */
  @media (hover: hover) {
    .plan-featured { animation: plan-float 5s var(--ease) infinite; }
  }
  @keyframes plan-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }
  .plan-featured { position: relative; z-index: 1; }

  /* ---- AURORA: brillo ambiental que deriva en los fondos de sección ---- */
  .ec-grid::before,
  .s-grid::before,
  .p-grid::before,
  .plan-grid::before,
  .t-grid::before,
  .b-grid::before,
  .process::before,
  .faq::before,
  .contact-wrap::before,
  .feats-grid::before,
  .detail-feats::before,
  .redes-feats::before,
  .values-grid::before,
  .team-grid::before,
  .stats-grid::before,
  .eco::before,
  .cta-band::before,
  .stats-band::before {
    content: "";
    position: absolute;
    inset: -6% -8%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(560px 280px at 20% 20%,
      color-mix(in oklab, var(--brand-bright) 24%, transparent), transparent 70%);
    mix-blend-mode: screen;
    opacity: 0.5;
    animation: aurora-drift 14s var(--ease) infinite alternate;
    will-change: transform;
  }
  .ec-grid, .s-grid, .p-grid, .plan-grid, .t-grid, .b-grid,
  .process, .faq, .contact-wrap,
  .feats-grid, .detail-feats, .redes-feats,
  .values-grid, .team-grid, .stats-grid { position: relative; z-index: 1; }
  .eco > *, .cta-band > *, .stats-band > * { position: relative; z-index: 1; }
  .ec-grid::before,
  .s-grid::before,
  .p-grid::before,
  .plan-grid::before { opacity: 0.32; }
  .t-grid::before,
  .b-grid::before,
  .process::before,
  .faq::before,
  .contact-wrap::before { opacity: 0.22; }
  .feats-grid::before,
  .detail-feats::before,
  .redes-feats::before,
  .values-grid::before,
  .team-grid::before,
  .stats-grid::before { opacity: 0.18; }
  @keyframes aurora-drift {
    0% { transform: translate3d(-8%, -4%, 0) scale(1); }
    50% { transform: translate3d(10%, 6%, 0) scale(1.15); }
    100% { transform: translate3d(-2%, -8%, 0) scale(1.05); }
  }

  /* ---- Ambientes: flotación continua de elementos decorativos ---- */
  .p-card .p-letter,
  .s-card .s-ico,
  .t-card .t-ava,
  .info-card .ic,
  .value-card .v-n,
  .feat-item .fi-ico,
  .team-card .team-ava {
    display: inline-grid;
    place-items: center;
    animation: ambient-float var(--fl, 4.6s) var(--ease) infinite;
  }
  .ec-card .ec-thumb,
  .plan .plan-price .pp {
    animation: ambient-float var(--fl, 4.6s) var(--ease) infinite;
  }
  .p-card .p-letter   { --fl: 5.4s; }
  .s-card .s-ico      { --fl: 4.8s; }
  .t-card .t-ava      { --fl: 5.8s; }
  .info-card .ic      { --fl: 6.2s; }
  .ec-card .ec-thumb  { --fl: 6.6s; --rng: -9px; }
  .plan .plan-price .pp { --fl: 5s; --rng: -6px; }
  .value-card .v-n    { --fl: 5.2s; }
  .feat-item .fi-ico  { --fl: 4.4s; --rng: -5px; }
  .team-card .team-ava { --fl: 5.6s; }
  .p-card:nth-child(2n) .p-letter { animation-delay: -2.2s; }
  .p-card:nth-child(3n) .p-letter { animation-delay: -3.6s; }
  .s-card:nth-child(2n) .s-ico    { animation-delay: -1.8s; }
  .s-card:nth-child(3n) .s-ico    { animation-delay: -3.1s; }
  .ec-card:nth-child(2n) .ec-thumb { animation-delay: -2.6s; }
  .ec-card:nth-child(3n) .ec-thumb { animation-delay: -4.1s; }
  .value-card:nth-child(2n) .v-n   { animation-delay: -1.9s; }
  .value-card:nth-child(3n) .v-n   { animation-delay: -3.4s; }
  .team-card:nth-child(2n) .team-ava { animation-delay: -2.4s; }
  .team-card:nth-child(3n) .team-ava { animation-delay: -4.2s; }
  .feat-item:nth-child(3n) .fi-ico  { animation-delay: -2.8s; }
  @keyframes ambient-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(var(--rng, -7px)); }
  }

  /* ---- Micro-rotación de la insignia del plan recomendado ---- */
  .plan-recommended {
    animation: recommended-pulse 3.4s var(--ease) infinite;
  }
  @keyframes recommended-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--brand-bright) 45%, transparent); }
    50%      { box-shadow: 0 0 0 6px color-mix(in oklab, var(--brand-bright) 0%, transparent); }
  }

  /* ---- Parallax diferencial de contenido (child, sin tocar el reveal) ---- */
  @supports (animation-timeline: scroll()) {
    html.scroll-anim .p-thumb,
    html.scroll-anim .b-thumb {
      animation: thumb-breathe linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 40%;
    }
  }
  @keyframes thumb-breathe {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
  }
  .p-thumb, .b-thumb { will-change: transform; }

  /* ---- Parallax de profundidad en bloques de texto (child) ---- */
  @supports (animation-timeline: scroll()) {
    html.scroll-anim .eco-list,
    html.scroll-anim .p-body,
    html.scroll-anim .b-body {
      animation: depth-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 30%;
    }
  }
  @keyframes depth-rise {
    0% { transform: translateY(14px); }
    100% { transform: translateY(-14px); }
  }

  /* ---- Formulario de contacto: foco magnético del card ---- */
  .form-card {
    animation: form-breathe 7s var(--ease) infinite alternate;
  }
  @keyframes form-breathe {
    0% { box-shadow: 0 20px 60px -40px color-mix(in oklab, var(--brand-bright) 30%, transparent); }
    100% { box-shadow: 0 30px 80px -36px color-mix(in oklab, var(--brand-bright) 50%, transparent); }
  }

  /* Hover: mayor profundidad 3D en las tarjetas clave */
  .is-tiled.s-card,
  .is-tiled.p-card,
  .is-tiled.b-card,
  .is-tiled.plan,
  .is-tiled.ec-card,
  .is-tiled.t-card,
  .is-tiled.process-step,
  .is-tiled.hero-card { transform-style: preserve-3d; }

  /* Parallax ligero (scroll-timeline) */
  @supports (animation-timeline: scroll()) {
    [data-parallax] {
      animation: parallax linear both;
      animation-timeline: scroll();
    }
    [data-parallax="slow"] { animation-name: parallax-slow; }
    [data-parallax="medium"] { animation-name: parallax-med; }
  }
  @keyframes parallax-slow { to { transform: translateY(120px); } }
  @keyframes parallax-med { to { transform: translateY(60px); } }

  /* ---- Micro-movimientos continuos ---- */
  @keyframes icon-bob {
    0%, 100% { translate: 0 0; rotate: 0deg; }
    50% { translate: 0 -4px; rotate: 3deg; }
  }

  /* ---- Hover: realce sutil (sin mover la tarjeta) ---- */
  .s-card:hover .s-ico,
  .s-card:hover .s-icon,
  .process-step:hover .p-ico,
  .t-card:hover .t-ava,
  .b-card:hover .b-thumb,
  .p-card:hover .p-thumb,
  .plan:hover .plan-ico { transform: translateY(-3px) scale(1.04); }

  /* ---- Hover: halo de marca sobre tarjetas ---- */
  .s-card,
  .p-card,
  .process-step {
    position: relative;
    overflow: hidden;
  }
  .s-card::after,
  .p-card::after,
  .process-step::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -60%;
    width: 50%;
    height: 240%;
    pointer-events: none;
    background: linear-gradient(120deg, transparent, color-mix(in oklab, var(--brand-bright) 16%, transparent) 50%, transparent);
    transform: rotate(12deg) translateX(-160%);
    transition: transform 0.7s var(--ease);
    z-index: 1;
  }
  .s-card:hover::after,
  .p-card:hover::after,
  .process-step:hover::after { transform: rotate(12deg) translateX(160%); }

  @media (prefers-reduced-motion: reduce) {
    .rs-photo, .rs-ph-glow, .rs-like, .rs-ph-ico { animation: none !important; }
    .hero-video-wrap, .hero-video { animation: none !important; }
    .ec-grid::before, .s-grid::before, .p-grid::before, .plan-grid::before,
    .t-grid::before, .b-grid::before, .process::before, .faq::before,
    .contact-wrap::before, .feats-grid::before, .detail-feats::before,
    .redes-feats::before, .values-grid::before, .team-grid::before,
    .stats-grid::before, .eco::before, .cta-band::before, .stats-band::before {
      animation: none !important; opacity: 0.12;
    }
    .p-card .p-letter, .s-card .s-ico, .t-card .t-ava, .info-card .ic,
    .ec-card .ec-thumb, .plan .plan-price .pp,
    .value-card .v-n, .feat-item .fi-ico, .team-card .team-ava,
    .plan-featured, .plan-recommended { animation: none !important; }
  }
}

/* ==================== TILT 3D EN TARJETAS (hover) ==================== */
.is-tiled.s-card,
.is-tiled.p-card,
.is-tiled.b-card,
.is-tiled.plan,
.is-tiled.ec-card,
.is-tiled.t-card,
.is-tiled.process-step,
.is-tiled.value-card,
.is-tiled.team-card,
.is-tiled.info-card,
.is-tiled.tl-card,
.is-tiled.rs-card,
.is-tiled.hero-card {
  transition-duration: 0.14s;
}
/* Halo de marca cuando la tarjeta está inclinada (tilt) */
.is-tiled.s-card,
.is-tiled.p-card,
.is-tiled.b-card,
.is-tiled.plan,
.is-tiled.ec-card,
.is-tiled.t-card,
.is-tiled.process-step,
.is-tiled.value-card,
.is-tiled.team-card,
.is-tiled.info-card,
.is-tiled.tl-card,
.is-tiled.rs-card,
.is-tiled.hero-card {
  border-color: color-mix(in oklab, var(--brand-bright) 38%, var(--line));
  box-shadow: 0 22px 48px -24px color-mix(in oklab, var(--brand-bright) 55%, transparent),
              0 1px 0 1px color-mix(in oklab, var(--brand-bright) 22%, transparent);
}

/* ==================== ENTRADA 3D DEL HERO AL CARGAR ====================
   Keyframes propios del hero: pop 3D agresivo (salen desde lejos con
   perspectiva estrecha, se acercan con overshoot y asientan). Aislados del
   resto del sitio para no alterar las otras secciones. */
@keyframes hero-rise {
  0%   { opacity: 0; transform: perspective(720px) translate3d(0, 84px, -200px) rotateX(26deg) scale(0.9); }
  52%  { opacity: 1; transform: perspective(720px) translate3d(0, -12px, 16px) rotateX(-4deg) scale(1.05); }
  78%  { transform: perspective(720px) translate3d(0, 5px, -8px) rotateX(1.5deg) scale(0.99); }
  100% { opacity: 1; transform: none; }
}
@keyframes hero-left {
  0%   { opacity: 0; transform: perspective(720px) translate3d(-100px, 0, -200px) rotateY(28deg) scale(0.9); }
  52%  { opacity: 1; transform: perspective(720px) translate3d(14px, 0, 18px) rotateY(-5deg) scale(1.05); }
  78%  { transform: perspective(720px) translate3d(-4px, 0, -8px) rotateY(1.5deg) scale(0.99); }
  100% { opacity: 1; transform: none; }
}
@keyframes hero-right {
  0%   { opacity: 0; transform: perspective(720px) translate3d(100px, 0, -200px) rotateY(-28deg) scale(0.9); }
  52%  { opacity: 1; transform: perspective(720px) translate3d(-14px, 0, 18px) rotateY(5deg) scale(1.05); }
  78%  { transform: perspective(720px) translate3d(4px, 0, -8px) rotateY(-1.5deg) scale(0.99); }
  100% { opacity: 1; transform: none; }
}
@keyframes hero-zoom {
  0%   { opacity: 0; transform: perspective(720px) translate3d(0, 0, -260px) scale(0.66); }
  52%  { opacity: 1; transform: perspective(720px) translate3d(0, 0, 24px) scale(1.07); }
  78%  { transform: perspective(720px) translate3d(0, 0, -10px) scale(0.99); }
  100% { opacity: 1; transform: none; }
}
@keyframes hero-blur {
  0%   { opacity: 0; transform: perspective(720px) translate3d(0, 26px, -150px) rotateX(20deg); filter: blur(14px); }
  52%  { opacity: 1; transform: perspective(720px) translate3d(0, -8px, 12px); filter: blur(0); }
  78%  { transform: perspective(720px) translate3d(0, 3px, -6px); filter: blur(0); }
  100% { opacity: 1; transform: none; filter: none; }
}

/* Entrada del hero al cargar: animación TEMPORAL (timeline auto). La
   salida/reentrada del contenido en scroll la mueve el JS (unificado en todos
   los navegadores), por eso aquí NO hay animación CSS ligada a scroll sobre
   el contenido del hero. */
@supports (animation-timeline: view()) {
  html.scroll-anim .hero .hero-copy > [data-reveal] {
    animation-name: hero-rise;
    animation-duration: 0.95s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: backwards;
    animation-timeline: auto;
    animation-delay: var(--hid, 0s);
  }
  html.scroll-anim .hero .hero-copy > [data-reveal="left"] { animation-name: hero-left; }
  html.scroll-anim .hero .hero-copy > [data-reveal="right"] { animation-name: hero-right; }
  html.scroll-anim .hero .hero-copy > [data-reveal="zoom"] { animation-name: hero-zoom; }
  html.scroll-anim .hero .hero-copy > [data-reveal="blur"] { animation-name: hero-blur; }

  /* El visual del hero lo mueve el JS (sin parallax ni reveal CSS) */
  html.scroll-anim .hero .hero-visual { animation: none; }

  html.scroll-anim .hero .hero-copy > [data-reveal]:nth-child(1) { --hid: 0.1s; }
  html.scroll-anim .hero .hero-copy > [data-reveal]:nth-child(2) { --hid: 0.26s; }
  html.scroll-anim .hero .hero-copy > [data-reveal]:nth-child(3) { --hid: 0.42s; }
  html.scroll-anim .hero .hero-copy > [data-reveal]:nth-child(4) { --hid: 0.58s; }
  html.scroll-anim .hero .hero-copy > [data-reveal]:nth-child(5) { --hid: 0.72s; }
}

/* Fallback (IntersectionObserver): misma entrada agresiva con stagger */
html.js:not(.scroll-anim) .hero .hero-copy > [data-reveal]:nth-child(1) { --hid: 0.1s; }
html.js:not(.scroll-anim) .hero .hero-copy > [data-reveal]:nth-child(2) { --hid: 0.26s; }
html.js:not(.scroll-anim) .hero .hero-copy > [data-reveal]:nth-child(3) { --hid: 0.42s; }
html.js:not(.scroll-anim) .hero .hero-copy > [data-reveal]:nth-child(4) { --hid: 0.58s; }
html.js:not(.scroll-anim) .hero .hero-copy > [data-reveal]:nth-child(5) { --hid: 0.72s; }
html.js:not(.scroll-anim) .hero .hero-copy > [data-reveal].in {
  animation: hero-rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--hid, 0s);
}
html.js:not(.scroll-anim) .hero .hero-copy > [data-reveal="left"].in { animation-name: hero-left; }
html.js:not(.scroll-anim) .hero .hero-copy > [data-reveal="right"].in { animation-name: hero-right; }
html.js:not(.scroll-anim) .hero .hero-copy > [data-reveal="zoom"].in { animation-name: hero-zoom; }
html.js:not(.scroll-anim) .hero .hero-copy > [data-reveal="blur"].in { animation-name: hero-blur; }

/* --- Efectos de texto animados en los títulos de sección --- */
.section-head-text {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-image: linear-gradient(180deg, var(--brand-bright), var(--brand));
  animation: text-shine 8s ease infinite;
}
@keyframes text-shine {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Entrada de secciones al hacer scroll --- */
.section-scroll-enter {
  opacity: 0;
  transform: translateY(80px) rotateX(20deg);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.section-scroll-enter.in {
  opacity: 1;
  transform: none;
}

/* Re-añadido tras limpieza de codificación: estilos de planes y espaciado */
.plan-executivo {
  border-left: 4px solid #059669;
}
.plan-destacado {
  border-left: 4px solid #e53e3e;
}
.plan:hover {
  border-color: #059669;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.15);
}
html.js .section { margin-bottom: 0.5rem !important; }
html.js .section:last-child { margin-bottom: 0 !important; }

/* ---- CRM Modal (override admin-head opacity) ---- */
.crm-modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 14, 25, 0.55);
  backdrop-filter: blur(3px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 1 !important;
}
.crm-modal-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg, 12px);
  width: min(700px, 94vw);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 24px 70px -24px rgba(0, 0, 0, 0.55);
}
.crm-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.crm-modal-head h3 { margin: 0; font-size: 1rem; }
.crm-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.crm-modal-close:hover { background: var(--bg-2); color: var(--ink); }

/* ---- Row actions (KB list) ---- */
.row-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.row-actions .pill {
  width: 30px;
  height: 30px;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.row-actions .pill:hover { background: var(--bg-2); color: var(--ink); border-color: var(--line-strong); }
.row-actions .pill.danger:hover { background: #fef2f2; color: var(--red); border-color: var(--red); }

/* KB entries */
.law {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.law:last-child { border-bottom: none; }
.tipo {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: color-mix(in oklab, var(--brand-soft) 15%, transparent);
  color: var(--brand-soft);
  font-weight: 600;
}
.chip.off {
  background: color-mix(in oklab, var(--red) 12%, transparent);
  color: var(--red);
}

/* ---- Wishlist heart button (product card) ---- */
.ec-wishlist-btn {
  position: absolute;
  top: .6rem;
  right: .6rem;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(4px);
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.ec-wishlist-btn:hover { background: #fff; color: #ef4444; transform: scale(1.1); }
.ec-wishlist-btn.is-active { color: #ef4444; }
.ec-wishlist-btn.is-active svg { fill: #ef4444; stroke: #ef4444; }

/* Wishlist button in product modal */
.pm-wishlist-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .7rem;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #9ca3af;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.pm-wishlist-btn:hover { border-color: #ef4444; color: #ef4444; }
.pm-wishlist-btn.is-active { background: #fef2f2; border-color: #ef4444; color: #ef4444; }
.pm-wishlist-btn.is-active svg { fill: #ef4444; stroke: #ef4444; }

/* ========================== PRODUCT MODAL ========================= */

.pm-overlay {
  position: fixed; inset: 0; z-index: 20000;
  background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.pm-modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: 1rem;
  width: min(900px, 96vw); max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px -12px rgba(0,0,0,.45);
  position: relative;
}
.pm-close {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.06); color: var(--muted);
  cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.pm-close:hover { background: rgba(0,0,0,.12); color: var(--fg); }

/* Two-column layout */
.pm-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 420px; }

/* Gallery (left) */
.pm-gallery { position: relative; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.pm-main-img {
  flex: 1; min-height: 300px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); cursor: zoom-in; overflow: hidden;
}
.pm-main-img img { transition: opacity .2s; }
.pm-no-img { font-size: 4rem; opacity: .3; }
.pm-thumbs {
  display: flex; gap: .35rem; padding: .5rem .6rem;
  border-top: 1px solid var(--line); overflow-x: auto;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.pm-thumb {
  width: 52px; height: 52px; border-radius: .45rem; overflow: hidden;
  border: 2px solid transparent; background: var(--surface);
  cursor: pointer; flex: none; padding: 0; transition: all .15s;
}
.pm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pm-thumb:hover { border-color: var(--brand-bright); }
.pm-thumb.active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(0,0,226,.15); }
.pm-img-counter {
  position: absolute; bottom: 68px; right: 10px;
  background: rgba(0,0,0,.7); color: #fff; padding: .2rem .55rem;
  border-radius: 99px; font-size: .7rem; font-weight: 600;
  pointer-events: none; display: flex; gap: .15rem;
}

/* Info (right) */
.pm-info { display: flex; flex-direction: column; }
.pm-info-top { flex: 1; padding: 1.2rem 1.3rem .8rem; overflow-y: auto; }
.pm-info-bottom { padding: .8rem 1.3rem 1.2rem; border-top: 1px solid var(--line); }
.pm-cat { font-size: .7rem; font-weight: 600; color: var(--brand-soft); text-transform: uppercase; letter-spacing: .06em; }
.pm-name { margin: .3rem 0; font-size: 1.2rem; font-weight: 800; line-height: 1.3; }
.pm-rating { display: flex; align-items: center; gap: .4rem; margin-bottom: .4rem; font-size: .82rem; }
.pm-desc { font-size: .85rem; color: var(--muted); line-height: 1.65; margin: .3rem 0 0; }
.pm-meta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: .7rem; font-size: .78rem; color: var(--muted-2); }
.pm-meta span { display: inline-flex; align-items: center; gap: .25rem; }
.pm-price { display: flex; align-items: baseline; gap: .5rem; }
.pm-old-price { text-decoration: line-through; color: var(--muted-2); font-size: .85rem; }
.pm-current-price { font-size: 1.35rem; font-weight: 800; color: var(--fg); }
.pm-current-price.offer { color: #dc2626; }
.pm-actions { display: flex; gap: .5rem; align-items: center; margin-top: .6rem; }
.pm-add-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.pm-paypal-btn { background: #ffc439; border-color: #ffc439; color: #003087; font-weight: 700; font-size: .82rem; }

/* Reviews */
.pm-reviews { padding: 1rem 1.3rem 1.3rem; border-top: 1px solid var(--line); }
.pm-reviews-title { font-size: .95rem; font-weight: 700; margin: 0 0 .6rem; }
.pm-reviews-count { font-weight: 400; color: var(--muted); font-size: .82rem; }
.pm-reviews-summary { display: flex; align-items: center; gap: 1rem; margin-bottom: .8rem; padding: .7rem; background: var(--surface); border-radius: .55rem; }
.pm-reviews-list { max-height: 200px; overflow-y: auto; margin-bottom: .8rem; }
.pm-review-form { margin-top: .5rem; }
.pm-review-label { font-size: .82rem; font-weight: 600; margin-bottom: .4rem; }
.pm-stars-input { display: flex; gap: .3rem; margin-bottom: .5rem; cursor: pointer; font-size: 1.4rem; color: #d1d5db; }
.pm-input, .pm-textarea {
  width: 100%; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: .45rem;
  background: var(--surface); color: var(--fg); font-size: .85rem; font-family: inherit;
  box-sizing: border-box; margin-bottom: .4rem; transition: border-color .15s;
}
.pm-textarea { resize: vertical; min-height: 70px; }
.pm-input:focus, .pm-textarea:focus { outline: none; border-color: var(--brand-bright); }
.pm-review-submit { font-size: .82rem; margin-top: .2rem; }

/* Lightbox */
.pm-lightbox {
  position: fixed; inset: 0; z-index: 30000;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
}
.pm-lb-close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.1); color: #fff;
  cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.pm-lb-close:hover { background: rgba(255,255,255,.2); }
.pm-lb-prev, .pm-lb-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.1); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.pm-lb-prev { left: 16px; }
.pm-lb-next { right: 16px; }
.pm-lb-prev:hover, .pm-lb-next:hover { background: rgba(255,255,255,.2); }
.pm-lb-img { max-width: 90vw; max-height: 85vh; }
.pm-lb-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-size: .85rem; font-weight: 600;
}

@media (max-width: 700px) {
  .pm-layout { grid-template-columns: 1fr; }
  .pm-gallery { border-right: none; border-bottom: 1px solid var(--line); }
  .pm-main-img { min-height: 220px; }
}

/* ========================== WISHLIST PAGE ========================= */

.wl-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.8rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.wl-hero-inner { display: flex; align-items: center; gap: .8rem; }
.wl-hero-icon {
  width: 48px; height: 48px; border-radius: .75rem;
  background: linear-gradient(135deg, #fef2f2, #fecaca);
  color: #ef4444;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.wl-hero-title { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.wl-hero-sub { margin: .15rem 0 0; font-size: .82rem; color: var(--muted); }
.wl-hero-user { font-weight: 600; color: var(--brand-soft); }
.wl-hero-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1rem; font-size: .82rem; font-weight: 600;
  border-radius: .55rem; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); text-decoration: none;
  transition: all .15s;
}
.wl-hero-btn:hover { border-color: var(--brand-bright); color: var(--brand-soft); }

/* Empty state */
.wl-empty {
  text-align: center; padding: 4rem 2rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 1rem;
}
.wl-empty-icon {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 1.2rem;
  background: linear-gradient(135deg, #fef2f2, #fecaca); color: #ef4444;
  display: flex; align-items: center; justify-content: center;
}
.wl-empty h3 { margin: 0 0 .5rem; font-size: 1.1rem; font-weight: 700; }
.wl-empty p { margin: 0; font-size: .88rem; color: var(--muted); max-width: 360px; margin-inline: auto; line-height: 1.6; }

/* Products grid */
.wl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.wl-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: .85rem;
  overflow: hidden;
  transition: all .25s;
}
.wl-card:hover { border-color: var(--brand-bright); box-shadow: 0 8px 30px -10px rgba(0,0,0,.12); transform: translateY(-2px); }
.wl-card-img {
  position: relative; aspect-ratio: 4/3; overflow: hidden;
  background: var(--surface);
}
.wl-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.wl-card:hover .wl-card-img img { transform: scale(1.05); }
.wl-card-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--muted-2); opacity: .4;
}
.wl-card-badge {
  position: absolute; top: .6rem; left: .6rem;
  padding: .2rem .6rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: #ef4444; color: #fff; border-radius: 99px;
}
.wl-card-body { padding: .9rem 1rem 1rem; }
.wl-card-cat {
  display: inline-block; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--brand-soft); margin-bottom: .3rem;
}
.wl-card-name { margin: 0 0 .25rem; font-size: .92rem; font-weight: 700; line-height: 1.3; }
.wl-card-desc {
  margin: 0 0 .5rem; font-size: .78rem; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wl-card-price { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.wl-price-old { font-size: .78rem; color: var(--muted-2); text-decoration: line-through; }
.wl-price-current { font-size: 1rem; font-weight: 800; color: var(--brand); }
.wl-card-actions { display: flex; gap: .4rem; }
.wl-card-cart {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .45rem .6rem; font-size: .78rem; font-weight: 600;
  border: none; border-radius: .5rem;
  background: linear-gradient(135deg, var(--brand-bright), var(--brand));
  color: #fff; cursor: pointer; transition: all .15s;
}
.wl-card-cart:hover { filter: brightness(1.1); transform: translateY(-1px); }
.wl-card-remove {
  width: 36px; height: 36px; border-radius: .5rem; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; flex: none;
}
.wl-card-remove:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }

/* Share panel */
.wl-share {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
}
.wl-share-head {
  display: flex; align-items: center; gap: .7rem;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.wl-share-icon {
  width: 42px; height: 42px; border-radius: .65rem;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: var(--brand-bright);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.wl-share-title { margin: 0; font-size: 1.05rem; font-weight: 700; }
.wl-share-sub { margin: .1rem 0 0; font-size: .78rem; color: var(--muted); }
.wl-share-body { padding: 1.2rem 1.5rem 1.5rem; }
.wl-share-field { margin-bottom: 1.2rem; }
.wl-share-label { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: .4rem; }
.wl-share-textarea {
  width: 100%; padding: .65rem .8rem; font-size: .88rem; font-family: inherit;
  border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); color: var(--fg);
  resize: vertical; min-height: 80px; transition: border-color .15s;
}
.wl-share-textarea:focus { outline: none; border-color: var(--brand-bright); box-shadow: 0 0 0 3px rgba(0,0,226,.08); }
.wl-share-counter { text-align: right; font-size: .7rem; color: var(--muted-2); margin-top: .2rem; }

/* Image selector */
.wl-img-grid {
  display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .3rem;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.wl-img-opt {
  width: 64px; height: 64px; border-radius: .5rem; overflow: hidden;
  border: 2px solid var(--line); background: var(--surface); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: all .15s; flex: none; padding: 0;
}
.wl-img-opt img { width: 100%; height: 100%; object-fit: cover; }
.wl-img-opt:hover { border-color: var(--brand-bright); }
.wl-img-opt.is-active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,0,226,.15); }
.wl-img-none {
  flex-direction: column; gap: .15rem; color: var(--muted); font-size: .55rem;
}

/* Preview card */
.wl-share-preview { margin-bottom: 1.2rem; }
.wl-preview-card {
  display: flex; gap: 1rem; padding: .8rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: .75rem;
}
.wl-preview-img {
  width: 120px; height: 90px; border-radius: .5rem; overflow: hidden; flex: none;
  background: var(--line-transparent);
}
.wl-preview-img img { width: 100%; height: 100%; object-fit: cover; }
.wl-preview-body { flex: 1; min-width: 0; }
.wl-preview-text {
  margin: 0 0 .5rem; font-size: .82rem; line-height: 1.5; color: var(--fg);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.wl-preview-items { display: flex; flex-wrap: wrap; gap: .3rem; }
.wl-preview-tag {
  display: inline-block; padding: .15rem .5rem; font-size: .68rem; font-weight: 600;
  background: var(--brand-pale); color: var(--brand-soft); border-radius: 99px;
}
.wl-preview-more { background: var(--line); color: var(--muted); }

/* Share buttons */
.wl-share-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }
.wl-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1rem; font-size: .82rem; font-weight: 600;
  border-radius: .55rem; border: none; cursor: pointer; transition: all .15s;
  text-decoration: none; color: #fff;
}
.wl-btn-whatsapp { background: #25d366; }
.wl-btn-whatsapp:hover { background: #1da851; filter: brightness(1.05); }
.wl-btn-facebook { background: #1877f2; }
.wl-btn-facebook:hover { background: #1565d8; filter: brightness(1.05); }
.wl-btn-twitter { background: #000; }
.wl-btn-twitter:hover { background: #1a1a1a; }
.wl-btn-copy {
  background: var(--surface); color: var(--fg); border: 1px solid var(--line);
}
.wl-btn-copy:hover { border-color: var(--brand-bright); color: var(--brand-soft); }

/* Copy toast */
.wl-copy-toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: .6rem 1.2rem; font-size: .82rem; font-weight: 600;
  background: #1a1a1a; color: #fff; border-radius: .55rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.2); z-index: 9999;
  opacity: 0; transition: all .3s;
}
.wl-copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Add to cart toast */
.wl-toast {
  position: fixed; bottom: 2rem; right: 2rem;
  padding: .6rem 1.2rem; font-size: .82rem; font-weight: 600;
  background: var(--brand); color: #fff; border-radius: .55rem;
  box-shadow: 0 8px 30px rgba(0,0,226,.25); z-index: 9999;
  opacity: 0; transform: translateY(10px); transition: all .3s;
}
.wl-toast.show { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 640px) {
  .wl-hero { flex-direction: column; align-items: flex-start; }
  .wl-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .wl-card-body { padding: .6rem .7rem .8rem; }
  .wl-card-name { font-size: .82rem; }
  .wl-card-desc { font-size: .72rem; }
  .wl-share-body { padding: 1rem; }
  .wl-share-buttons { flex-direction: column; }
  .wl-btn { justify-content: center; }
  .wl-preview-card { flex-direction: column; }
  .wl-preview-img { width: 100%; height: 120px; }
}

/* ── Variante selector (modal producto) ──────────────── */
.pm-variants { margin: 0 0 .5rem; }
.pm-var-group { margin-bottom: .7rem; }
.pm-var-label { font-size: .8rem; font-weight: 600; color: #555; margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .04em; }
.pm-var-options { display: flex; gap: .4rem; flex-wrap: wrap; }
.pm-var-opt {
  padding: .4rem .75rem; border-radius: 6px; border: 1.5px solid #d1d5db;
  background: #fff; font-size: .82rem; cursor: pointer; transition: .15s;
}
.pm-var-opt:hover { border-color: #22c55e; color: #16a34a; }
.pm-var-opt.active, .pm-var-opt.selected { border-color: #22c55e; background: #dcfce7; color: #15803d; font-weight: 600; }
.pm-var-opt.disabled { opacity: .4; pointer-events: none; }
.pm-var-color {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid #d1d5db;
  cursor: pointer; transition: .15s; position: relative; flex-shrink: 0;
}
.pm-var-color:hover { border-color: #22c55e; }
.pm-var-color.active, .pm-var-color.selected { border-color: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.3); }
.pm-var-color::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--sw-color, transparent);
}

/* ── Admin product modal tabs ──────────────────────── */
.pm-tab {
  padding: .55rem .85rem; border: none; background: none;
  font-size: .82rem; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; transition: .15s;
  white-space: nowrap; font-family: inherit;
}
.pm-tab:hover { color: var(--fg); }
.pm-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.pm-panel { display: none; }
.pm-panel.active { display: block; }

/* ── Header mobile icons (unlayered to beat tokens.css) ──── */
@media (max-width: 960px) {
  .header-actions .btn-label { display: none !important; }
  .header-actions .btn,
  .header-actions .btn-sm {
    padding: 0 !important;
    font-size: 0 !important;
    overflow: visible !important;
  }
  .header-actions .btn-icon,
  .header-actions .btn-cta.btn-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border-radius: 50% !important;
    justify-content: center !important;
    overflow: visible !important;
  }
  .header-actions .btn-icon > svg,
  .header-actions .btn-cta.btn-icon > svg,
  .header-actions .btn > svg,
  .header-actions .btn-icon svg,
  .header-actions .btn-cta.btn-icon svg,
  .header-actions .btn svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    flex-shrink: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  .header-actions .btn-primary > svg,
  .header-actions .btn-primary svg {
    color: var(--white) !important;
    stroke: var(--white) !important;
  }
  .header-actions .btn-ghost > svg,
  .header-actions .btn-ghost svg {
    color: var(--ink) !important;
    stroke: var(--ink) !important;
  }
}
