/* ============================================
   LaviTech — Shared Styles
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg-deep: #070e1a;
  --bg-primary: #0a1628;
  --bg-card: #0f1f3d;
  --bg-card-hover: #142850;
  --accent-gold: #d4a843;
  --accent-gold-light: #f0d078;
  --accent-blue: #2a5298;
  --accent-blue-light: #3a6bc5;
  --text-primary: #ffffff;
  --text-secondary: #8a9bb8;
  --text-muted: #5a6a82;
  --border-subtle: rgba(212, 168, 67, 0.15);
  --border-glow: rgba(212, 168, 67, 0.4);
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Theme Variants --- */
body.theme-light {
  --bg-deep: #f7f8fb;
  --bg-primary: #ffffff;
  --bg-card: #f2f5fb;
  --bg-card-hover: #e4ecf8;
  --accent-gold: #b58f3d;
  --accent-gold-light: #f1d58b;
  --accent-blue: #1b4f8c;
  --accent-blue-light: #3f79c6;
  --text-primary: #111827;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-subtle: rgba(79, 70, 229, 0.12);
  --border-glow: rgba(79, 70, 229, 0.3);
}

body.theme-dark {
  --bg-deep: #050812;
  --bg-primary: #070d1e;
  --bg-card: #0d1733;
  --bg-card-hover: #14244e;
  --accent-gold: #d4a843;
  --accent-gold-light: #f7d57e;
  --accent-blue: #4d7ffa;
  --accent-blue-light: #7aa1ff;
  --text-primary: #eef2ff;
  --text-secondary: #a5b4fc;
  --text-muted: #c7d2fe;
  --border-subtle: rgba(77, 93, 240, 0.16);
  --border-glow: rgba(102, 126, 234, 0.35);
}

body.theme-neon {
  --bg-deep: #04070f;
  --bg-primary: #060f1d;
  --bg-card: rgba(11, 26, 56, 0.95);
  --bg-card-hover: rgba(20, 40, 88, 0.95);
  --accent-gold: #f0c94f;
  --accent-gold-light: #ffe79c;
  --accent-blue: #3de0ff;
  --accent-blue-light: #78d6ff;
  --text-primary: #f5faff;
  --text-secondary: #9ad9ff;
  --text-muted: #83c8ff;
  --border-subtle: rgba(61, 224, 255, 0.18);
  --border-glow: rgba(61, 224, 255, 0.4);
}

body.theme-neon::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(61, 224, 255, 0.18), transparent 18%),
    radial-gradient(circle at 80% 15%, rgba(245, 130, 255, 0.14), transparent 18%),
    radial-gradient(circle at 50% 80%, rgba(253, 255, 107, 0.12), transparent 24%);
  animation: neonLights 12s ease-in-out infinite;
}

@keyframes neonLights {
  0%, 100% { background-position: 0% 0%, 100% 15%, 50% 80%; }
  50% { background-position: 10% 10%, 90% 20%, 55% 75%; }
}

.theme-neon .hero-gradient {
  background:
    radial-gradient(circle at 20% 25%, rgba(61, 224, 255, 0.2), transparent 18%),
    radial-gradient(circle at 80% 15%, rgba(245, 130, 255, 0.18), transparent 18%),
    radial-gradient(circle at 50% 75%, rgba(255, 255, 107, 0.12), transparent 20%),
    linear-gradient(180deg, rgba(4, 7, 15, 0.95), rgba(6, 15, 29, 0.98));
  animation: neonPulse 8s ease-in-out infinite alternate;
}

@keyframes neonPulse {
  from { transform: scale(1); }
  to { transform: scale(1.02); }
}

/* --- Base Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* --- Image Protection --- */
.image-container {
  position: relative;
}
.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 10;
  cursor: default;
  border-radius: inherit;
}
ul { list-style: none; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); }

/* --- Selection --- */
::selection { background: var(--accent-gold); color: var(--bg-deep); }

/* --- Navigation --- */
.nav-glass {
  background: rgba(7, 14, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}
.nav-glass.scrolled {
  background: rgba(7, 14, 26, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.nav-link {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s;
  padding: 4px 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--accent-gold); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.theme-switcher {
  position: relative;
}

.theme-switcher-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 140px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.theme-switcher-button:hover,
.theme-switcher-button.active {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.theme-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.75rem);
  width: 14rem;
  padding: 0.5rem 0;
  border-radius: 1.25rem;
  background: rgba(7, 14, 26, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  z-index: 40;
}

.theme-dropdown.hidden {
  display: none;
}

.theme-option {
  width: 100%;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  background: transparent;
  border: none;
  text-align: left;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.theme-option:hover,
.theme-option.active {
  background: rgba(212, 168, 67, 0.12);
  color: var(--accent-gold);
}

.theme-switcher-mobile .theme-dropdown {
  position: relative;
  right: auto;
  top: 0.75rem;
  width: 100%;
}

.theme-switcher-mobile .theme-switcher-button {
  width: 100%;
  justify-content: space-between;
}

/* --- Hero Sections --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  perspective: 1200px;
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(42, 82, 152, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(212, 168, 67, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(10, 22, 40, 0.9) 0%, transparent 60%);
  z-index: 1;
}

/* --- 3D Floating Logo --- */
.logo-3d-float {
  animation: logoFloat 6s ease-in-out infinite;
  transform-style: preserve-3d;
  filter: drop-shadow(0 20px 40px rgba(212, 168, 67, 0.2));
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotateY(0deg) rotateX(0deg); }
  25% { transform: translateY(-15px) rotateY(5deg) rotateX(3deg); }
  50% { transform: translateY(-8px) rotateY(-3deg) rotateX(-2deg); }
  75% { transform: translateY(-20px) rotateY(4deg) rotateX(2deg); }
}

/* --- Typewriting --- */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--accent-gold);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: cursorBlink 0.8s infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- 3D Card Tilt --- */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}
.tilt-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(212, 168, 67, 0.1);
}
.tilt-card .tilt-inner {
  transform: translateZ(30px);
  transition: transform 0.15s ease-out;
}

/* --- 3D Flip Card --- */
.flip-card { perspective: 1000px; cursor: pointer; }
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
}
.flip-card-back { transform: rotateY(180deg); }

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(80px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}
/* Stagger delay classes */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }
.stagger-8 { transition-delay: 0.8s; }

/* --- Floating Particles --- */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(0) scale(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1); }
}

/* --- Rotating Border --- */
.rotating-border {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}
.rotating-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 0deg, transparent, var(--accent-gold), transparent, var(--accent-blue), transparent);
  border-radius: 18px;
  animation: rotateBorder 4s linear infinite;
  z-index: -1;
}
.rotating-border::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--bg-card);
  border-radius: 14px;
  z-index: -1;
}
@keyframes rotateBorder {
  to { transform: rotate(360deg); }
}

/* --- Gradient Animation --- */
.gradient-animate {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* --- Button Styles --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent-gold);
  color: var(--bg-deep);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  background: var(--accent-gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 168, 67, 0.3);
}
.btn-primary:active { transform: translateY(1px) scale(0.98); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid var(--accent-gold);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-outline:hover {
  background: var(--accent-gold);
  color: var(--bg-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 168, 67, 0.2);
}
.btn-outline:active { transform: translateY(1px) scale(0.98); }

/* --- Section Styles --- */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
}

/* --- Card Base --- */
.card-base {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  transition: var(--transition-smooth);
}
.card-base:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
}
.powered-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s;
  filter: brightness(1.1);
}
.powered-logo:hover { opacity: 1; }

/* --- Team Card (Contact Page) --- */
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition-smooth);
  transform-style: preserve-3d;
}
.team-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(212, 168, 67, 0.08);
}
.team-card .headshot {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--border-subtle);
  transition: border-color 0.3s;
}
.team-card:hover .headshot { border-color: var(--accent-gold); }
.team-card .title-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(212, 168, 67, 0.12);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-top: 8px;
}
.team-card .contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: color 0.3s;
}
.team-card .contact-item:last-child { border-bottom: none; }
.team-card .contact-item:hover { color: var(--accent-gold); }
.team-card .contact-item a { transition: color 0.3s; }
.team-card .contact-item a:hover { color: var(--accent-gold); }

/* --- Timeline --- */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent-gold), var(--accent-blue), transparent);
  transform: translateX(-50%);
}
.timeline-dot {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 16px;
  background: var(--accent-gold);
  border: 3px solid var(--bg-deep);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 20px rgba(212, 168, 67, 0.4);
}

/* --- Process Steps --- */
.process-connector {
  position: absolute;
  top: 40px;
  left: calc(50% + 40px);
  width: calc(100% - 80px);
  height: 2px;
  background: linear-gradient(to right, var(--accent-gold), var(--accent-blue));
  opacity: 0.3;
}

/* --- Filter Buttons --- */
.filter-btn {
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent-gold);
  color: var(--bg-deep);
  border-color: var(--accent-gold);
}

/* --- Form Styles --- */
.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  transition: var(--transition-smooth);
  outline: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

/* --- Theme Selector --- */
.theme-selector {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  outline: none;
}
.theme-selector:hover {
  border-color: var(--accent-gold);
}
.theme-selector:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}
.theme-selector option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* --- Parallax Shape --- */
.parallax-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.15;
}

/* --- Mobile Menu --- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(7, 14, 26, 0.98);
  backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu .nav-link { font-size: 24px; letter-spacing: 0.1em; }

/* --- Hamburger --- */
.hamburger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; z-index: 110; }
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-smooth);
  border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .timeline-line { left: 20px; }
  .timeline-dot { left: 20px; }
  .section-title { font-size: 28px; }
  .section-subtitle { font-size: 16px; }
  .process-connector { display: none; }
}

/* --- Quick Menu --- */
#quick-menu {
  position: absolute;
  display: none;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 8px;
  min-width: 180px;
  z-index: 9999;
  border: 1px solid var(--border-subtle);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition-smooth);
  color: var(--text-primary);
}

.menu-item:hover {
  background: var(--bg-card-hover);
}