/* ============================================
   SuperIBS - Stripe-Inspired Design System
   ============================================ */

/* CSS Custom Properties (Design Tokens) */
:root {
  /* Primary Brand Colors */
  --primary: #0A4D68;
  --primary-deep: #083D52;
  --primary-soft: #1A7A9E;
  --primary-press: #062F3F;

  /* Accent Colors (from logo) */
  --accent: #F5A623;
  --accent-soft: #FFC857;
  --accent-deep: #D4890F;

  /* Ink (Text) Colors */
  --ink: #0d253d;
  --ink-secondary: #273951;
  --ink-mute: #64748d;

  /* Surface Colors */
  --canvas: #ffffff;
  --canvas-soft: #f6f9fc;
  --canvas-cream: #FDF8F0;
  --hairline: #e3e8ee;
  --hairline-input: #a8c3de;

  /* Shadows */
  --shadow-sm: rgba(0, 55, 112, 0.08) 0 1px 3px;
  --shadow-md: rgba(0, 55, 112, 0.08) 0 8px 24px, rgba(0, 55, 112, 0.04) 0 2px 6px;
  --shadow-lg: rgba(0, 55, 112, 0.12) 0 16px 48px, rgba(0, 55, 112, 0.06) 0 4px 12px;

  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 300ms ease-out;
}

/* ============================================
   Base Styles
   ============================================ */

html {
  scroll-behavior: smooth;
}

body {
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
  background-color: var(--primary);
  color: var(--canvas);
}

/* Focus States */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================
   Navigation
   ============================================ */

#navbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--hairline);
  box-shadow: var(--shadow-sm);
}

.nav-link {
  position: relative;
  font-weight: 400;
  font-size: 15px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-base);
}

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

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background-color: var(--primary);
  color: var(--canvas);
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--radius-pill);
  transition: transform var(--transition-base),
              background-color var(--transition-base),
              box-shadow var(--transition-base);
}

.btn-primary:hover {
  background-color: var(--primary-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 77, 104, 0.25);
}

.btn-primary:active {
  background-color: var(--primary-press);
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background-color: var(--canvas);
  color: var(--primary);
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--primary);
  transition: transform var(--transition-base),
              background-color var(--transition-base),
              border-color var(--transition-base);
}

.btn-secondary:hover {
  background-color: var(--canvas-soft);
  border-color: var(--primary-soft);
  transform: translateY(-2px);
}

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

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* ============================================
   Hero Section - Background & Gradient Mesh
   ============================================ */

.hero-bg {
  /* Wide panoramic Dubai skyline with Burj Khalifa */
  background-image: url('https://images.unsplash.com/photo-1512453979798-5ea266f8880c?w=2400&q=80');
  background-size: 100% auto;
  background-position: center bottom;
  background-repeat: no-repeat;
  filter: grayscale(100%);
  opacity: 0.22;
  z-index: 1;
}

@media (max-width: 1024px) {
  .hero-bg {
    background-size: cover;
    background-position: center 70%;
  }
}

.gradient-mesh {
  background: linear-gradient(135deg,
    rgba(253, 248, 240, 0.7) 0%,
    rgba(255, 229, 196, 0.65) 15%,
    rgba(232, 213, 249, 0.65) 30%,
    rgba(197, 228, 243, 0.65) 45%,
    rgba(184, 230, 249, 0.65) 60%,
    rgba(212, 231, 250, 0.7) 75%,
    rgba(246, 249, 252, 0.75) 100%
  );
  z-index: 2;
}

/* Animated mesh effect */
.gradient-mesh::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(245, 166, 35, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 30%, rgba(10, 77, 104, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 80%, rgba(26, 122, 158, 0.08) 0%, transparent 50%);
  animation: meshPulse 8s ease-in-out infinite alternate;
}

@keyframes meshPulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* ============================================
   Dubai Skyline Background
   ============================================ */

.dubai-bg {
  background-image: url('https://images.unsplash.com/photo-1512453979798-5ea266f8880c?w=1920&q=80');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  filter: grayscale(100%);
  opacity: 0.12;
}

/* Light overlay to ensure content readability */
.dubai-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.5) 100%
  );
}

/* ============================================
   Animations
   ============================================ */

/* Fade Up Animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  opacity: 0;
  animation: fadeUp 0.5s ease-out forwards;
}

/* Scroll Animation (triggered by JS) */
.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow),
              transform var(--transition-slow);
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grid items */
.scroll-animate:nth-child(1) { transition-delay: 0ms; }
.scroll-animate:nth-child(2) { transition-delay: 50ms; }
.scroll-animate:nth-child(3) { transition-delay: 100ms; }
.scroll-animate:nth-child(4) { transition-delay: 150ms; }
.scroll-animate:nth-child(5) { transition-delay: 200ms; }
.scroll-animate:nth-child(6) { transition-delay: 250ms; }

/* ============================================
   Service Cards
   ============================================ */

.service-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-base);
}

.service-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   Value Cards (Why Us Section)
   ============================================ */

.value-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition-base),
              transform var(--transition-base);
}

.value-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ============================================
   Location Cards
   ============================================ */

.location-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base);
}

.location-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

/* ============================================
   Accordion (Additional Services)
   ============================================ */

.accordion-item {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: background-color var(--transition-fast);
}

.accordion-trigger:hover {
  background-color: var(--canvas-soft);
}

.accordion-trigger::-webkit-details-marker {
  display: none;
}

.accordion-content {
  padding: 0 20px 16px;
}

/* ============================================
   Form Inputs
   ============================================ */

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--ink);
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}

.form-input:hover {
  border-color: var(--hairline-input);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 77, 104, 0.1);
}

.form-input::placeholder {
  color: var(--ink-mute);
}

/* Select arrow */
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748d'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 44px;
}

/* ============================================
   Floating WhatsApp Button
   ============================================ */

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: transform var(--transition-base),
              box-shadow var(--transition-base);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* Pulse animation */
.whatsapp-float::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #25D366;
  animation: whatsappPulse 2s infinite;
  z-index: -1;
}

@keyframes whatsappPulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
  .gradient-mesh::before {
    background:
      radial-gradient(ellipse 100% 60% at 30% 20%, rgba(245, 166, 35, 0.12) 0%, transparent 50%),
      radial-gradient(ellipse 80% 50% at 70% 60%, rgba(10, 77, 104, 0.08) 0%, transparent 50%);
  }

  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
  }

  .service-card,
  .value-card,
  .location-card {
    padding: 20px;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  .whatsapp-float,
  #navbar,
  .gradient-mesh {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
