/* =====================================================================
   ENSUTEX — DESIGN TOKENS v1
   Sistema visual limpio, profesional y premium.
   Inspirado en claridad editorial, no en tendencias pasajeras.
   ===================================================================== */

:root {
  /* ── Surface ─────────────────────────────────────────── */
  --surface:            #ffffff;
  --surface-soft:       #f8f9fa;
  --surface-strong:     #0a0a0a;
  --surface-glass:      rgba(255,255,255,0.88);

  /* ── Inverse Surface (dark sections) ─────────────────── */
  --inverse-surface:    #0a0a0a;
  --inverse-muted:      #161616;
  --inverse-soft:       #1a1a1a;

  /* ── Text ────────────────────────────────────────────── */
  --text-primary:       #0a0a0a;
  --text-secondary:     #4b5563;
  --text-muted:         #6b7280;
  --text-inverse:       #f5f5f5;
  --text-inverse-muted: #a1a1a1;

  /* ── Border & Overlay ────────────────────────────────── */
  --border:             rgba(0,0,0,0.08);
  --border-strong:      rgba(0,0,0,0.14);
  --border-inverse:     rgba(255,255,255,0.10);
  --overlay:            rgba(10,10,10,0.55);
  --overlay-soft:       rgba(10,10,10,0.35);

  /* ── Accent (primario, solo blanco y negro) ──────────── */
  --accent:             #0a0a0a;
  --accent-hover:       #1f1f1f;
  --accent-fg:          #ffffff;

  /* ── Success (verde solo para ahorro / aprobación) ───── */
  --success:            #16a34a;
  --success-soft:       rgba(22,163,74,0.10);
  --success-strong:     #052e16;

  /* ── Danger (rojo solo urgencia real) ────────────────── */
  --danger:             #dc2626;
  --danger-soft:        rgba(220,38,38,0.08);

  /* ── Brand Colors ────────────────────────────────────── */
  --brand-red:          #cc0000;
  --brand-blue:         #0ea5e9;

  /* ── Typography ──────────────────────────────────────── */
  --font-display:       'Plus Jakarta Sans', 'Instrument Sans', system-ui, sans-serif;
  --font-body:          'Instrument Sans', system-ui, sans-serif;
  --fs-h1:              clamp(2.2rem, 5vw, 4rem);
  --fs-h2:              clamp(1.8rem, 4vw, 3rem);
  --fs-h3:              clamp(1.2rem, 2.5vw, 1.5rem);
  --fs-body:            0.95rem;
  --fs-sm:              0.8rem;
  --fs-xs:              0.68rem;
  --fs-kicker:          0.62rem;
  --lh-tight:           1.1;
  --lh-body:            1.6;

  /* ── Spacing ─────────────────────────────────────────── */
  --space-xs:           0.35rem;
  --space-sm:           0.7rem;
  --space-md:           1.25rem;
  --space-lg:           2.5rem;
  --space-xl:           4rem;
  --space-2xl:          6rem;
  --section-pad:        var(--space-2xl);

  /* ── Radius ──────────────────────────────────────────── */
  --radius-sm:          8px;
  --radius-md:          16px;
  --radius-lg:          24px;
  --radius-full:        9999px;

  /* ── Shadows ─────────────────────────────────────────── */
  --shadow-sm:          0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:          0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg:          0 20px 50px rgba(0,0,0,0.12);
  --shadow-xl:          0 30px 80px rgba(0,0,0,0.20);

  /* ── Easing ──────────────────────────────────────────── */
  --ease:               cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:            cubic-bezier(0.55, 0, 1, 0.45);
  --ease-out:           cubic-bezier(0, 0, 0.45, 1);
  --ease-bounce:        cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Layout ──────────────────────────────────────────── */
  --nav-height:         5rem;
  --nav-height-mobile:  4rem;
  --content-max:        1200px;
  --content-narrow:     780px;
}

/* ── Utilidades atómicas con tokens ──────────────────── */

.bg-surface        { background: var(--surface); }
.bg-surface-soft   { background: var(--surface-soft); }
.bg-surface-strong { background: var(--surface-strong); color: var(--text-inverse); }
.bg-inverse        { background: var(--inverse-surface); color: var(--text-inverse); }
.bg-inverse-muted  { background: var(--inverse-muted); color: var(--text-inverse); }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-inverse   { color: var(--text-inverse); }

.border-token   { border-color: var(--border); }
.border-strong  { border-color: var(--border-strong); }

.radius-sm  { border-radius: var(--radius-sm); }
.radius-md  { border-radius: var(--radius-md); }
.radius-lg  { border-radius: var(--radius-lg); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ── Tipografía atómica ───────────────────────────────── */
.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.fs-h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
.fs-h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); }
.fs-h3 { font-size: var(--fs-h3); line-height: 1.2; }

/* ── Section wrapper ──────────────────────────────────── */
.section-pad {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}
@media (max-width: 767px) {
  :root { --section-pad: 3.5rem; }
}

/* ── Ancho máximo centrado ────────────────────────────── */
.content-wrap {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* ---------------------------------------------------------------------
   UI polish: direccion visual, logos, tipografia y prueba multimedia
   --------------------------------------------------------------------- */
html,
body {
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
.font-display {
  font-family: var(--font-display);
  letter-spacing: 0 !important;
}

.font-black {
  font-weight: 800 !important;
}

.tracking-tight,
.tracking-tighter {
  letter-spacing: 0 !important;
}

nav img[src*="logo-ensutex"],
footer img[src*="logo-ensutex"] {
  display: block;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

nav img[src*="logo-ensutex"] {
  max-width: 7.35rem;
  max-height: 2.75rem;
}

footer img[src*="logo-ensutex"] {
  max-width: 7rem;
  max-height: 4.2rem;
}

nav a {
  color: #111827;
}

nav[class*="bg-black"] a:not([class*="bg-white"]):not([class*="text-black"]),
nav[class*="bg-zinc-9"] a:not([class*="bg-white"]):not([class*="text-black"]) {
  color: #e4e4e7 !important;
}

nav[class*="bg-black"] a:hover,
nav[class*="bg-zinc-9"] a:hover,
nav[class*="bg-black"] a.text-white,
nav[class*="bg-zinc-9"] a.text-white,
nav[class*="bg-black"] a[aria-current="page"],
nav[class*="bg-zinc-9"] a[aria-current="page"] {
  color: #ffffff !important;
}

nav[class*="bg-black"] a[class*="bg-white"],
nav[class*="bg-zinc-9"] a[class*="bg-white"] {
  color: #0a0a0a !important;
}

nav .hidden.md\:flex a:not([href*="#contacto"]) {
  font-weight: 800;
  font-size: 0.92rem;
}

nav a[href*="#contacto"],
nav a[href*="contacto"] {
  min-width: 12rem;
  text-align: center;
}

.cta-wide {
  min-height: 2.85rem;
}

@media (min-width: 640px) {
  .cta-flow {
    justify-content: flex-end;
    max-width: 45rem;
  }

  .cta-flow .cta-wide {
    min-width: 13.5rem;
  }
}

.visual-proof-section {
  position: relative;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .catalog-page-hero > .relative.z-10 {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 360px);
    gap: 2rem;
    align-items: center;
  }

  .catalog-page-hero nav {
    grid-column: 1 / -1;
  }

  .catalog-page-hero__copy {
    text-align: left;
    max-width: 48rem;
    margin: 0;
  }

  .catalog-page-hero__copy h1 {
    font-size: clamp(2.15rem, 3.1vw, 3.05rem) !important;
    line-height: 1.06 !important;
  }

  .catalog-page-hero__copy .cta-flow {
    justify-content: flex-start;
  }

  .catalog-page-hero .relative.w-full.max-w-sm {
    justify-self: center;
    margin: 0;
    max-width: 360px;
  }
}

@media (max-width: 767px) {
  .catalog-page-hero {
    padding-top: 5.25rem !important;
    padding-bottom: 2.75rem !important;
  }

  .catalog-page-hero__copy h1 {
    font-size: clamp(2.1rem, 11vw, 3.05rem) !important;
  }
}



#prueba-visual #ty-title,
#prueba-visual #ty-desc {
  overflow: visible !important;
  max-width: 100%;
}

#prueba-visual #ty-desc {
  color: #3f3f46;
}

@media (min-width: 1024px) {
  #hero-section {
    min-height: calc(100dvh - var(--nav-height));
  }

  #hero-section > .relative.z-10 {
    padding-top: clamp(1.75rem, 4vh, 2.5rem) !important;
    padding-bottom: clamp(1.5rem, 3vh, 2.5rem) !important;
  }

  #hero-section .hero-copy-main {
    font-size: clamp(2.75rem, 3.8vw, 3.65rem) !important;
    margin-bottom: 0.5rem !important;
  }

  #hero-section h1.hero-reveal-item {
    margin-bottom: 1rem !important;
  }

  #hero-section p.hero-reveal-item {
    margin-bottom: 1.35rem !important;
    line-height: 1.5;
  }

  #hero-section .cta-wide {
    min-height: 2.85rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  #prueba-visual .visual-proof-copy {
    min-height: 100%;
  }
}

@media (min-width: 1024px) and (max-height: 840px) {
  #hero-section .hero-copy-main {
    font-size: clamp(2.35rem, 3.2vw, 3.15rem) !important;
  }

  #hero-section p.hero-reveal-item {
    font-size: 1rem !important;
  }
}

#carousel-main {
  border-radius: 20px;
}

#carousel-main .carousel-nav {
  position: absolute !important;
  top: 50% !important;
  z-index: 30;
  display: inline-flex;
  width: clamp(2.8rem, 4.7vw, 3.8rem);
  height: clamp(2.8rem, 4.7vw, 3.8rem);
  align-items: center;
  justify-content: center;
  border: 2px solid #050505;
  border-radius: 999px;
  background: rgba(255,255,255,0.96);
  color: #050505;
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
  transform: translateY(-50%) !important;
  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

#carousel-main .carousel-nav:hover {
  border-color: #25D366;
  background: #25D366;
  color: #052e16;
  box-shadow: 0 22px 46px rgba(37,211,102,0.18);
}

#carousel-main .carousel-nav:active {
  transform: translateY(-50%) scale(0.96) !important;
}

#carousel-main .carousel-nav-prev {
  left: clamp(0.75rem, 2vw, 1.4rem) !important;
  right: auto !important;
}

#carousel-main .carousel-nav-next {
  right: clamp(0.75rem, 2vw, 1.4rem) !important;
  left: auto !important;
}

#lightbox:not(.open),
#lightbox:not(.open) * {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#carousel-track {
  will-change: transform;
}

#carousel-track .design-slide {
  min-width: 100%;
}

#carousel-track img {
  cursor: zoom-in;
}

#carousel-dots {
  max-width: min(980px, 100%);
  margin-left: auto;
  margin-right: auto;
  flex-wrap: nowrap;
  gap: 0.32rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: none;
}

#carousel-dots::-webkit-scrollbar {
  display: none;
}

.design-dot {
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.design-dot span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.42);
  transition:
    width 0.25s ease,
    background-color 0.25s ease,
    transform 0.25s ease;
}

.design-dot:hover span {
  background: rgba(255,255,255,0.76);
  transform: scale(1.1);
}

.design-dot.is-active span {
  width: 1.45rem;
  background: #25D366;
}



@media (max-width: 767px) {
  nav img[src*="logo-ensutex"] {
    max-width: 6rem;
    max-height: 2.45rem;
  }


  #carousel-main .carousel-nav {
    width: 2.65rem;
    height: 2.65rem;
  }
}

/* ---------------------------------------------------------------------
   Home overrides: CTA attention, chatbot prompt and visual proof reel
   --------------------------------------------------------------------- */
.cta-pulse {
  animation: ensutexCtaPulse 5.6s var(--ease) infinite;
  box-shadow:
    0 12px 30px rgba(0,0,0,0.16),
    0 0 0 0 rgba(37,211,102,0.18);
  will-change: box-shadow;
}

@keyframes ensutexCtaPulse {
  0%,
  58%,
  100% {
    box-shadow:
      0 12px 30px rgba(0,0,0,0.16),
      0 0 0 0 rgba(37,211,102,0);
  }

  70% {
    box-shadow:
      0 16px 34px rgba(0,0,0,0.18),
      0 0 0 0.45rem rgba(37,211,102,0.11);
  }

  82% {
    box-shadow:
      0 12px 30px rgba(0,0,0,0.16),
      0 0 0 0.8rem rgba(37,211,102,0);
  }
}

@media (min-width: 768px) {
  body.has-sticky-cta #chatbot-cta:not(.hidden),
  #chatbot-cta:not(.hidden) {
    position: absolute;
    right: 4.85rem;
    bottom: 0.55rem;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 2.65rem;
    max-width: max-content !important;
    padding: 0.62rem 0.82rem;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--radius-full);
    background:
      linear-gradient(135deg, rgba(10,10,10,0.96), rgba(31,31,31,0.94));
    color: #ffffff;
    box-shadow:
      0 18px 48px rgba(0,0,0,0.24),
      inset 0 1px 0 rgba(255,255,255,0.12);
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    text-wrap: balance;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateX(-0.2rem) !important;
    translate: 0 0;
    animation: ensutexChatbotHint 6.8s var(--ease) infinite;
    pointer-events: none;
    white-space: nowrap !important;
  }

  #chatbot-cta:not(.hidden)::after {
    content: "";
    position: absolute;
    right: -0.42rem;
    top: 50%;
    width: 0.84rem;
    height: 0.84rem;
    background: linear-gradient(135deg, rgba(31,31,31,0.94), rgba(10,10,10,0.96));
    border-top: 1px solid rgba(255,255,255,0.14);
    border-right: 1px solid rgba(255,255,255,0.14);
    transform: translateY(-50%) rotate(45deg);
  }
}

@media (max-width: 767px) {
  #chatbot-cta {
    display: none !important;
  }
}

@keyframes ensutexChatbotHint {
  0%,
  64%,
  100% {
    translate: 0 0;
    box-shadow:
      0 18px 48px rgba(0,0,0,0.24),
      inset 0 1px 0 rgba(255,255,255,0.12);
  }

  76% {
    translate: -0.35rem 0;
    box-shadow:
      0 22px 56px rgba(0,0,0,0.28),
      0 0 0 0.35rem rgba(37,211,102,0.09),
      inset 0 1px 0 rgba(255,255,255,0.14);
  }
}

#prueba-visual .showreel-frame {
  position: relative;
  display: block !important;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 1 / 1;
  border: 1.5px solid #000000 !important;
  border-radius: clamp(14px, 2vw, 20px);
  max-width: 430px !important;
  width: 100% !important;
  background:
    radial-gradient(circle at 18% 8%, rgba(255,255,255,0.12), transparent 32%),
    linear-gradient(135deg, #040404 0%, #111111 52%, #050505 100%) !important;
  box-shadow:
    0 28px 72px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.10);
}

#prueba-visual .showreel-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background:
    linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.08) 45%, transparent 70%),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 240% 100%, 46px 46px, 46px 46px;
  animation: visualReelSweep 8s var(--ease) infinite;
  pointer-events: none;
}

#prueba-visual .showreel-slide {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  border: 1.5px solid #000000 !important;
  border-radius: clamp(14px, 2vw, 20px);
  background: #f7f7f4 !important;
  box-shadow: 0 16px 42px rgba(0,0,0,0.28);
  transition:
    opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.45s var(--ease);
}

#prueba-visual .showreel-slide.is-active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 2;
  border-color: #000000 !important;
  box-shadow: 0 22px 56px rgba(0,0,0,0.36);
}

#prueba-visual .showreel-slide img,
#prueba-visual .showreel-frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover !important;
  object-position: center;
  display: block;
  opacity: 1 !important;
  visibility: visible !important;
  border-radius: 0;
  background: transparent !important;
  filter: saturate(1.04) contrast(1.02);
  transform: none !important;
}

#prueba-visual .showreel-label {
  z-index: 4;
  max-width: calc(100% - 1rem);
  padding: 0.42rem 0.62rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  background: rgba(5,5,5,0.72);
  color: #fff !important;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
  text-shadow: none !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#prueba-visual .showreel-dots {
  display: none !important;
}

#prueba-visual .showreel-dot span {
  background: rgba(10,10,10,0.34) !important;
}

#prueba-visual .showreel-dot:hover span {
  background: rgba(10,10,10,0.62) !important;
}

#prueba-visual .showreel-dot.is-active span {
  background: #0a0a0a !important;
}

@media (max-width: 767px) {
  #prueba-visual .showreel-frame {
    gap: 0.58rem;
    padding: 0.58rem;
  }

  #prueba-visual .showreel-slide {
    border-radius: 10px;
  }

  #prueba-visual .showreel-label {
    max-width: calc(100% - 0.8rem);
    padding: 0.38rem 0.56rem;
    font-size: 0.62rem;
  }
}

@keyframes visualReelSweep {
  0%,
  58%,
  100% {
    background-position: -160% 0, 0 0, 0 0;
  }

  76% {
    background-position: 160% 0, 0 0, 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-pulse,
  #chatbot-cta {
    animation: none !important;
    transition: none !important;
  }
}
