/* ============================================
   KIWIFLOW — AI Consulting Website
   Premium Design System (Brand Guide v1.0)
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ============================================
   1. CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* --- Brand Colors (The Kiwi Theme) --- */
  --color-primary: #8CC63F;
  /* Electric Kiwi Green */
  --color-primary-dark: #70a131;
  --color-primary-light: #a9de5d;
  --color-primary-glow: rgba(140, 198, 63, 0.15);

  --color-secondary: #E2F0A5;
  /* Pale Yellow-Green (Kiwi Core) */
  --color-secondary-glow: rgba(226, 240, 165, 0.15);

  /* --- Dark Mode Backgrounds (Kiwi Skin/Charcoal) --- */
  --color-bg: #121212;
  /* Deep background */
  --color-surface: #1E1E1E;
  /* Card surface */
  --color-surface-hover: #2A2A2A;

  /* --- Typography Colors --- */
  --color-text-main: #FFFFFF;
  --color-text-muted: #A0AAB5;
  --color-text-inverse: #121212;
  /* Dark text on bright backgrounds */

  /* --- Supporting Colors --- */
  --color-white: #FFFFFF;
  --color-error: #FF4D4D;
  --color-error-glow: rgba(255, 77, 77, 0.15);

  /* --- Typography --- */
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
  --font-display: 'Outfit', var(--font-primary);

  /* --- Spacing (8px grid) --- */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
  --space-12: 96px;
  --space-16: 128px;

  /* --- Layout --- */
  --container-max: 1200px;

  /* --- Border Radius --- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.5), 0 8px 20px rgba(0, 0, 0, 0.3);
  --shadow-primary: 0 4px 24px var(--color-primary-glow);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 12px 48px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.2);

  /* --- Transitions --- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 200ms;
  --duration-base: 350ms;
  --duration-slow: 600ms;
}

/* ============================================
   2. Base Reset & Typography
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--color-text-muted);
  background-color: var(--color-bg);
  overflow-x: hidden;
  touch-action: manipulation;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  color: var(--color-text-main);
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1;
}

h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h3 {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  line-height: 1.35;
}

h4 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

/* --- Noise Overlay --- */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: overlay;
  filter: url(#noiseFilter);
}

/* --- Custom Cursor --- */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  display: none;
}

@media (pointer: fine) {
  .custom-cursor {
    display: block;
  }
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-primary);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
}

.cursor-ring {
  width: 30px;
  height: 30px;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

.custom-cursor.active .cursor-ring {
  width: 50px;
  height: 50px;
  background-color: rgba(140, 198, 63, 0.1);
  border-color: var(--color-primary);
}

/* --- Ambient Mouse Glow --- */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(140, 198, 63, 0.06),
      /* Subtle Kiwi glow */
      transparent 50%);
  transition: opacity 0.5s ease;
}

/* --- Background Blobs --- */
.bg-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(140, 198, 63, 0.05) 0%, transparent 70%);
  filter: blur(80px);
  border-radius: 50%;
  animation: float-blob 20s infinite alternate ease-in-out;
}

.blob:nth-child(1) {
  top: -10%;
  left: -10%;
}

.blob:nth-child(2) {
  bottom: -10%;
  right: -10%;
  animation-delay: -5s;
}

@keyframes float-blob {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(10%, 5%) scale(1.1);
  }
}

/* --- Text Reveal Animations --- */
.reveal-text {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.reveal-text>span {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s ease-out;
}

.reveal-text.visible>span {
  transform: translateY(0);
  opacity: 1;
}

.reveal-text.delay-1>span {
  transition-delay: 0.15s;
}

p {
  margin-bottom: var(--space-2);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-primary-dark);
}

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

/* ============================================
   3. Layout
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.section {
  padding: var(--space-16) 0;
  position: relative;
}

.section--gray {
  background-color: var(--color-surface);
  /* Darker surface for contrast */
}

.section--navy {
  background-color: var(--color-bg);
  color: var(--color-text-main);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  /* subtle separation */
}

.section--navy h2,
.section--navy h3,
.section--navy h4 {
  color: var(--color-text-main);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-10);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

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

.section-header h2 {
  margin-bottom: var(--space-2);
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1.7;
}

/* ============================================
   4. Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out), background-color var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  min-height: 48px;
  position: relative;
  overflow: hidden;
}

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

/* Primary — Kiwi Green */
.btn--primary {
  background: var(--color-primary);
  color: var(--color-bg) !important;
  /* Dark text for contrast on bright green */
  border: none;
  box-shadow: 0 4px 16px var(--color-primary-glow), 0 1px 4px rgba(140, 198, 63, 0.2);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.btn--primary:hover {
  transform: translateY(-2px);
  background: var(--color-primary-light);
  box-shadow: 0 12px 32px var(--color-primary-glow), 0 4px 12px rgba(140, 198, 63, 0.3);
  color: var(--color-bg) !important;
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px var(--color-primary-glow);
}

/* Secondary — Kiwi Outline */
.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid rgba(140, 198, 63, 0.35);
}

.btn--secondary:hover {
  background: rgba(140, 198, 63, 0.08);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* Secondary on dark */
.btn--secondary-light {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.btn--secondary-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 18px 36px;
  font-size: 16px;
  border-radius: var(--radius-md);
  min-height: 54px;
}

/* ============================================
   5. Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: var(--space-3) 0;
  transition: all var(--duration-base) var(--ease-out);
  background-color: transparent;
}

.nav.scrolled {
  padding: var(--space-2) 0;
  background-color: rgba(18, 18, 18, 0.85);
  /* Dark blur */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav__logo-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.nav__logo-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text-main);
}

.nav__logo-text span {
  color: var(--color-primary);
  font-weight: 400;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
}

.nav__links a:not(.btn) {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-muted);
  position: relative;
  padding: 4px 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.nav__links a:not(.btn):hover,
.nav__links a.active:not(.btn) {
  color: var(--color-text-main);
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  transition: width var(--duration-base) var(--ease-out);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__cta {
  margin-left: var(--space-2);
}

.nav__cta .btn {
  padding: 12px 24px;
  font-size: 14px;
  min-height: 44px;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--duration-base) var(--ease-in-out), opacity var(--duration-base) var(--ease-in-out);
}

.nav__hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   6. Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 76px;
  overflow: hidden;
  background: var(--color-bg);
}

/* Gradient mesh background */
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__bg::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(140, 198, 63, 0.12) 0%, transparent 65%);
  /* Kiwi green */
  border-radius: 50%;
  animation: breathe 10s ease-in-out infinite;
}

.hero__bg::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: 10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(226, 240, 165, 0.06) 0%, transparent 65%);
  /* Pale yellow-green */
  border-radius: 50%;
  animation: breathe 12s ease-in-out infinite reverse;
}

/* Subtle dot grid */
.hero__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(140, 198, 63, 0.15) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, black 20%, transparent 70%);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-10);
  min-height: calc(100vh - 76px);
  position: relative;
  z-index: 2;
}

.hero__text {
  color: var(--color-white);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(140, 198, 63, 0.1);
  border: 1px solid rgba(140, 198, 63, 0.2);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero__badge::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-primary);
  animation: pulse 2.5s ease-in-out infinite;
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: var(--space-3);
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 20px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--space-6);
  max-width: 520px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
}

.hero__scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: var(--space-4);
}

.hero__scroll-indicator span {
  opacity: 0.6;
}

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  position: relative;
}

.wheel {
  width: 2px;
  height: 6px;
  background: var(--color-primary);
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 1px;
  animation: scroll-wheel 2s infinite;
}

@keyframes scroll-wheel {
  0% {
    transform: translate(-50%, 0);
    opacity: 0;
  }

  30% {
    opacity: 1;
  }

  100% {
    transform: translate(-50%, 15px);
    opacity: 0;
  }
}

.hero__actions .btn {
  margin: 0 var(--space-2) var(--space-2) 0;
}

/* Hero Visual — Three.js Canvas */
.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#heroCanvas {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  cursor: grab;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#heroCanvas.visible {
  opacity: 1;
  transform: scale(1);
}

#heroCanvas:active {
  cursor: grabbing;
}

/* ============================================
   7. Services Section
   ============================================ */
/* 3D perspective wrapper */
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  perspective: 1200px;
}

.service-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  transition: all var(--duration-base) var(--ease-out);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}

.service-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}

/* 3D shine overlay */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 60%);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
  pointer-events: none;
}

.service-card:hover::after {
  opacity: 1;
}

.service-card__icon {
  width: 52px;
  height: 52px;
  background: rgba(140, 198, 63, 0.08);
  /* subtle kiwi bg */
  border: 1px solid rgba(140, 198, 63, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  transition: all var(--duration-base) var(--ease-out);
  transform: translateZ(20px);
}

.service-card:hover .service-card__icon {
  background: var(--color-primary-glow);
  box-shadow: 0 0 16px var(--color-primary-glow);
}

.service-card__icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-1);
  transform: translateZ(10px);
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 0;
}

/* ============================================
   8. Process / How It Works
   ============================================ */
.process__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  position: relative;
}

.process__steps::before {
  content: '';
  position: absolute;
  top: 52px;
  left: calc(16.67% + 40px);
  right: calc(16.67% + 40px);
  height: 1px;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.1),
      var(--color-primary),
      rgba(255, 255, 255, 0.1));
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.process-step__number {
  width: 104px;
  height: 104px;
  background: var(--color-surface);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  position: relative;
  transition: all var(--duration-base) var(--ease-out);
}

.process-step:hover .process-step__number {
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(140, 198, 63, 0.2);
  transform: scale(1.05);
  background: var(--color-bg);
}

.process-step h3 {
  margin-bottom: var(--space-1);
}

.process-step p {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 300px;
  margin: 0 auto;
}

/* ============================================
   9. Stats / Why Kiwiflow
   ============================================ */
.stats {
  background: var(--color-surface);
  color: var(--color-text-main);
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats__bg-accent {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(140, 198, 63, 0.08) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.stats__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
  position: relative;
  z-index: 1;
}

.stats__text h2 {
  color: var(--color-text-main);
  margin-bottom: var(--space-3);
}

.stats__text p {
  color: var(--color-text-muted);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.stats__quote {
  font-family: inherit;
  /* removed serif */
  font-size: 20px;
  font-weight: 500;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  padding-left: var(--space-3);
  border-left: 3px solid var(--color-primary);
  line-height: 1.7;
}

.stats__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* Glassmorphism stat cards */
.stat-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  transition: all var(--duration-base) var(--ease-out);
  transform-style: preserve-3d;
  will-change: transform;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(140, 198, 63, 0.3);
}

.stat-card__number {
  font-size: 44px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  transform: translateZ(15px);
}

.stat-card__label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================
   10. Testimonials
   ============================================ */
.testimonials__carousel {
  position: relative;
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto;
}

.testimonials__track {
  display: flex;
  transition: transform var(--duration-slow) var(--ease-in-out);
  width: 100%;
}

.testimonial-card {
  flex: 0 0 100%;
  min-width: 100%;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-6) var(--space-5);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.testimonial-card__stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}

.testimonial-card__text {
  font-family: inherit;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.75;
  color: var(--color-text-main);
  margin-bottom: var(--space-4);
  font-style: italic;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-bg);
  font-weight: 700;
  font-size: 16px;
}

.testimonial-card__info strong {
  display: block;
  font-size: 15px;
  color: var(--color-text-main);
}

.testimonial-card__info span {
  font-size: 13px;
  color: var(--color-text-muted);
}

.testimonials__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-5);
}

.testimonials__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  padding: 0;
}

.testimonials__dot.active {
  background: var(--color-primary);
  width: 24px;
  border-radius: 4px;
  box-shadow: 0 0 8px var(--color-primary-glow);
}

/* ============================================
   11. CTA Banner
   ============================================ */
.cta-banner {
  background: var(--color-primary);
  color: var(--color-bg);
  text-align: center;
  padding: var(--space-12) 0;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 65%);
  border-radius: 50%;
}

.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 65%);
  border-radius: 50%;
}

.cta-banner__content {
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  color: var(--color-white);
  font-size: clamp(28px, 3.5vw, 40px);
  margin-bottom: var(--space-2);
}

.cta-banner p {
  font-size: 18px;
  opacity: 0.85;
  margin-bottom: var(--space-5);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ============================================
   12. Contact Section
   ============================================ */
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-10);
  align-items: start;
}

.contact__info h2 {
  margin-bottom: var(--space-2);
}

.contact__info>p {
  color: var(--color-text-muted);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.contact__detail {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.contact__detail-icon {
  width: 44px;
  height: 44px;
  background: rgba(140, 198, 63, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(140, 198, 63, 0.2);
}

.contact__detail-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
}

.contact__detail strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-main);
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.contact__detail span,
.contact__detail a {
  font-size: 15px;
  color: var(--color-text-muted);
}

/* Contact Form */
.contact__form {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-card);
}

.form__group {
  margin-bottom: var(--space-3);
}

.form__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.form__label .required {
  color: var(--color-error);
}

.form__input,
.form__textarea {
  width: 100%;
  font-family: var(--font-primary);
  font-size: 15px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-main);
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--color-text-muted);
  font-size: 14px;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--color-primary);
  background: var(--color-surface-hover);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

/* Valid/Invalid states */
.form__input:not(:placeholder-shown):valid {
  border-color: var(--color-primary);
  background: rgba(140, 198, 63, 0.03);
}

.form__input:not(:placeholder-shown):invalid {
  border-color: var(--color-error);
  background: rgba(255, 77, 77, 0.03);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.form__submit {
  width: 100%;
  margin-top: var(--space-2);
}

.form__feedback {
  padding: 12px 16px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  display: none;
  text-align: center;
  transition: all 0.3s ease;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form__feedback.success {
  display: block;
  background-color: rgba(140, 198, 63, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(140, 198, 63, 0.3);
}

.form__feedback.error {
  display: block;
  background-color: rgba(255, 77, 77, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(255, 77, 77, 0.3);
}

/* ============================================
   13. Footer
   ============================================ */
.footer {
  background: var(--color-bg);
  color: var(--color-text-muted);
  padding: var(--space-10) 0 var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: var(--space-2);
}

.footer__logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.footer__logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text-main);
}

.footer__logo-text span {
  color: var(--color-primary);
  font-weight: 400;
}

.footer__brand p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.35);
}

.footer__col h4 {
  color: var(--color-white);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-3);
  letter-spacing: 0.02em;
}

.footer__col ul {
  list-style: none;
}

.footer__col ul li {
  margin-bottom: 10px;
}

.footer__col ul a {
  color: var(--color-text-muted);
  font-size: 14px;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__col ul a:hover {
  color: var(--color-primary);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__bottom p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.25);
  margin: 0;
}

.footer__socials {
  display: flex;
  gap: 10px;
}

.footer__socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  transition: all var(--duration-fast) var(--ease-out);
}

.footer__socials a:hover {
  background: rgba(140, 198, 63, 0.12);
  border-color: rgba(140, 198, 63, 0.2);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-primary-glow);
}

.footer__socials svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ============================================
   14. Animations
   ============================================ */
@keyframes breathe {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes floatParticle {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(8px, -12px);
  }

  50% {
    transform: translate(-4px, -20px);
  }

  75% {
    transform: translate(-10px, -6px);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(1.8);
  }
}

/* Apple-style scroll reveal — scale + fade + translate */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* Parallax speed layers */
.parallax-slow {
  will-change: transform;
}

.parallax-medium {
  will-change: transform;
}

.parallax-fast {
  will-change: transform;
}

/* Apple-style large text reveal */
.text-reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}

.text-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 3D tilt interactivity (JS-driven) */
.tilt-3d {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ============================================
   15. Responsive
   ============================================ */
@media (max-width: 1024px) {
  .section {
    padding: var(--space-10) 0;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-6);
  }

  .hero__subtitle {
    margin: 0 auto var(--space-5);
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__visual-graphic {
    max-width: 380px;
    margin: 0 auto;
  }

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process__steps {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .process__steps::before {
    display: none;
  }

  .stats__inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

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

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

@media (max-width: 768px) {
  .section {
    padding: var(--space-8) 0;
  }

  .container {
    padding: 0 var(--space-3);
  }

  .hero {
    min-height: auto;
    padding: calc(76px + var(--space-6)) 0 var(--space-6);
  }

  .hero__inner {
    min-height: auto;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    padding: calc(76px + var(--space-4)) var(--space-4) var(--space-4);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08);
    transition: right var(--duration-base) var(--ease-in-out);
    gap: 4px;
  }

  .nav__links.open {
    right: 0;
  }

  .nav__links a {
    font-size: 16px;
    padding: 12px 0;
    width: 100%;
    color: var(--color-bg);
  }

  .nav__cta {
    margin-left: 0;
    margin-top: var(--space-2);
  }

  .nav__hamburger {
    display: flex;
  }

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

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

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

  .cta-banner {
    padding: var(--space-8) 0;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
    margin: 0 0 var(--space-2) 0;
  }

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

/* --- Accessibility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {

  *,
  ::before,
  ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}