/*!
 * Supraide — animations.css v1.1
 * Premium microinteraction styles. All transforms + opacity only.
 * Pairs with assets/js/interactions.js
 */

/* ─── Split-text word reveal ────────────────────────────────────────────── */
.st-word { display: inline-block; overflow: hidden; vertical-align: top; }
.st-inner {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}
.st-inner.is-revealed { transform: translateY(0); }

/* ─── Clip-path image reveal ────────────────────────────────────────────── */
[data-clip-reveal] {
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  transition: clip-path 1200ms cubic-bezier(0.77, 0, 0.175, 1);
}
[data-clip-reveal].clip-revealed {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* ─── Btn variant A — switch pill (primary CTA) ─────────────────────────── */
.btn-switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0 0 0 24px;
  height: 52px;
  background: var(--carbon);
  border-radius: 999px;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-switch-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(24, 24, 27, 0.2);
}
.btn-switch-pill .btn-text { padding-right: 20px; white-space: nowrap; }
.btn-switch-pill .btn-knob {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--volt);
  flex-shrink: 0;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-switch-pill:hover .btn-knob { transform: rotate(15deg); }
.btn-switch-pill .btn-knob svg { width: 18px; height: 18px; color: var(--carbon); fill: none; }

/* ─── Btn variant B — toggle micro (for dark surfaces) ──────────────────── */
.btn-toggle-micro {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--carbon);
  border-radius: 999px;
  color: var(--volt);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-toggle-micro .mini-sw {
  width: 28px; height: 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px; position: relative;
  transition: background 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-toggle-micro .mini-sw::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--volt);
  transition: left 300ms cubic-bezier(0.34, 1.56, 0.64, 1), background 300ms;
}
.btn-toggle-micro:hover .mini-sw { background: var(--volt); }
.btn-toggle-micro:hover .mini-sw::after { left: calc(100% - 13px); background: var(--carbon); }

/* ─── Btn variant C — knob end (secondary CTA) ──────────────────────────── */
.btn-knob-end {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0 0 0 20px;
  height: 48px;
  background: var(--carbon);
  border-radius: 999px;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-knob-end:hover { transform: translateY(-2px); }
.btn-knob-end .btn-text {
  padding-right: 16px; white-space: nowrap;
  transition: padding-left 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-knob-end:hover .btn-text { padding-left: 4px; }
.btn-knob-end .btn-end-cap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--volt);
  flex-shrink: 0;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-knob-end:hover .btn-end-cap { transform: rotate(45deg); }
.btn-knob-end .btn-end-cap svg { width: 16px; height: 16px; color: var(--carbon); fill: none; }

/* ─── Animated link underline (volt) ────────────────────────────────────── */
.link-underline {
  background-image: linear-gradient(to right, var(--volt), var(--volt));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 400ms cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: 2px;
}
.link-underline:hover { background-size: 100% 1.5px; }

/* ─── Nav logo image sizing ─────────────────────────────────────────────── */
.nav-logo-iso { width: auto; height: 32px; border-radius: 4px; object-fit: contain; flex-shrink: 0; }

/* ─── Form loading ring ─────────────────────────────────────────────────── */
.has-ring { position: relative; overflow: hidden; }
.has-ring.is-loading .contact-submit-label { opacity: 0; }
.has-ring.is-loading::after {
  content: '';
  position: absolute; inset: 0; margin: auto;
  width: 22px; height: 22px;
  border: 2px solid rgba(205,250,80,0.3);
  border-top-color: var(--volt);
  border-radius: 50%;
  animation: ring-spin 800ms linear infinite;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

/* ─── Custom cursor (off by default) ────────────────────────────────────── */
.supraide-cursor {
  position: fixed; top: 0; left: 0;
  width: 12px; height: 12px;
  border: 1.5px solid var(--volt);
  border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 300ms, height 300ms, background 300ms;
}
.supraide-cursor.is-hover { width: 40px; height: 40px; background: rgba(205,250,80,0.2); }

/* ─── Ocultar nav-cta en móvil/tablet (sobreescribe display:inline-flex) ── */
@media (max-width: 968px) {
  .nav-cta.btn-knob-end { display: none !important; }
}

/* ─── Responsive button adjustments ────────────────────────────────────── */
@media (max-width: 640px) {
  /* btn-switch-pill: fills its container, text pushes knob to the right */
  .btn-switch-pill {
    width: 100%;
    justify-content: space-between;
    height: 48px;
    font-size: 14px;
    padding: 0 0 0 20px;
  }
  .btn-switch-pill .btn-knob { width: 48px; height: 48px; }

  /* btn-knob-end: same treatment */
  .btn-knob-end {
    width: 100%;
    justify-content: space-between;
    height: 44px;
    padding: 0 0 0 16px;
    font-size: 13px;
  }
  .btn-knob-end .btn-end-cap { width: 44px; height: 44px; }

  /* nav-cta must stay hidden on mobile regardless of btn-knob-end display rule */
  .nav-cta.btn-knob-end { display: none; width: auto; }
}

/* ─── Reduced motion overrides ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal], [data-clip-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .st-inner { transform: none !important; }
  .btn-switch-pill:hover,
  .btn-knob-end:hover { transform: none; }
}
