/* ==========================================================
   Kalvoryx - Website styles
   ========================================================== */
:root {
  --bg: #05060f;
  --bg-2: #080a18;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #eef1ff;
  --muted: #9097b8;
  --cyan: #22d3ee;
  --blue: #3b6cff;
  --violet: #8b5cf6;
  --grad: linear-gradient(120deg, var(--cyan) 0%, var(--blue) 50%, var(--violet) 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-glow: 0 10px 40px -10px rgba(59, 108, 255, 0.55);
  --font: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Sora", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="ar"] body { font-family: var(--font-ar); }
html[lang="ar"] .hero__title, html[lang="ar"] .section__title { letter-spacing: 0; line-height: 1.35; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: rgba(59, 108, 255, .45); color: #fff; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 600px) { .container { padding-inline: 16px; } }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: gradShift 6s linear infinite;
}
@keyframes gradShift { to { background-position: 200% center; } }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__mark { width: 84px; filter: drop-shadow(0 0 24px rgba(59,108,255,.6)); }
.pl-k1, .pl-k2 { opacity: 0; animation: plIn .5s var(--ease) forwards; }
.pl-k2 { animation-delay: .15s; }
.pl-v { stroke-dasharray: 80; stroke-dashoffset: 80; animation: plDraw .7s .3s var(--ease) forwards; }
@keyframes plIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes plDraw { to { stroke-dashoffset: 0; } }

/* ---------- Cursor glow & progress ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 0; pointer-events: none;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,108,255,.14), rgba(139,92,246,.06) 40%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity .3s;
  opacity: 0;
}
@media (hover: hover) { .cursor-glow { opacity: 1; } }
.scroll-progress {
  position: fixed; top: 0; inset-inline-start: 0; height: 2px; width: 0; z-index: 200;
  background: var(--grad); box-shadow: 0 0 12px var(--blue);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, border-color .3s;
  isolation: isolate;
}
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--primary {
  background: var(--grad); background-size: 200% auto; color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover { background-position: right center; box-shadow: 0 14px 50px -8px rgba(139,92,246,.7); }
.btn--ghost { background: var(--surface); border-color: var(--border-2); color: var(--text); backdrop-filter: blur(8px); }
.btn--ghost:hover { background: var(--surface-2); border-color: rgba(255,255,255,.28); }
.btn__arrow { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
[dir="rtl"] .btn__arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .btn__arrow { transform: scaleX(-1) translateX(4px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  transition: background .4s, border-color .4s, backdrop-filter .4s, height .3s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(5, 6, 15, .72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-color: var(--border);
  --header-h: 66px;
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.brand__mark { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(59,108,255,.45)); transition: transform .5s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }
.brand__word { font-family: var(--font); font-weight: 700; font-size: 22px; letter-spacing: .01em; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__link {
  position: relative; padding: 8px 14px; font-size: 14.5px; color: var(--muted); border-radius: 999px;
  transition: color .25s, background .25s;
}
.nav__link:hover, .nav__link.is-active { color: var(--text); background: var(--surface); }
.nav__cta { margin-inline-start: 10px; }
.header__actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  position: relative; display: inline-flex; padding: 4px; gap: 2px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 999px;
}
.lang-toggle__opt {
  position: relative; z-index: 1; min-width: 34px; padding: 5px 8px; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--muted); border-radius: 999px; transition: color .3s, background .3s;
}
.lang-toggle__opt[data-lang="ar"] { font-family: var(--font-ar); }
.lang-toggle__opt.is-active { color: #fff; background: var(--grad); }

.burger { display: none; width: 44px; height: 44px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-2); position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: transform .35s var(--ease), opacity .25s; }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px; background: rgba(5,6,15,.96); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: .35s var(--ease);
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__link { padding: 14px 16px; font-size: 16px; border-radius: 12px; }
  .nav__cta { margin: 8px 0 0; padding: 16px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 90px; overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.hero__orb { position: absolute; border-radius: 50%; filter: blur(90px); z-index: 0; pointer-events: none; }
.hero__orb--1 { width: 520px; height: 520px; background: rgba(59,108,255,.35); top: -120px; inset-inline-end: -120px; animation: orb 14s ease-in-out infinite alternate; }
.hero__orb--2 { width: 440px; height: 440px; background: rgba(139,92,246,.28); bottom: -160px; inset-inline-start: -120px; animation: orb 18s ease-in-out infinite alternate-reverse; }
@keyframes orb { to { transform: translate(60px, 40px) scale(1.12); } }

.hero__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 999px;
  font-size: 13.5px; color: #c9cff0; backdrop-filter: blur(8px);
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(34,211,238,.7); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(34,211,238,0); } 100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); } }

.hero__title {
  margin: 22px 0 20px; font-size: clamp(38px, 6vw, 72px); line-height: 1.06; font-weight: 700; letter-spacing: -.025em;
}
.hero__title > span { display: block; }
.hero__rotator { display: block; min-height: 2.12em; }
.hero__rotator .caret { vertical-align: -0.08em; }
.caret { display: inline-block; width: 4px; height: .9em; margin-inline-start: 6px; background: var(--cyan); border-radius: 2px; animation: blink 1s steps(1) infinite; align-self: center; }
@keyframes blink { 50% { opacity: 0; } }
.hero__lead { max-width: 560px; margin: 0 0 34px; font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 40px 0 0; padding: 0; list-style: none; }
.hero__chips li {
  padding: 7px 14px; font-size: 13px; color: #b9c0e3; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.02);
}

/* Code card */
.hero__visual { position: relative; perspective: 1200px; }
.code-card {
  position: relative; z-index: 2;
  background: linear-gradient(160deg, rgba(20,24,52,.9), rgba(10,12,28,.92));
  border: 1px solid var(--border-2); border-radius: var(--radius);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(59,108,255,.1), 0 0 80px -20px rgba(59,108,255,.45);
  overflow: hidden; transform-style: preserve-3d; transition: transform .2s ease-out;
}
.code-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(34,211,238,.6), transparent 35%, transparent 65%, rgba(139,92,246,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.code-card__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot--r { background: #ff5f57; } .dot--y { background: #febc2e; } .dot--g { background: #28c840; }
.code-card__file { margin-inline-start: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.code-card__body {
  margin: 0; padding: 22px 22px 18px; min-height: 290px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: #cdd3f5; white-space: pre-wrap; text-align: left;
}
.code-card__body .k { color: #c792ea; } .code-card__body .f { color: #82aaff; } .code-card__body .s { color: #c3e88d; }
.code-card__body .c { color: #5c6590; font-style: italic; } .code-card__body .p { color: #22d3ee; } .code-card__body .n { color: #f78c6c; }
.code-card__body .cur { display: inline-block; width: 8px; height: 1.1em; background: var(--cyan); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
.code-card__status {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px; color: var(--muted); direction: ltr;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #28c840; box-shadow: 0 0 10px #28c840; }
.code-card__sep { opacity: .4; }

.float-badge {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: rgba(14,17,38,.85); border: 1px solid var(--border-2); border-radius: 16px; backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -15px rgba(0,0,0,.7); direction: ltr;
  animation: floaty 6s ease-in-out infinite;
}
.float-badge strong { display: block; font-size: 15px; line-height: 1.2; }
.float-badge small { color: var(--muted); font-size: 12px; }
.float-badge__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--grad); font-size: 17px; }
.float-badge--1 { top: -26px; right: -18px; }
.float-badge--2 { bottom: -28px; left: -26px; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-12px); } }
.hero__ring {
  position: absolute; z-index: 1; inset: -40px; border-radius: 50%;
  border: 1px dashed rgba(139,92,246,.25); animation: spin 40s linear infinite; pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-cue {
  position: absolute; z-index: 2; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.25); border-radius: 14px;
}
.scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--cyan); animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (max-width: 960px) {
  .hero { min-height: 0; align-items: flex-start; padding-bottom: 80px; }
  .hero__inner { grid-template-columns: 1fr; gap: 70px; }
  .hero__visual { max-width: 520px; width: 100%; margin-inline: auto; }
  .hero__ring { display: none; }
  .scroll-cue { display: none; }
}
@media (max-width: 600px) {
  .hero { padding-top: calc(var(--header-h) + 24px); }
  .code-card__body { font-size: 12px; min-height: 250px; padding: 18px 16px; }
  .float-badge--1 { right: 4px; top: -30px; }
  .float-badge--2 { left: 4px; bottom: -30px; }
  .hero__cta .btn { flex: 1 1 100%; }
}

/* ---------- Marquee ---------- */
.marquee {
  position: relative; z-index: 2; overflow: hidden; padding: 22px 0;
  border-block: 1px solid var(--border); background: linear-gradient(90deg, rgba(34,211,238,.05), rgba(139,92,246,.06));
  direction: ltr;
}
.marquee__track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: 34px; padding-inline-end: 34px; }
.marquee__group span { font-size: clamp(18px, 2.4vw, 26px); font-weight: 600; white-space: nowrap; color: #dfe4ff; }
html[lang="ar"] .marquee__group span { font-family: var(--font-ar); }
.marquee__group i { font-style: normal; color: var(--violet); font-size: 16px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; z-index: 1; padding: clamp(80px, 11vw, 140px) 0; }
.section--alt { background: linear-gradient(180deg, transparent, var(--bg-2) 20%, var(--bg-2) 80%, transparent); }
.section__head { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.section__head--left { margin-inline: 0; text-align: start; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan);
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--grad); border-radius: 2px; }
.section__title { margin: 14px 0 16px; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; }
.section__lead { margin: 0; font-size: clamp(16px, 1.4vw, 18px); color: var(--muted); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.svc-card {
  position: relative; padding: 32px 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); overflow: hidden;
  transition: border-color .4s, background .4s, transform .2s ease-out;
  transform-style: preserve-3d;
}
.svc-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(59,108,255,.18), transparent 50%);
}
.svc-card:hover { border-color: rgba(59,108,255,.45); background: rgba(255,255,255,.05); }
.svc-card:hover::before { opacity: 1; }
.svc-card__icon {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 22px;
  border-radius: 16px; background: linear-gradient(140deg, rgba(34,211,238,.18), rgba(139,92,246,.22));
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .5s var(--ease);
}
.svc-card:hover .svc-card__icon { transform: translateY(-4px) rotate(-6deg); }
.svc-card__icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svc-card h3 { position: relative; margin: 0 0 10px; font-size: 20px; font-weight: 600; }
.svc-card p { position: relative; margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.svc-card__tags { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; direction: ltr; }
[dir="rtl"] .svc-card__tags { justify-content: flex-end; }
.svc-card__tags li { padding: 4px 10px; font-size: 12px; color: #b9c0e3; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--border); }
@media (max-width: 960px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .services { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.process { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0; padding: 0; list-style: none; }
.process__line { position: absolute; top: 28px; inset-inline: 28px; height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.process__line span { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--grad); box-shadow: 0 0 12px var(--blue); transition: width .1s linear; }
.step { position: relative; }
.step__num {
  position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 24px;
  border-radius: 50%; background: var(--bg); border: 1px solid var(--border-2);
  font-family: var(--mono); font-weight: 500; color: var(--cyan);
  transition: background .5s, color .5s, box-shadow .5s, border-color .5s;
}
.step.is-lit .step__num { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 0 30px rgba(59,108,255,.6); }
.step h3 { margin: 0 0 8px; font-size: 20px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 860px) {
  .process { grid-template-columns: 1fr; gap: 36px; padding-inline-start: 0; }
  .process__line { top: 28px; bottom: 28px; inset-inline: 27px auto; width: 2px; height: auto; }
  .process__line span { width: 100% !important; height: var(--fill, 0%); inset-block: 0 auto; }
  .step { display: grid; grid-template-columns: 56px 1fr; column-gap: 20px; }
  .step__num { grid-row: span 2; margin: 0; }
  .step h3 { align-self: end; }
}

/* ---------- Why ---------- */
.why { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.why__intro .btn { margin-top: 30px; }
.why__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feat {
  position: relative; padding: 28px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: transform .4s var(--ease), border-color .4s;
}
.feat:hover { transform: translateY(-6px); border-color: rgba(139,92,246,.45); }
.feat:nth-child(even) { transform: translateY(28px); }
.feat:nth-child(even):hover { transform: translateY(22px); }
.feat__k { font-family: var(--mono); font-size: 13px; color: var(--violet); }
.feat h3 { margin: 10px 0 8px; font-size: 18px; }
.feat p { margin: 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 960px) {
  .why { grid-template-columns: 1fr; }
  .feat:nth-child(even), .feat:nth-child(even):hover { transform: none; }
}
@media (max-width: 520px) { .why__grid { grid-template-columns: 1fr; } }

/* ---------- Stack ---------- */
.stack { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 920px; margin-inline: auto; }
.stack span {
  padding: 11px 20px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: #d6dbf7;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .3s var(--ease), border-color .3s, color .3s, box-shadow .3s;
}
.stack span:hover { transform: translateY(-3px); color: #fff; border-color: rgba(34,211,238,.5); box-shadow: 0 10px 30px -10px rgba(34,211,238,.45); }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: start; }
.faq { display: grid; gap: 12px; }
.faq__item { border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); transition: border-color .3s, background .3s; }
.faq__item[open] { border-color: rgba(59,108,255,.4); background: rgba(255,255,255,.05); }
.faq__item summary {
  position: relative; list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; font-weight: 600; font-size: 16.5px;
}
[dir="rtl"] .faq__item summary { padding: 20px 22px 20px 56px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; top: 50%; inset-inline-end: 20px; transform: translateY(-50%);
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2); color: var(--cyan); font-weight: 400; font-size: 20px; transition: transform .35s var(--ease), background .3s;
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); background: var(--grad); color: #fff; }
.faq__item p { margin: 0; padding: 0 22px 22px; color: var(--muted); animation: faqIn .4s var(--ease); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; gap: 10px; } }

/* ---------- Contact ---------- */
.contact { overflow: hidden; }
.contact__glow {
  position: absolute; z-index: -1; left: 50%; top: 50%; width: 900px; height: 600px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(59,108,255,.22), rgba(139,92,246,.1), transparent); filter: blur(30px);
}
.contact__inner {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start;
  padding: clamp(28px, 5vw, 56px); border-radius: 28px;
  background: linear-gradient(160deg, rgba(20,24,52,.65), rgba(8,10,24,.75));
  border: 1px solid var(--border-2); backdrop-filter: blur(12px);
}
.contact__list { margin: 30px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.contact__list li { display: flex; align-items: center; gap: 14px; color: #d6dbf7; }
.contact__list a:hover { color: var(--cyan); }
.contact__ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.contact__ic svg { width: 20px; height: 20px; fill: none; stroke: var(--cyan); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { position: relative; display: block; }
.field input, .field textarea {
  width: 100%; padding: 24px 16px 10px; font: inherit; font-size: 15px; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  outline: none; transition: border-color .3s, background .3s, box-shadow .3s; resize: vertical;
}
.field textarea { min-height: 130px; }
.field span {
  position: absolute; top: 17px; inset-inline-start: 16px; font-size: 15px; color: var(--muted);
  pointer-events: none; transition: .25s var(--ease); transform-origin: left top;
}
.field input:focus, .field textarea:focus { border-color: var(--blue); background: rgba(59,108,255,.06); box-shadow: 0 0 0 4px rgba(59,108,255,.15); }
.field input:focus + span, .field input:not(:placeholder-shown) + span,
.field textarea:focus + span, .field textarea:not(:placeholder-shown) + span { top: 7px; font-size: 11.5px; color: var(--cyan); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #ff5f7a; }
.form__label { display: block; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 8px 16px; border-radius: 999px; font-size: 14px; cursor: pointer; user-select: none;
  background: rgba(255,255,255,.04); border: 1px solid var(--border-2); color: #c9cff0; transition: .25s;
}
.chip span:hover { border-color: rgba(255,255,255,.3); }
.chip input:checked + span { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 20px -6px rgba(59,108,255,.7); }
.chip input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.form__note { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--cyan); }
.form__note.is-error { color: #ff7a90; }
@media (max-width: 860px) { .contact__inner { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 1; padding: 60px 0 30px; border-top: 1px solid var(--border); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.footer__brand p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer__nav a { color: var(--muted); font-size: 14.5px; transition: color .25s; }
.footer__nav a:hover { color: var(--text); }
.footer__legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); color: #6b7299; font-size: 13px;
}
.footer__legal p { margin: 0; }

/* ---------- To top ---------- */
.to-top {
  position: fixed; z-index: 90; bottom: 22px; inset-inline-end: 22px; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--grad); border: 0; color: #fff; box-shadow: var(--shadow-glow);
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: .4s var(--ease);
}
.to-top svg { width: 20px; height: 20px; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.svc-card.reveal.is-in, .code-card.reveal.is-in { transition: opacity .9s var(--ease), transform .2s ease-out, border-color .4s, background .4s; }

/* ---------- Language switch fade ---------- */
body.is-switching main, body.is-switching .footer { opacity: .2; transition: opacity .18s; }
main, .footer { transition: opacity .25s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}
