/* ==========================================================================
   Code & Craft Tech - Master Luxury Design Architecture & Header Aesthetics
   Domain: design.codeandcrafttech.in
   Quality level: Pentagram, Cuberto, Clay & Superside caliber
   ========================================================================== */

:root {
  /* Ultra-Luxury Brand Tokens */
  --color-primary: #2563EB;
  --color-primary-glow: #3B82F6;
  --color-secondary: #0F172A;
  --color-accent: #06B6D4;
  --color-purple: #8B5CF6;
  --color-bg-dark: #020617;
  --color-card-bg: rgba(15, 23, 42, 0.7);
  --color-text-light: #F8FAFC;
  --color-text-muted: #94A3B8;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2563EB 0%, #8B5CF6 50%, #06B6D4 100%);
  --gradient-glow: linear-gradient(135deg, rgba(37, 99, 235, 0.35) 0%, rgba(139, 92, 246, 0.35) 50%, rgba(6, 182, 212, 0.35) 100%);
  --gradient-dark: linear-gradient(135deg, #020617 0%, #0F172A 100%);

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Shadows & Glassmorphism */
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 35px rgba(37, 99, 235, 0.3);
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(2.2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h4 { font-size: 1.3rem; }

p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

/* Container & Sections */
.container {
  width: 92%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-padding {
  padding: 7rem 0;
}

.text-center { text-align: center; }

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glass Card */
.glass-card {
  background: var(--color-card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 2.5rem;
  transition: var(--transition-normal);
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: var(--shadow-glow);
}

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--color-bg-dark);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(37, 99, 235, 0.2);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   ULTRA-ELEGANT FLOATING GLASS HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 94%;
  max-width: 1380px;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  border-radius: 60px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transition: var(--transition-normal);
}

.site-header.scrolled {
  top: 0.5rem;
  background: rgba(2, 6, 23, 0.9);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
}

/* Logo & Badge Styling */
.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.logo-text-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--color-text-light);
  white-space: nowrap;
}

.logo-badge {
  background: var(--gradient-primary);
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

/* Main Navigation Links */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0.45rem 0.85rem;
  border-radius: 30px;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.dark-mode-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: var(--transition-fast);
}

.dark-mode-toggle:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.header-cta-btn {
  padding: 0.65rem 1.4rem;
  font-size: 0.88rem;
  white-space: nowrap;
  border-radius: 50px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.85rem 1.8rem;
  border-radius: 50px;
  cursor: pointer;
  border: none;
  transition: var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.7);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 9rem;
  overflow: hidden;
}

.hero-glow-1 {
  position: absolute;
  top: -15%;
  left: 25%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, rgba(0,0,0,0) 70%);
  filter: blur(100px);
}

.hero-glow-2 {
  position: absolute;
  bottom: 10%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, rgba(0,0,0,0) 70%);
  filter: blur(100px);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.3);
  padding: 0.4rem 1.2rem;
  border-radius: 30px;
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

/* Portfolio Filter & Grid */
.portfolio-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #E2E8F0;
  padding: 0.65rem 1.5rem;
  border-radius: 40px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--gradient-primary);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--color-secondary);
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow);
}

.portfolio-item img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.3) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: #fff;
  opacity: 0;
  transition: var(--transition-normal);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

/* Before / After Slider */
.ba-slider {
  position: relative;
  width: 100%;
  max-width: 960px;
  height: 480px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: var(--glass-border);
}

.ba-slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-slider .resize {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.ba-slider .handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: var(--color-accent);
  cursor: ew-resize;
  z-index: 10;
}

.ba-slider .handle::after {
  content: '↔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: var(--shadow-glow);
}

/* Calculator */
.calculator-card {
  background: var(--gradient-dark);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  padding: 3.5rem;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: var(--shadow-glow);
}

.calc-select, .calc-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
}

.calc-select option {
  background: var(--color-secondary);
  color: #fff;
}

.calc-result-box {
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid var(--color-primary);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}

.calc-result-price {
  font-size: 3.5rem;
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--color-accent);
}

/* Timeline */
.timeline-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 4rem auto 0;
}

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

.timeline-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3.5rem;
}

.timeline-step:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-content {
  width: 45%;
}

.timeline-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.3rem;
  z-index: 2;
  box-shadow: var(--shadow-glow);
}

/* Floating Action CTA Buttons */
.floating-cta-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9990;
}

.floating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
}

.floating-whatsapp { background: #25D366; }
.floating-quote { background: var(--color-primary); }

.floating-btn:hover {
  transform: scale(1.12);
}

/* Footer */
.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: 5rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Custom Cursor Tracker (Offscreen by default) */
.custom-cursor {
  position: fixed;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  z-index: 999999;
}

.custom-cursor-follower {
  position: fixed;
  width: 38px;
  height: 38px;
  background: rgba(37, 99, 235, 0.15);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  z-index: 999998;
}

/* Responsive */
@media (max-width: 1100px) {
  .main-navigation { display: none; }
  .site-header { width: 90%; }
}

@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .timeline-wrapper::before { left: 24px; }
  .timeline-step, .timeline-step:nth-child(even) { flex-direction: row; }
  .timeline-content { width: 85%; margin-left: 3.5rem; }
}

@media (max-width: 768px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .ba-slider { height: 340px; }
}
