/* ============================================================
   ÉLITE PELUQUEROS — style-upgrade.css
   Luxury layer · carga DESPUÉS del <style> inline
   Editorial modern · Piedra #ECEAE5 / Tinta #1A1917 / Burdeos #9a7b3d
   Fraunces + Public Sans + IBM Plex Mono
   ============================================================ */

/* ── LENIS — desactivar scroll nativo suave ─────────────────── */
html { scroll-behavior: auto !important; }

/* ── ROOT ADDITIONS ─────────────────────────────────────────── */
:root {
  --ease:      cubic-bezier(0.23, 1, 0.32, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── GRAIN ANIMADO — desktop only, muy sutil ────────────────── */
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-2px,  1px); }
  40%  { transform: translate( 1px, -2px); }
  60%  { transform: translate(-1px,  2px); }
  80%  { transform: translate( 2px, -1px); }
  100% { transform: translate(0, 0); }
}

@media (min-width: 861px) {
  body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.03;
    pointer-events: none;
    z-index: 99990;
    mix-blend-mode: multiply;
    animation: grainShift 7s steps(2) infinite;
    will-change: transform;
  }

  body::after {
    content: '';
    position: fixed; inset: 0;
    background-image:
      radial-gradient(ellipse 140% 100% at 50% 50%, transparent 46%, rgba(26, 25, 23, 0.05) 80%, rgba(26, 25, 23, 0.10) 100%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    opacity: 0.55;
    pointer-events: none;
    z-index: 99989;
    mix-blend-mode: multiply;
  }
}

/* ── VIGNETTE PERIMETRAL — muy suave ────────────────────────── */
.vignette-overlay {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 99988;
  box-shadow: inset 0 0 160px 50px rgba(26, 25, 23, 0.09);
}
@media (max-width: 860px) { .vignette-overlay { display: none; } }

/* ── SCROLL PROGRESS BAR ─────────────────────────────────────── */
#scrollProgress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--acc), rgba(203, 255, 60, 0.4));
  z-index: 99999;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── SCROLLBAR FINO ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--acc), var(--acc-dark));
  border-radius: 2px;
}

/* ── HERO-MED — parallax prep ────────────────────────────────── */
.hero-med {
  will-change: transform;
  transition: none !important;
}
@media (max-width: 860px) {
  .hero-med { will-change: auto !important; transform: none !important; }
}

/* ── HERO — reemplazar grain estático por .hero-grain animado ── */
.hero::after { opacity: 0 !important; }

/* ── HERO GRAIN ANIMADO ──────────────────────────────────────── */
@keyframes heroGrain {
  0%   { transform: translate(0,    0); }
  14%  { transform: translate(-6%,  -11%); }
  28%  { transform: translate(-14%,  5%); }
  42%  { transform: translate( 9%, -16%); }
  57%  { transform: translate(-4%,  12%); }
  71%  { transform: translate(13%,  -5%); }
  85%  { transform: translate(-8%,   7%); }
  100% { transform: translate( 4%,  -9%); }
}

.hero-grain {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.hero-grain::before {
  content: '';
  position: absolute; inset: -50%;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: 0.028;
  mix-blend-mode: multiply;
  animation: heroGrain 0.72s steps(1) infinite;
  will-change: transform;
}
.hero-inner, .hero-stats { position: relative; z-index: 2; }
@media (max-width: 860px) { .hero-grain { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-grain::before { animation: none; } }

/* ── HEADER SCROLLED — más premium ──────────────────────────── */
.hdr {
  transition: background 0.45s var(--ease), backdrop-filter 0.45s var(--ease), border-color 0.45s var(--ease);
}
.hdr.scrolled {
  background: rgba(11, 11, 12, 0.82) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}
/* Gradient border bottom al hacer scroll */
.hdr::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(203, 255, 60, 0) 10%,
    rgba(203, 255, 60, 0.25) 30%,
    rgba(203, 255, 60, 0.4) 50%,
    rgba(203, 255, 60, 0.25) 70%,
    rgba(203, 255, 60, 0) 90%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.hdr.scrolled::after { opacity: 1; }
.hdr.scrolled { border-bottom-color: transparent !important; }

/* Logo — micro opacity en hover */
.logo { transition: opacity 0.35s var(--ease); }
.logo:hover { opacity: 0.7; }

/* ── NAV — UNDERLINE DESDE EL CENTRO ────────────────────────── */
.nav a {
  position: relative;
  padding-bottom: 4px;
  transition: color 0.28s;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: auto;
  width: 0;
  height: 1px;
  background: var(--acc);
  transform: translateX(-50%);
  transition: width 0.4s var(--ease);
}
.nav a:hover::after { width: 100%; right: auto; }

/* ── REVEAL UPGRADE — timing premium en .rv ─────────────────── */
.rv {
  transform: translateY(36px) !important;
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease) !important;
}
.rv.vis {
  opacity: 1 !important;
  transform: none !important;
}
@media (max-width: 860px) {
  .rv {
    transform: translateY(16px) !important;
    transition: opacity 0.55s var(--ease), transform 0.55s var(--ease) !important;
  }
}

/* ── CARDS .svc y .cur — prep tilt + hover lift ─────────────── */
.svc, .cur {
  will-change: transform;
  transform-style: preserve-3d;
  isolation: isolate;
  transition:
    transform 0.55s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.55s cubic-bezier(0.23, 1, 0.32, 1),
    border-color 0.4s !important;
}

/* Box-shadow en hover — el JS tilt maneja el transform en desktop */
@media (hover: hover) and (pointer: fine) {
  .svc:hover {
    box-shadow:
      0 28px 60px rgba(26, 25, 23, 0.16),
      0 0 0 1px rgba(203, 255, 60, 0.12) !important;
  }
  .cur:hover {
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.4) !important;
  }
}

/* Tap activo en touch */
@media (hover: none) {
  .svc:active, .cur:active {
    transform: scale(0.98);
    transition: transform 0.15s ease;
  }
}

/* ── TESTIMONIOS CARDS ───────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
  .test-c {
    transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
  }
  .test-c:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(26, 25, 23, 0.13);
  }
}

/* ── CURSOR LUXURY ───────────────────────────────────────────── */
@media (pointer: fine) {
  body { cursor: none !important; }
  a, button, [role="button"], .svc, .cur, .gi, label { cursor: none !important; }
}

#cursor {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--acc);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s var(--ease);
}
#cursor.cursor-hover { width: 10px; height: 10px; background: var(--acc-2); }
#cursor.cursor-click { width: 14px; height: 14px; opacity: 0.6 !important; }

#cursorRing {
  position: fixed;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(203, 255, 60, 0.5);
  pointer-events: none;
  z-index: 999998;
  opacity: 0;
  transform: translate(-50%, -50%);
  background: transparent;
  transition:
    opacity 0.3s ease,
    width 0.4s var(--ease-soft),
    height 0.4s var(--ease-soft),
    border-color 0.3s ease,
    background 0.3s ease;
}
#cursorRing.cursor-hover {
  width: 48px; height: 48px;
  border-color: rgba(203, 255, 60, 0.78);
  background: rgba(203, 255, 60, 0.05);
}
#cursorRing.cursor-view {
  width: 76px; height: 76px;
  border-color: rgba(203, 255, 60, 0.72);
  background: rgba(203, 255, 60, 0.07);
  opacity: 0.95;
}

#cursorLabel {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: "DM Mono", monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--acc);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
}

/* ── BACK-TO-TOP UPGRADE ─────────────────────────────────────── */
.scroll-top {
  transition:
    opacity 0.4s var(--ease),
    transform 0.3s var(--ease),
    border-color 0.3s,
    box-shadow 0.3s,
    background 0.2s !important;
}
.scroll-top:hover {
  transform: translateY(-2px) !important;
  border-color: var(--acc) !important;
  box-shadow: 0 6px 18px rgba(203, 255, 60, 0.22) !important;
  background: var(--acc) !important;
}

/* ── CALL FLOAT — PULSE PREMIUM ──────────────────────────────── */
@keyframes callPremium {
  0%   { box-shadow: 0 4px 20px rgba(203, 255, 60,.28), 0 0 0 0   rgba(203, 255, 60, 0);   }
  35%  { box-shadow: 0 4px 20px rgba(203, 255, 60,.28), 0 0 0 5px  rgba(203, 255, 60,.16); }
  70%  { box-shadow: 0 4px 20px rgba(203, 255, 60,.28), 0 0 0 10px rgba(203, 255, 60,.05); }
  100% { box-shadow: 0 4px 20px rgba(203, 255, 60,.28), 0 0 0 12px rgba(203, 255, 60, 0);  }
}
.wa-fl {
  animation: callPremium 3.5s cubic-bezier(0.23, 1, 0.32, 1) infinite !important;
}
.wa-fl:hover {
  animation-play-state: paused !important;
  transform: scale(1.1) translateY(-3px) !important;
}

/* ── FOOTER LINKS — letter-spacing en hover ─────────────────── */
.ftr-col a {
  transition: color 0.25s var(--ease), letter-spacing 0.35s var(--ease) !important;
}
.ftr-col a:hover { letter-spacing: 0.02em; }

/* ── SELECTION UPGRADE ───────────────────────────────────────── */
::selection {
  background: rgba(203, 255, 60, 0.2);
  color: var(--ink);
  text-shadow: none;
}
::-moz-selection {
  background: rgba(203, 255, 60, 0.2);
  color: var(--ink);
}

/* ── FOCUS-VISIBLE ───────────────────────────────────────────── */
:focus-visible {
  outline: 1px solid rgba(203, 255, 60, 0.6);
  outline-offset: 3px;
}

/* ── MOBILE — GPU RESET & TAP UX ────────────────────────────── */
@media (max-width: 860px) {
  * {
    -webkit-tap-highlight-color: transparent;
    will-change: auto !important;
  }
  a, button { touch-action: manipulation; }
  img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }
  .svc, .cur { will-change: auto; transform-style: flat; }
  #cursor, #cursorRing { display: none; }
  body::before, body::after { content: none !important; display: none !important; }
}

/* ── PREFERS-REDUCED-MOTION ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .rv {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .wa-fl {
    animation: none !important;
    box-shadow: 0 4px 20px rgba(203, 255, 60,.28);
  }
  .hero-med { transform: none !important; }
  body::before { animation: none !important; }
}
