/* =========================================================
   SYSTENGER · estilos base + utilidades fuera de Tailwind
   ========================================================= */

:root {
  --ink-0:   #030b0b;
  --ink-1:   #011516;   /* hero / dark sections */
  --ink-2:   #0d1b1c;   /* surface */
  --ink-3:   #162324;   /* elevated */
  --ink-4:   #003730;   /* border on dark */

  --paper-0: #ffffff;
  --paper-1: #f6f7f9;   /* alt section bg */
  --paper-2: #eceef2;
  --line:    #d8dce3;

  --fg-on-dark:  #e7ebf2;
  --mut-on-dark: #8993a3;
  --fg-on-light: #011516;
  --mut-on-light:#5b6573;

  --accent:      #039b9c;   /* teal */
  --accent-hi:   #0bbcbd;
  --accent-lo:   #006f75;

  --serif: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { -webkit-font-smoothing: antialiased; }

html, body {
  font-family: var(--serif);
  background: var(--paper-0);
  color: var(--fg-on-light);
  scroll-behavior: smooth;
}

.font-mono { font-family: var(--mono); }

/* ---------- placeholders de imagen (stripes diagonales) ---------- */
.ph {
  position: relative;
  background-color: #091415;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.04) 0 1px,
      transparent 1px 14px
    ),
    linear-gradient(180deg, #0d1b1c 0%, #081314 100%);
  overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  position: absolute;
  inset: auto 0 0 0;
  margin: 14px;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.55);
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.08);
  width: max-content;
  border-radius: 2px;
  text-transform: uppercase;
}
.ph-light {
  background-color: #e8ebef;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(10,14,20,0.05) 0 1px,
      transparent 1px 14px
    ),
    linear-gradient(180deg, #eceef2 0%, #d6dae0 100%);
}
.ph-light::after {
  color: rgba(10,14,20,0.55);
  background: rgba(255,255,255,0.7);
  border-color: rgba(10,14,20,0.1);
}

/* ---------- líneas + grilla técnica de fondo ---------- */
.tech-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
}
.tech-grid-light {
  background-image:
    linear-gradient(rgba(10,14,20,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,14,20,0.05) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ---------- kicker ---------- */
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

/* ---------- hero bg sync ---------- */
.hero-bg {
  opacity: 0;
  transition: opacity 900ms cubic-bezier(.2,.7,.2,1);
}
.hero-bg.is-active { opacity: 1; }

/* ---------- hero slider ---------- */
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms cubic-bezier(.2,.7,.2,1), transform 800ms cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-bar {
  position: relative;
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}
.hero-bar .fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--accent);
  transition: width 80ms linear;
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

/* ---------- cards business unit ---------- */
.bu-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink-2);
  border: 1px solid var(--ink-4);
  transition: transform 500ms cubic-bezier(.2,.7,.2,1), border-color 300ms;
}
.bu-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.bu-card .img {
  height: 320px;
  transition: transform 900ms cubic-bezier(.2,.7,.2,1);
}
.bu-card:hover .img { transform: scale(1.04); }
.bu-card .arrow {
  transition: transform 300ms;
}
.bu-card:hover .arrow { transform: translateX(6px); }

/* ---------- process card ---------- */
.proc-card {
  border-top: 1px solid var(--ink-4);
  padding-top: 28px;
  transition: border-color 300ms;
}
.proc-card:hover { border-color: var(--accent); }
.proc-card .num {
  font-family: var(--mono);
  color: var(--mut-on-dark);
  transition: color 300ms;
}
.proc-card:hover .num { color: var(--accent); }

/* ---------- nav dropdown ---------- */
.nav-item { position: relative; white-space: nowrap; }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: -16px;
  min-width: 280px;
  background: var(--ink-2);
  border: 1px solid var(--ink-4);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top center;
  transition: opacity 200ms cubic-bezier(.2,.7,.2,1),
              transform 200ms cubic-bezier(.2,.7,.2,1),
              visibility 200ms;
  box-shadow: 0 20px 48px rgba(0,0,0,0.5), 0 1px 0 rgba(3,155,156,0.12);
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.nav-dropdown a {
  display: block;
  padding: 10px 12px;
  color: var(--fg-on-dark);
  font-size: 13px;
  transition: background 150ms, color 150ms, padding-left 150ms;
}
.nav-dropdown a:hover { background: var(--ink-3); color: var(--accent); padding-left: 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease,
              transform 220ms cubic-bezier(.2,.7,.2,1),
              box-shadow 220ms ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 rgba(3,155,156,0);
}
.btn-primary:hover {
  background: var(--accent-hi);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(3,155,156,0.3);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost-dark {
  border-color: rgba(255,255,255,0.25);
  color: var(--fg-on-dark);
}
.btn-ghost-dark:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn-ghost-dark:active { transform: translateY(0); }
.btn-ghost-light {
  border-color: rgba(10,14,20,0.2);
  color: var(--fg-on-light);
}
.btn-ghost-light:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn-ghost-light:active { transform: translateY(0); }

.btn .arrow {
  display: inline-block;
  transition: transform 250ms;
}
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- language switch ---------- */
.lang-pill {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  border: 1px solid transparent;
  color: var(--mut-on-dark);
  transition: color 150ms, border-color 150ms, background 150ms;
}
.lang-pill.is-active {
  color: var(--accent);
  border-color: var(--accent);
}
.lang-pill:hover { color: var(--fg-on-dark); }
.lang-pill.is-active:hover { color: var(--accent); }

/* ---------- counter ---------- */
.counter {
  font-feature-settings: "tnum" 1;
}

/* ---------- mobile menu ---------- */
.mobile-panel {
  transform: translateX(100%);
  transition: transform 350ms cubic-bezier(.2,.7,.2,1);
}
.mobile-panel.is-open { transform: translateX(0); }

/* ---------- scrollbar discreto ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-1); }
::-webkit-scrollbar-thumb { background: var(--ink-4); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- selección ---------- */
::selection { background: var(--accent); color: #fff; }

/* ---------- impide scroll ---------- */
body.no-scroll { overflow: hidden; }

/* ---------- page transition veil ---------- */
#__page-veil {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--ink-1);
  opacity: 1;
  pointer-events: none;
  transition: opacity 380ms cubic-bezier(.2,.7,.2,1);
}
#__page-veil.is-hidden { opacity: 0; }
#__page-veil.is-leaving { opacity: 1; }

/* ---------- scroll reveal — delay extras ---------- */
.reveal-delay-5 { transition-delay: 400ms; }
.reveal-delay-6 { transition-delay: 480ms; }

/* ---------- clients carousel ---------- */
@keyframes scroll-clients-horizontal {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.clients-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #f6f7f9 0%, #eceef2 100%);
  border-top: 1px solid var(--paper-2);
  border-bottom: 1px solid var(--paper-2);
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.clients-track {
  display: flex;
  gap: 0;
  height: 100%;
  animation: scroll-clients-horizontal 40s linear infinite;
  width: fit-content;
}

.client-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 48px;
  flex-shrink: 0;
  width: auto;
  min-width: 200px;
  height: 100%;
  background: transparent;
  transition: all 300ms cubic-bezier(.2,.7,.2,1);
  position: relative;
  cursor: pointer;
}

.client-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(3,155,156,0.08) 0%, rgba(3,155,156,0) 100%);
  opacity: 0;
  transition: opacity 300ms;
}

.client-item:hover {
  background: rgba(3,155,156,0.04);
}

.client-item:hover::before {
  opacity: 1;
}

.client-item img {
  max-height: 80px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 1;
  transition: transform 300ms ease, filter 300ms ease;
  filter: none;
}

.client-item:hover img {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 12px rgba(3,155,156,0.25));
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .clients-carousel {
    height: 110px;
  }
  
  .clients-track {
    animation: scroll-clients-horizontal 35s linear infinite;
  }
  
  .client-item {
    padding: 0 32px;
    min-width: 160px;
  }
  
  .client-item img {
    max-height: 60px;
    max-width: 120px;
  }
}

@media (max-width: 480px) {
  .clients-carousel {
    height: 90px;
  }
  
  .clients-track {
    animation: scroll-clients-horizontal 30s linear infinite;
  }
  
  .client-item {
    padding: 0 20px;
    min-width: 120px;
  }
  
  .client-item img {
    max-height: 48px;
    max-width: 90px;
  }
}

/* ============================================================
   ===  REVISIONS · brand · floating cards · clients sheen  ===
   ============================================================ */

/* ---------- brand "S" glow (header + footer) ---------- */
.brand-s {
  filter: drop-shadow(0 0 14px rgba(11, 188, 189, 0.45))
          drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  transition: filter 380ms cubic-bezier(.2,.7,.2,1),
              transform 380ms cubic-bezier(.2,.7,.2,1);
}
a:hover .brand-s,
.brand-s:hover {
  filter: drop-shadow(0 0 22px rgba(11, 188, 189, 0.7))
          drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  transform: translateY(-1px);
}

/* ---------- softer bu-cards · gentle float ---------- */
@keyframes bu-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.bu-card {
  border-radius: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset,
              0 10px 28px rgba(0,0,0,0.25);
  animation: bu-float 6.5s ease-in-out infinite;
}
.bu-card:nth-child(2) { animation-delay: -2.2s; }
.bu-card:nth-child(3) { animation-delay: -4.4s; }
.bu-card .img {
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}
.bu-card:hover {
  animation-play-state: paused;
  transform: translateY(-12px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45),
              0 0 0 1px rgba(11,188,189,0.35);
}
@media (prefers-reduced-motion: reduce) {
  .bu-card { animation: none; }
}

/* ---------- proc-cards: tiny softness ---------- */
.proc-card {
  border-radius: 0 14px 0 0;
  padding: 28px 8px 0;
  transition: border-color 300ms, transform 380ms cubic-bezier(.2,.7,.2,1);
}
.proc-card:hover { transform: translateY(-4px); }

/* ---------- CLIENTS CAROUSEL · no background, just sheen ---------- */
.clients-carousel {
  background: transparent;
  border-top: 0;
  border-bottom: 0;
  box-shadow: none;
  height: 160px;
  position: relative;
}
/* edge fades — names disappear smoothly at the sides */
.clients-carousel::before,
.clients-carousel::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.clients-carousel::before {
  left: 0;
  background: linear-gradient(to right, var(--paper-1) 0%, rgba(246,247,249,0) 100%);
}
.clients-carousel::after {
  right: 0;
  background: linear-gradient(to left, var(--paper-1) 0%, rgba(246,247,249,0) 100%);
}
.client-item {
  background: transparent !important;
  padding: 0 56px;
}
.client-item::before {
  /* soft teal halo — appears on hover */
  background: radial-gradient(circle at center,
              rgba(11,188,189,0.18) 0%,
              rgba(11,188,189,0.05) 35%,
              rgba(11,188,189,0) 70%);
  opacity: 0;
  transition: opacity 420ms cubic-bezier(.2,.7,.2,1);
}
.client-item:hover { background: transparent !important; }
.client-item:hover::before { opacity: 1; }
.client-item img {
  opacity: 1;
  filter: none;
  transition: transform 360ms cubic-bezier(.2,.7,.2,1),
              filter 360ms cubic-bezier(.2,.7,.2,1);
}
.client-item:hover img {
  transform: scale(1.06);
  filter: drop-shadow(0 6px 18px rgba(11,188,189,0.35));
}

/* ---------- FORM REDESIGN · "sex appeal" dark elegance ---------- */
.form-shell {
  background: linear-gradient(180deg,
              rgba(1,21,22,0.04) 0%,
              rgba(1,21,22,0.01) 100%);
  border: 1px solid var(--paper-2);
  border-radius: 18px;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}
.form-shell::before {
  content: "";
  position: absolute;
  top: 0; left: -20%;
  width: 140%;
  height: 1px;
  background: linear-gradient(90deg,
              transparent 0%,
              rgba(11,188,189,0.6) 50%,
              transparent 100%);
}
.form-shell .field {
  color: var(--mut-on-light);
  font-weight: 500;
}
.form-shell .input,
.form-shell .select,
.form-shell .textarea {
  background: #fff;
  border: 1px solid rgba(0,55,48,0.12);
  border-radius: 12px;
  font-size: 15.5px;
  padding: 16px 18px;
  transition: border-color 220ms cubic-bezier(.2,.7,.2,1),
              box-shadow 220ms cubic-bezier(.2,.7,.2,1),
              transform 220ms cubic-bezier(.2,.7,.2,1);
}
.form-shell .input:hover,
.form-shell .select:hover,
.form-shell .textarea:hover {
  border-color: rgba(11,188,189,0.4);
}
.form-shell .input:focus,
.form-shell .select:focus,
.form-shell .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(11,188,189,0.12),
              0 6px 18px rgba(11,188,189,0.08);
  transform: translateY(-1px);
}
.form-shell .check-box { border-radius: 5px; }
.form-shell .form-success {
  border-radius: 14px;
  background: linear-gradient(135deg,
              rgba(11,188,189,0.08) 0%,
              rgba(11,188,189,0.02) 100%);
}

/* form section panel softening */
.form-shell + aside .bg-paper-1,
aside .bg-paper-1 {
  border-radius: 18px;
}

/* ---------- map iframe wrapper ---------- */
.map-frame {
  display: block;
  width: 100%;
  height: 480px;
  border: 0;
  filter: grayscale(0.2) contrast(1.05);
  transition: filter 360ms ease;
}
.map-frame:hover { filter: grayscale(0) contrast(1.05); }
.map-wrap {
  border-radius: 18px;
  border: 1px solid var(--ink-4);
  overflow: hidden;
}

/* ---------- bu-card text padding fix when rounded ---------- */
.bu-card { isolation: isolate; }
.bu-card a { border-radius: inherit; }

