:root {
  --blue: #2563eb;
  --violet: #7c3aed;
  --teal: #14b8a6;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --grad: linear-gradient(135deg, var(--blue), var(--violet));
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif; }
p { margin: 0; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }

.skip-link {
  position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff;
  padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.5); outline-offset: 2px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 1.2rem; font-weight: 800; }
.brand strong { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.nav a:not(.btn):hover { color: var(--blue); }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 12px; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 10px 18px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3); }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: #eff6ff; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 96px;
  background:
    radial-gradient(circle at 88% 8%, rgba(124, 58, 237, 0.14), transparent 45%),
    radial-gradient(circle at 4% 92%, rgba(20, 184, 166, 0.12), transparent 45%),
    radial-gradient(circle at 40% 0%, rgba(37, 99, 235, 0.08), transparent 40%),
    var(--bg);
}
.hero .container, .site-header .container { width: min(1340px, 100% - 40px); }
.hero-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.78rem; font-weight: 700; color: var(--violet);
  background: #f3efff; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}

.hero h1 { font-size: clamp(2.1rem, 3.7vw, 3.1rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.h1-line { display: block; text-wrap: balance; }
.old { position: relative; display: inline-block; color: #64748b; }
.old::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 54%; height: 0.09em;
  background: linear-gradient(90deg, #f43f5e, #fb7185); border-radius: 4px;
  transform-origin: left; transition: transform 0.7s cubic-bezier(.2,.8,.2,1);
}
.old:empty { display: none; }
.hero h1.typing .old::after { transform: scaleX(0); }
.hero h1.typing .old.struck::after { transform: scaleX(1); }
.grad {
  background: linear-gradient(100deg, var(--blue), var(--violet), var(--teal), var(--blue));
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s linear infinite;
}

.slogan { margin-top: 24px; font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; font-size: 1.3rem; font-weight: 700; color: var(--ink); line-height: 1.4; max-width: 30ch; }
.lead { margin-top: 14px; font-size: 1.05rem; max-width: 52ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.hero-points li::before { content: "\2713"; color: var(--teal); font-weight: 800; margin-right: 8px; }

/* Hero visual (animated scene lives in storixx.css) */
.hero-visual { position: relative; min-width: 0; }
.hero-blob {
  position: absolute; inset: -6% -4%; z-index: 0; filter: blur(40px); opacity: 0.55;
  background: conic-gradient(from 0deg, #60a5fa, #a78bfa, #2dd4bf, #60a5fa);
  border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
  animation: blob 14s ease-in-out infinite alternate;
}
.hero-visual .sx { position: relative; z-index: 1; }
.hero-visual .sx .viewport { box-shadow: 0 30px 70px -20px rgba(37, 99, 235, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08); }

/* Entrance animations */
.reveal { animation: rise 0.8s cubic-bezier(.2,.8,.2,1) both; }
.reveal-right { animation: slide-in 1s 0.2s cubic-bezier(.2,.8,.2,1) both; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(60px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes strike { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes shimmer { to { background-position: -250% 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes blob {
  from { transform: rotate(0deg) scale(1); border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%; }
  to { transform: rotate(30deg) scale(1.08); border-radius: 60% 40% 45% 55% / 45% 60% 40% 55%; }
}

/* Sections */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -0.01em; }
.section-head p:last-child { margin-top: 12px; }
.muted { color: var(--muted); font-weight: 400; }

.cards { display: grid; gap: 24px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }

.icon {
  width: 52px; height: 52px; border-radius: 14px; background: #eef2ff;
  display: grid; place-items: center; margin-bottom: 18px;
}
.icon svg { width: 26px; height: 26px; fill: var(--blue); }

/* Product cards */
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg-alt); }
.product-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--violet); margin-bottom: 6px; }
.product-features { list-style: none; padding: 0; margin: 14px 0 0; font-size: 0.92rem; }
.product-features li { padding-left: 22px; position: relative; margin-bottom: 4px; }
.product-features li::before { content: "\2713"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }
.product-foot { margin-top: auto; padding-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-weight: 700; color: var(--ink); font-size: 0.95rem; }

/* Demo */
.demo { background: var(--ink); color: #cbd5e1; }
.demo h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; }
.demo .eyebrow { color: #a5b4fc; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.demo-copy p:not(.eyebrow) { margin-top: 14px; max-width: 46ch; }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list a { color: #93c5fd; }

.demo-form { background: #fff; border-radius: 20px; padding: 28px; color: var(--text); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 10px;
  font: inherit; color: var(--ink); background: #fff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }
.form-status { margin-top: 14px; font-size: 0.92rem; min-height: 1.4em; }
.form-status.ok { color: #047857; }
.form-status.err { color: #b91c1c; }

/* Footer */
.site-footer { background: #0b1220; color: #94a3b8; padding: 36px 0; font-size: 0.92rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.copy { width: 100%; border-top: 1px solid #1e293b; padding-top: 18px; margin-top: 6px; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .demo-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; }
}

@media (max-width: 620px) {
  .cards-3 { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 64px; }
  .section { padding: 60px 0; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Language toggle */
.lang-toggle {
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; order: 3; margin-inline-start: 18px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); font: inherit; font-weight: 600; font-size: 0.88rem; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.lang-toggle:hover { border-color: var(--blue); background: #eff6ff; }
.lang-toggle svg { width: 16px; height: 16px; }
.header-inner .nav { order: 2; margin-inline-start: auto; }

/* Urdu / right-to-left version: Nastaliq script; Latin words stay in Inter / Plus Jakarta Sans */
html[dir="rtl"] body,
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] .btn {
  font-family: 'Inter', 'Noto Nastaliq Urdu', system-ui, sans-serif;
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] .slogan, html[dir="rtl"] .brand {
  font-family: 'Plus Jakarta Sans', 'Noto Nastaliq Urdu', 'Inter', sans-serif;
}
html[dir="rtl"] body { line-height: 2.15; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; }
html[dir="rtl"] .hero h1 { line-height: 1.95; font-size: clamp(1.9rem, 3.3vw, 2.8rem); }
html[dir="rtl"] .section-head h2, html[dir="rtl"] .demo h2 { line-height: 1.8; }
html[dir="rtl"] .card h3 { line-height: 1.9; }
html[dir="rtl"] .slogan { max-width: 36ch; line-height: 2; font-size: 1.15rem; }
html[dir="rtl"] .lead { line-height: 2.2; }
html[dir="rtl"] .btn { line-height: 1.9; padding-block: 10px; }
html[dir="rtl"] .btn-sm { padding-block: 6px; }
html[dir="rtl"] .nav a:not(.btn) { font-size: 0.98rem; line-height: 1.9; }
html[dir="rtl"] .eyebrow, html[dir="rtl"] .hero-caption-label, html[dir="rtl"] .product-cat { letter-spacing: 0; text-transform: none; }
html[dir="rtl"] .old::after { transform-origin: right; top: 64%; }
html[dir="rtl"] .hero-points li::before { margin-right: 0; margin-left: 8px; }
html[dir="rtl"] .hero-points { line-height: 2; }
html[dir="rtl"] .product-features li { padding-left: 0; padding-right: 22px; }
html[dir="rtl"] .product-features li::before { left: auto; right: 0; }
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="tel"] { direction: ltr; text-align: right; }
/* give the animated scene more room in Urdu */
html[dir="rtl"] .hero-grid { grid-template-columns: 0.8fr 1.2fr; gap: 40px; }

@media (max-width: 820px) {
  .lang-toggle { order: 2; margin-inline-start: auto; margin-inline-end: 6px; }
  .nav-toggle { order: 3; }
}

@media (max-width: 960px) {
  html[dir="rtl"] .hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .brand { font-size: 1.02rem; }
  .brand img { width: 34px; height: 34px; }
}

/* Hero copy: headline is written first, the rest fades in afterwards */
.hero-copy > * { transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1); }
.hero-copy > :nth-child(3) { transition-delay: 0.12s; }
.hero-copy > :nth-child(4) { transition-delay: 0.24s; }
.hero-copy > :nth-child(5) { transition-delay: 0.36s; }
.hero-copy.is-typing > :not(h1) { opacity: 0; transform: translateY(18px); }
.type-caret {
  display: inline-block; width: 3px; height: 0.85em; margin-inline-start: 4px; vertical-align: -0.05em;
  background: var(--violet); border-radius: 2px; animation: caret 0.8s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* Urdu hero: headline, paragraph, then the closing line */
html[dir="rtl"] .hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
html[dir="rtl"] .hero-copy .lead { order: 2; margin-top: 18px; }
html[dir="rtl"] .hero-copy .slogan { order: 3; margin-top: 20px; max-width: none; font-size: 1.25rem; color: var(--blue); }
html[dir="rtl"] .hero-copy .hero-actions { order: 4; }
html[dir="rtl"] .hero-copy .hero-points { order: 5; }

.product-ph {
  width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center;
  font: 800 3rem 'Plus Jakarta Sans', sans-serif; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

/* page contact form */
.field select { width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 10px; font: inherit; color: var(--ink); background: #fff; }
.field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; clip: rect(0 0 0 0); pointer-events: none; }
