/* ============================================
   UBBIM Shared Design System
   Based on UBBIM Digital aesthetic
   ============================================ */

/* --- Base --- */
body {
  font-family: 'Inter', sans-serif;
  background: #01040f;
  color: #e2e8f0;
  overflow-x: hidden;
}

/* --- Noise Overlay --- */
.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* --- Aurora Background --- */
.aurora {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  top: 0;
  left: 0;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: aurora-float 20s infinite ease-in-out;
}

.aurora-blob:nth-child(1) {
  width: 500px;
  height: 500px;
  background: #0ea5e9;
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.aurora-blob:nth-child(2) {
  width: 400px;
  height: 400px;
  background: #8b5cf6;
  top: 40%;
  right: -10%;
  animation-delay: -5s;
}

.aurora-blob:nth-child(3) {
  width: 300px;
  height: 300px;
  background: #10b981;
  bottom: -10%;
  left: 30%;
  animation-delay: -10s;
}

@keyframes aurora-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, -50px) scale(1.1); }
  50% { transform: translate(-30px, 30px) scale(0.9); }
  75% { transform: translate(20px, 20px) scale(1.05); }
}

/* --- Typography --- */
.font-display { font-family: 'Space Grotesk', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

.text-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-agent {
  background: linear-gradient(135deg, #34d399 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-shine {
  background: linear-gradient(90deg, #34d399, #38bdf8, #818cf8, #c084fc, #34d399);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 8s linear infinite;
}

@keyframes shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* --- Glassmorphism --- */
.glass {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-strong {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Button Styles --- */
.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #10b981, #0ea5e9, #8b5cf6);
  background-size: 200% 200%;
  animation: gradient-shift 5s ease infinite;
  transition: all 0.3s ease;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -10px rgba(139, 92, 246, 0.4);
}

.btn-outline {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(14, 165, 233, 0.1), rgba(139, 92, 246, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-outline:hover::before {
  opacity: 1;
}

.btn-outline:hover {
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
}

/* --- Card Styles --- */
.service-card {
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(56, 189, 248, 0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* --- Grid Pattern --- */
.grid-pattern {
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

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

::-webkit-scrollbar-track {
  background: #01040f;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* --- Marquee --- */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  animation: marquee 30s linear infinite;
}

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

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* --- Line decoration --- */
.line-deco {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.3), transparent);
}

/* --- Status indicators --- */
.status-dot {
  animation: status-blink 2s ease-in-out infinite;
}

@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Page Header --- */
.page-header {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px;
}

/* --- Project Slideshow --- */
.project-slide {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  display: none;
}

.project-slide.active {
  display: block;
}

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

.project-slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(1,4,15,0.95) 0%, transparent 100%);
}

.slideshow-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.slideshow-nav button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slideshow-nav button.active,
.slideshow-nav button:hover {
  background: #0ea5e9;
  border-color: #0ea5e9;
}

.slideshow-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.slideshow-arrow {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(1, 4, 15, 0.8);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  pointer-events: all;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.slideshow-arrow:hover {
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  border-color: transparent;
}

/* --- Gallery --- */
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s ease;
}

.gallery-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.5rem;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* --- Awards Gallery --- */
.award-gallery-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.award-gallery-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

.award-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.award-gallery-item:hover img {
  transform: scale(1.08);
}

/* --- Quote Block --- */
.quote-block {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  position: relative;
}

.quote-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #0ea5e9, transparent);
}

/* --- Modal --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(1, 4, 15, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  max-width: 90vw;
  max-height: 90vh;
}

.modal-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #0ea5e9;
}

/* --- Client Logo --- */
.client-logo {
  opacity: 0.7;
  transition: all 0.4s ease;
  max-height: 100px;
  width: auto;
}

.client-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* --- Contact Map --- */
.contact-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(100%) invert(92%) contrast(83%);
}
