﻿/**
 * KRM INFO TECH - Light theme: glass, motion, reveals, image sections
 */

:root {
  --color-accent: #3b82f6;
  --color-accent-cyan: #06b6d4;
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(148, 163, 184, 0.35);
  --shadow-soft: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 24px 48px rgba(15, 23, 42, 0.1);
}

html {
  scroll-behavior: smooth;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

body {
  font-family: "Inter", system-ui, sans-serif;
}

.font-display {
  font-family: "Poppins", system-ui, sans-serif;
}

/* Sticky nav shadow when scrolled */
#navbar.nav-shadow > div:first-child {
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

/* Glass surfaces - light */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.glass-light {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

/* Hero - light airy gradient */
.hero-gradient {
  background:
    radial-gradient(ellipse 85% 55% at 50% -15%, rgba(59, 130, 246, 0.2), transparent 55%),
    radial-gradient(ellipse 55% 45% at 95% 10%, rgba(6, 182, 212, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 55% at 5% 90%, rgba(59, 130, 246, 0.1), transparent 45%),
    linear-gradient(180deg, #f1f5f9 0%, #ffffff 42%, #f8fafc 100%);
}

.shape-float {
  animation: float-y 8s ease-in-out infinite;
}

.shape-float-delay {
  animation: float-y 10s ease-in-out infinite;
  animation-delay: -3s;
}

.shape-float-slow {
  animation: float-y 12s ease-in-out infinite;
  animation-delay: -5s;
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-18px) rotate(2deg);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.04);
  }
}

.hero-glow {
  animation: pulse-glow 6s ease-in-out infinite;
}

.btn-primary {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 36px rgba(59, 130, 246, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.6);
}

.btn-secondary {
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.06);
}

.card-hover {
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.card-hover:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-card-hover), 0 0 36px rgba(59, 130, 246, 0.1);
}

/* Portfolio dark overlay on photos - keeps titles readable */
.portfolio-overlay {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-card:hover img {
  transform: scale(1.06);
}

.portfolio-card img {
  transition: transform 0.5s ease;
}

.timeline-line {
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.45) 0%,
    rgba(6, 182, 212, 0.35) 50%,
    rgba(59, 130, 246, 0.2) 100%
  );
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.08s;
}

.reveal-delay-2 {
  transition-delay: 0.16s;
}

.reveal-delay-3 {
  transition-delay: 0.24s;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  transition: width 0.25s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

.nav-link-active::after {
  width: 100%;
}

.map-placeholder {
  background:
    linear-gradient(135deg, rgba(241, 245, 249, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 20px,
      rgba(59, 130, 246, 0.04) 20px,
      rgba(59, 130, 246, 0.04) 21px
    );
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

/* Image bento - subtle lift on hover */
.img-tile {
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

.img-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.img-tile img {
  transition: transform 0.5s ease;
}

.img-tile:hover img {
  transform: scale(1.05);
}

/* Mobile slide-in drawer (opens from right) */
body.mobile-drawer-open {
  overflow: hidden;
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.mobile-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  cursor: pointer;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(20rem, 90vw);
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-left: 1px solid var(--glass-border);
  box-shadow: -16px 0 48px rgba(15, 23, 42, 0.14);
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer-link {
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ---------- Dark mode ---------- */
html.dark {
  color-scheme: dark;
  --glass-bg: rgba(30, 41, 59, 0.82);
  --glass-border: rgba(148, 163, 184, 0.14);
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-card-hover: 0 24px 48px rgba(0, 0, 0, 0.45);
}

html.dark .glass {
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html.dark .glass-light {
  background: rgba(15, 23, 42, 0.62);
  border-color: rgba(148, 163, 184, 0.18);
}

html.dark .hero-gradient {
  background:
    radial-gradient(ellipse 85% 55% at 50% -15%, rgba(59, 130, 246, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 45% at 95% 10%, rgba(6, 182, 212, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 55% at 5% 90%, rgba(59, 130, 246, 0.12), transparent 45%),
    linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
}

html.dark body {
  background-color: #0f172a !important;
  color: #e2e8f0 !important;
}

html.dark #navbar.nav-shadow > div:first-child {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

html.dark .mobile-drawer {
  background: rgba(15, 23, 42, 0.98);
  border-left-color: rgba(148, 163, 184, 0.15);
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.5);
}

html.dark .mobile-drawer-backdrop.is-open {
  background: rgba(0, 0, 0, 0.72);
}

html.dark .map-placeholder {
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 20px,
      rgba(59, 130, 246, 0.06) 20px,
      rgba(59, 130, 246, 0.06) 21px
    );
}

html.dark .from-slate-100.via-white.to-slate-50 {
  background: linear-gradient(to bottom right, #1e293b, #334155, #0f172a) !important;
}

html.dark section[aria-labelledby="cta-heading"] {
  background: linear-gradient(to bottom right, #1e293b, #0f172a, rgba(30, 58, 138, 0.28)) !important;
}

html.dark [class*="via-slate-50/95"] {
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.9)) !important;
}

html.dark [class*="bg-slate-50"] {
  background-color: #0f172a !important;
}

html.dark [class*="bg-white"] {
  background-color: #1e293b !important;
}

html.dark [class*="text-slate-900"] {
  color: #f8fafc !important;
}

html.dark [class*="text-slate-800"] {
  color: #f1f5f9 !important;
}

html.dark [class*="text-slate-700"] {
  color: #e2e8f0 !important;
}

html.dark [class*="text-slate-600"] {
  color: #cbd5e1 !important;
}

html.dark [class*="text-slate-500"] {
  color: #94a3b8 !important;
}

html.dark [class*="text-blue-600"] {
  color: #93c5fd !important;
}

html.dark [class*="text-cyan-700"] {
  color: #22d3ee !important;
}

html.dark [class*="border-cyan-200"] {
  border-color: rgba(34, 211, 238, 0.35) !important;
}

html.dark [class*="border-slate-200"] {
  border-color: rgba(71, 85, 105, 0.55) !important;
}

html.dark [class*="border-slate-300"] {
  border-color: rgba(71, 85, 105, 0.65) !important;
}

html.dark [class*="hover:bg-slate-100"]:hover {
  background-color: rgba(51, 65, 85, 0.65) !important;
}

html.dark [class*="hover:text-slate-900"]:hover {
  color: #f8fafc !important;
}

html.dark [class*="bg-blue-50"] {
  background-color: rgba(59, 130, 246, 0.18) !important;
}

html.dark input:not([type="submit"]),
html.dark textarea {
  color: #f1f5f9 !important;
}

html.dark input:not([type="submit"])::placeholder,
html.dark textarea::placeholder {
  color: #64748b !important;
}

/* Floating WhatsApp - compact left */
.whatsapp-float {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 52;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: linear-gradient(145deg, #25d366 0%, #128c7e 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    -8px 4px 22px rgba(37, 211, 102, 0.48),
    -3px 0 18px rgba(6, 182, 212, 0.3),
    0 6px 18px rgba(15, 23, 42, 0.16);
  animation: whatsapp-glow 2.5s ease-in-out infinite;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.whatsapp-float-icon {
  width: 20px;
  height: 20px;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  color: #fff;
}

.whatsapp-float:focus-visible {
  outline: 2px solid #06b6d4;
  outline-offset: 3px;
}

@keyframes whatsapp-glow {
  0%,
  100% {
    box-shadow:
      -8px 4px 22px rgba(37, 211, 102, 0.48),
      -3px 0 18px rgba(6, 182, 212, 0.28),
      0 6px 18px rgba(15, 23, 42, 0.14);
  }
  50% {
    box-shadow:
      -10px 5px 28px rgba(37, 211, 102, 0.58),
      -4px 0 22px rgba(6, 182, 212, 0.34),
      0 7px 20px rgba(15, 23, 42, 0.16);
  }
}

body.mobile-drawer-open .whatsapp-float,
body.mobile-drawer-open .theme-float {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
}

/* Theme toggle - compact right, soft glow (biased right) */
.theme-float {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 52;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(145deg, #60a5fa 0%, #06b6d4 100%);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    8px 4px 22px rgba(59, 130, 246, 0.5),
    3px 0 18px rgba(6, 182, 212, 0.32),
    0 6px 18px rgba(15, 23, 42, 0.16);
  animation: theme-glow 2.5s ease-in-out infinite;
  transition:
    transform 0.22s ease,
    background-color 0.22s ease,
    color 0.22s ease,
    opacity 0.25s ease;
}

.theme-float:hover {
  transform: scale(1.08);
  color: #ffffff;
}

.theme-float:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 3px;
}

.theme-float-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@keyframes theme-glow {
  0%,
  100% {
    box-shadow:
      8px 4px 22px rgba(59, 130, 246, 0.5),
      3px 0 18px rgba(6, 182, 212, 0.3),
      0 6px 18px rgba(15, 23, 42, 0.14);
  }
  50% {
    box-shadow:
      10px 5px 28px rgba(59, 130, 246, 0.6),
      4px 0 22px rgba(6, 182, 212, 0.36),
      0 7px 20px rgba(15, 23, 42, 0.16);
  }
}

html.dark .theme-float {
  background: linear-gradient(145deg, #f59e0b 0%, #f97316 100%);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  box-shadow:
    8px 4px 24px rgba(245, 158, 11, 0.55),
    3px 0 20px rgba(249, 115, 22, 0.36),
    0 6px 20px rgba(0, 0, 0, 0.35);
}

html.dark .theme-float:hover {
  color: #ffffff;
}

@media (min-width: 1024px) {
  .whatsapp-float {
    left: max(1.25rem, env(safe-area-inset-left));
    bottom: max(1.35rem, env(safe-area-inset-bottom));
    width: 2.625rem;
    height: 2.625rem;
  }

  .whatsapp-float-icon {
    width: 21px;
    height: 21px;
  }

  .theme-float {
    right: max(1.25rem, env(safe-area-inset-right));
    bottom: max(1.35rem, env(safe-area-inset-bottom));
    width: 2.625rem;
    height: 2.625rem;
  }

  .theme-float-icon {
    width: 19px;
    height: 19px;
  }
}

@media print {
  .whatsapp-float,
  .theme-float {
    display: none !important;
  }
}

/* Client logo marquee */
.logo-marquee {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.logo-marquee::before,
.logo-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  width: 72px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.logo-marquee::before {
  left: 0;
  background: linear-gradient(to right, rgba(248, 250, 252, 1), rgba(248, 250, 252, 0));
}

.logo-marquee::after {
  right: 0;
  background: linear-gradient(to left, rgba(248, 250, 252, 1), rgba(248, 250, 252, 0));
}

.logo-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  width: max-content;
  animation: logo-scroll 26s linear infinite;
}

.logo-marquee:hover .logo-marquee-track {
  animation-play-state: paused;
}

.logo-item {
  min-width: 160px;
  height: 58px;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.logo-item span {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: #334155;
  white-space: nowrap;
}

@keyframes logo-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

html.dark .logo-marquee {
  border-color: rgba(71, 85, 105, 0.55);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.94) 100%);
}

html.dark .logo-marquee::before {
  background: linear-gradient(to right, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0));
}

html.dark .logo-marquee::after {
  background: linear-gradient(to left, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0));
}

html.dark .logo-item {
  border-color: rgba(71, 85, 105, 0.55);
  background: rgba(30, 41, 59, 0.88);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

html.dark .logo-item span {
  color: #e2e8f0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .shape-float,
  .shape-float-delay,
  .shape-float-slow,
  .hero-glow {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card-hover:hover {
    transform: none;
  }

  .img-tile:hover,
  .img-tile:hover img {
    transform: none;
  }

  .mobile-drawer,
  .mobile-drawer-backdrop {
    transition: none;
  }

  .whatsapp-float {
    animation: none;
    box-shadow:
      -8px 4px 22px rgba(37, 211, 102, 0.42),
      -3px 0 18px rgba(6, 182, 212, 0.26),
      0 6px 18px rgba(15, 23, 42, 0.14);
  }

  .theme-float {
    animation: none;
    box-shadow:
      10px 5px 22px rgba(59, 130, 246, 0.18),
      4px 0 18px rgba(251, 191, 36, 0.1),
      0 6px 16px rgba(15, 23, 42, 0.06);
  }

  .logo-marquee-track {
    animation: none;
  }
}

