/* Estilos base */
body {
  font-family: "Roboto", sans-serif;
  transition:
    background-color 0.3s,
    color 0.3s;
}

h1,
h2,
h3,
.font-tech {
  font-family: "Rajdhani", sans-serif;
}

/* Unified button interactions */
button,
a[data-btn],
.case-card__cta,
.case-modal-btn {
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease,
    filter 0.25s ease;
  will-change: transform, box-shadow;
  transform-origin: center;
  --mouse-x: 50%;
  --mouse-y: 50%;
  --mouse-active: 0;
}

button::before,
a[data-btn]::before,
.case-card__cta::before,
.case-modal-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.3), transparent 65%);
  opacity: calc(0.35 * var(--mouse-active));
  transform: scale(1.2);
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: -2;
}

button::after,
a[data-btn]::after,
.case-card__cta::after,
.case-modal-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%) skewX(-15deg);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

button:hover,
a[data-btn]:hover,
.case-card__cta:hover,
.case-modal-btn:hover,
button:focus-visible,
a[data-btn]:focus-visible,
.case-card__cta:focus-visible,
.case-modal-btn:focus-visible {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  outline: none;
  --mouse-active: 1;
}

button:hover::after,
a[data-btn]:hover::after,
.case-card__cta:hover::after,
.case-modal-btn:hover::after,
button:focus-visible::after,
a[data-btn]:focus-visible::after,
.case-card__cta:focus-visible::after,
.case-modal-btn:focus-visible::after {
  opacity: 0.9;
  animation: buttonSheen 0.85s ease forwards;
}

html.dark button:hover,
html.dark a[data-btn]:hover,
html.dark .case-card__cta:hover,
html.dark .case-modal-btn:hover,
html.dark button:focus-visible,
html.dark a[data-btn]:focus-visible,
html.dark .case-card__cta:focus-visible,
html.dark .case-modal-btn:focus-visible {
  box-shadow: 0 6px 24px rgba(0, 178, 226, 0.2);
}

button:active,
a[data-btn]:active,
.case-card__cta:active,
.case-modal-btn:active {
  transform: translateY(0);
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.18);
  filter: brightness(0.96);
}

@keyframes buttonSheen {
  0% {
    transform: translateX(-140%) skewX(-15deg);
    opacity: 0;
  }

  40% {
    opacity: 0.45;
  }

  100% {
    transform: translateX(140%) skewX(-15deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  button,
  a[data-btn],
  .case-card__cta,
  .case-modal-btn {
    transition: filter 0.2s ease;
  }

  button:hover,
  a[data-btn]:hover,
  .case-card__cta:hover,
  .case-modal-btn:hover {
    transform: none;
    box-shadow: none;
  }

  button::after,
  a[data-btn]::after,
  .case-card__cta::after,
  .case-modal-btn::after {
    display: none;
  }

  button::before,
  a[data-btn]::before,
  .case-card__cta::before,
  .case-modal-btn::before {
    display: none;
  }
}

[data-scroll] {
  opacity: 0;
  transform: translateY(45px) scale(0.99);
  transition:
    opacity 0.7s ease,
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-scroll].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ai-control-card {
  position: relative;
  padding: 2.5rem;
  border-radius: 2.5rem;
  background: linear-gradient(160deg, rgba(4, 15, 28, 0.97), rgba(1, 9, 18, 0.94) 60%, rgba(3, 22, 38, 0.97));
  border: 1px solid rgba(0, 178, 226, 0.18);
  box-shadow:
    0 22px 65px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  isolation: isolate;
}

.ai-control-card__halo,
.ai-control-card__grid,
.ai-control-card__noise {
  position: absolute;
  inset: -20%;
  z-index: 0;
}

.ai-control-card__halo {
  background: radial-gradient(circle at 25% 15%, rgba(0, 178, 226, 0.55), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(0, 226, 200, 0.45), transparent 50%);
  filter: blur(30px);
  opacity: 0.8;
  animation: haloPulse 8s ease-in-out infinite alternate;
}

.ai-control-card__grid {
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  transform: translateZ(0);
  animation: gridDrift 20s linear infinite;
}

.ai-control-card__noise {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' fill-opacity='0.4'%3E%3Cpath d='M0 0h1v1H0z' fill='%23FFFFFF'/%3E%3C/g%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  opacity: 0.12;
}

.ai-metric {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 0.4rem;
  column-gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}

.ai-metric__label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ai-metric__bar {
  grid-column: span 2;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.ai-metric__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00b2e2, #00e6c0);
  box-shadow: 0 0 12px rgba(0, 178, 226, 0.45);
}

@keyframes haloPulse {
  0% {
    transform: scale(0.95);
  }

  100% {
    transform: scale(1.05);
  }
}

@keyframes gridDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-60px, -60px, 0);
  }
}

/* The Key Interaction */
.the-key-container {
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  z-index: 30;
}

.the-key-container:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(0, 178, 226, 0.5);
}

.the-key-container:hover .key-icon {
  transform: scale(1.1) rotate(15deg);
  filter: drop-shadow(0 0 15px #00b2e2);
}

.menu-spokes {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.menu-active .menu-spokes {
  opacity: 1;
  pointer-events: all;
}

.menu-active .key-icon {
  color: #00b2e2;
  transform: rotate(90deg);
}

/* Circuit Lines Animation (Energy Flow) */
.circuit-line {
  stroke-dasharray: 60 300;
  stroke-dashoffset: 360;
  opacity: 0;
  transition: opacity 0.3s ease-in;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px #00b2e2);
}

.menu-active .circuit-line {
  opacity: 1;
  animation: energyFlow 2s linear infinite;
}

@keyframes energyFlow {
  0% {
    stroke-dashoffset: 360;
  }

  100% {
    stroke-dashoffset: 0;
  }
}

/* Background dim tracks */
.circuit-line-bg {
  opacity: 0;
  transition: opacity 0.5s;
}

.menu-active .circuit-line-bg {
  opacity: 0.3;
}

/* Energy Pulse traveling the line */
.energy-pulse {
  offset-path: path(var(--path-str));
  offset-distance: 0%;
  animation: pulseTravel 2s linear infinite;
  opacity: 0;
  mix-blend-mode: overlay;
}

.menu-active .energy-pulse {
  opacity: 1;
}

@keyframes pulseTravel {
  0% {
    offset-distance: 0%;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

/* Option Selection */
.option-selected {
  background-color: rgba(0, 178, 226, 0.15) !important;
  border-color: #00b2e2 !important;
  box-shadow: 0 0 25px rgba(0, 178, 226, 0.6) !important;
  transform: scale(1.1) !important;
  animation: none !important;
}

.option-selected i {
  color: #00b2e2 !important;
  text-shadow: 0 0 10px #00b2e2;
}

/* Chip Pattern Background */
.chip-pattern {
  background-image:
    linear-gradient(45deg, #1a1a1a 25%, transparent 25%, transparent 75%, #1a1a1a 75%, #1a1a1a),
    linear-gradient(45deg, #1a1a1a 25%, transparent 25%, transparent 75%, #1a1a1a 75%, #1a1a1a);
  background-color: #101820;
  background-size: 10px 10px;
  background-position:
    0 0,
    5px 5px;
}

/* Infinite Slider */
.slider-track {
  display: flex;
  width: max-content;
  animation: scroll 35s linear infinite;
  will-change: transform;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Shared Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border-radius: 9999px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  color: #ffffff;
  border: 1px solid rgba(0, 178, 226, 0.6);
  background: linear-gradient(135deg, #00b2e2 0%, #2fc8ff 100%);
  box-shadow: 0 12px 30px rgba(0, 178, 226, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 178, 226, 0.35);
}

.btn-secondary {
  color: #334155;
  border: 1px solid #cbd5f5;
  background: #ffffff;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 178, 226, 0.5);
  color: #00b2e2;
  box-shadow: 0 14px 30px rgba(0, 178, 226, 0.15);
}

html.dark .btn-secondary {
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(10, 17, 26, 0.6);
}

html.dark .btn-secondary:hover {
  color: #ffffff;
  border-color: rgba(0, 178, 226, 0.6);
  box-shadow: 0 14px 30px rgba(0, 178, 226, 0.2);
}

/* Glassmorphism Utilities */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html.dark .glass-panel {
  background: rgba(16, 24, 32, 0.85);
  border-right: 1px solid rgba(0, 178, 226, 0.1);
}

/* Video Reel Specifics */
.reel-container video {
  mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #e5e7eb;
}

html.dark ::-webkit-scrollbar-track {
  background: #101820;
}

::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border-radius: 4px;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #002b49;
}

::-webkit-scrollbar-thumb:hover {
  background: #00b2e2;
}

/* ================== Web Dev Landing ================== */
.viewport-video-shell {
  position: relative;
  border-radius: 2rem;
  padding: 1.75rem;
  overflow: hidden;
}

.viewport-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--viewport-ratio, 16 / 9);
  border-radius: 2rem;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(0, 178, 226, 0.2), rgba(0, 27, 54, 0.8));
}

.interactive-image-shell {
  border-radius: 2rem;
  min-height: 320px;
  overflow: hidden;
  position: relative;
}

.interactive-image-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0), rgba(0, 178, 226, 0.15));
  pointer-events: none;
}

.case-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 249, 255, 0.92));
  border-radius: 2rem;
  padding: 2rem;
  border: 1px solid rgba(10, 30, 60, 0.08);
  box-shadow:
    0 15px 45px rgba(1, 22, 45, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

html.dark .case-card {
  background: linear-gradient(150deg, rgba(3, 16, 30, 0.95), rgba(1, 11, 20, 0.9));
  border-color: rgba(0, 178, 226, 0.12);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.case-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.case-card__image {
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(0, 178, 226, 0.2);
  background: radial-gradient(circle at top, rgba(0, 178, 226, 0.15), transparent);
}

.case-card__image figcaption {
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  color: #6b7280;
}

html.dark .case-card__image figcaption {
  color: #d1d5db;
}

.case-card__cta {
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(120deg, #00b2e2, #0092c2);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0, 178, 226, 0.25);
  transition: transform 0.3s, box-shadow 0.3s;
}

.case-card__cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 178, 226, 0.35);
}

.case-modal-btn {
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(120deg, rgba(0, 178, 226, 0.15), rgba(0, 178, 226, 0.05));
  border: 1px solid rgba(0, 178, 226, 0.4);
  color: #0b1320;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.case-modal-btn:hover {
  background: linear-gradient(120deg, #00b2e2, #00d0ff);
  color: #fff;
  box-shadow: 0 15px 35px rgba(0, 178, 226, 0.3);
}

html.dark .case-modal-btn {
  color: #f0f4ff;
}

.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-toggle-btn i {
  font-size: 1rem;
}

.logo-brand--dark {
  display: none;
  filter: brightness(0) invert(1) saturate(0) contrast(1.2);
}

html.dark .logo-brand--light {
  display: none;
}

html.dark .logo-brand--dark {
  display: block;
}

#arGlasses {
  position: absolute;
  left: 0;
  top: 0;
  width: 160px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.55));
  transition:
    left 0.15s ease,
    top 0.15s ease,
    width 0.15s ease;
  pointer-events: none;
  user-select: none;
}
.aurora-layer {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  filter: blur(55px);
  opacity: 0.85;
  mix-blend-mode: screen;
  animation: auroraMesh 24s ease-in-out infinite;
  background:
    linear-gradient(125deg, rgba(0, 178, 226, 0.38), transparent 55%),
    linear-gradient(210deg, rgba(0, 255, 209, 0.22), transparent 60%),
    linear-gradient(30deg, rgba(0, 74, 173, 0.35), transparent 70%),
    radial-gradient(circle at 20% 30%, rgba(0, 207, 255, 0.25), transparent 45%),
    radial-gradient(circle at 70% 10%, rgba(0, 255, 194, 0.2), transparent 50%),
    linear-gradient(160deg, #031326 0%, #010c17 60%, #031836 100%);
}

.aurora-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Crect width='1' height='1' fill='white' opacity='0.12'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  opacity: 0.07;
}

html.dark .aurora-layer {
  mix-blend-mode: lighten;
}

.aurora-layer--hero {
  animation-duration: 26s;
  opacity: 0.75;
}

.aurora-layer--ai {
  animation-duration: 32s;
  opacity: 0.65;
}

@keyframes auroraMesh {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  40% {
    transform: translate3d(-3%, -2%, 0) scale(1.03);
  }

  70% {
    transform: translate3d(2%, 3%, 0) scale(1.01);
  }

  100% {
    transform: translate3d(-1%, 1%, 0) scale(1);
  }
}


/* Services carousel */
.services-carousel {
  position: relative;
  overflow: hidden;
  padding: 4px 0;
}

.services-carousel::-webkit-scrollbar {
  display: none;
}

.services-carousel {
  scrollbar-width: none;
}

.services-carousel:hover .services-track {
  animation-play-state: paused;
}

.services-carousel:focus-within .services-track {
  animation-play-state: paused;
}

.services-carousel.is-dragging .services-track {
  animation-play-state: paused;
}

.services-carousel:hover,
.services-carousel:focus-within {
  overflow-x: auto;
  cursor: grab;
}

.services-carousel:active {
  cursor: grabbing;
}

.services-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: services-marquee 70s linear infinite;
}

.services-item {
  min-width: 640px;
  background: transparent;
  border: none;
  border-radius: 28px;
  padding: 6px 4px;
  margin-left: -220px;
  text-align: center;
}

.services-item:first-child {
  margin-left: 0;
}

.dark .services-item {
  background: transparent;
}

.services-item img {
  width: 560px;
  height: 560px;
  object-fit: contain;
  margin: 0 auto;
}

.services-item figcaption {
  margin-top: 12px;
  font-size: 0.875rem;
  color: #4b5563;
}

.dark .services-item figcaption {
  color: #9ca3af;
}

/* Video gallery */
.video-gallery {
  position: relative;
  margin-top: 1.5rem;
}

.video-gallery__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px 48px 24px;
  scroll-behavior: smooth;
}

.video-gallery__track::-webkit-scrollbar {
  display: none;
}

.video-gallery__item {
  scroll-snap-align: center;
}

.video-gallery__frame {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  background: #050c13;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transform: translateZ(0);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.video-gallery__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

.video-gallery__item:hover .video-gallery__frame {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 30px 60px rgba(0, 178, 226, 0.25);
}

.video-gallery__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-gallery__badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 43, 73, 0.85);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: grid;
  place-items: center;
  z-index: 3;
  transition: background 0.3s ease, transform 0.3s ease;
}

.video-gallery__nav:hover {
  background: rgba(0, 178, 226, 0.8);
  transform: translateY(-50%) scale(1.05);
}

.video-gallery__nav--left {
  left: 8px;
}

.video-gallery__nav--right {
  right: 8px;
}

@media (min-width: 1024px) {
  .video-gallery__track {
    grid-auto-columns: minmax(320px, 1fr);
  }
}

@media (max-width: 640px) {
  .video-gallery__track {
    padding: 12px 16px 20px;
    gap: 16px;
  }

  .video-gallery__nav {
    display: none;
  }
}

@keyframes services-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 640px) {
  .services-track {
    animation-duration: 40s;
    gap: 0;
  }

  .services-item {
    min-width: 460px;
    margin-left: -160px;
  }

  .services-item img {
    width: 420px;
    height: 420px;
  }
}
