/* ============================================
   Amanah Web Development — v3
   Calm, animated, professional · Light + Dark
   ============================================ */

:root {
  --brand: #2563eb;
  --brand-2: #3b82f6;
  --brand-light: #60a5fa;
  --brand-dark: #1e40af;
  --navy: #0b1a3a;
  --grad: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #0b1a3a 100%);
  --grad-light: linear-gradient(135deg, rgba(59,130,246,.12), rgba(37,99,235,.06));
  --ease: cubic-bezier(.22,1,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --radius: 16px;
}

html[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-soft: #eef2fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0b1a3a;
  --text-soft: #475569;
  --muted: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(11,26,58,.06);
  --shadow-md: 0 10px 30px -10px rgba(11,26,58,.15), 0 4px 12px -4px rgba(11,26,58,.08);
  --shadow-lg: 0 30px 60px -20px rgba(11,26,58,.25), 0 18px 36px -18px rgba(11,26,58,.18);
  --code-str: #059669;
  --code-kw: #8b5cf6;
}

html[data-theme="dark"] {
  --bg: #050914;
  --bg-soft: #0a1124;
  --surface: #0f172a;
  --surface-2: #131b35;
  --text: #e8ecff;
  --text-soft: #a8b3d4;
  --muted: #64748b;
  --border: #1e293b;
  --border-strong: #334155;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.5);
  --shadow-md: 0 10px 30px -10px rgba(0,0,0,.6), 0 4px 12px -4px rgba(0,0,0,.4);
  --shadow-lg: 0 30px 60px -20px rgba(0,0,0,.8), 0 18px 36px -18px rgba(0,0,0,.6);
  --code-str: #34d399;
  --code-kw: #a78bfa;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.no-scroll, html.no-scroll body { overflow: hidden; height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .6s var(--ease), color .6s var(--ease);
}
html[data-lang="ar"] body { font-family: 'Cairo', 'Inter', sans-serif; }
html[dir="rtl"] { direction: rtl; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
.muted { color: var(--muted); font-weight: 500; }

/* ============ LOGO MARK ============ */
.logo-mark {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(11,26,58,.04));
  border: 1px solid var(--border);
  position: relative;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-4deg) scale(1.08); box-shadow: 0 12px 28px -8px rgba(37,99,235,.4); }
.logo-mark svg { width: 30px; height: 22px; display: block; filter: drop-shadow(0 2px 6px rgba(37,99,235,.25)); }
.logo-mark.sm { width: 34px; height: 34px; border-radius: 9px; }
.logo-mark.sm svg { width: 22px; height: 16px; }

/* ============ LOADER ============ */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  transition: opacity .8s var(--ease), visibility .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease);
}
.loader.hidden { opacity: 0; visibility: hidden; transform: scale(1.05); filter: blur(8px); }

.loader-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, #eef2fb 0%, #d8e1f5 100%);
  overflow: hidden;
}
html[data-theme="dark"] .loader-bg {
  background: radial-gradient(ellipse at center, #0a1124 0%, #020616 100%);
}

/* Floating stars */
.loader-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(37,99,235,.6), transparent 50%),
    radial-gradient(1px 1px at 28% 42%, rgba(59,130,246,.5), transparent 50%),
    radial-gradient(2px 2px at 45% 75%, rgba(37,99,235,.4), transparent 50%),
    radial-gradient(1px 1px at 62% 25%, rgba(96,165,250,.5), transparent 50%),
    radial-gradient(1px 1px at 78% 58%, rgba(37,99,235,.45), transparent 50%),
    radial-gradient(2px 2px at 88% 88%, rgba(59,130,246,.4), transparent 50%),
    radial-gradient(1px 1px at 18% 78%, rgba(96,165,250,.5), transparent 50%),
    radial-gradient(1px 1px at 95% 12%, rgba(37,99,235,.5), transparent 50%);
  animation: starsPulse 3s ease-in-out infinite alternate;
}
@keyframes starsPulse { from { opacity: .5; } to { opacity: 1; } }

/* Subtle grid */
.loader-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(37,99,235,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.06) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}
html[data-theme="dark"] .loader-grid {
  background-image:
    linear-gradient(rgba(96,165,250,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,165,250,.07) 1px, transparent 1px);
}

.loader-blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .55;
  animation: blobMove 12s ease-in-out infinite;
}
.lb1 { width: 460px; height: 460px; background: radial-gradient(circle, #3b82f6, transparent 70%); top: 5%; left: 8%; }
.lb2 { width: 380px; height: 380px; background: radial-gradient(circle, #1e40af, transparent 70%); bottom: 5%; right: 8%; animation-delay: -4s; }
.lb3 { width: 340px; height: 340px; background: radial-gradient(circle, #6366f1, transparent 70%); top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: -8s; }
@keyframes blobMove {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px,-30px) scale(1.08); }
  66% { transform: translate(-30px,40px) scale(.94); }
}

.loader-inner {
  position: relative; text-align: center;
  opacity: 0;
  animation: innerFadeIn .6s var(--ease) .1s forwards;
}
@keyframes innerFadeIn { to { opacity: 1; } }

/* Center stage: rings, orbits, halo, logo */
.loader-stage {
  position: relative; width: 240px; height: 240px;
  margin: 0 auto 32px;
}

/* Pulse rings that expand outward from center */
.pulse-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 90px; height: 90px;
  margin: -45px 0 0 -45px;
  border: 2px solid rgba(37,99,235,.5);
  border-radius: 50%;
  animation: pulseOut 2.4s ease-out infinite;
}
.pr2 { animation-delay: .8s; }
.pr3 { animation-delay: 1.6s; }
@keyframes pulseOut {
  0% { transform: scale(.9); opacity: .85; }
  100% { transform: scale(2.6); opacity: 0; }
}
html[data-theme="dark"] .pulse-ring { border-color: rgba(96,165,250,.55); }

/* Orbital rings with satellites */
.orbit {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(37,99,235,.25);
}
html[data-theme="dark"] .orbit { border-color: rgba(96,165,250,.25); }
.orbit-1 {
  width: 150px; height: 150px;
  margin: -75px 0 0 -75px;
  animation: spin 6s linear infinite;
}
.orbit-2 {
  width: 190px; height: 190px;
  margin: -95px 0 0 -95px;
  animation: spin 10s linear infinite reverse;
  border-style: dashed; border-color: rgba(37,99,235,.18);
}
html[data-theme="dark"] .orbit-2 { border-color: rgba(96,165,250,.18); }
.orbit-3 {
  width: 230px; height: 230px;
  margin: -115px 0 0 -115px;
  animation: spin 14s linear infinite;
  border-color: rgba(37,99,235,.14);
}
html[data-theme="dark"] .orbit-3 { border-color: rgba(96,165,250,.14); }
.orbit-dot {
  position: absolute;
  width: 8px; height: 8px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(59,130,246,.9), 0 0 24px rgba(37,99,235,.5);
}
.orbit-1 .orbit-dot { top: -4px; left: 50%; margin-left: -4px; }
.orbit-2 .orbit-dot:nth-child(1) { top: 50%; right: -4px; margin-top: -3px; width: 6px; height: 6px; }
.orbit-2 .orbit-dot:nth-child(2) { top: 50%; left: -3px; margin-top: -2px; width: 4px; height: 4px; background: linear-gradient(135deg, #93c5fd, #3b82f6); }
.orbit-3 .orbit-dot { bottom: -3px; left: 50%; margin-left: -3px; width: 5px; height: 5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Halo glow behind logo */
.loader-halo {
  position: absolute;
  top: 50%; left: 50%;
  width: 130px; height: 130px;
  margin: -65px 0 0 -65px;
  background: radial-gradient(circle, rgba(59,130,246,.55), rgba(37,99,235,.18) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(8px);
  animation: haloPulse 2s ease-in-out infinite;
}
@keyframes haloPulse {
  0%,100% { transform: scale(1); opacity: .75; }
  50% { transform: scale(1.18); opacity: 1; }
}

/* Logo with stroke draw-in */
.loader-logo {
  position: absolute;
  top: 50%; left: 50%;
  width: 110px; height: 70px;
  margin: -35px 0 0 -55px;
  z-index: 2;
  filter: drop-shadow(0 8px 24px rgba(37,99,235,.55));
  animation: logoFloat 3.5s ease-in-out 1.4s infinite;
}
.lg-stroke {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: drawIn 1.3s var(--ease) forwards;
}
.a-stroke { animation-delay: .1s; }
.a-bar { stroke-dasharray: 50; stroke-dashoffset: 50; animation-delay: .9s; }
.w-stroke { animation-delay: .5s; }
@keyframes drawIn { to { stroke-dashoffset: 0; } }
@keyframes logoFloat { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.04); } }

/* Wordmark cascade */
.loader-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 28px;
  letter-spacing: .55em;
  color: var(--navy);
  margin-bottom: 12px;
  display: inline-flex;
  padding-inline-start: .55em; /* compensate for trailing letter-spacing */
}
html[data-theme="dark"] .loader-text { color: #e8ecff; }
.loader-text span {
  display: inline-block; opacity: 0;
  transform: translateY(25px) rotateX(-90deg);
  animation: letterIn .7s var(--ease) forwards;
  transform-origin: bottom center;
}
.loader-text span:nth-child(1) { animation-delay: 1.4s; }
.loader-text span:nth-child(2) { animation-delay: 1.5s; }
.loader-text span:nth-child(3) { animation-delay: 1.6s; }
.loader-text span:nth-child(4) { animation-delay: 1.7s; }
.loader-text span:nth-child(5) { animation-delay: 1.8s; }
.loader-text span:nth-child(6) { animation-delay: 1.9s; }
@keyframes letterIn {
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

.loader-sub {
  font-size: 12px; letter-spacing: .4em;
  color: var(--brand); font-weight: 600;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp .8s var(--ease) 2.1s forwards;
}

/* Progress bar with shimmer */
.loader-progress {
  margin: 36px auto 8px; width: 240px; height: 3px;
  background: rgba(37,99,235,.10);
  border-radius: 3px; overflow: hidden;
  position: relative;
  opacity: 0;
  animation: fadeUp .6s var(--ease) 2.2s forwards;
}
.loader-bar {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #60a5fa 0%, #2563eb 50%, #0b1a3a 100%);
  border-radius: 3px;
  animation: barFill 2.2s var(--ease) 2.3s forwards;
  position: relative;
}
.loader-bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation: shimmer 1.4s linear infinite;
}
@keyframes barFill { to { width: 100%; } }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.loader-percent {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 11px; font-weight: 600;
  color: var(--text-soft); letter-spacing: .15em;
  opacity: 0;
  animation: fadeUp .6s var(--ease) 2.3s forwards;
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ============ CURSOR GLOW ============ */
.cursor-glow {
  position: fixed; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,.10), transparent 60%);
  border-radius: 50%; pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1; opacity: 0;
}
html[data-theme="dark"] .cursor-glow { background: radial-gradient(circle, rgba(59,130,246,.16), transparent 60%); }
@media (hover: hover) { .cursor-glow { opacity: 1; } }

/* ============ HERO BACKGROUND — Vanta GLOBE, polished ============ */
.hero { position: relative; overflow: hidden; isolation: isolate; min-height: 92vh; }
.vanta-bg {
  position: absolute;
  inset: -12% -18% -12% -8%;
  z-index: -2;
  opacity: .8;
  pointer-events: none;
  mask-image: radial-gradient(circle at 70% 50%, black 0%, rgba(0,0,0,.9) 25%, transparent 68%);
  -webkit-mask-image: radial-gradient(circle at 70% 50%, black 0%, rgba(0,0,0,.9) 25%, transparent 68%);
  filter: saturate(1.2) contrast(1.05);
  animation: vantaDrift 32s ease-in-out infinite;
}
@keyframes vantaDrift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-1%, -1%); }
}
.vanta-bg canvas { display: block; width: 100% !important; height: 100% !important; }
html[data-theme="dark"] .vanta-bg { opacity: .95; }

/* Soft blue glow halo behind the globe */
.hero-glow {
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle 520px at 70% 45%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    radial-gradient(circle 320px at 70% 45%, color-mix(in srgb, #60a5fa 18%, transparent), transparent 60%);
  animation: glowPulse 6s ease-in-out infinite;
}
html[data-theme="dark"] .hero-glow {
  background:
    radial-gradient(circle 620px at 70% 45%, rgba(59,130,246,.28), transparent 70%),
    radial-gradient(circle 360px at 70% 45%, rgba(147,197,253,.20), transparent 60%);
}
@keyframes glowPulse {
  0%, 100% { opacity: .85; }
  50% { opacity: 1; }
}

/* Fade hero into the body background */
.hero-fade {
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, transparent 28%, transparent 100%),
    linear-gradient(180deg, transparent 0%, transparent 78%, var(--bg) 100%);
}

@media (max-width: 920px) {
  .vanta-bg {
    inset: -8% -8% -8% -8%;
    mask-image: radial-gradient(circle at 50% 42%, black 0%, rgba(0,0,0,.8) 28%, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at 50% 42%, black 0%, rgba(0,0,0,.8) 28%, transparent 72%);
  }
  .hero-glow { background:
    radial-gradient(circle 380px at 50% 35%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%);
  }
}

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(11,26,58,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,26,58,.05) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
html[data-theme="dark"] .grid-overlay {
  background-image:
    linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px);
}
.noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .04 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  opacity: .5; mix-blend-mode: multiply;
}
html[data-theme="dark"] .noise { mix-blend-mode: screen; opacity: .3; }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, padding .3s;
}
.nav.scrolled { border-bottom-color: var(--border); background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: 0 2px 20px -10px rgba(11,26,58,.1); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 24px; }

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.logo-wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: .18em; color: var(--text); }
.logo-sub { font-size: 10px; letter-spacing: .22em; color: var(--brand); font-weight: 600; text-transform: uppercase; margin-top: 2px; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative;
  color: var(--text-soft); text-decoration: none; font-weight: 500; font-size: 14.5px;
  padding: 10px 16px; border-radius: 10px;
  transition: color .25s var(--ease);
}
.nav-links a::before {
  content: ''; position: absolute; inset: 0;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-radius: 10px;
  transform: scale(.85); opacity: 0;
  transition: transform .3s var(--ease), opacity .3s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::before { transform: scale(1); opacity: 1; }
.nav-links a > * { position: relative; z-index: 1; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Icon button (theme toggle) */
.icon-btn {
  width: 40px; height: 40px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; font: inherit;
  transition: all .25s var(--ease);
  position: relative;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.ic-wrap {
  position: relative; width: 18px; height: 18px;
  display: inline-grid; place-items: center;
}
.ic { position: absolute; top: 0; left: 0; width: 18px; height: 18px; transition: transform .5s var(--ease), opacity .35s; }
html[data-theme="light"] .ic-sun { transform: rotate(0) scale(1); opacity: 1; }
html[data-theme="light"] .ic-moon { transform: rotate(-90deg) scale(0); opacity: 0; }
html[data-theme="dark"] .ic-sun { transform: rotate(90deg) scale(0); opacity: 0; }
html[data-theme="dark"] .ic-moon { transform: rotate(0) scale(1); opacity: 1; }

/* Language switcher */
.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 9px 13px; border-radius: 10px; height: 40px;
  font: inherit; font-weight: 600; font-size: 13px;
  color: var(--text); cursor: pointer;
  transition: all .2s var(--ease);
}
.lang-btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.lang-btn .chev { transition: transform .25s var(--ease); }
.lang-switch.open .lang-btn .chev { transform: rotate(180deg); }
.lang-switch.open .lang-btn { border-color: var(--brand); color: var(--brand); }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  list-style: none; padding: 6px; margin: 0;
  min-width: 170px;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px) scale(.96);
  transform-origin: top right;
  transition: all .25s var(--ease);
}
html[dir="rtl"] .lang-menu { right: auto; left: 0; transform-origin: top left; }
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.lang-menu li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  cursor: pointer; font-size: 14px; font-weight: 500;
  color: var(--text); transition: background .15s;
}
.lang-menu li:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }
.lang-menu li.active { background: var(--grad-light); color: var(--brand); }
.lang-menu .flag { font-size: 16px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 13px 22px; border-radius: 12px;
  font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: all .25s var(--ease);
  white-space: nowrap; font-family: inherit;
  position: relative; overflow: hidden;
}
.btn-sm { padding: 9px 18px; font-size: 14px; border-radius: 10px; height: 40px; }
.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1e40af 100%);
  color: #ffffff;
  box-shadow:
    0 1px 0 rgba(255,255,255,.25) inset,
    0 -1px 0 rgba(0,0,0,.15) inset,
    0 8px 24px -8px rgba(37,99,235,.6),
    0 2px 6px -2px rgba(37,99,235,.4);
  text-shadow: 0 1px 1px rgba(11,26,58,.25);
  font-weight: 600;
  letter-spacing: .01em;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
  opacity: 0; transition: opacity .3s var(--ease);
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 50%);
  pointer-events: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,.3) inset,
    0 -1px 0 rgba(0,0,0,.15) inset,
    0 16px 32px -8px rgba(37,99,235,.7),
    0 4px 12px -2px rgba(37,99,235,.5);
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }
.btn-primary > * { position: relative; z-index: 1; }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn.full { display: flex; width: 100%; }

/* ============ HERO ============ */
.hero { padding: 80px 0 110px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; gap: 50px; } }

.eyebrow {
  display: inline-block;
  color: var(--brand); font-size: 12px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  padding: 6px 14px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-radius: 999px;
  margin: 0 0 22px;
}
.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(38px, 5.5vw, 64px);
  line-height: 1.05; letter-spacing: -.02em;
  margin: 0 0 22px; font-weight: 700;
  color: var(--text);
}
.hero h1 span { display: inline-block; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="dark"] .grad-text { background: linear-gradient(135deg, #60a5fa, #3b82f6, #1e40af); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--text-soft); max-width: 560px; margin: 0 0 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 50px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: 'Space Grotesk', sans-serif; font-size: 28px; color: var(--text); font-weight: 700; }
.hero-stats span { color: var(--muted); font-size: 13px; font-weight: 500; }

.hero-visual { position: relative; perspective: 1000px; }
.visual-card {
  background: var(--surface); border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); overflow: hidden;
  transform: rotateY(-5deg) rotateX(3deg);
  animation: cardFloat 6s ease-in-out infinite;
}
@keyframes cardFloat {
  0%,100% { transform: rotateY(-5deg) rotateX(3deg) translateY(0); }
  50% { transform: rotateY(-5deg) rotateX(3deg) translateY(-12px); }
}
.window-bar { display: flex; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.window-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.window-bar span:nth-child(1) { background: #fca5a5; }
.window-bar span:nth-child(2) { background: #fcd34d; }
.window-bar span:nth-child(3) { background: #86efac; }

.code-area { padding: 24px; font-family: 'JetBrains Mono', 'Consolas', monospace; font-size: 14px; line-height: 1.9; }
.code-line { color: var(--text); opacity: 0; animation: typeIn .5s var(--ease) forwards; }
.code-line:nth-child(1) { animation-delay: 1.6s; }
.code-line:nth-child(2) { animation-delay: 1.8s; }
.code-line:nth-child(3) { animation-delay: 2.0s; }
.code-line:nth-child(4) { animation-delay: 2.2s; }
.code-line:nth-child(5) { animation-delay: 2.4s; }
.code-line:nth-child(6) { animation-delay: 2.6s; }
@keyframes typeIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.c-kw { color: var(--code-kw); font-weight: 600; }
.c-var { color: var(--text); font-weight: 600; }
.c-prop { color: var(--brand); }
.c-str { color: var(--code-str); }
.cursor-blink { display: inline-block; animation: blink 1s infinite; color: var(--brand); }
@keyframes blink { 50% { opacity: 0; } }

.floating-pill {
  position: absolute;
  background: var(--surface); border: 1px solid var(--border);
  padding: 10px 16px; border-radius: 999px;
  font-weight: 600; font-size: 13px; color: var(--text);
  box-shadow: var(--shadow-md);
  animation: pillFloat 5s ease-in-out infinite;
}
.pill-1 { top: -10px; left: -20px; animation-delay: 0s; }
.pill-2 { top: 50%; right: -30px; animation-delay: -1.5s; }
.pill-3 { bottom: 10px; left: 10%; animation-delay: -3s; }
@keyframes pillFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ============ SECTIONS ============ */
.section { padding: 110px 0; position: relative; }
.section-soft { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--brand) 4%, transparent), transparent); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 70px; }
.section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15; letter-spacing: -.015em;
  margin: 0 0 16px; color: var(--text);
}
.section-lead { color: var(--text-soft); font-size: 17px; margin: 0; }

/* ============ GRIDS ============ */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 920px; margin: 0 auto; }
@media (max-width: 920px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ============ FEATURES ============ */
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
  transition: all .4s var(--ease);
  position: relative; overflow: hidden;
}
.feature::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.feature:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--grad-light); color: var(--brand);
  display: grid; place-items: center;
  margin-bottom: 20px;
  transition: transform .4s var(--ease);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature:hover .feature-icon { transform: scale(1.1) rotate(-5deg); background: var(--grad); color: white; }
.feature h3 { font-family: 'Space Grotesk', sans-serif; margin: 0 0 10px; font-size: 22px; color: var(--text); font-weight: 600; }
.feature p { color: var(--text-soft); margin: 0; font-size: 15px; }

/* ============ PORTFOLIO (REAL PREVIEWS) ============ */
.portfolio { gap: 28px; }
.project {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: all .45s var(--ease);
  display: flex; flex-direction: column;
}
.project * { text-decoration: none; }
.project:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }

.project-visual {
  position: relative;
  background: var(--surface-2);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.browser-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.browser-bar > span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border-strong);
}
.browser-bar > span:nth-child(1) { background: #fca5a5; }
.browser-bar > span:nth-child(2) { background: #fcd34d; }
.browser-bar > span:nth-child(3) { background: #86efac; }
.browser-url {
  margin-inline-start: 10px;
  flex: 1;
  padding: 4px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
}
.project-preview {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--surface-2);
  overflow: hidden;
}
.project-preview img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .8s var(--ease);
  z-index: 1;
}
.project:hover .project-preview img { transform: scale(1.05); }
.preview-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 80px;
  z-index: 0;
}
.project-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(11,26,58,.85));
  display: flex; align-items: flex-end;
  padding: 20px 24px;
  color: white; font-weight: 600; font-size: 14px;
  opacity: 0; transition: opacity .4s var(--ease);
  z-index: 2;
}
.project:hover .project-overlay { opacity: 1; }

.project-info { padding: 24px 28px 28px; }
.project-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tag {
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand);
  padding: 5px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}
.project-arrow {
  font-size: 20px; color: var(--text-soft);
  transition: transform .4s var(--ease), color .3s;
}
.project:hover .project-arrow { transform: translate(4px, -4px); color: var(--brand); }
.project-info h3 { font-family: 'Space Grotesk', sans-serif; margin: 0 0 8px; font-size: 22px; color: var(--text); font-weight: 600; }
.project-info p { color: var(--text-soft); margin: 0; font-size: 14.5px; }

/* ============ PRICING ============ */
.pricing { gap: 28px; }
.price-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 32px;
  display: flex; flex-direction: column;
  position: relative; transition: all .4s var(--ease);
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.price-card.featured {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 2px solid var(--brand);
  box-shadow: 0 30px 60px -20px rgba(37,99,235,.3);
  transform: scale(1.03);
}
.price-card.featured:hover { transform: scale(1.03) translateY(-6px); }
@media (max-width: 920px) {
  .price-card.featured { transform: scale(1); }
  .price-card.featured:hover { transform: translateY(-6px); }
}
.badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: white;
  padding: 6px 16px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 8px 20px -6px rgba(37,99,235,.5);
}
.price-head { margin-bottom: 20px; }
.price-head h3 { font-family: 'Space Grotesk', sans-serif; margin: 0 0 6px; font-size: 24px; color: var(--text); font-weight: 700; }
.price-tag { color: var(--text-soft); margin: 0; font-size: 14px; }
.price-amount {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px;
  padding: 20px 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border);
  margin-bottom: 24px;
}
.price-amount .from { font-size: 13px; color: var(--muted); font-weight: 500; }
.price-amount .amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 42px; font-weight: 800; color: var(--text);
  letter-spacing: -.02em; line-height: 1;
}
.price-amount .to { font-size: 16px; color: var(--text-soft); font-weight: 600; }
.features { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.features li {
  padding-inline-start: 28px; position: relative;
  font-size: 14.5px; color: var(--text); font-weight: 500;
}
.features li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
  background-color: color-mix(in srgb, var(--brand) 12%, transparent);
}
.fineprint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 36px; }

/* ============ TIMELINE ============ */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.timeline::before {
  content: ''; position: absolute;
  top: 38px; left: 8%; right: 8%; height: 2px;
  background: linear-gradient(to right, transparent, var(--border) 15%, var(--border) 85%, transparent);
  z-index: 0;
}
@media (max-width: 920px) { .timeline { grid-template-columns: 1fr 1fr; } .timeline::before { display: none; } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } }
.step { position: relative; z-index: 1; text-align: center; padding: 0 8px; }
.step-num {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border);
  display: grid; place-items: center;
  margin: 0 auto 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px; font-weight: 700; color: var(--brand);
  transition: all .4s var(--ease);
}
.step:hover .step-num { transform: scale(1.08); color: white; background: var(--grad); border-color: transparent; }
.step h4 { font-family: 'Space Grotesk', sans-serif; margin: 0 0 8px; font-size: 19px; color: var(--text); font-weight: 600; }
.step p { color: var(--text-soft); margin: 0; font-size: 14.5px; }

/* ============ CONTACT ============ */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
@media (max-width: 920px) { .contact-wrap { grid-template-columns: 1fr; } }
.contact-info .eyebrow, .contact-info h2 { text-align: start; }
.contact-info h2 { margin-bottom: 16px; }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-direction: column; gap: 20px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.ci-ico {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: var(--grad-light); color: var(--brand);
  display: grid; place-items: center;
}
.ci-ico svg { width: 20px; height: 20px; }
.ci-ico.whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); color: white; }
.contact-list strong { display: block; color: var(--text); font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.contact-list a, .contact-list span { color: var(--text-soft); text-decoration: none; font-size: 15px; }
.contact-list a:hover { color: var(--brand); }

.contact-form {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 36px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 18px;
}
.contact-form label { display: flex; flex-direction: column; gap: 8px; }
.contact-form label > span { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: .02em; }
.contact-form input, .contact-form select, .contact-form textarea {
  padding: 13px 16px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 15px;
  outline: none; transition: all .2s var(--ease);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  border-color: var(--brand); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent);
}
.contact-form textarea { resize: vertical; min-height: 110px; font-family: inherit; }
.form-note { color: #059669; font-size: 14px; margin: 0; min-height: 20px; font-weight: 500; }

/* ============ FOOTER ============ */
.footer { padding: 36px 0; border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: .14em; font-size: 14px; color: var(--text); }
.footer-brand .muted { letter-spacing: .14em; font-size: 11px; }
.footer p { margin: 0; font-size: 13px; }

/* ============ REVEAL ANIMATIONS ============ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .section { padding: 80px 0; }
  .hero { padding: 50px 0 80px; }
  .floating-pill { display: none; }
  .visual-card { transform: none; animation: none; }
}
