/* ==========================================================================
   QazSolutions — design system
   Palette and motifs derived from the eagle/circuit logo.
   ========================================================================== */

:root {
  --brand-deep:   #1565C8;
  --brand-bright: #2196F3;
  --brand-dark:   #0C3F80;
  --brand-glow:   rgba(33, 150, 243, .35);

  --bg:        #FFFFFF;
  --bg-alt:    #F4F8FD;
  --bg-deep:   #08172E;
  --surface:   #FFFFFF;
  --border:    #E1EAF5;

  --text:      #0C1B2E;
  --text-soft: #52657E;
  --text-inv:  #FFFFFF;

  --grad: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-bright) 100%);

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 10px 40px rgba(12, 63, 128, .08);
  --shadow-lg: 0 24px 70px rgba(12, 63, 128, .16);

  --wrap: 1180px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.85rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 118px) 0; position: relative; }
.section--alt { background: var(--bg-alt); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand-deep);
  background: rgba(33, 150, 243, .09);
  border: 1px solid rgba(33, 150, 243, .22);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-bright); box-shadow: 0 0 0 4px rgba(33, 150, 243, .18);
}

.lead { font-size: 1.08rem; color: var(--text-soft); max-width: 62ch; }

.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .lead { margin-left: auto; margin-right: auto; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px; border: 1px solid transparent;
  font-family: inherit; font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: transform .25s, box-shadow .25s, background .25s, color .25s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--grad); color: var(--text-inv);
  box-shadow: 0 10px 26px rgba(21, 101, 200, .32);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(21, 101, 200, .42); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--brand-bright); color: var(--brand-deep); }
.btn--light { background: #fff; color: var(--brand-deep); }
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0, 0, 0, .22); }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 16px 0; transition: background .3s, box-shadow .3s, padding .3s;
}
.site-header.is-stuck {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border); padding: 9px 0;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 1.12rem; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand span { letter-spacing: -.02em; }
.brand b { color: var(--brand-bright); font-weight: 700; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: .93rem; font-weight: 500; color: var(--text-soft); position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 2px; width: 0;
  background: var(--grad); border-radius: 2px; transition: width .28s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-side { display: flex; align-items: center; gap: 14px; }
.lang {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 600; color: var(--brand-deep);
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px;
  transition: border-color .25s, background .25s;
}
.lang:hover { border-color: var(--brand-bright); background: rgba(33, 150, 243, .06); }

.burger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border);
  border-radius: 12px; background: #fff; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s, opacity .3s; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 170px 0 100px; overflow: hidden;
  background:
    radial-gradient(900px 500px at 78% 8%, rgba(33, 150, 243, .13), transparent 62%),
    radial-gradient(700px 460px at 8% 82%, rgba(21, 101, 200, .10), transparent 60%),
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { font-size: 1.14rem; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.trust { display: flex; align-items: center; gap: 14px; }
.trust-dots { display: flex; }
.trust-dots i {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff;
  background: var(--grad); margin-left: -10px; display: block;
}
.trust-dots i:first-child { margin-left: 0; }
.trust-dots i:nth-child(2) { background: linear-gradient(135deg, #2196F3, #64B5F6); }
.trust-dots i:nth-child(3) { background: linear-gradient(135deg, #0C3F80, #1565C8); }
.trust-dots i:nth-child(4) { background: linear-gradient(135deg, #1E88E5, #42A5F5); }
.trust p { margin: 0; font-size: .9rem; color: var(--text-soft); }

/* Hero visual — circuit motif echoing the logo */
.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-visual .orb {
  position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: var(--grad); filter: blur(58px); opacity: .22;
}
.hero-mark { position: relative; width: min(100%, 430px); }
.hero-mark img { width: 100%; filter: drop-shadow(0 26px 50px rgba(21, 101, 200, .28)); }

.float-card {
  position: absolute; background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 16px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px;
  font-size: .84rem; font-weight: 600;
}
.float-card i { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-bright); }
.float-card--a { top: 8%; left: -6%; animation: floaty 5.5s ease-in-out infinite; }
.float-card--b { bottom: 12%; right: -4%; animation: floaty 6.5s ease-in-out infinite .8s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-13px); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 22px; text-align: center;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.stat:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(33, 150, 243, .4); }
.stat b { display: block; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1; margin-bottom: 8px; }
.stat span { font-size: .87rem; color: var(--text-soft); }

/* ---------- Services ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 28px; overflow: hidden;
  transition: transform .32s, box-shadow .32s, border-color .32s;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform .38s;
}
.card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card-ico {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  background: rgba(33, 150, 243, .10); color: var(--brand-deep); margin-bottom: 20px;
  transition: background .32s, color .32s, transform .32s;
}
.card-ico svg { width: 26px; height: 26px; }
.card:hover .card-ico { background: var(--grad); color: #fff; transform: rotate(-6deg) scale(1.06); }
.card p { color: var(--text-soft); font-size: .94rem; margin: 0; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; position: relative; }
.step { position: relative; padding-top: 34px; }
.step::before {
  content: ""; position: absolute; top: 9px; left: 0; right: -13px; height: 2px;
  background: repeating-linear-gradient(90deg, rgba(33,150,243,.45) 0 7px, transparent 7px 14px);
}
.step:last-child::before { right: 0; }
.step i {
  position: absolute; top: 0; left: 0; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand-bright);
  box-shadow: 0 0 0 5px rgba(33, 150, 243, .13);
}
.step b { display: block; font-size: .8rem; letter-spacing: .1em; color: var(--brand-bright); margin-bottom: 7px; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-soft); font-size: .93rem; margin: 0; }

/* ---------- Portfolio ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 24px; }
.project {
  position: relative; border-radius: var(--radius); padding: 30px 28px; overflow: hidden;
  background: var(--bg-deep); color: var(--text-inv); min-height: 208px;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform .34s, box-shadow .34s;
}
.project::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(520px 260px at 88% 6%, rgba(33, 150, 243, .40), transparent 66%);
  transition: opacity .34s; opacity: .75;
}
.project > * { position: relative; z-index: 1; }
.project:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); }
.project:hover::after { opacity: 1; }
.project .tag {
  align-self: flex-start; font-size: .72rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2);
  margin-bottom: auto;
}
.project h3 { margin: 20px 0 7px; }
.project p { color: rgba(255, 255, 255, .74); font-size: .92rem; margin: 0; }

/* ---------- CTA marquee ---------- */
.marquee { background: var(--grad); padding: 22px 0; overflow: hidden; }
.marquee-track { display: flex; gap: 44px; width: max-content; animation: slide 26s linear infinite; }
.marquee-track span {
  display: inline-flex; align-items: center; gap: 44px;
  color: #fff; font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap;
}
.marquee-track span::after { content: "✦"; opacity: .6; font-size: 1rem; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 52px; align-items: start; }
.contact-list { display: grid; gap: 14px; margin-top: 30px; }
.contact-item {
  display: flex; align-items: center; gap: 15px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .26s, transform .26s, box-shadow .26s;
}
.contact-item:hover { border-color: var(--brand-bright); transform: translateX(4px); box-shadow: var(--shadow); }
.contact-item .ico {
  width: 42px; height: 42px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: rgba(33, 150, 243, .10); color: var(--brand-deep);
}
.contact-item .ico svg { width: 20px; height: 20px; }
.contact-item small { display: block; font-size: .77rem; color: var(--text-soft); }
.contact-item b { font-size: .97rem; font-weight: 600; }

/* ---------- Form ---------- */
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow);
}
.field { margin-bottom: 17px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; font-family: inherit; font-size: .95rem;
  color: var(--text); background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .22s, box-shadow .22s, background .22s;
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:focus, .field textarea:focus {
  outline: none; background: #fff; border-color: var(--brand-bright);
  box-shadow: 0 0 0 4px rgba(33, 150, 243, .13);
}
.field input::placeholder, .field textarea::placeholder { color: #9AABC0; }
.field.has-error input, .field.has-error textarea { border-color: #E5484D; box-shadow: 0 0 0 4px rgba(229, 72, 77, .1); }
.field .err { display: none; font-size: .8rem; color: #E5484D; margin-top: 6px; }
.field.has-error .err { display: block; }

.form-note { font-size: .8rem; color: var(--text-soft); margin: 14px 0 0; text-align: center; }

.form-msg { display: none; padding: 14px 16px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 18px; }
.form-msg.is-on { display: block; }
.form-msg--ok  { background: rgba(22, 163, 74, .10); color: #15803D; border: 1px solid rgba(22, 163, 74, .28); }
.form-msg--bad { background: rgba(229, 72, 77, .09); color: #B4272B; border: 1px solid rgba(229, 72, 77, .26); }

.btn.is-busy { opacity: .72; pointer-events: none; }
.btn .spin {
  width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff; border-radius: 50%; display: none; animation: spin .7s linear infinite;
}
.btn.is-busy .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* honeypot */
.hp { position: absolute !important; left: -9999px !important; opacity: 0 !important; height: 0 !important; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-deep); color: rgba(255, 255, 255, .68); padding: 62px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer p { font-size: .92rem; max-width: 40ch; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 15px; }
.footer-col a { display: block; font-size: .92rem; padding: 5px 0; color: rgba(255, 255, 255, .68); transition: color .22s, transform .22s; }
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.footer-bot {
  border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .85rem;
}

/* ---------- Reveal on scroll ---------- */
/* Hidden only when JS is active (html.js), so a JS failure never blanks the page. */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 140px; }
  .hero-visual { order: -1; }
  .hero-mark { width: min(72%, 300px); }
  .float-card--a { left: 0; }
  .float-card--b { right: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .step::before { display: none; }

  .burger { display: flex; }
  .nav-links {
    position: fixed; inset: 0 0 auto 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-top: 1px solid var(--border);
    box-shadow: var(--shadow-lg); padding: 10px 24px 20px;
    transform: translateY(-14px); opacity: 0; pointer-events: none;
    transition: transform .28s, opacity .28s;
  }
  .nav-links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .nav-links a::after { display: none; }
  .nav-side .btn--primary { display: none; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-card { padding: 24px 20px; }
  .hero-actions .btn { width: 100%; }
  .marquee-track span { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
