/* =========================
   RESET & VARIABLES
========================= */
*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Core Colors - High Contrast */
  --bg-color: #f0f4f8; /* Light grey-blue */
  --text-main: #020617; /* Deepest blue/black for max readability */
  --text-muted: #334155; /* Dark slate */
  
  /* Dropdown Backgrounds (Solid - No Blur on Container) */
  --dropdown-bg: #ffffff;
  
  /* Glass Effect Variables (Light Mode - VERY SUBTLE) */
  --glass-bg: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.03);
  --glass-blur: blur(12px);

  /* Brand Colors */
  --primary: #00b4d8;
  --primary-hover: #0096c7;
  --accent-glow: rgba(0, 180, 216, 0.25);

  /* Spacing */
  --radius: 24px;
  --container: 1140px;
}

[data-theme="dark"] {
  /* Dark Mode Palette */
  --bg-color: #0f172a; /* Deep Slate */
  --text-main: #ffffff; /* Pure white */
  --text-muted: #e2e8f0; /* Light grey */
  
  /* Dropdown Backgrounds (Solid) */
  --dropdown-bg: #1e293b; /* Slate 800 */

  /* Glass Effect Variables (Dark Mode) */
  --glass-bg: rgba(30, 41, 59, 0.6); 
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  
  --accent-glow: rgba(0, 180, 216, 0.4);
}

/* =========================
   AMBIENT BACKGROUND (The Orbs)
========================= */
.ambient-background {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -999; /* Pushed far back */
  overflow: hidden;
  background-color: var(--bg-color);
  transition: background-color 0.3s ease;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: floatOrb 10s infinite ease-in-out alternate;
}

/* Orb Colors */
.orb-1 {
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(0,180,216,0.4) 0%, rgba(0,0,0,0) 70%);
  top: -10%; left: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.3) 0%, rgba(0,0,0,0) 70%); /* Violet */
  bottom: -10%; right: -5%;
  animation-delay: -5s;
}

.orb-3 {
  width: 30vw; height: 30vw;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.3) 0%, rgba(0,0,0,0) 70%); /* Sky */
  top: 40%; left: 40%;
  opacity: 0.4;
  animation-duration: 15s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 50px); }
}

/* =========================
   BASE TYPOGRAPHY
========================= */
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin-top: 0;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }

p { margin-bottom: 1.5rem; color: var(--text-muted); }

.lead-text { font-size: 1.25rem; font-weight: 400; color: var(--text-main); }
.text-center { text-align: center; }

a { text-decoration: none; color: inherit; transition: 0.2s; }
img { max-width: 100%; display: block; height: auto; border-radius: var(--radius); }

/* ADD THIS BLOCK */
html {
  background-color: var(--bg-color);
  /* Ensures the canvas matches the theme, preventing white strips on mobile */
}
/* END OF ADDITION */

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =========================
   GLASS COMPONENTS
========================= */
/* Applies the glass effect to key containers */
.site-header, .card, .gallery-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* =========================
   HEADER & NAVIGATION
========================= */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  border-top: none; border-left: none; border-right: none;
  transition: background 0.3s ease;
  /* Promote to layer to avoid blur conflicts with dropdowns */
  transform: translateZ(0); 
}

.header-container {
  display: flex; justify-content: space-between; align-items: center;
  height: 72px; max-width: var(--container); margin: 0 auto; padding: 0 24px;
}

.brand {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em;
  color: var(--text-main);
}

.primary-nav { display: flex; gap: 32px; align-items: center; }
.nav-item { position: relative; height: 100%; display: flex; align-items: center; }

/* Nav Links - Updated Animation */
.nav-item > a { 
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-main); /* High contrast */
  padding: 0px 0;
  display: inline-block;
  position: relative;
  transition: color 0.25s ease;
}

.nav-item > a:hover,
.nav-item > a.active {
  color: var(--primary);
}

/* Animated underline */
.nav-item > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background-color: var(--primary);
  transition: width 0.25s ease;
}

.nav-item > a:hover::after,
.nav-item > a.active::after {
  width: 100%;
}

/* DROPDOWN MENU */
.dropdown {
  position: absolute; top: 180%; left: 0;
  width: 280px; padding: 12px;
  border-radius: 12px;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1100;
  
  /* SOLID BACKGROUND (No Blur on Container) */
  background: var(--dropdown-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  
  /* Ensure it has its own compositing layer */
  transform: translateY(10px) translateZ(0); 
}

/* Bridge to keep hover active */
.dropdown::before {
  content: ""; position: absolute; top: -20px; left: 0; width: 100%; height: 20px;
}

.nav-item:hover .dropdown, .dropdown:hover {
  opacity: 1; visibility: visible; 
  /* Reset transform but keep Z promotion */
  transform: translateY(0) translateZ(0); 
}

.dropdown ul { list-style: none; padding: 0; margin: 0; }
.dropdown li { margin-bottom: 4px; }

.dropdown a { 
  display: block; padding: 10px 16px; border-radius: 8px; 
  color: var(--text-main); font-size: 0.95rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* GLOW EFFECT ON HOVER (Glassmorphic Item) */
.dropdown a:hover { 
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary); 
  /* The Glassmorphic Glow */
  box-shadow: 0 0 15px var(--accent-glow);
  border: 0px solid var(--glass-border);
  text-shadow: 0 0 8px var(--accent-glow);
}

.header-actions { display: flex; align-items: center; gap: 1rem; }

.brochure-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 14px;
  border: 1px solid rgba(0, 180, 216, 0.55);
  border-radius: 999px;
  background: rgba(0, 180, 216, 0.10);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(0, 180, 216, 0.12);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.brochure-download-btn:hover,
.brochure-download-btn:focus-visible {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 22px var(--accent-glow);
  transform: translateY(-1px);
}

/* =========================
   THEME SWITCH
========================= */
.theme-switch {
  background: none; border: none; padding: 0; cursor: pointer;
  position: relative; width: 52px; height: 28px; border-radius: 14px;
  flex-shrink: 0; -webkit-tap-highlight-color: transparent;
}

.switch-track {
  position: absolute; inset: 0;
  background-color: rgba(120, 120, 120, 0.3);
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  transition: background-color 0.3s;
}

[data-theme="dark"] .switch-track { background-color: rgba(0, 0, 0, 0.4); }

.switch-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px;
  background-color: var(--text-main);
  border-radius: 50%;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
}

[data-theme="dark"] .switch-thumb { transform: translateX(24px); }

/* ICON FIX: Absolute centering inside thumb */
.switch-icon {
  width: 14px; height: 14px; 
  position: absolute;
  top: 50%; left: 50%;
  transition: opacity 0.3s, transform 0.4s;
  color: var(--bg-color); /* Icon matches track bg */
}

/* Light Mode: Sun visible */
.icon-sun { 
  opacity: 1; 
  transform: translate(-50%, -50%) rotate(0deg); 
}
.icon-moon { 
  opacity: 0; 
  transform: translate(-50%, -50%) rotate(-90deg); 
}

/* Dark Mode: Moon visible */
[data-theme="dark"] .icon-sun { 
  opacity: 0; 
  transform: translate(-50%, -50%) rotate(90deg); 
}
[data-theme="dark"] .icon-moon { 
  opacity: 1; 
  transform: translate(-50%, -50%) rotate(0deg); 
}


/* =========================
   HERO SECTION
========================= */
.hero-banner {
  position: relative; height: 80vh; min-height: 550px;
  display: flex; align-items: center; justify-content: flex-end;
  overflow: hidden; 
  margin-top: -73px; /* Pull up behind the transparent header */
  padding-top: 73px; /* Add padding to compensate */
}

.hero-banner-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: -2;
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  border-radius: 0; /* Removes the rounded corners */
}

.hero-overlay {
  position: absolute; inset: 0;
  /* Dark overlay for both modes to ensure white text readability */
  /* Gradient: Transparent on left, Dark Grey/Black on right */
  background: linear-gradient(to left, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 40%, transparent 100%);
  z-index: -1;
}

.hero-content {
  position: relative; z-index: 2;
  max-width: var(--container); width: 100%; padding: 0 24px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: flex-end; text-align: right;
  animation: fadeUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-content h1 { 
  font-size: 56px;
  /* Force white text in Hero to contrast with dark overlay */
  color: #ffffff;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.hero-content p {
  color: #e2e8f0; /* Light grey */
  font-weight: 500; 
  text-shadow: 0 2px 15px rgba(0,0,0,0.5);
}

.highlight-text { 
  background: linear-gradient(135deg, var(--primary), #4cc9f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Removed glow effect filter completely */
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================
   LAYOUT & GRID
========================= */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section-spacer { padding: 120px 0; }
.section-spacer-sm { padding: 60px 0; }

.grid { display: grid; gap: 40px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); gap: 24px; }
.align-center { align-items: center; }
.grid.gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 24px; }

/* Image Blocks */
.image-block img { width: 100%; display: block; }

/* =========================
   COMPONENTS: CARDS & BUTTONS
========================= */
.card {
  border-radius: var(--radius);
  padding: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(255,255,255,0.3);
}

.card-icon { font-size: 2.5rem; margin-bottom: 1rem; }

.gallery-card {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.gallery-card:hover { transform: translateY(-4px); border-color: var(--primary); }

/* Solution page product images */
.gallery-card img {
  width: 100%;
  height: 100%;
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
  object-position: center;
  border-radius: 0 !important;
  background: transparent;
}

.btn {
  display: inline-block; padding: 14px 32px;
  border-radius: 50px; font-weight: 600; font-size: 16px;
  transition: all 0.3s ease; text-align: center; border: none; cursor: pointer;
}

.btn-primary {
  background: rgba(0, 180, 216, 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
}
.btn-primary:hover {
  background: var(--primary);
  box-shadow: 0 8px 25px rgba(0, 180, 216, 0.6);
  transform: translateY(-2px);
}

.btn-white {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  border: 1px solid white;
}
.btn-white:hover {
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.feature-list { list-style: none; padding: 0; }
.feature-list li {
  padding-left: 28px; margin-bottom: 12px; position: relative; font-weight: 500;
  color: var(--text-main);
}
.feature-list li::before {
  content: "✓"; color: var(--primary);
  position: absolute; left: 0; font-weight: bold;
}

/* Images with Shadows */
.shadow-img {
  border-radius: var(--radius);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
}

/* =========================
   SPECIAL SECTIONS
========================= */
/* .bg-dark modified to be theme-adaptive */
.bg-dark {
  background: var(--glass-bg); /* Now switches between light/dark automatically */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  color: var(--text-main); /* Text now switches color automatically */
  margin: 0 24px; 
  padding: 40px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.bg-dark h2, .bg-dark p, .bg-dark .lead-text {
  color: var(--text-main); /* Ensures headers and text also adapt */
}

.bg-light { background: transparent; }

/* =========================
   PAGE HEADERS (SUBPAGES)
========================= */
.page-header {
  position: relative; padding: 140px 0 100px;
  text-align: center; overflow: hidden;
  margin-top: -73px;
  background-color: var(--bg-color);
}

.page-header-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: 0; opacity: 0.6;
  border-radius: 0; /* Removes the rounded corners */
}

.page-header-overlay {
  position: absolute; inset: 0;
  /* Gradient removed to eliminate the fade-to-bottom effect */
  background: none;
  z-index: 1;
}

.relative-content { position: relative; z-index: 2; }

/* Page Header Typography */
.page-header h1 { 
  color: var(--text-main); 
  margin-bottom: 20px; 
  font-size: 2.75rem;
  text-shadow: 0 0 20px rgba(255,255,255,0.8);
}
[data-theme="dark"] .page-header h1 {
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.page-header p { 
  font-size: 1.25rem; 
  max-width: 680px; 
  margin: 0 auto;
  text-shadow: 0 0 10px rgba(255,255,255,0.8);
}
[data-theme="dark"] .page-header p {
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* =========================
   FOOTER
========================= */
.site-footer {
  padding: 40px 0; text-align: center;
  color: var(--text-muted); font-size: 0.9rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.02); /* Slight tint */
  margin-top: 60px;
}

/* =========================
   RESPONSIVE
========================= */
.icon-btn { background: none; border: none; font-size: 1.5rem; color: var(--text-main); cursor: pointer; }
.mobile-only { display: none; }

@media (max-width: 960px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; gap: 32px; }
  .reverse-mobile .image-block { order: -1; }
  
  .hero-banner { justify-content: center; }
  .hero-content { align-items: center; text-align: center; }
  /* Vertical fade on mobile for readability */
  .hero-overlay { background: linear-gradient(to top, rgba(15,23,42,0.9), transparent); }
  .hero-content h1 { font-size: 2.5rem; }

  .mobile-only { display: block; }

  .header-actions {
    gap: 0.65rem;
  }

  .brochure-download-btn {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.68rem;
  }
  
  /* =========================================
     MOBILE MENU & DROPDOWN (Opaque & Adaptive)
     ========================================= */

  /* 1. Mobile Menu Container */
  .primary-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; 
    
    /* Solid, adaptive background (No Blur) */
    background-color: var(--bg-color); 
    backdrop-filter: none; 
    -webkit-backdrop-filter: none;
    
    padding: 24px; border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  }
  .primary-nav.open { display: flex; }
  .nav-item { width: 100%; display: block; height: auto; margin-bottom: 10px; }
  
  /* 2. Mobile Dropdowns */
  .dropdown { 
    position: static; width: 100%; opacity: 1; 
    visibility: visible; 
    
    /* Solid, adaptive background (No Blur) */
    background-color: var(--dropdown-bg) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    
    /* Card Styling */
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    
    transform: none; 
  }
  .dropdown::before { display: none; }
  
  /* Link Styling inside Dropdown */
  .dropdown a {
    padding-left: 12px;
    border-left: 3px solid var(--primary);
    margin-bottom: 4px;
    border-radius: 4px;
  }
}

/* =========================
   MOBILE RESPONSIVENESS FIXES
   (Font sizes, spacing, hero height, image adjustments)
========================= */
@media (max-width: 768px) {

  /* 1. Fix Typography Sizing */
  .hero-content h1 {
    font-size: 2.5rem; 
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }
  
  .page-header p {
    font-size: 1rem;
    padding: 0 16px;
  }

  /* 2. Reduce Excessive Spacing */
  .section-spacer {
    padding: 60px 0;
  }
  
  .section-spacer-sm {
    padding: 40px 0;
  }

  .card, .bg-dark {
    padding: 24px;
  }
  
  .container {
    padding: 0 20px;
  }

  /* 3. Hero Section Adjustments */
  .hero-banner {
    min-height: auto;
    height: auto;
    
    /* REMOVE Negative Margin so content starts AFTER the navbar gap */
    margin-top: 0;
    
    /* Adjust padding to standard size since we are no longer pulling it up */
    padding-top: 60px; 
    padding-bottom: 60px;
  }
  
  /* 3b. Hero Image Left Align */
  .hero-banner-img {
    object-position: left center; /* Left align the image */
  }

  .hero-content {
    align-items: center;
    text-align: center;
    padding: 0 20px;
  }
  
  .hero-overlay {
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.95) 100%);
  }

  /* 4. Page Header Height & Spacing Fix */
  .page-header {
    /* REMOVE Negative Margin */
    margin-top: 0;
    
    /* Standard Padding */
    padding: 60px 0 60px;
    
    /* Adds a clean space after the banner image before the next content starts */
    margin-bottom: 40px; 
  }

  /* 5. Grid Fixes */
  .grid.gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  /* 6. Square Crop for Specific Images */
  img[src*="home-5.png"],
  img[src*="home-6.png"],
  img[src*="sol-privacy-service-2.png"] {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .header-container {
    padding: 0 14px;
  }

  .header-actions {
    gap: 0.45rem;
  }

  .brand {
    font-size: 1.35rem;
  }

  .brochure-download-btn {
    padding: 6px 8px;
    font-size: 0.62rem;
  }

  .theme-switch {
    width: 48px;
    height: 26px;
  }

  .switch-thumb {
    width: 20px;
    height: 20px;
  }

  [data-theme="dark"] .switch-thumb {
    transform: translateX(22px);
  }
}
/* =========================
   PREMIUM MOTION FOUNDATION
   Safe enhancement layer: 3D cards, spotlight hover,
   button shine, reduced motion support

   NOTE: Scroll reveal was intentionally removed so the
   full page content feels loaded immediately while scrolling.
========================= */

/* 1. Premium 3D card + spotlight hover
   JS adds .motion-card only on desktop/fine pointer devices. */
.js-motion-enabled .motion-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transform-style: preserve-3d;
  transform:
    perspective(1000px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    translateY(var(--motion-lift, 0));
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease;
  will-change: transform;
}

.js-motion-enabled .motion-card > * {
  position: relative;
  z-index: 2;
}

.js-motion-enabled .motion-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  background:
    radial-gradient(
      420px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
      rgba(0, 180, 216, 0.22),
      rgba(255, 255, 255, 0.08) 28%,
      transparent 62%
    );
}

.js-motion-enabled[data-theme="dark"] .motion-card::before {
  background:
    radial-gradient(
      420px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
      rgba(0, 180, 216, 0.28),
      rgba(255, 255, 255, 0.06) 28%,
      transparent 64%
    );
}

.js-motion-enabled .motion-card:hover,
.js-motion-enabled .motion-card:focus-within {
  --motion-lift: -6px;
  border-color: rgba(0, 180, 216, 0.42);
  box-shadow:
    0 22px 50px rgba(2, 6, 23, 0.16),
    0 0 34px rgba(0, 180, 216, 0.16);
}

.js-motion-enabled[data-theme="dark"] .motion-card:hover,
.js-motion-enabled[data-theme="dark"] .motion-card:focus-within {
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.34),
    0 0 38px rgba(0, 180, 216, 0.22);
}

.js-motion-enabled .motion-card:hover::before,
.js-motion-enabled .motion-card:focus-within::before {
  opacity: 1;
}

/* Keep gallery cards premium without making product images look distorted. */
.js-motion-enabled .gallery-card.motion-card img {
  transform: translateZ(24px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), filter 0.28s ease;
}

.js-motion-enabled .gallery-card.motion-card:hover img {
  transform: translateZ(34px) scale(1.035);
  filter: drop-shadow(0 12px 18px rgba(0, 180, 216, 0.18));
}

/* 2. Button shine
   Works without JS and keeps existing button styles intact. */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn::after {
  content: "";
  position: absolute;
  inset: -40% -80%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-60%) rotate(18deg);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.16) 35%,
    rgba(255, 255, 255, 0.62) 50%,
    rgba(255, 255, 255, 0.16) 65%,
    transparent 100%
  );
}

.btn:hover::after,
.btn:focus-visible::after {
  opacity: 1;
  transform: translateX(60%) rotate(18deg);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

/* Better keyboard visibility for premium interactive elements. */
.btn:focus-visible,
.nav-item > a:focus-visible,
.dropdown a:focus-visible,
.theme-switch:focus-visible,
.icon-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

/* 3. Reduced-motion safety
   Respects OS accessibility settings and keeps the site steady. */
.reduce-motion .motion-card,
.reduce-motion .motion-card:hover,
.reduce-motion .motion-card:focus-within {
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .orb {
    animation: none !important;
  }

  .js-motion-enabled .motion-card,
  .js-motion-enabled .motion-card:hover,
  .js-motion-enabled .motion-card:focus-within {
    transform: none !important;
  }

  .btn::after,
  .motion-card::before {
    display: none !important;
  }
}

/* Touch devices should stay clean and stable; hover-only effects remain desktop-first. */
@media (hover: none), (pointer: coarse) {
  .js-motion-enabled .motion-card,
  .js-motion-enabled .motion-card:hover,
  .js-motion-enabled .motion-card:focus-within {
    transform: none;
  }

  .js-motion-enabled .motion-card::before {
    display: none;
  }
}

/* =========================
   HOME PAGE: PROJECT SHOWCASE
========================= */
.project-showcase-section {
  position: relative;
  overflow: hidden;
}

.project-showcase-section::before,
.project-showcase-section::after {
  content: "";
  position: absolute;
  left: 50%;
  width: min(980px, calc(100% - 48px));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(0, 180, 216, 0.65), transparent);
  pointer-events: none;
}

.project-showcase-section::before { top: 36px; }
.project-showcase-section::after { bottom: 36px; }

.section-header {
  margin-bottom: 40px;
}

.section-header p {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.08rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  padding: 14px;
  overflow: hidden;
  border-color: rgba(0, 180, 216, 0.20);
}

.project-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.18);
}

.project-card-content {
  padding: 20px 6px 8px;
}

.project-card h3 {
  color: var(--primary);
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 12px;
}

.project-card h3 span {
  display: block;
}

.project-card p {
  color: var(--text-main);
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-showcase-section::before { top: 22px; }
  .project-showcase-section::after { bottom: 22px; }

  .project-card {
    padding: 12px;
  }

  .project-card-content {
    padding: 18px 4px 8px;
  }

  .project-card h3 span {
    display: inline;
  }
}
