/* ============================================
   AE Electrical Installation — Custom Styles
   ============================================ */

/* CSS Custom Properties */
:root {
  --bg-deep: #0a0e13;
  --bg-surface: #111820;
  --bg-raised: #1a2332;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(0,168,232,0.25);

  --primary: #00a8e8;
  --primary-dim: #0077a8;
  --primary-glow: rgba(0,168,232,0.12);
  --primary-bg: rgba(0,168,232,0.06);

  --tertiary: #f0963a;
  --tertiary-dim: #c57a2e;
  --tertiary-glow: rgba(240,150,58,0.12);
  --tertiary-bg: rgba(240,150,58,0.06);

  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.65);
  --text-muted: rgba(255,255,255,0.35);
}

/* Base */
body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* Grain Overlay — subtle film grain, not pixel noise */
.grain-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.018;
  mix-blend-mode: overlay;
}

/* Logo — clean PNG with transparent bg */
.nav-logo {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 0px transparent);
}

.nav-logo:hover {
  filter: drop-shadow(0 0 8px rgba(0,168,232,0.6)) drop-shadow(0 0 20px rgba(0,168,232,0.3));
  transform: scale(1.05);
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(0,168,232,0.3)); }
  50% { filter: drop-shadow(0 0 12px rgba(0,168,232,0.6)) drop-shadow(0 0 24px rgba(0,168,232,0.2)); }
}

.nav-main.scrolled .nav-logo {
  animation: logoPulse 3s ease-in-out infinite;
}

.footer-logo {
  filter: brightness(0.5) grayscale(0.4);
  opacity: 0.6;
  transition: all 0.4s ease;
}

.footer-logo:hover {
  filter: brightness(0.8) grayscale(0);
  opacity: 0.9;
}

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* Grid Dots Pattern */
.grid-dots {
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* ============================================
   Hero Styles
   ============================================ */

/* Hero Slider (Ken Burns) */
.hero-slider {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  animation: kenBurns 25s ease-in-out infinite alternate;
}

.hero-slide.active {
  opacity: 1;
}

@keyframes kenBurns {
  0%   { transform: scale(1.0); }
  100% { transform: scale(1.12) translate(-1%, -0.5%); }
}

/* Hero Overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,14,19,0.3) 0%,
    rgba(10,14,19,0.5) 50%,
    rgba(10,14,19,0.95) 100%
  );
  z-index: 2;
}

/* Parallax Hero (inner pages) */
.hero-parallax {
  position: relative;
  overflow: hidden;
}

.hero-parallax-bg {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.hero-gradient-teal {
  background: linear-gradient(to bottom, rgba(10,14,19,0.4) 0%, rgba(0,168,232,0.08) 50%, rgba(10,14,19,0.95) 100%);
}

.hero-gradient-orange {
  background: linear-gradient(to bottom, rgba(10,14,19,0.4) 0%, rgba(240,150,58,0.08) 50%, rgba(10,14,19,0.95) 100%);
}

/* Scroll Indicator */
.scroll-indicator {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50%      { transform: translateX(-50%) translateY(8px); opacity: 0.8; }
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */

[data-animate] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

[data-animate="slide-left"] {
  transform: translateX(-60px);
}

[data-animate="slide-right"] {
  transform: translateX(60px);
}

[data-animate="scale"] {
  transform: scale(0.9);
  opacity: 0;
}

/* Stagger delays */
[data-animate-delay="1"] { transition-delay: 0.1s; }
[data-animate-delay="2"] { transition-delay: 0.2s; }
[data-animate-delay="3"] { transition-delay: 0.3s; }
[data-animate-delay="4"] { transition-delay: 0.4s; }

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

.nav-main {
  background: rgba(10,14,19,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.nav-main.scrolled {
  background: rgba(10,14,19,0.95);
  border-bottom-color: rgba(0,168,232,0.08);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.nav-link {
  position: relative;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

/* Services Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(17,24,32,0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  padding: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  font-size: 13px;
}

.nav-dropdown-item:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

/* Burger Menu */
.burger-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 46;
}

.burger-line {
  width: 24px;
  height: 2px;
  background: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.burger-btn.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-btn.active .burger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.burger-btn.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu — compact dropdown */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  max-height: 100dvh;
  z-index: 45;
  background: rgba(10,14,19,0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 40px rgba(0,0,0,0.5);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Mobile menu backdrop */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: white;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

.mobile-menu.open a:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateX(0); }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: translateX(0); }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateX(0); }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.25s; opacity: 1; transform: translateX(0); }
.mobile-menu.open a:nth-child(5) { transition-delay: 0.3s; opacity: 1; transform: translateX(0); }
.mobile-menu.open a:nth-child(6) { transition-delay: 0.35s; opacity: 1; transform: translateX(0); }
.mobile-menu.open a:nth-child(7) { transition-delay: 0.4s; opacity: 1; transform: translateX(0); }

.mobile-menu a:hover {
  color: var(--primary);
}

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

.service-card {
  position: relative;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-hover);
  box-shadow:
    0 0 0 1px rgba(0,168,232,0.15),
    0 8px 40px rgba(0,168,232,0.06),
    inset 0 1px 0 rgba(255,255,255,0.05);
  transform: translateY(-4px);
}

.service-card .card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(1) brightness(0.3);
  opacity: 0.15;
  transform: scale(1.0);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .card-bg {
  filter: grayscale(0.3) brightness(0.4);
  opacity: 0.35;
  transform: scale(1.1);
}

.service-card .card-icon {
  transition: filter 0.3s ease;
}

.service-card:hover .card-icon {
  filter: drop-shadow(0 0 12px rgba(0,168,232,0.4));
}

/* Orange variant for residential */
.service-card-orange:hover {
  border-color: rgba(240,150,58,0.3);
  box-shadow:
    0 0 0 1px rgba(240,150,58,0.15),
    0 8px 40px rgba(240,150,58,0.06),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.service-card-orange:hover .card-icon {
  filter: drop-shadow(0 0 12px rgba(240,150,58,0.4));
}

/* Filter Tabs */
.filter-tab {
  padding: 8px 20px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.filter-tab:hover {
  color: var(--text-secondary);
}

.filter-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Filter animation */
.filter-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.filter-item.hidden {
  opacity: 0;
  transform: scale(0.95);
  position: absolute;
  pointer-events: none;
}

/* ============================================
   Contact Form
   ============================================ */

.form-input {
  background: transparent !important;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: #fff !important;
  padding: 12px 0;
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-bottom-color: var(--primary);
  box-shadow: 0 2px 12px var(--primary-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  background: transparent !important;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: #fff !important;
  padding: 12px 0;
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: border-color 0.3s ease;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.form-select option {
  background: var(--bg-surface);
  color: white;
}

.form-select:focus {
  outline: none;
  border-bottom-color: var(--primary);
  box-shadow: 0 2px 12px var(--primary-glow);
}

/* Success state */
.form-success {
  display: none;
  text-align: center;
  padding: 60px 20px;
  animation: fadeInUp 0.6s ease-out;
}

.form-success.show {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Timeline (about.html)
   ============================================ */

.timeline {
  position: relative;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
}

.timeline-item:nth-child(odd) {
  margin-left: 0;
  text-align: right;
  padding-right: 60px;
}

.timeline-item:nth-child(even) {
  margin-left: 50%;
  text-align: left;
  padding-left: 60px;
}

.timeline-node {
  position: absolute;
  top: 28px;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--bg-deep);
  box-shadow: 0 0 12px var(--primary-glow);
}

.timeline-item:nth-child(odd) .timeline-node {
  right: -7px;
}

.timeline-item:nth-child(even) .timeline-node {
  left: -7px;
}

/* Mobile timeline */
@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }
  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    text-align: left;
    padding-left: 50px;
    padding-right: 20px;
  }
  .timeline-item:nth-child(odd) .timeline-node,
  .timeline-item:nth-child(even) .timeline-node {
    left: 13px;
    right: auto;
  }
}

/* ============================================
   Circuit Trace Divider
   ============================================ */

.circuit-divider {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.circuit-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(0,168,232,0.2) 20%,
    rgba(0,168,232,0.2) 80%,
    transparent 100%
  );
}

.circuit-divider::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ============================================
   Button Styles — Clipped corners + glow
   ============================================ */

.btn-primary {
  position: relative;
  background: transparent;
  color: white;
  padding: 14px 36px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  z-index: -1;
  transition: all 0.4s ease;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent 50%, rgba(255,255,255,0.1));
  z-index: -1;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 30px var(--primary-glow),
    0 0 0 1px rgba(0,168,232,0.3);
}

.btn-primary:hover::before {
  background: var(--primary-dim);
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary .btn-arrow {
  transition: transform 0.2s ease;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-orange::before {
  background: var(--tertiary);
}

.btn-orange:hover {
  box-shadow:
    0 8px 30px var(--tertiary-glow),
    0 0 0 1px rgba(240,150,58,0.3);
}

.btn-orange:hover::before {
  background: var(--tertiary-dim);
}

.btn-outline {
  position: relative;
  background: transparent;
  color: white;
  padding: 14px 36px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  z-index: 1;
}

.btn-outline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  z-index: -1;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  color: var(--primary);
}

.btn-outline:hover::before {
  border-color: var(--primary);
  background: var(--primary-bg);
  box-shadow: 0 0 20px var(--primary-glow);
}

/* ============================================
   Accent Bar
   ============================================ */

.accent-bar {
  width: 48px;
  height: 2px;
  background: var(--primary);
}

.accent-bar-orange {
  background: var(--tertiary);
}

/* ============================================
   Animated Section Headers
   ============================================ */

.section-header {
  position: relative;
  display: inline-block;
}

.section-header .section-subtitle {
  font-size: 10px;
  font-family: 'Inter', monospace;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.section-header .section-subtitle::before,
.section-header .section-subtitle::after {
  content: '';
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--primary));
  opacity: 0.4;
}

.section-header .section-subtitle::after {
  background: linear-gradient(to left, transparent, var(--primary));
}

.section-header h2 {
  position: relative;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--primary);
  margin: 16px auto 0;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px var(--primary-glow);
}

.section-header:hover h2::after {
  width: 120px;
}

/* ============================================
   Value Cards (about.html) — with scan effect
   ============================================ */

.value-card {
  position: relative;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  padding: 40px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  overflow: hidden;
}

.value-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 15px var(--primary);
  opacity: 0;
  transform: translateY(0);
  transition: opacity 0.3s ease;
}

.value-card:hover::before {
  opacity: 1;
  animation: valueScan 1.2s ease-in-out;
}

@keyframes valueScan {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.6; }
  100% { transform: translateY(200px); opacity: 0; }
}

.value-card:hover {
  border-color: var(--border-hover);
  box-shadow:
    0 0 30px var(--primary-glow),
    inset 0 1px 0 rgba(255,255,255,0.04);
  transform: translateY(-6px);
}

.value-card .value-icon {
  transition: all 0.4s ease;
}

.value-card:hover .value-icon {
  filter: drop-shadow(0 0 12px rgba(0,168,232,0.5));
  transform: scale(1.1);
}

/* ============================================
   Unified Panel — Laser Slice Effect
   ============================================ */

.unified-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 500px;
}

/* HUD top bar spanning full width */
.panel-header {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
}

.panel-sys {
  font-family: 'Inter', monospace;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.6;
}

.panel-sys-r { color: var(--tertiary) !important; }

.panel-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2ecc71;
  display: inline-block;
  animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; box-shadow: 0 0 6px rgba(46,204,113,0.4); }
}

/* Two background halves — meet exactly at the slice line */
.panel-bg-left {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.6) brightness(0.18);
  clip-path: polygon(0 0, 55% 0, 45% 100%, 0 100%);
  transition: filter 0.6s ease, clip-path 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.unified-panel:hover .panel-bg-left {
  filter: grayscale(0.3) brightness(0.22);
  clip-path: polygon(0 0, 54% 0, 44% 100%, 0 100%);
}

.panel-bg-right {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.6) brightness(0.18);
  clip-path: polygon(55% 0, 100% 0, 100% 100%, 45% 100%);
  transition: filter 0.6s ease, clip-path 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.unified-panel:hover .panel-bg-right {
  filter: grayscale(0.3) brightness(0.22);
  clip-path: polygon(56% 0, 100% 0, 100% 100%, 46% 100%);
  transform: translateY(4px);
}

/* Color overlays on each half */
.panel-overlay-left {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,168,232,0.12) 0%, transparent 60%);
  clip-path: polygon(0 0, 55% 0, 45% 100%, 0 100%);
  pointer-events: none;
  transition: clip-path 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.unified-panel:hover .panel-overlay-left {
  clip-path: polygon(0 0, 54% 0, 44% 100%, 0 100%);
}
.panel-overlay-right {
  position: absolute;
  inset: 0;
  background: linear-gradient(225deg, rgba(240,150,58,0.12) 0%, transparent 60%);
  clip-path: polygon(55% 0, 100% 0, 100% 100%, 45% 100%);
  pointer-events: none;
  transition: clip-path 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.unified-panel:hover .panel-overlay-right {
  clip-path: polygon(56% 0, 100% 0, 100% 100%, 46% 100%);
  transform: translateY(4px);
}

/* ---- GLOWING SLICE LINE — follows exact clip-path diagonal ---- */
.panel-slice {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

/* The glow line — uses same diagonal as the clip-path: 55% top → 45% bottom */
.panel-slice::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    transparent 3%,
    var(--primary) 15%,
    rgba(0,168,232,0.8) 35%,
    rgba(200,220,255,1) 50%,
    rgba(240,150,58,0.8) 65%,
    var(--tertiary) 85%,
    transparent 97%
  );
  clip-path: polygon(calc(55% - 1px) 0, calc(55% + 1px) 0, calc(45% + 1px) 100%, calc(45% - 1px) 100%);
  filter: drop-shadow(0 0 6px rgba(0,168,232,0.6)) drop-shadow(0 0 20px rgba(0,168,232,0.3));
  animation: slicePulse 3s ease-in-out infinite;
  transition: clip-path 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s ease;
}
.unified-panel:hover .panel-slice::after {
  clip-path: polygon(calc(55% - 2px) 0, calc(55% + 2px) 0, calc(45% + 2px) 100%, calc(45% - 2px) 100%);
  filter: drop-shadow(0 0 10px rgba(0,168,232,0.8)) drop-shadow(0 0 30px rgba(0,168,232,0.4));
}

/* Wider glow aura behind the line */
.panel-slice::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    transparent 5%,
    rgba(0,168,232,0.15) 30%,
    rgba(200,220,255,0.2) 50%,
    rgba(240,150,58,0.15) 70%,
    transparent 95%
  );
  clip-path: polygon(calc(55% - 8px) 0, calc(55% + 8px) 0, calc(45% + 8px) 100%, calc(45% - 8px) 100%);
  opacity: 0.5;
  transition: clip-path 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease;
}
.unified-panel:hover .panel-slice::before {
  clip-path: polygon(calc(55% - 14px) 0, calc(55% + 14px) 0, calc(45% + 14px) 100%, calc(45% - 14px) 100%);
  opacity: 0.8;
}

/* Spark — hidden (clip-path approach doesn't support traveling spark) */
.panel-spark {
  display: none;
}

@keyframes slicePulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes sparkTravel {
  0% { top: -5%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 105%; opacity: 0; }
}

/* Scan line across full panel */
.panel-scan {
  position: absolute;
  top: -2px;
  left: 0; right: 0;
  height: 2px;
  z-index: 6;
  background: linear-gradient(90deg, transparent 10%, var(--primary) 40%, var(--tertiary) 60%, transparent 90%);
  box-shadow: 0 0 20px var(--primary), 0 0 40px rgba(0,168,232,0.2);
  opacity: 0;
}
.unified-panel:hover .panel-scan {
  opacity: 1;
  animation: panelScanDown 2s ease-in-out infinite;
}
@keyframes panelScanDown {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.6; }
  100% { transform: translateY(500px); opacity: 0; }
}

/* Content — two columns */
.panel-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 440px;
}

.panel-side {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}
.panel-side:first-child { padding-right: 60px; }
.panel-side:last-child { padding-left: 60px; }

.panel-side:hover .panel-icon {
  filter: drop-shadow(0 0 14px rgba(0,168,232,0.5));
  transform: scale(1.1);
}
.panel-side.orange:hover .panel-icon {
  filter: drop-shadow(0 0 14px rgba(240,150,58,0.5));
}

.panel-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  transition: all 0.4s ease;
}

.panel-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: white;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.panel-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.panel-specs {
  list-style: none;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.panel-specs li {
  font-size: 11px;
  color: var(--text-muted);
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-specs li .material-symbols-outlined {
  font-size: 14px;
}

.panel-link {
  margin-top: 16px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease;
}
.panel-side:hover .panel-link { color: var(--primary); }
.panel-side.orange:hover .panel-link { color: var(--tertiary); }
.panel-link .material-symbols-outlined {
  font-size: 14px;
  transition: transform 0.2s ease;
}
.panel-side:hover .panel-link .material-symbols-outlined {
  transform: translateX(4px);
}

/* Partner badge — text-based logo */
.partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}
.partner-badge:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.04);
}
.partner-logo-text {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  font-style: italic;
  letter-spacing: -0.02em;
}
.partner-logo-text .tig {
  color: #b0b0b0;
}
.partner-logo-text .montazh {
  color: #e8b230;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
  .unified-panel {
    min-height: auto;
  }
  .panel-content {
    grid-template-columns: 1fr;
  }
  .panel-side {
    justify-content: flex-start;
  }
  .panel-side:first-child,
  .panel-side:last-child {
    padding: 30px 24px;
  }
  .panel-bg-left {
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
  }
  .panel-bg-right {
    clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
  }
  .panel-overlay-left {
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
  }
  .panel-overlay-right {
    clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
  }
  .panel-slice::after {
    clip-path: polygon(0 calc(50% - 1px), 100% calc(50% - 1px), 100% calc(50% + 1px), 0 calc(50% + 1px));
  }
  .panel-slice::before {
    clip-path: polygon(0 calc(50% - 6px), 100% calc(50% - 6px), 100% calc(50% + 6px), 0 calc(50% + 6px));
  }
}

/* ============================================
   Floating particles animation
   ============================================ */

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-12px) rotate(1deg); }
  66% { transform: translateY(-6px) rotate(-1deg); }
}

.float-anim {
  animation: float 6s ease-in-out infinite;
}

.float-anim-delay {
  animation: float 6s ease-in-out infinite 2s;
}

/* Typing cursor animation for subtitles */
@keyframes cursorBlink {
  0%, 50% { border-right-color: var(--primary); }
  51%, 100% { border-right-color: transparent; }
}

/* Nav link hover underline animation */
.nav-link::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
  box-shadow: 0 0 8px var(--primary-glow);
}

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

/* ============================================
   Project Gallery Cards
   ============================================ */

.project-gallery {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-gallery:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 40px rgba(0,168,232,0.06);
}

/* Main image */
.project-gallery .gallery-main {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.project-gallery .gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85) saturate(0.9);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-gallery:hover .gallery-main img {
  filter: brightness(0.95) saturate(1);
  transform: scale(1.04);
}

.project-gallery .gallery-main::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--bg-surface) 100%);
  pointer-events: none;
}

/* Thumbnail strip */
.gallery-thumbs {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--bg-deep);
}

.gallery-thumbs img {
  flex: 1;
  height: 56px;
  object-fit: cover;
  filter: brightness(0.5) grayscale(0.6);
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 0;
}

.gallery-thumbs img:hover {
  filter: brightness(0.8) grayscale(0);
}

.gallery-thumbs img.active {
  filter: brightness(0.9) grayscale(0);
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Project info area */
.project-gallery .gallery-info {
  padding: 20px 24px 24px;
}

/* Orange variant for residential */
.project-gallery-orange:hover {
  border-color: rgba(240,150,58,0.3);
  box-shadow: 0 8px 40px rgba(240,150,58,0.06);
}

.project-gallery-orange .gallery-thumbs img.active {
  outline-color: var(--tertiary);
}

/* Gallery thumbnail click - main image swap */
.gallery-main img {
  will-change: opacity;
}

@media (max-width: 768px) {
  .gallery-thumbs img {
    height: 40px;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    animation: none;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
    transition: opacity 0.3s ease;
  }

  .scroll-indicator {
    animation: none;
  }

  .service-card,
  .project-card img,
  .split-card .split-bg {
    transition-duration: 0.2s;
  }

  .service-card:hover,
  .value-card:hover {
    transform: none;
  }
}

/* ============================================
   Tagline Banner
   ============================================ */

.tagline-banner {
  position: relative;
  overflow: hidden;
}

.tagline-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--primary) 20%,
    var(--tertiary) 50%,
    var(--primary) 80%,
    transparent 100%
  );
  opacity: 0.4;
}

.tagline-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--primary) 20%,
    var(--tertiary) 50%,
    var(--primary) 80%,
    transparent 100%
  );
  opacity: 0.4;
}

/* ============================================
   Glowing Accent Separator
   ============================================ */

.glow-separator {
  position: relative;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--primary) 30%,
    var(--primary) 70%,
    transparent
  );
  opacity: 0.3;
}

.glow-separator::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 9px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(0,168,232,0.15),
    transparent
  );
  filter: blur(4px);
}

/* ============================================
   Focus States
   ============================================ */

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
