/* =========================================================
   Techgys — modern stylesheet (no framework, no jQuery)
   ========================================================= */

:root {
  --bg:        #0b1020;
  --bg-soft:   #11172b;
  --surface:   rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border:    rgba(255, 255, 255, 0.10);
  --border-2:  rgba(255, 255, 255, 0.16);
  --text:      #e8ecf6;
  --muted:     #9aa6c2;
  --indigo:    #6366f1;
  --cyan:      #22d3ee;
  --grad:      linear-gradient(120deg, #818cf8 0%, #22d3ee 100%);
  --grad-dim:  linear-gradient(120deg, #4f46e5 0%, #0891b2 100%);
  --radius:    18px;
  --maxw:      1120px;
  --shadow:    0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -0.02em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #06121b;
  box-shadow: 0 12px 30px -12px rgba(34, 211, 238, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -12px rgba(34, 211, 238, 0.85); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-2);
  color: var(--text);
}
.btn-ghost:hover { transform: translateY(-2px); background: var(--surface-2); border-color: var(--cyan); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11, 16, 32, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.18rem; letter-spacing: -0.03em; }
.brand .logo { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 6px 16px -6px rgba(99, 102, 241, 0.8); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:not(.btn):hover { color: var(--text); background: var(--surface); }
.nav-links a.btn { margin-left: 8px; padding: 10px 18px; }
.nav-links a.btn-primary { color: #06121b; font-weight: 600; }
.nav-links a.btn-ghost { color: var(--text); }
.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px; height: 44px;
  border-radius: 11px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 168px 0 96px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px 420px at 78% 8%, rgba(34, 211, 238, 0.18), transparent 60%),
    radial-gradient(620px 420px at 12% 18%, rgba(99, 102, 241, 0.22), transparent 60%),
    linear-gradient(180deg, #0b1020 0%, #0b1020 100%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(700px 500px at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(700px 500px at 50% 0%, #000 30%, transparent 78%);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.83rem;
  color: var(--muted);
  font-weight: 500;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }
.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.5rem);
  font-weight: 800;
  margin: 26px 0 0;
  max-width: 16ch;
}
.hero .lead {
  margin: 22px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: var(--muted);
  max-width: 56ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 56px;
  color: var(--muted);
  font-size: 0.92rem;
}
.hero-meta strong { color: var(--text); font-weight: 700; }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: 96px 0; }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cyan);
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 14px; }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

/* ---------- Services ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); background: var(--surface-2); }
.card .icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--grad-dim);
  margin-bottom: 20px;
  box-shadow: 0 10px 24px -12px rgba(99, 102, 241, 0.9);
}
.card .icon svg { width: 26px; height: 26px; color: #fff; }
.card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.member {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.member:hover { transform: translateY(-4px); border-color: var(--border-2); }
.avatar {
  width: 82px; height: 82px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: #06121b;
  background: var(--grad);
  letter-spacing: -0.02em;
  box-shadow: 0 12px 28px -14px rgba(34, 211, 238, 0.85);
}
.member h4 { font-size: 1.1rem; }
.member .role { color: var(--cyan); font-size: 0.86rem; font-weight: 600; margin-top: 5px; }
.member .blurb { color: var(--muted); font-size: 0.88rem; margin-top: 12px; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  background: linear-gradient(120deg, rgba(99,102,241,0.12), rgba(34,211,238,0.10));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 44px 24px;
}
.stat { text-align: center; }
.stat .num { font-size: clamp(2.2rem, 5vw, 3.1rem); font-weight: 800; letter-spacing: -0.03em; }
.stat .label { color: var(--muted); margin-top: 6px; font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 30px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.info-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.info-card .icon {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--cyan);
}
.info-card .icon svg { width: 20px; height: 20px; }
.info-card h4 { font-size: 1rem; }
.info-card p, .info-card a { color: var(--muted); margin: 4px 0 0; font-size: 0.94rem; }
.info-card a:hover { color: var(--cyan); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field input, .field textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border-2);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .btn-primary { width: 100%; justify-content: center; margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer-brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.footer-brand .logo { width: 30px; height: 30px; border-radius: 8px; }
.site-footer p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad);
  color: #06121b;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 40;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top svg { width: 22px; height: 22px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 72px; left: 16px; right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: rgba(13, 19, 38, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-links .btn { margin: 6px 0 0; justify-content: center; }
  .stats { grid-template-columns: 1fr; gap: 30px; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding-top: 132px; }
}
@media (max-width: 460px) {
  .team-grid { grid-template-columns: 1fr; }
}
