/* ============================================================
   App Melody — styles.css
   Premium SaaS-style static website
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */
:root {
  /* Brand colors */
  --primary:        #1a56ff;
  --primary-dark:   #0041cc;
  --primary-light:  #4d8bff;
  --secondary:      #06b6d4;
  --accent:         #7c3aed;
  --success:        #10b981;
  --warning:        #f59e0b;

  /* Backgrounds */
  --bg:             #f8faff;
  --bg-surface:     #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-hero:        linear-gradient(135deg, #06091e 0%, #0d1540 45%, #061229 100%);

  /* Text */
  --text:           #0f172a;
  --text-muted:     #475569;
  --text-light:     #94a3b8;
  --text-on-dark:   #f8fafc;

  /* Borders */
  --border:         #e2e8f0;
  --border-strong:  #cbd5e1;

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:      0 10px 30px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.05);
  --shadow-xl:      0 20px 40px rgba(0,0,0,.12), 0 8px 16px rgba(0,0,0,.06);
  --shadow-primary: 0 8px 32px rgba(26,86,255,.35);
  --shadow-card:    0 2px 8px rgba(0,0,0,.06), 0 8px 24px rgba(26,86,255,.06);

  /* Gradients */
  --grad-primary:   linear-gradient(135deg, #1a56ff 0%, #7c3aed 100%);
  --grad-secondary: linear-gradient(135deg, #06b6d4 0%, #1a56ff 100%);
  --grad-accent:    linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);

  /* Typography */
  --font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Spacing */
  --section-py:     96px;
  --container:      1200px;
  --gutter:         24px;

  /* Radius */
  --r-sm:   8px;
  --r:      12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* Transitions */
  --t:      all 0.25s ease;
  --t-slow: all 0.45s ease;
  --t-spring: all 0.35s cubic-bezier(.34,1.56,.64,1);
}

/* ============================================================
   DARK THEME TOKENS
   ============================================================ */
[data-theme="dark"] {
  --bg:             #06091e;
  --bg-surface:     #0d1227;
  --bg-surface-alt: #111b38;
  --text:           #f0f4ff;
  --text-muted:     #94a3b8;
  --text-light:     #475569;
  --border:         #1e2d5a;
  --border-strong:  #253463;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.4);
  --shadow:         0 4px 12px rgba(0,0,0,.4);
  --shadow-lg:      0 10px 30px rgba(0,0,0,.5);
  --shadow-xl:      0 20px 40px rgba(0,0,0,.6);
  --shadow-card:    0 2px 8px rgba(0,0,0,.3), 0 8px 24px rgba(26,86,255,.12);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul { list-style: none; }
address { font-style: normal; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection {
  background-color: rgba(26,86,255,.2);
  color: var(--text);
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ============================================================
   3. LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding: var(--section-py) 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 64px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(26,86,255,.08);
  border: 1px solid rgba(26,86,255,.15);
  padding: 5px 14px;
  border-radius: var(--r-full);
  margin-bottom: 16px;
}

[data-theme="dark"] .section-badge {
  background: rgba(26,86,255,.15);
  border-color: rgba(26,86,255,.25);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.025em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   4. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: .9375rem;
  transition: var(--t);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  box-shadow: 0 12px 40px rgba(26,86,255,.45);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.35);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.6);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
  border: 1.5px solid rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.35);
  transform: translateY(-2px);
}

.btn-sm  { padding: 7px 16px; font-size: .875rem; }
.btn-sm svg { width: 14px; height: 14px; }

.btn-lg  { padding: 14px 28px; font-size: 1rem; }
.btn-lg svg { width: 18px; height: 18px; }

.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   5. NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 68px;
  display: flex;
  align-items: center;
  transition: var(--t);
}

.navbar.scrolled {
  background: rgba(248,250,255,.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(6,9,30,.88);
  border-bottom-color: var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
  flex-shrink: 0;
  color: var(--text-on-dark);
}

.navbar.scrolled .logo { color: var(--text); }

.logo-icon {
  font-size: 1.5rem;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text { color: inherit; }

.logo-accent {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  padding: 6px 12px;
  border-radius: var(--r);
  transition: var(--t);
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.12);
}

.navbar.scrolled .nav-link {
  color: var(--text-muted);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: var(--primary);
  background: rgba(26,86,255,.08);
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
  flex-shrink: 0;
}

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r);
  color: rgba(255,255,255,.8);
  transition: var(--t);
  padding: 0;
}

.theme-toggle:hover { background: rgba(255,255,255,.12); color: #fff; }

.navbar.scrolled .theme-toggle { color: var(--text-muted); }
.navbar.scrolled .theme-toggle:hover { background: var(--bg-surface-alt); color: var(--text); }

.theme-toggle svg { width: 18px; height: 18px; }

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: none; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  padding: 8px;
  border-radius: var(--r);
  transition: var(--t);
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: rgba(255,255,255,.9);
  border-radius: 2px;
  transition: var(--t);
}

.navbar.scrolled .hamburger span { background: var(--text); }

.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav CTA */
.nav-cta { display: inline-flex; }

/* ============================================================
   6. HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--bg-hero);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 0 80px;
}

/* Background layer */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Animated glowing orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  will-change: transform;
}

.hero-orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(26,86,255,.55) 0%, transparent 65%);
  top: -200px; right: -150px;
  animation: orbFloat1 12s ease-in-out infinite;
}

.hero-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,.45) 0%, transparent 65%);
  bottom: -100px; left: -100px;
  animation: orbFloat2 15s ease-in-out infinite;
}

.hero-orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(6,182,212,.35) 0%, transparent 65%);
  top: 45%; left: 35%;
  animation: orbFloat3 10s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(-40px, 30px) scale(1.08); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(30px, -40px) scale(1.06); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -25px) scale(1.04); }
  66%       { transform: translate(-20px, 15px) scale(.97); }
}

/* Grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.85);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .04em;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  padding: 7px 18px;
  border-radius: var(--r-full);
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}

.badge-pulse {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); }
  50%       { box-shadow: 0 0 0 6px rgba(16,185,129,.0); }
}

/* Hero title */
.hero-title {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.035em;
  color: #fff;
  margin-bottom: 20px;
}

/* Hero subtitle */
.hero-subtitle {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 36px;
}

/* Hero buttons */
.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}



/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.4);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  z-index: 1;
  transition: var(--t);
}

.hero-scroll-indicator:hover { color: rgba(255,255,255,.7); }

.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%       { transform: rotate(45deg) translateY(5px); }
}

/* ============================================================
   7. ABOUT SECTION
   ============================================================ */
.about { background: var(--bg-surface); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  align-items: center;
}

.about-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}

.about-content p {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
}

.feature-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r);
  background: rgba(26,86,255,.08);
  color: var(--primary);
  flex-shrink: 0;
}

[data-theme="dark"] .feature-icon { background: rgba(26,86,255,.15); }

.feature-icon svg { width: 15px; height: 15px; }

/* About visual — stacked cards */
.about-visual {
  display: none;
}

.about-card {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  width: 250px;
  transition: var(--t-slow);
}

.about-card:hover { transform: translateY(-6px) rotate(0deg) !important; box-shadow: var(--shadow-xl); }

[data-theme="dark"] .about-card { background: var(--bg-surface-alt); }

/* Cards stagger vertically so each title stays clear of the card above it */
.about-card-1 { top: 0;     left: 0;   transform: rotate(-2.5deg); z-index: 3; }
.about-card-2 { top: 145px; left: 45px; transform: rotate(1.5deg);  z-index: 2; }
.about-card-3 { top: 285px; left: 90px; transform: rotate(-1deg);   z-index: 1; }

.about-card-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r);
  background: var(--grad-primary);
  color: #fff;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.about-card-icon svg { width: 20px; height: 20px; }

.about-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.about-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   8. PRODUCTS SECTION
   ============================================================ */
.products { background: var(--bg); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  transition: var(--t-slow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

[data-theme="dark"] .product-card { background: var(--bg-surface-alt); }

/* Glow effect */
.product-card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: var(--r-xl);
  opacity: 0;
  transition: opacity .4s ease;
}

.product-card:hover .product-card-glow { opacity: 1; }

.product-glow-1 { background: radial-gradient(circle at 50% 0%, rgba(26,86,255,.12) 0%, transparent 60%); }
.product-glow-2 { background: radial-gradient(circle at 50% 0%, rgba(6,182,212,.12) 0%, transparent 60%); }
.product-glow-3 { background: radial-gradient(circle at 50% 0%, rgba(124,58,237,.12) 0%, transparent 60%); }

.product-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.product-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-lg);
  flex-shrink: 0;
}

.product-icon svg { width: 24px; height: 24px; }

.product-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--r-lg);
  object-fit: cover;
  flex-shrink: 0;
}

.product-icon-1 { background: linear-gradient(135deg, rgba(26,86,255,.15), rgba(26,86,255,.05)); color: var(--primary); }
.product-icon-2 { background: linear-gradient(135deg, rgba(6,182,212,.15), rgba(6,182,212,.05)); color: var(--secondary); }
.product-icon-3 { background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(124,58,237,.05)); color: var(--accent); }

[data-theme="dark"] .product-icon-1 { background: rgba(26,86,255,.2); }
[data-theme="dark"] .product-icon-2 { background: rgba(6,182,212,.2); }
[data-theme="dark"] .product-icon-3 { background: rgba(124,58,237,.2); }

.product-badge {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-full);
}

.product-badge-1 { background: rgba(26,86,255,.1);  color: var(--primary); }
.product-badge-2 { background: rgba(6,182,212,.1);  color: var(--secondary); }
.product-badge-3 { background: rgba(124,58,237,.1); color: var(--accent); }

.product-title {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}

.product-description {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.product-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
  flex: 1;
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  color: var(--text-muted);
}

.product-features li svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
  color: var(--success);
}

.product-footer { margin-top: auto; }

.btn-product {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--r-lg);
  font-size: .9rem;
  font-weight: 600;
  transition: var(--t);
}

.btn-product svg { width: 16px; height: 16px; }

.btn-product-1 {
  background: rgba(26,86,255,.08);
  color: var(--primary);
  border: 1.5px solid rgba(26,86,255,.2);
}
.btn-product-1:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
  transform: translateY(-2px);
}

.btn-product-2 {
  background: rgba(6,182,212,.08);
  color: var(--secondary);
  border: 1.5px solid rgba(6,182,212,.2);
}
.btn-product-2:hover {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
  box-shadow: 0 8px 24px rgba(6,182,212,.35);
  transform: translateY(-2px);
}

.btn-product-3 {
  background: rgba(124,58,237,.08);
  color: var(--accent);
  border: 1.5px solid rgba(124,58,237,.2);
}
.btn-product-3:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(124,58,237,.35);
  transform: translateY(-2px);
}

/* ============================================================
   9. SERVICES SECTION
   ============================================================ */
.services { background: var(--bg-surface); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: var(--t-slow);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity .3s ease;
  border-radius: var(--r-lg);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before { opacity: .04; }

[data-theme="dark"] .service-card { background: var(--bg-surface-alt); }

.service-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r);
  background: rgba(26,86,255,.08);
  color: var(--primary);
  margin-bottom: 14px;
  transition: var(--t);
  position: relative; z-index: 1;
}

[data-theme="dark"] .service-icon { background: rgba(26,86,255,.15); }

.service-card:hover .service-icon {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
  transform: scale(1.1);
}

.service-icon svg { width: 20px; height: 20px; }

.service-card h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  position: relative; z-index: 1;
}

.service-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.6;
  position: relative; z-index: 1;
}

/* ============================================================
   10. WHY CHOOSE SECTION
   ============================================================ */
.why-us {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.why-us::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(26,86,255,.05) 0%, transparent 60%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.why-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  position: relative;
  transition: var(--t-slow);
  overflow: hidden;
}

.why-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(26,86,255,.2);
}

[data-theme="dark"] .why-card { background: var(--bg-surface-alt); }

.why-number {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  letter-spacing: -.04em;
  user-select: none;
  transition: var(--t);
}

.why-card:hover .why-number { color: rgba(26,86,255,.12); }

.why-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-lg);
  background: rgba(26,86,255,.08);
  color: var(--primary);
  margin-bottom: 16px;
  transition: var(--t);
}

[data-theme="dark"] .why-icon { background: rgba(26,86,255,.15); }

.why-card:hover .why-icon {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.why-icon svg { width: 22px; height: 22px; }

.why-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.why-card p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   11. TECH STACK SECTION
   ============================================================ */
.tech-stack { background: var(--bg-surface); }

.tech-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tech-category {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: var(--t-slow);
}

.tech-category:hover {
  box-shadow: var(--shadow);
  border-color: rgba(26,86,255,.2);
  transform: translateY(-3px);
}

[data-theme="dark"] .tech-category { background: var(--bg-surface-alt); }

.tech-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tech-cat-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r);
  background: rgba(26,86,255,.08);
  color: var(--primary);
  flex-shrink: 0;
}

[data-theme="dark"] .tech-cat-icon { background: rgba(26,86,255,.18); }

.tech-cat-icon svg { width: 18px; height: 18px; }

.tech-category-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  font-size: .8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: rgba(26,86,255,.07);
  color: var(--primary);
  border: 1px solid rgba(26,86,255,.12);
  transition: var(--t);
}

.tech-tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26,86,255,.3);
}

[data-theme="dark"] .tech-tag {
  background: rgba(26,86,255,.12);
  border-color: rgba(26,86,255,.22);
}

/* ============================================================
   12. DEVELOPMENT PROCESS
   ============================================================ */
.process { background: var(--bg); }

.process-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

/* Horizontal connector line */
.process-timeline::before {
  content: '';
  position: absolute;
  top: 36px; left: calc(12.5% + 12px);
  right: calc(12.5% + 12px);
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  opacity: .2;
  pointer-events: none;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.process-step-num {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  font-size: .875rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 16px;
  transition: var(--t-slow);
  flex-shrink: 0;
}

.process-step.visible .process-step-num {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-primary);
}

[data-theme="dark"] .process-step-num { background: var(--bg-surface-alt); }

.process-step-body {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  width: 100%;
  transition: var(--t-slow);
}

.process-step:hover .process-step-body {
  box-shadow: var(--shadow-lg);
  border-color: rgba(26,86,255,.2);
  transform: translateY(-4px);
}

[data-theme="dark"] .process-step-body { background: var(--bg-surface-alt); }

.process-step-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r);
  background: rgba(26,86,255,.08);
  color: var(--primary);
  margin: 0 auto 12px;
}

[data-theme="dark"] .process-step-icon { background: rgba(26,86,255,.18); }

.process-step-icon svg { width: 16px; height: 16px; }

.process-step-body h3 {
  font-size: .9375rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.process-step-body p {
  font-size: .8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   13. FAQ SECTION
   ============================================================ */
.faq { background: var(--bg-surface); }

.faq-list {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: var(--t);
}

.faq-item.open {
  border-color: rgba(26,86,255,.25);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .faq-item { background: var(--bg-surface-alt); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: var(--t);
}

.faq-question:hover { color: var(--primary); }

.faq-chevron {
  width: 18px; height: 18px;
  flex-shrink: 0;
  transition: transform .3s ease;
  color: var(--text-light);
}

.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--primary); }

.faq-answer {
  padding: 0 22px 20px;
  border-top: 1px solid var(--border);
}

.faq-answer[hidden] { display: none; }

.faq-answer p {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.75;
  padding-top: 16px;
}

/* ============================================================
   14. CONTACT SECTION
   ============================================================ */
.contact { background: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}

.contact-info > p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
  font-size: .9375rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-item-icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r);
  background: rgba(26,86,255,.08);
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

[data-theme="dark"] .contact-item-icon { background: rgba(26,86,255,.18); }

.contact-icon-wa {
  background: rgba(37,211,102,.1) !important;
  color: #25d366 !important;
}

.contact-item-icon svg { width: 18px; height: 18px; }

.contact-item-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: .9375rem;
}

.contact-item-text strong { font-weight: 700; }

.contact-item-text span, .contact-item-text a {
  color: var(--text-muted);
  line-height: 1.5;
}

.contact-item-text a:hover { color: var(--primary); }

/* Map */
.contact-map {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Contact form wrap */
.contact-form-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

[data-theme="dark"] .contact-form-wrap { background: var(--bg-surface-alt); }

.contact-form-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}

.contact-form-sub {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.form-cta-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--r-lg);
  font-size: 1rem;
  font-weight: 700;
  background: #25d366;
  color: #fff;
  box-shadow: 0 6px 24px rgba(37,211,102,.35);
  transition: var(--t);
}
.btn-wa svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-wa:hover {
  background: #20bc5a;
  box-shadow: 0 10px 32px rgba(37,211,102,.5);
  transform: translateY(-2px);
}

.btn-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: var(--r-lg);
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  transition: var(--t);
}
.btn-call svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-call:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(26,86,255,.06);
  transform: translateY(-2px);
}

/* ============================================================
   15. FOOTER
   ============================================================ */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding-top: 64px;
}

[data-theme="dark"] .footer { background: #060817; }

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand .logo {
  color: var(--text);
  margin-bottom: 14px;
}

.footer-tagline {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-links-group h4 {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-links-group ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-group a {
  font-size: .9rem;
  color: var(--text-muted);
  transition: var(--t);
}

.footer-links-group a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: .875rem;
  color: var(--text-light);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: .875rem;
  color: var(--text-light);
  transition: var(--t);
}

.footer-bottom-links a:hover { color: var(--primary); }

/* ============================================================
   16. FLOATING BUTTONS
   ============================================================ */

/* WhatsApp float */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 999;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 28px rgba(37,211,102,.45);
  transition: var(--t-spring);
}

.whatsapp-float:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 14px 36px rgba(37,211,102,.55);
}

.whatsapp-float svg { width: 28px; height: 28px; }

.whatsapp-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%; transform: translateY(-50%);
  background: var(--text);
  color: var(--bg-surface);
  font-size: .8125rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  transform: translateY(-50%) translateX(-8px);
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow);
  transition: var(--t-spring);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
  transform: translateY(-3px);
}

.back-to-top svg { width: 18px; height: 18px; }

/* ============================================================
   17. SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger for grid children */
.services-grid .service-card:nth-child(2)  { transition-delay: .05s; }
.services-grid .service-card:nth-child(3)  { transition-delay: .10s; }
.services-grid .service-card:nth-child(4)  { transition-delay: .15s; }
.services-grid .service-card:nth-child(5)  { transition-delay: .20s; }
.services-grid .service-card:nth-child(6)  { transition-delay: .25s; }
.services-grid .service-card:nth-child(7)  { transition-delay: .30s; }

.why-grid .why-card:nth-child(2)   { transition-delay: .08s; }
.why-grid .why-card:nth-child(3)   { transition-delay: .16s; }
.why-grid .why-card:nth-child(4)   { transition-delay: .08s; }
.why-grid .why-card:nth-child(5)   { transition-delay: .16s; }
.why-grid .why-card:nth-child(6)   { transition-delay: .24s; }
.why-grid .why-card:nth-child(7)   { transition-delay: .08s; }
.why-grid .why-card:nth-child(8)   { transition-delay: .16s; }
.why-grid .why-card:nth-child(9)   { transition-delay: .24s; }

.tech-categories .tech-category:nth-child(2) { transition-delay: .08s; }
.tech-categories .tech-category:nth-child(3) { transition-delay: .16s; }
.tech-categories .tech-category:nth-child(4) { transition-delay: .08s; }
.tech-categories .tech-category:nth-child(5) { transition-delay: .16s; }
.tech-categories .tech-category:nth-child(6) { transition-delay: .24s; }

.products-grid .product-card:nth-child(2) { transition-delay: .12s; }
.products-grid .product-card:nth-child(3) { transition-delay: .24s; }

/* ============================================================
   18. SCROLL PROGRESS BAR
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad-primary);
  z-index: 9999;
  transition: width .1s linear;
}

/* ============================================================
   19. RESPONSIVE — TABLET (≤ 1100px)
   ============================================================ */
@media (max-width: 1100px) {
  :root { --section-py: 80px; }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-visual { height: 320px; }
  .about-card { width: 220px; }

  .products-grid { grid-template-columns: 1fr 1fr; }
  .products-grid .product-card:nth-child(3) { grid-column: 1 / -1; max-width: 480px; margin: 0 auto; }

  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-categories { grid-template-columns: repeat(2, 1fr); }
  .process-timeline { grid-template-columns: repeat(2, 1fr); }

  .process-timeline::before { display: none; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ============================================================
   20. RESPONSIVE — MOBILE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --section-py: 64px; --gutter: 16px; }

  /* Navbar */
  .hamburger { display: flex; }
  .nav-cta   { display: none; }

  .nav-links {
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 4px;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s ease, opacity .3s ease;
    z-index: 999;
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--r);
    font-size: 1rem;
  }

  .nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: rgba(26,86,255,.08);
  }

  /* Hero */
  .hero { padding: 100px 0 60px; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .hero-buttons .btn { justify-content: center; }

  /* About */
  .about-visual { display: none; }

  /* Products */
  .products-grid { grid-template-columns: 1fr; }
  .products-grid .product-card:nth-child(3) { max-width: 100%; }
  .product-features { grid-template-columns: 1fr; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }

  /* Why */
  .why-grid { grid-template-columns: 1fr; }

  /* Tech */
  .tech-categories { grid-template-columns: 1fr; }

  /* Process */
  .process-timeline { grid-template-columns: 1fr; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 24px; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============================================================
   21. RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .section-title { font-size: 1.625rem; }
  .hero-badge { font-size: .75rem; }
  .stat-value { font-size: 1.5rem; }
  .about-features { grid-template-columns: 1fr; }
}

/* ============================================================
   22. PRINT STYLES
   ============================================================ */
@media print {
  .navbar, .whatsapp-float, .back-to-top, .hero-bg,
  .scroll-progress, .hero-scroll-indicator { display: none !important; }
  .hero { min-height: auto; background: none; color: #000; }
  .reveal { opacity: 1; transform: none; }
}
