/* ==========================================
   SAAD VISUALS — MAIN DESIGN SYSTEM & UTILITIES
   ========================================== */

@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@400,500,700,800,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #111111;
  --bg-secondary: #1A1A1A;
  --bg-surface: #242424;
  --accent-mint: #A2EDA2;
  --accent-mint-glow: rgba(162, 237, 162, 0.25);
  --accent-mint-soft: #DDF8DD;
  --accent-dark: #285C35;
  --text-white: #FFFFFF;
  --text-light: #F5F5F2;
  --text-muted: #A7A7A7;
  --border-color: #333333;
  --border-hover: rgba(162, 237, 162, 0.4);
  
  --font-heading: 'Cabinet Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --max-width: 1320px;
  --header-height: 80px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-full: 6px;
  
  --transition-fast: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.95s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background-color: var(--bg-primary);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-light);
  overflow-x: hidden;
  position: relative;
  text-rendering: optimizeLegibility;
}

/* Background Sequence Canvas */
.bg-sequence-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  object-fit: cover;
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}

/* Content above canvas */
header, main, footer {
  position: relative;
  z-index: 2;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-white);
  line-height: 1.15;
  letter-spacing: 0.01em;
  font-weight: 700;
}

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

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

/* Global Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Section Header Shared Styles */
.section-header {
  margin-bottom: 36px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-mint);
  margin-bottom: 10px;
}

.section-label::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--accent-mint);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--accent-mint);
}

.section-title {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  color: var(--text-white);
  font-weight: 800;
  line-height: 1.1;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-top: 10px;
  font-weight: 400;
  line-height: 1.6;
}

/* BOX SHAPED BUTTONS SYSTEM */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 6px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-mint);
  color: #0b1a0e;
  box-shadow: 0 4px 20px rgba(162, 237, 162, 0.25);
  font-weight: 700;
  border: 1px solid var(--accent-mint);
}

.btn-primary:hover {
  background-color: #b7f3b7;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(162, 237, 162, 0.4);
  color: #050d07;
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-white);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.btn-secondary:hover {
  border-color: var(--accent-mint);
  color: var(--accent-mint);
  background-color: rgba(162, 237, 162, 0.08);
  transform: translateY(-2px);
}

/* LOOPING ARROW ANIMATION SYSTEM */
@keyframes arrow-loop-right {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(6px);
  }
}

@keyframes arrow-loop-left {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-6px);
  }
}

@keyframes arrow-loop-down {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

.btn-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  animation: arrow-loop-right 1.6s ease-in-out infinite;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.btn-icon.btn-icon-down {
  animation: arrow-loop-down 1.6s ease-in-out infinite;
}

.btn-icon.btn-icon-left {
  animation: arrow-loop-left 1.6s ease-in-out infinite;
}

.btn:hover .btn-icon {
  animation-duration: 0.8s;
  filter: drop-shadow(0 0 5px var(--accent-mint));
}


/* Sticky Navigation */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: background-color var(--transition-normal), backdrop-filter var(--transition-normal), border-color var(--transition-normal);
  border-bottom: 1px solid transparent;
}

.main-nav.scrolled {
  background-color: rgba(17, 17, 17, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  height: 56px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

/* GRADIENT TEXT UTILITY */
.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 10%, var(--accent-mint) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* GRADIENT BRAND NAME BESIDE LOGO WITH HOVER ANIMATION */
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #FFFFFF 0%, #A2EDA2 50%, #b7f3b7 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 0.5s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  display: inline-block;
}

.nav-brand:hover .brand-icon {
  transform: scale(1.06) rotate(-2deg);
}

.nav-brand:hover .brand-name {
  background-position: right center;
  transform: scale(1.04) translateX(2px);
  filter: drop-shadow(0 0 10px rgba(162, 237, 162, 0.4));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-mint);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-cta {
  padding: 10px 22px;
  font-size: 0.8125rem;
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  cursor: pointer;
  z-index: 1001;
}

.mobile-toggle svg {
  width: 28px;
  height: 28px;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(17, 17, 17, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-links {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.mobile-menu-link {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 0.02em;
}

.mobile-menu-link:hover {
  color: var(--accent-mint);
}

/* Animations & Scroll Reveals ("Touch-and-Go" Ultra-Smooth Motion Signature) */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.92s cubic-bezier(0.16, 1, 0.3, 1), transform 0.92s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-28px) scale(0.985);
  transition: opacity 0.98s cubic-bezier(0.16, 1, 0.3, 1), transform 0.98s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right {
  opacity: 0;
  transform: translateX(28px) scale(0.985);
  transition: opacity 0.98s cubic-bezier(0.16, 1, 0.3, 1), transform 0.98s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.96) translateY(18px);
  transition: opacity 0.92s cubic-bezier(0.16, 1, 0.3, 1), transform 0.92s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Touch-and-Go Staggered Child Element Animations */
.stagger-children > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.04s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.08s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.12s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.16s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.20s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.24s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.28s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.32s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(9) { transition-delay: 0.36s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(10) { transition-delay: 0.40s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(11) { transition-delay: 0.44s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(12) { transition-delay: 0.48s; opacity: 1; transform: translateY(0); }

/* Ensure immediate zero-delay response for all hover states */
.stagger-children > *:hover,
.filter-btn:hover,
.service-card:hover,
.portfolio-card:hover,
.skill-tag:hover,
.faq-item:hover,
.btn:hover,
a:hover,
button:hover {
  transition-delay: 0s !important;
}

/* Touch & Go Inter-Section Smooth Boundary Glide */
section {
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

section.section-entering {
  animation: sectionTouchGo 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sectionTouchGo {
  0% {
    opacity: 0.82;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cinematic Section Header Line Reveal Animation */
.section-header {
  position: relative;
}
.section-header.visible .section-label {
  animation: labelGlowFade 1.0s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes labelGlowFade {
  0% {
    opacity: 0;
    transform: translateY(12px);
    letter-spacing: 0.25em;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: 0.15em;
  }
}

/* Card Interactive Hover Lift & Mint Glow */
.card-hover-animate {
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}
.card-hover-animate:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--accent-mint);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 30px var(--accent-mint-glow);
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .nav-link {
    transition: none;
  }
  .btn-icon, .btn-icon-down, .btn-icon-left, .testimonial-arrow {
    animation: none !important;
  }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .nav-links, .nav-cta-desktop {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  .brand-icon {
    height: 46px;
  }
  .brand-name {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 18px;
  }
  :root {
    --header-height: 70px;
  }
  .brand-icon {
    height: 42px;
  }
  .brand-name {
    font-size: 1rem;
  }
  .btn {
    padding: 12px 22px;
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }
  .brand-name {
    font-size: 0.925rem;
    letter-spacing: 0.02em;
  }
  .brand-icon {
    height: 36px;
  }
  .mobile-menu-link {
    font-size: 1.6rem;
  }
}
