/* ============================================
   HIKARI SOLUCIONES S.A.C. — Custom Styles
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --cyan-glow: 0 0 20px rgba(6, 182, 212, 0.5), 0 0 40px rgba(6, 182, 212, 0.2);
  --cyan-glow-sm: 0 0 10px rgba(6, 182, 212, 0.35);
  --glass-bg: rgba(24, 34, 54, 0.65);
  --glass-border: rgba(34, 211, 238, 0.18);
  --glass-blur: 16px;
  --dark-900: #131a2e;
  --dark-800: #182236;
  --dark-700: #243044;
  --text-primary: #f1f5f9;
  --text-secondary: #a0aec0;
}

/* ---------- Base Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--dark-900);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---------- Animated Background ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(6, 182, 212, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(6, 182, 212, 0.06) 0%, transparent 70%),
    linear-gradient(180deg, var(--dark-900) 0%, #15203a 50%, var(--dark-900) 100%);
}

/* Floating particle grid */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle 1px, rgba(34, 211, 238, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridFloat 20s ease-in-out infinite;
}

@keyframes gridFloat {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-12px, -12px);
  }
}

/* ---------- Glassmorphism ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

.glass-sm {
  background: rgba(24, 34, 54, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: 12px;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5 {
  font-family: 'Outfit', sans-serif;
}

.gradient-text {
  background: linear-gradient(135deg, var(--cyan-400), #38bdf8, var(--cyan-400));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerText 4s ease-in-out infinite;
}

@keyframes shimmerText {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

/* ---------- Glow Button ---------- */
.btn-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-600));
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.btn-glow:hover {
  box-shadow: var(--cyan-glow);
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--cyan-400), var(--cyan-500));
}

.btn-glow:active {
  transform: translateY(0);
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(19, 26, 46, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(34, 211, 238, 0.12);
  padding: 10px 0;
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  padding: 4px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan-400);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan-400);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(19, 26, 46, 0.96);
  backdrop-filter: blur(24px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
}

.mobile-menu .nav-link {
  font-size: 1.5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 8px;
}

.hamburger span {
  width: 26px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(19, 26, 46, 0.45) 0%,
      rgba(19, 26, 46, 0.7) 50%,
      var(--dark-900) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* Typing cursor */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--cyan-400);
  margin-left: 4px;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Floating orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3), transparent);
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2), transparent);
  bottom: 20%;
  left: 5%;
  animation-delay: -3s;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(20px, -30px) scale(1.05);
  }

  66% {
    transform: translate(-15px, 15px) scale(0.95);
  }
}

/* ---------- Service Cards ---------- */
.service-card {
  position: relative;
  padding: 32px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  cursor: default;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow:
    0 0 30px rgba(6, 182, 212, 0.15),
    0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(34, 211, 238, 0.2);
  margin-bottom: 20px;
  font-size: 28px;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  box-shadow: var(--cyan-glow-sm);
  border-color: rgba(34, 211, 238, 0.4);
}

/* ---------- Stats Section ---------- */
.stat-item {
  text-align: center;
  padding: 24px;
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 3rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--cyan-400), #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Contact ---------- */
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  transition: background 0.3s ease;
}

.contact-item:hover {
  background: rgba(6, 182, 212, 0.05);
}

.contact-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.15);
  color: var(--cyan-400);
  font-size: 18px;
}

/* ---------- Map ---------- */
.map-container {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.map-container iframe {
  width: 100%;
  height: 350px;
  border: 0;
  filter: brightness(0.7) contrast(1.1) saturate(0.8) hue-rotate(180deg);
}

/* ---------- Chatbot ---------- */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-600));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--cyan-glow);
  transition: all 0.3s ease;
  color: #fff;
  font-size: 24px;
}

.chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.6), 0 0 60px rgba(6, 182, 212, 0.3);
}

.chat-fab .fab-close {
  display: none;
}

.chat-fab.active .fab-icon {
  display: none;
}

.chat-fab.active .fab-close {
  display: block;
}

/* Pulse ring */
.chat-fab::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(6, 182, 212, 0.4);
  animation: fabPulse 2s ease-out infinite;
}

.chat-fab.active::before {
  display: none;
}

@keyframes fabPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Chat window */
.chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 899;
  width: 380px;
  max-height: 520px;
  border-radius: 20px;
  background: rgba(19, 26, 46, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(34, 211, 238, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.chat-window.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.chat-header {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(6, 182, 212, 0.05));
  border-bottom: 1px solid rgba(34, 211, 238, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
}

.chat-header-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-header-info span {
  font-size: 0.75rem;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-header-info span::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 340px;
  min-height: 280px;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.2);
  border-radius: 2px;
}

/* Message bubbles */
.msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.5;
  animation: msgSlide 0.3s ease;
}

@keyframes msgSlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg-bot {
  align-self: flex-start;
  background: rgba(36, 48, 68, 0.85);
  border: 1px solid rgba(34, 211, 238, 0.1);
  border-bottom-left-radius: 4px;
  color: var(--text-primary);
}

.msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--cyan-600), var(--cyan-500));
  border-bottom-right-radius: 4px;
  color: #fff;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  align-self: flex-start;
  background: rgba(36, 48, 68, 0.7);
  border: 1px solid rgba(34, 211, 238, 0.08);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  animation: msgSlide 0.3s ease;
}

.typing-avatar {
  font-size: 16px;
  flex-shrink: 0;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-indicator .typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan-400);
  opacity: 0.4;
  animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-indicator .typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-indicator .typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.typing-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* Message content formatting */
.msg-content {
  line-height: 1.55;
}

.msg-content strong {
  color: var(--cyan-400);
  font-weight: 600;
}

.msg-user .msg-content strong {
  color: #fff;
}

.msg-content em {
  font-style: italic;
  opacity: 0.9;
}

.msg-list {
  margin: 6px 0;
  padding-left: 18px;
  list-style: none;
}

.msg-list li {
  position: relative;
  padding: 2px 0;
  padding-left: 8px;
}

.msg-list li::before {
  content: '▸';
  position: absolute;
  left: -10px;
  color: var(--cyan-400);
  font-size: 0.75rem;
}

.msg-code {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(34, 211, 238, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.78rem;
  overflow-x: auto;
  margin: 6px 0;
}

.msg-inline-code {
  background: rgba(6, 182, 212, 0.1);
  color: var(--cyan-400);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82em;
}

/* Message timestamps */
.msg-time {
  display: block;
  font-size: 0.62rem;
  color: rgba(148, 163, 184, 0.5);
  margin-top: 4px;
  text-align: right;
}

.msg-user .msg-time {
  color: rgba(255, 255, 255, 0.45);
}

/* Chat header clear button */
.chat-header-btn {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, 0.1);
  background: rgba(30, 41, 59, 0.5);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-header-btn:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.1);
}

/* Quick Reply Chips */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 8px;
  animation: msgSlide 0.4s ease;
}

.quick-reply-btn {
  padding: 8px 14px;
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--cyan-400);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.quick-reply-btn:hover {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
  transform: translateY(-1px);
}

.quick-reply-btn:active {
  transform: translateY(0);
}

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid rgba(34, 211, 238, 0.1);
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-input {
  flex: 1;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(34, 211, 238, 0.1);
  border-radius: 12px;
  padding: 10px 16px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.chat-input:focus {
  border-color: var(--cyan-500);
}

.chat-input::placeholder {
  color: var(--text-secondary);
}

.chat-send {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-600));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.chat-send:hover {
  box-shadow: var(--cyan-glow-sm);
  transform: scale(1.05);
}

.chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Scroll Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children delay */
.stagger-children .reveal:nth-child(1) {
  transition-delay: 0.1s;
}

.stagger-children .reveal:nth-child(2) {
  transition-delay: 0.2s;
}

.stagger-children .reveal:nth-child(3) {
  transition-delay: 0.3s;
}

.stagger-children .reveal:nth-child(4) {
  transition-delay: 0.4s;
}

.stagger-children .reveal:nth-child(5) {
  transition-delay: 0.5s;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(34, 211, 238, 0.1);
  background: rgba(19, 26, 46, 0.7);
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--cyan-400);
}

/* ---------- Divider Line ---------- */
.divider-glow {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan-400), transparent);
  border-radius: 2px;
  margin: 0 auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .chat-window {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 88px;
    max-height: 70vh;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .hero-orb {
    display: none;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.5rem;
  }

  .chat-window {
    width: calc(100vw - 16px);
    right: 8px;
  }
}