/* =========================
   ILIMBEK DEVELOPMENT
   Global Styles
========================= */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

section[id] {
  scroll-margin-top: 96px;
}

/* =========================
   Logo
========================= */

header img.logo {
  height: 56px !important;
  width: auto !important;
  max-height: none !important;
  max-width: none !important;
  display: block;
}

/* =========================
   Base Interaction
========================= */

a,
button,
input,
select,
textarea {
  transition:
    color 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease,
    opacity 0.22s ease;
}

nav a:hover {
  transform: translateY(-1px);
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
}

/* =========================
   Premium Card Feel
========================= */

.card-soft {
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.card-soft:hover {
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.10);
}

/* =========================
   Buttons
========================= */

.btn-lift:hover {
  transform: translateY(-2px);
}

.btn-lift:active {
  transform: translateY(0);
}

.btn-primary-soft {
  box-shadow: 0 12px 24px rgba(19, 127, 236, 0.18);
}

.btn-primary-soft:hover {
  box-shadow: 0 18px 30px rgba(19, 127, 236, 0.24);
}

/* =========================
   Inputs / Forms
========================= */

input,
select,
textarea {
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 4px rgba(19, 127, 236, 0.10);
}

/* =========================
   Reveal Animation Helpers
========================= */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.95s ease,
    transform 0.95s ease;
  will-change: opacity, transform;
}

.reveal.is-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; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

/* Header scroll state */
#site-main-header {
  box-shadow: 0 0 0 rgba(15, 23, 42, 0);
  transition:
    background-color 0.22s ease,
    backdrop-filter 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

#header-inner,
#header-logo,
#header-cta {
  transition: none;
}

#site-main-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

#site-main-header.is-scrolled #header-inner,
#site-main-header.is-scrolled #header-logo,
#site-main-header.is-scrolled #header-cta {
  transform: none;
}

.dark #site-main-header.is-scrolled {
  background: rgba(16, 25, 34, 0.88) !important;
  border-bottom-color: rgba(51, 65, 85, 0.85) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

/* =========================
   Portfolio Cards
========================= */

.portfolio-card {
  transition:
    transform .45s ease,
    box-shadow .35s ease,
    opacity .35s ease,
    filter .35s ease;
}

.portfolio-card.is-hiding {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  filter: blur(3px);
  pointer-events: none;
}

.portfolio-card.is-showing {
  animation: portfolioCardIn .5s ease forwards;
}

@keyframes portfolioCardIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* =========================
   Compare / Before After
========================= */

.compare-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
}

.compare-shell img {
  user-select: none;
  -webkit-user-drag: none;
}

.compare-label {
  position: absolute;
  top: 16px;
  z-index: 5;
  background: rgba(2, 6, 23, 0.75);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.compare-label.left {
  left: 16px;
}

.compare-label.right {
  right: 16px;
}

.compare-handle-knob {
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

/* =========================
   Infinite Project Marquee
========================= */

.project-marquee {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.project-marquee-track {
  display: flex;
  align-items: center;
  gap: 20px;
  width: max-content;
  animation: marqueeScroll 40s linear infinite;
}

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

.project-marquee-card {
  flex: 0 0 auto;
  width: 280px;
  height: 180px;
  overflow: hidden;
  border-radius: 18px;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #e5e7eb;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-marquee-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.project-marquee-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-marquee-card .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.04));
}

.project-marquee-card .title {
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
}

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

/* =========================
   Leaflet polish
========================= */

.leaflet-container {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.leaflet-control-zoom a {
  border-radius: 12px !important;
  overflow: hidden;
}

.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(8px);
  border-radius: 999px;
  margin: 10px !important;
  padding: 4px 10px !important;
}

.dark .leaflet-control-attribution {
  background: rgba(15, 23, 42, 0.65) !important;
  color: rgba(226, 232, 240, 0.85) !important;
}

/* =========================
   Selection
========================= */

::selection {
  background: rgba(19, 127, 236, 0.18);
}

/* =========================
   Reduced Motion
========================= */

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Premium header */
#site-main-header {
  box-shadow: 0 0 0 rgba(15, 23, 42, 0);
  transition:
    background-color 0.22s ease,
    backdrop-filter 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

#site-main-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.dark #site-main-header.is-scrolled {
  background: rgba(16, 25, 34, 0.88) !important;
  border-bottom-color: rgba(51, 65, 85, 0.85) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

#site-main-header .nav-link {
  position: relative;
}

#site-main-header .nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: #137fec;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

#site-main-header .nav-link:hover::after {
  transform: scaleX(1);
}

#site-main-header .nav-link.text-primary::after {
  transform: scaleX(1);
}

#header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(19, 127, 236, 0.22);
}

#mobile-menu {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-nav-link {
  display: block;
}

/* ---------- PAGE TRANSITION ---------- */
body {
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.page-ready {
  opacity: 1;
}

body.page-leaving {
  opacity: 0;
}

/* ---------- PARALLAX IMAGE HOVER ---------- */
.parallax-wrap {
  overflow: hidden;
  border-radius: inherit;
}

.parallax-media {
  will-change: transform;
  transform: scale(1.04);
  transition: transform 0.45s ease;
}

/* ---------- GLOW CARD ---------- */
.glow-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    background-color 0.35s ease;
}

.glow-card::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(19,127,236,0.18) 0%, rgba(19,127,236,0.08) 30%, rgba(19,127,236,0) 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.glow-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.10);
  border-color: rgba(19,127,236,0.22) !important;
}

.glow-card:hover::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  body,
  body.page-ready,
  body.page-leaving {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .parallax-media,
  .glow-card,
  .glow-card:hover {
    transform: none !important;
    transition: none !important;
  }

  .glow-card::after {
    display: none !important;
  }
} 

/* ---------- PORTFOLIO CARD PREMIUM ---------- */

.portfolio-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    background-color 0.35s ease;
}

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

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

.portfolio-card::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(19,127,236,0.18) 0%, rgba(19,127,236,0.08) 30%, rgba(19,127,236,0) 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 48px rgba(15, 23, 42, 0.14);
  border-color: rgba(19,127,236,0.25) !important;
}

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

/* =========================
   Scroll Progress Bar
========================= */

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg,#137fec,#3aa6ff);
  z-index: 999999;
  pointer-events: none;
}