/* Google Fonts loaded via preconnect in index.html for zero-blocking render */

/* -------------------------------------------------------------------------- */
/* 1. DESIGN TOKENS (Variables)                                              */
/* -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --bg-dark: hsl(220, 30%, 5%);
  --bg-darker: hsl(220, 30%, 3%);
  --text-main: hsl(220, 10%, 95%);
  --text-muted: hsl(220, 10%, 70%);
  --accent-primary: hsl(240, 100%, 70%);
  --accent-lumina: hsl(1, 75%, 73%);
  --accent-oxford: hsl(35, 100%, 55%);
  
  /* Glassmorphism */
  --glass-bg: hsla(220, 30%, 15%, 0.5);
  --glass-border: hsla(220, 30%, 25%, 0.3);
  --glass-blur: 12px;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* -------------------------------------------------------------------------- */
/* 2. RESET & BASE STYLES                                                    */
/* -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Phase 1: Grain Overlay */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  pointer-events: none;
  z-index: 9999;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

/* -------------------------------------------------------------------------- */
/* 3. LAYOUT & UTILITIES                                                     */
/* -------------------------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

section {
  padding: var(--spacing-xl) 0;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  /* Phase 1: Double Border Glassmorphism */
  border: 1px solid hsla(0, 0%, 100%, 0.1);
  border-top: 1px solid hsla(0, 0%, 100%, 0.2);
  border-left: 1px solid hsla(0, 0%, 100%, 0.2);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.gradient-text {
  background: linear-gradient(135deg, #fff 0%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-animate {
  background: linear-gradient(135deg, #fff 0%, var(--accent-primary) 50%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* -------------------------------------------------------------------------- */
/* 4. COMPONENTS                                                             */
/* -------------------------------------------------------------------------- */

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(135deg, #fff 0%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.footer-title {
  text-align: center;
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: var(--spacing-lg);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px; /* Balanced mobile padding */
  min-height: 48px; /* Apple HIG standard */
  border-radius: 100px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: none;

  &.btn-primary {
    background: var(--accent-primary);
    color: #000;
    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 20px rgba(112, 112, 255, 0.3);
    }
  }

  &.btn-outline {
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    background: transparent;
    &:hover {
      background: var(--glass-bg);
      border-color: var(--accent-primary);
    }
  }

  &.btn-sm {
    padding: 8px 24px;
  }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-sm) 0;
  z-index: 9999;
  border-radius: 0;
  transition: var(--transition-smooth);

  .navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 auto;
  }

  .logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;

    a {
      color: var(--text-muted);
      font-weight: 500;
      font-size: 0.9rem;
      &:hover { color: var(--accent-primary); }
    }
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--spacing-xl) + 40px) 0 var(--spacing-xl);
  overflow: hidden;

  /* Subtle Engineering Grid Background */
  .hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image: 
      linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, black 20%, transparent 80%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, black 20%, transparent 80%);
    pointer-events: none;
    z-index: 1;
  }

  .hero-content {
    position: relative;
    z-index: 10;
    max-width: 1080px;
    width: 100%;
  }

  .hero-text-stack {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Pre-Headline Kicker Pill */
  .hero-kicker-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 18px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Outfit', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #cbd5e1;
    margin-bottom: var(--spacing-md);
    transition: var(--transition-smooth);
  }

  .hero-kicker-pill:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.08);
    color: #fff;
  }

  .status-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
  }

  .status-pulse-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid #22c55e;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  }

  .hero-title {
    font-size: clamp(2.8rem, 6.5vw, 4.75rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
  }

  .hero-break {
    display: inline;
  }

  .hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 auto var(--spacing-md);
    max-width: 680px;
  }

  .hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-sm);
  }

  .btn-arrow-icon {
    margin-left: 8px;
    transition: transform 0.25s ease;
  }

  .btn:hover .btn-arrow-icon {
    transform: translate(3px, -3px);
  }

  .hero-micro-guarantee {
    margin-top: 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    opacity: 0.85;
  }

  /* Executive Proof / Stat Bar */
  .hero-stats-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    width: 100%;
    max-width: 780px;
    margin: var(--spacing-lg) auto 0;
    padding: 20px 32px;
    border-radius: 18px;
    background: rgba(18, 20, 29, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    transition: border-color var(--transition-smooth), transform var(--transition-smooth);
  }

  .hero-stats-bar:hover {
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
  }

  .stat-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .stat-val {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #ffffff 40%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .stat-lbl {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.09em;
  }

  .stat-sep {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
  }

  /* Floating Flagship Browser Preview */
  .hero-preview-frame {
    max-width: 960px;
    width: 100%;
    margin: calc(var(--spacing-xl) + 10px) auto 0;
    border-radius: 20px;
    overflow: hidden;
    background: #0b0d14;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 
      0 28px 80px rgba(0, 0, 0, 0.65),
      0 0 0 1px rgba(255, 255, 255, 0.06),
      0 0 80px rgba(99, 102, 241, 0.16);
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    z-index: 5;
    cursor: pointer;
  }

  .hero-preview-frame:hover {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 
      0 36px 90px rgba(0, 0, 0, 0.75),
      0 0 0 1px rgba(99, 102, 241, 0.35),
      0 0 100px rgba(99, 102, 241, 0.28);
  }

  .browser-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(20, 24, 38, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 12px;
  }

  .browser-dots {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
  }

  .b-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
  }

  .b-red { background: #ff5f56; }
  .b-yellow { background: #ffbd2e; }
  .b-green { background: #27c93f; }

  .browser-address {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(11, 13, 20, 0.85);
    padding: 6px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.76rem;
    color: #cbd5e1;
    max-width: 320px;
    width: 100%;
    justify-content: center;
    letter-spacing: 0.02em;
  }

  .browser-address svg {
    color: #22c55e;
    flex-shrink: 0;
  }

  .browser-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.12);
    padding: 5px 12px;
    border-radius: 9999px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    flex-shrink: 0;
  }

  .browser-badge .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 6px #6366f1;
  }

  .browser-body {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    text-decoration: none;
  }

  .hero-mockup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1);
  }

  .browser-body:hover .hero-mockup-img {
    transform: scale(1.025);
  }

  .browser-overlay-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 28px;
    background: linear-gradient(to top, rgba(11, 13, 20, 0.95) 0%, rgba(11, 13, 20, 0.7) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    transition: background 0.3s ease;
  }

  .caption-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 4px;
  }

  .caption-tag {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #a5b4fc;
    text-transform: uppercase;
  }

  .caption-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
  }

  .caption-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
    flex-shrink: 0;
  }

  .browser-body:hover .caption-btn {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    transform: translateX(4px);
  }

  /* Decorative Elements */
  /* Phase 1: Fluid Mesh Orbs */
  .hero-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, hsla(240, 100%, 70%, 0.2) 0%, transparent 70%);
    filter: blur(100px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    animation: orb-breathe 15s ease-in-out infinite alternate;

    &.hero-orb-1 { top: -10%; left: -5%; background: radial-gradient(circle, hsla(240, 100%, 70%, 0.2) 0%, transparent 70%); }
    &.hero-orb-2 { top: 40%; right: -5%; background: radial-gradient(circle, hsla(1, 75%, 73%, 0.15) 0%, transparent 70%); animation-delay: -5s; }
    &.hero-orb-3 { bottom: -10%; left: 20%; background: radial-gradient(circle, hsla(35, 100%, 55%, 0.15) 0%, transparent 70%); animation-delay: -10s; }
  }

  .hero-cursor-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, hsla(240, 100%, 70%, 0.1) 0%, transparent 70%);
    filter: blur(100px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    will-change: transform;
  }
}

@keyframes orb-breathe {
  0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(30px, -20px) scale(1.2); opacity: 0.8; }
  100% { transform: translate(-20px, 30px) scale(0.9); opacity: 0.5; }
}

/* Tech Marquee */
.tech-marquee {
  overflow: hidden;
  display: flex;
  padding: var(--spacing-md) 0;
  position: relative;

  .marquee-content {
    display: flex;
    gap: var(--spacing-lg);
    animation: marquee-scroll 30s linear infinite;
    white-space: nowrap;
  }

  .tech-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-muted);
  }
}

@keyframes marquee-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* Services (Phase 2: Bento Grid) */
.services {
  .services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
  }

  .service-card {
    padding: var(--spacing-md);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: hsla(220, 30%, 10%, 0.5);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;

    &.service-card-wide {
      grid-column: span 2;
    }

    /* Phase 4: Glint Effect */
    &::before {
      content: "";
      position: absolute;
      inset: 0;
      padding: 1px;
      border-radius: 20px;
      background: linear-gradient(135deg, transparent 40%, var(--accent-primary) 50%, transparent 60%);
      background-size: 300% 300%;
      -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      -webkit-mask-composite: xor;
      mask-composite: exclude;
      opacity: 0;
      transition: opacity 0.4s ease;
    }

    &:hover {
      border-color: var(--accent-primary);
      transform: translateY(-5px);
      &::before { opacity: 1; animation: glint-flow 2s linear infinite; }
    }

    .service-num {
      font-family: 'Cormorant Garamond', serif;
      font-style: italic;
      font-size: 1.5rem;
      margin-bottom: var(--spacing-sm);
    }
  }
}

@keyframes glint-flow {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* Projects */
.projects {
  background: var(--bg-darker);

  .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-lg);
  }

  .project-card {
    padding: var(--spacing-md);
    border-radius: 30px;
    transition: var(--transition-smooth);
    will-change: transform;
    position: relative;
    overflow: hidden;

    .project-image-container {
      position: relative;
      border-radius: 20px;
      overflow: hidden;
      margin-bottom: var(--spacing-md);
      aspect-ratio: 16/10;
    }

    .project-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: var(--transition-smooth);
      filter: grayscale(0.8);
      will-change: transform;
      transform: translateZ(0);
    }

    /* Phase 4: Hover Polish */
    &:hover {
      transform: translateY(-10px);
      background: var(--glass-bg);
      box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);

      .project-img { 
        transform: scale(1.05); 
        filter: grayscale(0) contrast(1);
      }
      .project-overlay { opacity: 1; }
    }
  }

  .project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
  }

  .project-category {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-xs);
  }

  .project-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
  }

  .project-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
  }

    .project-tags {
      display: flex;
      gap: var(--spacing-xs);
      flex-wrap: wrap;

      span {
        padding: 4px 12px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 100px;
        font-size: 0.75rem;
        color: var(--text-muted);
      }
    }

    /* Phase 6: Result Badge */
    .project-result-badge {
      position: absolute;
      top: 15px;
      left: 15px;
      padding: 6px 14px;
      background: hsla(240, 100%, 70%, 0.9);
      color: #000;
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      font-size: 0.75rem;
      border-radius: 100px;
      z-index: 5;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }
  }

/* Contact Form */
.footer {
  .contact-form-container {
    max-width: 600px;
    margin: 0 auto;

    .form-progress-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: var(--spacing-lg);
      padding: 0 var(--spacing-md);

      .progress-step {
        font-family: 'Outfit', sans-serif;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-muted);
        &.active { color: var(--accent-primary); font-weight: 700; }
      }

      .progress-line {
        height: 1px;
        flex-grow: 1;
        background: var(--glass-border);
        margin: 0 var(--spacing-sm);
      }
    }
  }

  .form-group {
    margin-bottom: var(--spacing-md);
  }

  .form-label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 16px; /* Increased for mobile touch */
    min-height: 48px; /* High-end mobile standard */
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 1rem; /* iOS no-zoom standard */
    transition: var(--transition-smooth);

    &:focus {
      outline: none;
      border-color: var(--accent-primary);
      background: hsla(220, 30%, 20%, 0.5);
    }

    &[type="textarea"] {
      height: 120px;
      resize: none;
    }
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);

  &.active {
    opacity: 1;
    pointer-events: all;
    .modal-content { transform: scale(1); }
  }

  .modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: var(--spacing-lg);
    border-radius: 30px;
    max-width: 800px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    transition: var(--transition-smooth);
  }

  .close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    &:hover { color: var(--accent-primary); }
  }
}

/* Custom Cursor */
.cursor-dot, .cursor-outline {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 10000;
  will-change: transform;
  transition: opacity 0.3s ease;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid var(--accent-primary);
  opacity: 0.5;
}

/* -------------------------------------------------------------------------- */
/* 5. ANIMATIONS                                                             */
/* -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-smooth);

  &.active {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Phase 3: Staggered Child Reveals */
.reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);

  &.active {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce-in {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  50% { opacity: 1; transform: translateY(-5px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes button-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(112, 112, 255, 0.7); }
  50% { box-shadow: 0 0 0 10px rgba(112, 112, 255, 0); }
}

/* -------------------------------------------------------------------------- */
/* 6. RESPONSIVE DESIGN                                                      */
/* -------------------------------------------------------------------------- */

/* Mobile Media Queries Refactor (Phase 7) */
@media screen and (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  :root {
    --spacing-xl: 3.5rem;
    --glass-blur: 6px;
    --glass-bg: hsla(220, 30%, 10%, 0.85);
  }

  /* Stable Mobile Viewport (no address bar jumping) */
  .hero {
    min-height: calc(100svh - 60px);
    height: auto;
    padding: 100px 0 var(--spacing-lg) 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-break {
    display: none;
  }

  .hero-kicker-pill {
    font-size: 0.68rem;
    padding: 6px 14px;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
    line-height: 1.3;
  }

  .hero-title {
    font-size: clamp(2.2rem, 9vw, 3.2rem);
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: 0.98rem;
    margin-bottom: 20px;
    line-height: 1.5;
  }

  .hero-orb, .hero-cursor-glow, .bg-glow {
    display: none !important;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-micro-guarantee {
    font-size: 0.72rem;
    line-height: 1.4;
    padding: 0 6px;
    margin-top: 10px;
  }

  .hero-stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 14px 10px;
    padding: 14px 16px;
    max-width: 340px;
    margin-top: 22px;
  }

  .stat-sep {
    display: none;
  }

  .stat-val {
    font-size: 1.35rem;
  }

  .stat-lbl {
    font-size: 0.66rem;
  }

  .hero-preview-frame {
    margin-top: 26px;
    border-radius: 14px;
  }

  .browser-header {
    padding: 9px 12px;
  }

  .browser-address {
    font-size: 0.66rem;
    padding: 4px 8px;
    max-width: 160px;
  }

  .browser-badge {
    display: none;
  }

  .browser-overlay-caption {
    padding: 14px;
  }

  .caption-title {
    font-size: 0.88rem;
  }

  .caption-btn {
    display: none;
  }

  .navbar {
    padding: 0.75rem 0;
    transition: padding 0.3s ease, background 0.3s ease;
  }

  .navbar.scrolled {
    padding: 0.6rem 0;
    background: hsla(220, 30%, 5%, 0.95);
    border-bottom: 1px solid var(--glass-border);
  }

  .navbar-inner {
    padding: 0 15px;
  }

  .nav-links { display: none !important; }
  .hamburger { 
    display: flex;
    min-width: 48px;
    min-height: 48px;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 5000;

    span {
      display: block;
      width: 26px;
      height: 2.5px;
      background: var(--text-main);
      margin: 5px 0;
      transition: var(--transition-smooth);
    }

    &.open {
      span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
      span:nth-child(2) { opacity: 0; transform: scaleX(0); }
      span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
    }
  }

  .mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 4000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;

    &.active {
      opacity: 1;
      pointer-events: all;
    }

    a {
      font-size: 1.8rem;
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      padding: 12px 24px;
      min-height: 48px;
      display: flex;
      align-items: center;
    }
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image-wrapper .about-img {
    height: 320px;
  }

  .project-grid { 
    grid-template-columns: 1fr; 
  }

  .project-image-container {
    aspect-ratio: 16/10;
  }

  .tech-marquee .tech-item {
    font-size: 0.95rem;
  }

  .tech-marquee .marquee-content {
    animation-duration: 20s;
    will-change: transform;
  }

  .modal-content {
    width: 95%;
    max-height: 88vh;
    margin: 10px;
    padding: 1.5rem 1.25rem;
    border-radius: 20px;
    -webkit-overflow-scrolling: touch;
  }

  .modal-close {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media screen and (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .container { padding: 0 1rem; }
}

@media (hover: none) {
  .cursor-dot, .cursor-outline { display: none !important; }
}

/* Phase 7: The Digital Front Desk (About Section) */
.about-me {
  background: var(--bg-dark);
  padding: var(--spacing-xl) 0;
  overflow: hidden;

  .about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--spacing-xl);
    align-items: center;
  }

  .about-image-wrapper {
    position: relative;
    padding: 10px;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);

    .about-img {
      width: 100%;
      height: 600px;
      object-fit: cover;
      border-radius: 12px;
      filter: grayscale(20%);
    }

    .location-tag {
      position: absolute;
      bottom: 30px;
      left: 30px;
      background: var(--bg-main);
      padding: 12px 20px;
      border-radius: 100px;
      font-size: 0.7rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      border: 1px solid var(--glass-border);
      display: flex;
      align-items: center;
      gap: 10px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
  }

  .about-title {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
  }

  .about-lead {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
  }

  .about-bio {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
  }

  .expertise-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
  }

  .outcome-box {
    padding: 30px;
    border-radius: 16px;
    border-left: 4px solid var(--accent-primary);
  }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-primary);
  animation: location-pulse 2s infinite;
}

@keyframes location-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

@media screen and (max-width: 992px) {
  .about-me {
    .about-grid { grid-template-columns: 1fr; gap: var(--spacing-lg); }
    .about-image-wrapper .about-img { height: 400px; }
    .about-title { font-size: 2.5rem; }
  }
}

@media screen and (max-width: 768px) {
  .expertise-row { grid-template-columns: 1fr !important; }
}

/* Phase 6: Continuous Interaction & Conversion Mechanics */
.process-lab {
  background: var(--bg-darker);
  position: relative;
  overflow: hidden;
  padding: var(--spacing-xl) 0;

  .process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
  }

  .process-item {
    text-align: center;
    position: relative;
  }

  .process-step-num {
    font-size: 3.5rem;
    font-weight: 700;
    opacity: 0.1;
    margin-bottom: -1rem;
    transition: var(--transition-smooth);
  }

  &:hover .process-step-num {
    opacity: 0.3;
    color: var(--accent-primary);
  }
}

.status-badge {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  padding: 10px 18px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9998;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);

  .status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    position: relative;

    &::after {
      content: "";
      position: absolute;
      inset: -4px;
      border: 1px solid #4ade80;
      border-radius: 50%;
      animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    }
  }
}

@keyframes pulse-ring {
  0% { transform: scale(0.33); opacity: 0; }
  33% { transform: scale(1); opacity: 1; }
  80%, 100% { transform: scale(1.5); opacity: 0; }
}

@media screen and (max-width: 768px) {
  .process-grid { grid-template-columns: 1fr; gap: var(--spacing-md); }
  .status-badge { bottom: 20px; right: 20px; padding: 8px 14px; font-size: 0.7rem; }
}

/* ==========================================================================
   Hero Trust Metrics
   ========================================================================== */
.hero-trust-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
  margin-top: var(--spacing-md);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-trust-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-trust-metrics .check-icon {
  color: #4ade80;
  font-weight: 700;
}

/* ==========================================================================
   FAQ Section & Accordion
   ========================================================================== */
.faq-section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

.faq-accordion {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.faq-item.active {
  border-color: rgba(99, 102, 241, 0.4);
}

.faq-trigger {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.faq-trigger:hover {
  color: var(--accent-primary);
}

.faq-icon {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
  flex-shrink: 0;
  line-height: 1;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent-primary);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
  padding: 0 24px;
}

.faq-item.active .faq-content {
  max-height: 250px;
  padding: 0 24px 22px 24px;
}

.faq-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

@media screen and (max-width: 768px) {
  .faq-trigger {
    padding: 16px 18px;
    font-size: 0.95rem;
  }
  .faq-item.active .faq-content {
    padding: 0 18px 18px 18px;
  }
  .hero-trust-metrics {
    font-size: 0.8rem;
    gap: 8px 16px;
  }
}


/* ==========================================================================
   7. MOBILE OPTIMISATION PASS
   Fixes specificity conflicts: earlier mobile rules were overridden by the
   nested desktop selectors (e.g. `.services .services-grid`).
   ========================================================================== */

/* Desktop defaults for mobile-only UI */
.hamburger { display: none; }
.mobile-menu { display: none; }

html, body { overflow-x: clip; }
section, footer { scroll-margin-top: 72px; }
textarea.form-input { min-height: 120px; resize: vertical; }
* { -webkit-tap-highlight-color: transparent; }

/* Disable hover lift effects on touch devices (prevents "stuck" hover states) */
@media (hover: none) {
  .projects .project-card:hover,
  .services .service-card:hover,
  .hero .hero-stats-bar:hover,
  .btn.btn-primary:hover { transform: none; box-shadow: none; }
  .projects .project-card .project-img { filter: grayscale(0); }
}

@media screen and (max-width: 768px) {
  /* Navigation */
  .navbar .logo { font-size: 1.15rem; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }
  .hamburger span { transform-origin: center; }
  .hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  body:has(.mobile-menu.active) .status-badge { opacity: 0; pointer-events: none; }

  /* Typography */
  .section-header { margin-bottom: var(--spacing-md); }
  .section-title { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .section-subtitle { font-size: 1rem; }
  .footer-title { font-size: clamp(1.9rem, 8vw, 2.5rem); margin-bottom: var(--spacing-md); }

  /* Hero */
  .hero { padding: 96px 0 var(--spacing-lg); }
  .hero .hero-kicker-pill { font-size: 0.66rem; padding: 6px 12px; letter-spacing: 0.08em; margin-bottom: 16px; }
  .hero .hero-title { font-size: clamp(2rem, 9vw, 3rem); line-height: 1.15; margin-bottom: 16px; }
  .hero .hero-subtitle { font-size: 0.98rem; line-height: 1.5; margin-bottom: 20px; }
  .hero .hero-actions { flex-direction: column; width: 100%; gap: 12px; }
  .hero .hero-actions .btn { width: 100%; }
  .hero .hero-micro-guarantee { font-size: 0.72rem; line-height: 1.4; }
  .hero .hero-stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 16px 10px;
    padding: 16px;
    max-width: 360px;
    margin-top: 28px;
  }
  .hero .stat-sep { display: none; }
  .hero .stat-val { font-size: 1.35rem; }
  .hero .stat-lbl { font-size: 0.64rem; text-align: center; }
  .hero .hero-preview-frame { margin-top: 32px; border-radius: 14px; }
  .hero .browser-header { padding: 9px 12px; }
  .hero .browser-address { font-size: 0.66rem; padding: 4px 8px; max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .hero .browser-badge, .hero .caption-btn { display: none; }
  .hero .browser-overlay-caption { padding: 14px; }
  .hero .caption-title { font-size: 0.9rem; }

  /* Marquee */
  .tech-marquee .marquee-content { gap: var(--spacing-md); }

  /* Services */
  .services .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .services .service-card { padding: 24px; }
  .services .service-card.service-card-wide { grid-column: auto; }
  .services .service-card h3 { font-size: 1.35rem !important; }

  /* Process */
  .process-lab .process-grid { grid-template-columns: 1fr; gap: var(--spacing-md); margin-top: var(--spacing-md); }
  .process-lab .process-step-num { font-size: 2.6rem; }

  /* About */
  .about-me .about-grid { gap: var(--spacing-md); }
  .about-me .about-image-wrapper .about-img { height: 340px; }
  .about-me .about-image-wrapper .location-tag { bottom: 20px; left: 20px; padding: 10px 16px; }
  .about-me .about-title { font-size: 2rem; }
  .about-me .about-lead { font-size: 1.15rem; }
  .about-me .about-bio { font-size: 1rem; margin-bottom: var(--spacing-md); }
  .about-me .expertise-row { gap: 16px; margin-bottom: var(--spacing-md); }
  .about-me .outcome-box { padding: 20px; }

  /* Projects */
  .projects .project-grid { grid-template-columns: 1fr; gap: var(--spacing-md); }
  .projects .project-card { padding: 16px; border-radius: 20px; }
  .projects .project-card .project-image-container { border-radius: 14px; margin-bottom: 16px; }
  .projects .project-title { font-size: 1.3rem; }

  /* Reveal children were never activated on mobile -> invisible content */
  .reveal-child { opacity: 1 !important; transform: none !important; }

  /* FAQ: allow longer answers */
  .faq-item.active .faq-content { max-height: 600px; }

  /* Contact form */
  .footer .contact-form-container .form-progress-bar { padding: 0; margin-bottom: var(--spacing-md); }
  #contact-form { padding: 20px !important; }
  .footer-bottom { margin-top: var(--spacing-lg) !important; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

  /* Modal */
  .modal { padding: 16px; }
  .modal .modal-content {
    width: 100%;
    max-height: 85svh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 56px 20px 24px;
    margin: 0;
    border-radius: 20px;
  }
  .modal .close-modal {
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    line-height: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
  }

  /* Floating status badge: respect safe area, stay compact */
  .status-badge {
    bottom: calc(16px + env(safe-area-inset-bottom));
    right: 16px;
    padding: 8px 12px;
    font-size: 0.68rem;
    transition: opacity 0.3s ease;
  }
}

@media screen and (max-width: 380px) {
  .hero .hero-title { font-size: 1.85rem; }
  .hero .hero-kicker-pill { font-size: 0.6rem; }
  .status-badge .status-text { display: none; }
  .status-badge { padding: 10px; }
}

/* Mobile project thumbnails */
@media screen and (max-width: 768px) {
  .projects .project-card .project-image-container { aspect-ratio: 16 / 10; background: #0b0d14; }
  .projects .project-card .project-img { filter: none; object-position: top center; transform: none; }
  .projects .project-overlay { display: none; }
  .projects .project-result-badge {
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    font-size: 0.62rem;
    max-width: calc(100% - 20px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .projects .project-card:active .project-image-container { opacity: 0.85; }
}

/* Mobile scroll reveal (GPU-only properties; classes added/removed by JS) */
@media screen and (max-width: 768px) {
  .m-reveal {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition: opacity 0.45s ease-out, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }
  .m-reveal.m-in {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .m-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ==========================================================================
   8. DESKTOP PERFORMANCE PASS
   ========================================================================== */
@media screen and (min-width: 769px) {
  /* Reveal: animate only compositor properties (was `transition: all`) */
  .reveal {
    transform: translate3d(0, 24px, 0);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal-child {
    transform: translate3d(0, 16px, 0);
    transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.active, .reveal-child.active { transform: none; }

  /* Whole sections no longer slide (huge layers); their children still stagger in */
  section.reveal { opacity: 1; transform: none; transition: none; }

  /* Hero orbs: filter:blur(100px) on animated 600px layers repainted every frame.
     The radial gradients are already soft, so drop the filter and promote to GPU. */
  .hero .hero-orb,
  .hero .hero-cursor-glow {
    filter: none;
    will-change: transform;
    contain: strict;
  }
  .hero .hero-orb { animation-duration: 20s; }

  /* Specific transitions instead of `all` on frequently-hovered elements */
  .services .service-card {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.3s ease;
  }
  .projects .project-card {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease, background-color 0.4s ease;
  }
  .projects .project-card .project-img {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), filter 0.4s ease;
    will-change: auto;
  }
  .projects .project-overlay { transition: opacity 0.3s ease; }
  .faq-item { transition: border-color 0.3s ease; }
  .btn { transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-child { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero .hero-orb, .tech-marquee .marquee-content { animation: none !important; }
}

/* Mobile navbar */
@media screen and (max-width: 768px) {
  .cursor-dot, .cursor-outline { display: none !important; }

  .navbar.glass {
    padding: env(safe-area-inset-top) 0 0;
    border: none;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    box-shadow: none;
    background: hsla(220, 30%, 5%, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s ease, border-color 0.3s ease;
  }
  .navbar.glass.scrolled {
    padding: env(safe-area-inset-top) 0 0;
    background: hsla(220, 30%, 5%, 0.92);
    border-bottom-color: hsla(0, 0%, 100%, 0.08);
  }
  .navbar .navbar-inner {
    height: 60px;
    padding: 0 8px 0 16px;
  }
  .navbar .logo { font-size: 1.1rem; letter-spacing: 0.01em; white-space: nowrap; }

  .hamburger {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    gap: 5px;
    border-radius: 10px;
  }
  .hamburger span {
    width: 22px;
    height: 2px;
    margin: 0;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  }
  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hamburger:active { background: hsla(0, 0%, 100%, 0.06); }

  /* Keep the bar seamless with the open menu overlay */
  body:has(.mobile-menu.active) .navbar.glass {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .mobile-menu { padding-top: calc(60px + env(safe-area-inset-top)); }

  .hero { padding-top: calc(84px + env(safe-area-inset-top)); }
}
