/* ============================================================
   ALIV CODE Ltd — Main Stylesheet (Dark Purple Theme)
   Structure:
   1. Custom Properties (design tokens)
   2. Reset & Base
   3. Typography
   4. Layout Utilities
   5. Buttons
   6. Header & Navigation
   7. Hero Section
   8. About Section
   9. Services Section
   10. Why Us Section
   11. Process Section
   12. Contact Section
   13. Footer
   14. Animations & Reveal
   15. Responsive Overrides
============================================================ */


/* ============================================================
   1. CUSTOM PROPERTIES (Design Tokens)
   Edit these to quickly change the site's look and feel.
============================================================ */
:root {
  /* Colors — Dark Mode */
  --color-bg:           #09090f;       /* Page base — near-black with blue undertone */
  --color-bg-alt:       #0d0d16;       /* Alt section background */
  --color-bg-surface:   #13131f;       /* Cards, inputs, elevated surfaces */
  --color-bg-surface-2: #1a1a2e;       /* Higher elevation — hover states, popovers */
  --color-bg-dark:      #060609;       /* Footer, deepest layer */
  --color-bg-dark-2:    #0a0a14;       /* Code card header */

  --color-accent:       #8b5cf6;       /* Primary purple */
  --color-accent-hover: #7c3aed;
  --color-accent-light: rgba(139, 92, 246, 0.15);
  --color-accent-muted: rgba(139, 92, 246, 0.1);
  --color-accent-glow:  rgba(139, 92, 246, 0.25);

  --color-pink:         #ec4899;       /* Secondary accent — pink */
  --color-pink-muted:   rgba(236, 72, 153, 0.1);

  --color-text:         #f1f0f5;       /* Headings */
  --color-text-body:    #c4c3d0;       /* Body text */
  --color-text-muted:   #8b8a9e;       /* Captions, secondary */
  --color-text-inverse: #09090f;       /* Text on colored buttons */

  --color-border:       rgba(255, 255, 255, 0.07);
  --color-border-card:  rgba(139, 92, 246, 0.1);   /* Subtle purple card border */
  --color-border-hover: rgba(139, 92, 246, 0.45);  /* Purple border on hover */

  --color-success:      #34d399;
  --color-error:        #f87171;

  /* Gradients */
  --gradient-hero:    linear-gradient(135deg, #09090f 0%, #1a0836 55%, #09090f 100%);
  --gradient-accent:  linear-gradient(135deg, #8b5cf6, #ec4899);
  --gradient-text:    linear-gradient(135deg, #c084fc 10%, #f472b6 90%);
  --gradient-surface: linear-gradient(135deg, rgba(139,92,246,0.06), rgba(236,72,153,0.03));

  /* Typography */
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;
  --text-5xl:   3rem;
  --text-6xl:   3.75rem;
  --text-7xl:   4.5rem;

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* Border Radius */
  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* Shadows — deeper and colored for dark mode */
  --shadow-sm:   0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-md:   0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.4);
  --shadow-lg:   0 10px 15px -3px rgb(0 0 0 / 0.55), 0 4px 6px -4px rgb(0 0 0 / 0.4);
  --shadow-xl:   0 20px 25px -5px rgb(0 0 0 / 0.6), 0 8px 10px -6px rgb(0 0 0 / 0.4);
  --shadow-card: 0 0 0 1px rgba(139, 92, 246, 0.07), 0 4px 24px rgb(0 0 0 / 0.45);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3), 0 0 60px rgba(139, 92, 246, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --container-max:   1200px;
  --container-pad:   var(--space-6);
  --header-height:   72px;

  /* Z-index scale */
  --z-header:  100;
  --z-overlay: 200;
  --z-modal:   300;
}


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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-body);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ============================================================
   3. TYPOGRAPHY
============================================================ */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.section-heading {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

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

.section-subtext {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  margin-bottom: var(--space-16);
  line-height: 1.7;
}

.body-large {
  font-size: var(--text-lg);
  color: var(--color-text-body);
  line-height: 1.75;
  margin-bottom: var(--space-5);
}

.body-text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: var(--space-5);
}

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


/* ============================================================
   4. LAYOUT UTILITIES
============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.section-alt {
  background-color: var(--color-bg-alt);
  /* Subtle purple-tinted separator lines */
  border-top: 1px solid rgba(139, 92, 246, 0.06);
  border-bottom: 1px solid rgba(139, 92, 246, 0.06);
}


/* ============================================================
   5. BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(139, 92, 246, 0.2), 0 4px 16px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 1px 2px rgba(139, 92, 246, 0.3), 0 8px 28px rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
}

.btn-arrow {
  transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}


/* ============================================================
   6. HEADER & NAVIGATION
============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(9, 9, 15, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.site-header.scrolled {
  border-bottom-color: rgba(139, 92, 246, 0.12);
  box-shadow: 0 1px 32px rgba(0, 0, 0, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-8);
}

/* Brand / Logo */
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  flex-shrink: 0;
}

.brand-name {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.03em;
}

.brand-ltd {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* Desktop Nav */
.nav-desktop ul {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-desktop a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
}

.nav-desktop a:hover {
  color: var(--color-text);
  background: rgba(139, 92, 246, 0.1);
}

.nav-desktop .nav-cta {
  background: var(--color-accent);
  color: #ffffff;
  padding: 0.5rem var(--space-5);
  font-weight: 600;
  margin-left: var(--space-2);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.3);
}

.nav-desktop .nav-cta:hover {
  background: var(--color-accent-hover);
  color: #ffffff;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.45);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.nav-toggle:hover {
  background: rgba(139, 92, 246, 0.1);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: var(--radius-full);
  transition: transform var(--transition-base), opacity var(--transition-base);
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  background: rgba(9, 9, 15, 0.97);
  padding: var(--space-4) var(--space-6) var(--space-6);
}

.nav-mobile[aria-hidden="false"] {
  display: block;
}

.nav-mobile ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.mobile-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.mobile-link:hover {
  color: var(--color-text);
  background: rgba(139, 92, 246, 0.1);
}

.mobile-cta {
  margin-top: var(--space-3);
  background: var(--color-accent);
  color: #ffffff !important;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.mobile-cta:hover {
  background: var(--color-accent-hover) !important;
  color: #ffffff !important;
}


/* ============================================================
   7. HERO SECTION
============================================================ */
.section-hero {
  position: relative;
  background: var(--gradient-hero);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + var(--space-16)) 0 var(--space-24);
  overflow: hidden;
}

/* Hero background decorations */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}

.hero-orb {
  position: absolute;
  border-radius: var(--radius-full);
  filter: blur(80px);
}

.hero-orb--1 {
  width: 700px;
  height: 700px;
  top: -250px;
  right: -150px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.7), transparent 65%);
  animation: float 9s ease-in-out infinite;
}

.hero-orb--2 {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.5), transparent 65%);
  animation: float 13s ease-in-out infinite reverse;
}

/* Third orb — subtle blue accent */
.hero-orb--1::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  top: 60%;
  left: -20%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25), transparent 70%);
  border-radius: var(--radius-full);
  filter: blur(60px);
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.04); }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 820px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4rem var(--space-4);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(196, 164, 255, 0.95);
  margin-bottom: var(--space-8);
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25); }
  50%       { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.08); }
}

.hero-heading {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl));
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  /* Subtle text shadow to lift heading from background */
  text-shadow: 0 0 60px rgba(139, 92, 246, 0.2);
}

.br-mobile { display: none; }

.hero-subtext {
  font-size: clamp(var(--text-base), 2vw, var(--text-xl));
  color: rgba(196, 195, 210, 0.8);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: var(--space-10);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-16);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  justify-content: center;
  padding: var(--space-5) var(--space-8);
  background: rgba(139, 92, 246, 0.07);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(8px);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(210, 205, 230, 0.85);
}

.stat-icon {
  color: var(--color-accent);
  flex-shrink: 0;
}

.stat-divider {
  width: 1px;
  height: 20px;
  background: rgba(139, 92, 246, 0.25);
  flex-shrink: 0;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-dot {
  width: 28px;
  height: 44px;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-full);
  position: relative;
}

.scroll-dot::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(139, 92, 246, 0.7);
  border-radius: var(--radius-full);
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  80%       { transform: translateX(-50%) translateY(16px); opacity: 0; }
}


/* ============================================================
   8. ABOUT SECTION
============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-20);
  align-items: center;
}

.about-pillars {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.pillar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-body);
}

.pillar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--color-accent-muted);
  border-radius: var(--radius-full);
  color: var(--color-accent);
  flex-shrink: 0;
}

/* Code card visual */
.about-visual {
  position: relative;
}

.about-card-stack {
  position: relative;
}

.code-card {
  background: var(--color-bg-dark);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl), 0 0 40px rgba(139, 92, 246, 0.08);
  font-family: var(--font-mono);
}

.code-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-dark-2);
  border-bottom: 1px solid rgba(139, 92, 246, 0.08);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.dot-red   { background: #ff5f57; }
.dot-amber { background: #ffbd2e; }
.dot-green { background: #28c840; }

.code-card-title {
  font-size: var(--text-xs);
  color: rgba(139, 92, 246, 0.5);
  margin-left: auto;
  font-family: var(--font-mono);
}

.code-card-body {
  padding: var(--space-6);
  font-size: var(--text-sm);
  line-height: 2;
}

.code-line { color: rgba(241, 240, 245, 0.85); }
.code-line.indent { padding-left: var(--space-6); }
.kw  { color: #c084fc; }   /* Purple keywords */
.fn  { color: #7dd3fc; }   /* Light blue functions */
.cm  { color: rgba(139, 92, 246, 0.4); font-style: italic; }

/* Metric cards */
.metric-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  position: absolute;
  background: var(--color-bg-surface);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(139, 92, 246, 0.08);
  white-space: nowrap;
}

.metric-card--1 {
  bottom: -20px;
  left: -20px;
}

.metric-card--2 {
  top: -20px;
  right: -20px;
}

.metric-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-accent-muted);
  border-radius: var(--radius-md);
  color: var(--color-accent);
  flex-shrink: 0;
}

.metric-icon--green {
  background: rgba(52, 211, 153, 0.12);
  color: var(--color-success);
}

.metric-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

.metric-value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
}


/* ============================================================
   9. SERVICES SECTION
============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.service-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  position: relative;
  overflow: hidden;
}

/* Very subtle gradient shimmer inside card */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-surface);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.35), 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 40px rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.4);
}

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

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

.service-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-accent-muted);
  border-radius: var(--radius-lg);
  color: var(--color-accent);
  margin-bottom: var(--space-5);
  transition: background var(--transition-base), color var(--transition-base), box-shadow var(--transition-base);
  position: relative;
  z-index: 1;
}

.service-card:hover .service-card-icon {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.5);
}

.service-card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.service-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.service-card--wide .service-card-icon {
  width: 52px;
  height: 52px;
}

.service-card--wide .service-card-title {
  font-size: var(--text-xl);
}

.service-card--wide .service-card-desc {
  font-size: var(--text-base);
  max-width: 600px;
}


/* ============================================================
   10. WHY US SECTION
============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.why-card {
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-card);
  background: var(--color-bg-surface);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  position: relative;
  overflow: hidden;
}

.why-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
  border-radius: var(--radius-full) var(--radius-full) 0 0;
}

.why-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25), 0 16px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(139, 92, 246, 0.3);
}

.why-card:hover::before {
  transform: scaleX(1);
}

.why-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-accent-muted);
  border-radius: var(--radius-lg);
  color: var(--color-accent);
  margin-bottom: var(--space-5);
}

.why-card-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.015em;
}

.why-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}


/* ============================================================
   11. PROCESS SECTION
============================================================ */
.process-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 0;
  margin-top: var(--space-4);
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6);
}

.process-step-number {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.process-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--color-bg-surface);
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-full);
  color: var(--color-accent);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.process-step:hover .process-step-icon {
  border-color: var(--color-accent);
  background: var(--color-accent-muted);
  box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.1), 0 0 20px rgba(139, 92, 246, 0.25);
}

.process-step-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.process-step-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.process-connector {
  display: flex;
  align-items: flex-start;
  padding-top: calc(var(--space-5) + 64px / 2 + var(--space-4));
}

.process-connector::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, rgba(139,92,246,0.15), rgba(139,92,246,0.5), rgba(139,92,246,0.15));
}


/* ============================================================
   12. CONTACT SECTION
============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-20);
  align-items: start;
}

.contact-info {
  padding-top: var(--space-4);
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-lg);
}

.contact-detail-icon {
  display: flex;
  color: var(--color-accent);
  flex-shrink: 0;
}

.contact-email {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.contact-email:hover {
  color: #c084fc;
  text-decoration: underline;
}

.contact-note {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Contact Form */
.contact-form-wrap {
  background: var(--color-bg-surface);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-card);
  /* Subtle glow */
  position: relative;
}

.contact-form-wrap::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(236,72,153,0.08), transparent 60%);
  z-index: -1;
  border-radius: var(--radius-2xl);
  filter: blur(1px);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.required {
  color: var(--color-accent);
}

.optional {
  color: var(--color-text-muted);
  font-weight: 400;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem var(--space-4);
  border: 1.5px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(139, 92, 246, 0.04);
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.5;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.06);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(139, 92, 246, 0.07);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.field-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  font-weight: 500;
  min-height: 16px;
}

.form-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
  text-align: center;
}

.form-success {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-success);
}

.form-success[hidden] {
  display: none;
}


/* ============================================================
   13. FOOTER
============================================================ */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.55);
  padding-top: var(--space-20);
  border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-brand .brand--footer .brand-name {
  color: var(--color-text);
}

.footer-brand .brand--footer .brand-ltd {
  color: rgba(255, 255, 255, 0.3);
}

.footer-tagline {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.4);
  margin-top: var(--space-4);
}

.footer-reg {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.25);
  margin-top: var(--space-2);
}

.footer-nav {
  display: contents;
}

.footer-nav-heading {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-5);
}

.footer-nav-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-nav-col a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.4);
  transition: color var(--transition-fast);
}

.footer-nav-col a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  padding: var(--space-6) 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-bottom p,
.footer-bottom a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.25);
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.footer-bottom-links a:hover {
  color: rgba(139, 92, 246, 0.85);
}


/* ============================================================
   14. ANIMATIONS & REVEAL
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered delays for grid cards */
.services-grid .service-card:nth-child(1),
.why-grid .why-card:nth-child(1) { transition-delay: 0ms; }
.services-grid .service-card:nth-child(2),
.why-grid .why-card:nth-child(2) { transition-delay: 80ms; }
.services-grid .service-card:nth-child(3),
.why-grid .why-card:nth-child(3) { transition-delay: 160ms; }
.services-grid .service-card:nth-child(4),
.why-grid .why-card:nth-child(4) { transition-delay: 80ms; }
.services-grid .service-card:nth-child(5),
.why-grid .why-card:nth-child(5) { transition-delay: 160ms; }
.services-grid .service-card:nth-child(6),
.why-grid .why-card:nth-child(6) { transition-delay: 240ms; }
.services-grid .service-card:nth-child(7)  { transition-delay: 120ms; }

.process-step:nth-child(1) { transition-delay: 0ms; }
.process-step:nth-child(3) { transition-delay: 120ms; }
.process-step:nth-child(5) { transition-delay: 240ms; }
.process-step:nth-child(7) { transition-delay: 360ms; }


/* ============================================================
   15. RESPONSIVE OVERRIDES
============================================================ */

/* Tablet: ≤ 1024px */
@media (max-width: 1024px) {
  :root {
    --container-pad: var(--space-5);
  }

  .about-grid {
    gap: var(--space-12);
  }

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

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

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

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }

  .footer-brand {
    grid-column: span 2;
  }
}

/* Tablet portrait / large mobile: ≤ 768px */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --container-pad: var(--space-5);
  }

  /* Nav */
  .nav-desktop { display: none; }
  .nav-toggle  { display: flex; }

  /* Hero */
  .hero-heading { letter-spacing: -0.03em; }
  .br-mobile { display: inline; }

  .hero-stats {
    gap: var(--space-4);
    padding: var(--space-4) var(--space-6);
  }

  .stat-divider { display: none; }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .about-visual {
    padding: var(--space-8);
  }

  .metric-card--1 { bottom: -10px; left: -10px; }
  .metric-card--2 { top: -10px; right: -10px; }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

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

  /* Why */
  .why-grid {
    grid-template-columns: 1fr;
  }

  /* Process */
  .process-steps {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .process-connector {
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
    transform: rotate(90deg);
    height: 40px;
    align-items: center;
  }

  .process-connector::after {
    width: 30px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form-wrap {
    padding: var(--space-8) var(--space-6);
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-brand {
    grid-column: span 1;
  }

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

  /* Section padding */
  .section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
}

/* Small mobile: ≤ 480px */
@media (max-width: 480px) {
  :root {
    --container-pad: var(--space-4);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-3);
  }

  .section-heading {
    font-size: var(--text-3xl);
  }

  .service-card,
  .why-card {
    padding: var(--space-6);
  }

  .contact-form-wrap {
    padding: var(--space-6) var(--space-5);
  }
}

/* Reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
