:root {
  --bg: #03050a;
  --panel: rgba(12, 18, 31, 0.72);
  --panel-strong: rgba(17, 27, 48, 0.9);
  --text: #f5f8ff;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --blue: #19b7ff;
  --cyan: #69f3ff;
  --violet: #7c5cff;
  --radius: 8px;
  --shadow: 0 24px 80px rgba(0, 96, 255, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 14%, rgba(25, 183, 255, 0.24), transparent 26rem),
    radial-gradient(circle at 86% calc(8% + var(--scroll-glow, 0px)), rgba(124, 92, 255, 0.2), transparent 30rem),
    linear-gradient(135deg, #020308 0%, #07111f 46%, #03050a 100%);
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--scroll-progress, 0%);
  height: 3px;
  z-index: 120;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet));
  box-shadow: 0 0 24px rgba(25, 183, 255, .78);
  transition: width .08s linear;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(105, 243, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 243, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 10%, #000 0, transparent 68%);
  animation: gridDrift 18s linear infinite;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  z-index: 1;
  background-image: linear-gradient(115deg, rgba(255,255,255,.08) 0 1px, transparent 1px 9px);
}

.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(105, 243, 255, 0.78);
  border-radius: 50%;
  pointer-events: none;
  z-index: 80;
  transform: translate(-50%, -50%);
  transition: width .2s ease, height .2s ease, border-color .2s ease;
}

.cursor.active { width: 44px; height: 44px; border-color: rgba(25, 183, 255, 0.35); }

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1120px, calc(100% - 28px));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 46px rgba(0,0,0,.36);
  transition: top .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.is-scrolled .site-header {
  top: 10px;
  background: rgba(3, 7, 18, 0.9);
  border-color: rgba(105, 243, 255, .22);
  box-shadow: 0 18px 60px rgba(0,0,0,.52), 0 0 36px rgba(25, 183, 255, .12);
}

.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: 0; min-width: 0; }
.brand-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.brand span { white-space: nowrap; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 0 34px rgba(25, 183, 255, 0.45);
  color: #fff;
}

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 10px 13px;
  color: var(--muted);
  border-radius: var(--radius);
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,.07); }
.nav-pill { border: 1px solid var(--line); color: var(--cyan) !important; }
.language-switcher {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
}
.language-switcher button {
  min-width: 38px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  font-size: .78rem;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.language-switcher button:hover,
.language-switcher button.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(25,183,255,.78), rgba(124,92,255,.78));
  box-shadow: 0 0 18px rgba(25,183,255,.24);
}
.nav-toggle { display: none; background: transparent; border: 0; width: 42px; height: 42px; padding: 0; flex: 0 0 42px; }
.nav-toggle span { display: block; height: 2px; margin: 7px 4px; background: var(--text); }

main { position: relative; z-index: 2; }
.hero, .page-hero, .section { width: min(1120px, calc(100% - 28px)); margin: 0 auto; }
.full-hero {
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: 148px 0 76px;
  position: relative;
  isolation: isolate;
}

.full-hero::before {
  content: "";
  position: absolute;
  inset: 12% -8% auto auto;
  width: min(520px, 70vw);
  aspect-ratio: 1;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 120deg, rgba(25,183,255,.06), rgba(105,243,255,.28), rgba(124,92,255,.18), rgba(25,183,255,.06));
  filter: blur(6px);
  animation: pulseHalo 7s ease-in-out infinite;
}
.page-hero { padding: 168px 0 50px; }
.page-hero h1 {
  max-width: 1040px;
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: .96;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--cyan);
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 980px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 9vw, 7.4rem);
  line-height: .9;
  letter-spacing: 0;
}
h2 { font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1; letter-spacing: 0; }
h3 { font-size: 1.28rem; }
p { color: var(--muted); line-height: 1.7; }
.hero-copy { max-width: 720px; font-size: clamp(1.03rem, 2vw, 1.35rem); }
.hero-logo {
  width: min(360px, 72vw);
  height: auto;
  margin: -18px 0 10px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.quick-phone {
  width: min(560px, 100%);
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 13, 24, .62);
  backdrop-filter: blur(18px);
}
.quick-phone label { color: var(--muted); font-size: .92rem; }
.quick-phone input { min-height: 48px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(105,243,255,.56); }
.btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
.btn.primary { background: linear-gradient(135deg, var(--blue), var(--violet)); box-shadow: var(--shadow); border: 0; }
.btn.ghost { background: rgba(255,255,255,.05); }

.orbital {
  position: absolute;
  right: 0;
  top: 20%;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(105,243,255,.2);
  border-radius: 50%;
  filter: drop-shadow(0 0 28px rgba(25,183,255,.35));
  animation: spin 18s linear infinite;
}
.orbital span { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 28px var(--blue); }
.orbital span:nth-child(1) { top: 10%; left: 48%; }
.orbital span:nth-child(2) { right: 8%; top: 58%; }
.orbital span:nth-child(3) { left: 14%; bottom: 16%; }

.hero-panel, .stats-band, .tech-strip, .glass-card, .premium-card, .contact-card, .map-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(18px);
}
.hero-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 760px;
  margin-top: 56px;
  overflow: hidden;
}
.hero-panel div, .stats-band div { padding: 22px; background: rgba(255,255,255,.025); }
.hero-panel strong, .stats-band strong, .achievement-grid strong { display: block; font-size: 2rem; }
.hero-panel span, .stats-band span, .achievement-grid span { color: var(--muted); }

.section { padding: 86px 0; }
.section-head { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 34px; }
.section-head h2 { max-width: 740px; }
.service-grid, .portfolio-grid, .achievement-grid, .admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.service-grid.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.premium-card {
  min-height: 248px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform .24s ease, border-color .24s ease, background .24s ease;
}
.premium-card::before, .glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.09), transparent);
  transform: translateX(-120%);
  transition: transform .7s ease;
}
.premium-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% -20%;
  height: 120px;
  background: linear-gradient(90deg, transparent, rgba(25,183,255,.18), transparent);
  transform: rotate(-8deg);
}
.premium-card:hover { transform: translateY(-8px); border-color: rgba(105,243,255,.48); background: var(--panel-strong); }
.premium-card:hover::before, .glass-card:hover::before { transform: translateX(120%); }
.premium-card span { color: var(--cyan); font-weight: 800; }

.stats-band {
  width: min(1120px, calc(100% - 28px));
  margin: 40px auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}
.stats-band strong { color: var(--text); font-size: clamp(2.2rem, 5vw, 4.6rem); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.testimonial-stack { display: grid; gap: 18px; }
.glass-card { padding: 24px; position: relative; overflow: hidden; }
blockquote { margin: 0; color: #dbeafe; line-height: 1.7; }
cite { display: block; margin-top: 18px; color: var(--cyan); font-style: normal; }

.tech-strip {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto 90px;
  overflow: hidden;
  padding: 14px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tech-track {
  display: flex;
  gap: 10px;
  width: max-content;
  padding-inline: 14px;
  animation: techMarquee 26s linear infinite;
}
.tech-strip:hover .tech-track { animation-play-state: paused; }
.tech-strip span, .tag, .filters button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
}

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filters button { color: var(--text); cursor: pointer; }
.filters button.active { background: linear-gradient(135deg, var(--blue), var(--violet)); border-color: transparent; }
.project-card { overflow: hidden; cursor: pointer; }
.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center;
  padding: 18px;
  background: linear-gradient(135deg, rgba(25,183,255,.07), rgba(124,92,255,.05)), #07111f;
}
.project-card .content { padding: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.72);
}
.modal.open { display: grid; }
.modal-card { width: min(780px, 100%); border-radius: var(--radius); border: 1px solid var(--line); background: #07111f; overflow: hidden; position: relative; }
.modal-card > div > img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  object-position: center;
  padding: 18px;
  background: #050914;
}
.icon-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 42px; height: 42px; border: 1px solid var(--line); background: rgba(0,0,0,.5); color: var(--text); border-radius: var(--radius); font-size: 1.5rem; cursor: pointer; }

.timeline { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.timeline article { display: grid; grid-template-columns: 80px 180px 1fr; gap: 20px; padding: 24px; background: rgba(255,255,255,.035); }
.timeline span { color: var(--cyan); font-weight: 800; }

.contact-layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 22px; align-items: start; }
form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
label { display: grid; gap: 8px; color: #dbeafe; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0,0,0,.26);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25,183,255,.12); }
input.is-valid, textarea.is-valid, select.is-valid { border-color: rgba(19,199,122,.72); }
input.is-invalid, textarea.is-invalid, select.is-invalid { border-color: rgba(255,90,116,.78); }
.wide-field { grid-column: 1 / -1; }
.contact-side { display: grid; gap: 14px; }
.contact-card, .map-card { padding: 22px; color: var(--text); }
.contact-card span, .map-card span { display: block; margin-top: 10px; color: var(--muted); }
.map-card { min-height: 190px; display: grid; align-content: end; background: linear-gradient(135deg, rgba(25,183,255,.16), rgba(124,92,255,.12)), var(--panel); }

.footer {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 34px 0 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: 360px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(5, 13, 24, .94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.floating-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 85;
  display: grid;
  gap: 10px;
}
.floating-actions a,
.floating-actions button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(105,243,255,.28);
  border-radius: 50%;
  color: #fff;
  background: rgba(5, 13, 24, .78);
  box-shadow: 0 14px 36px rgba(0,0,0,.34), 0 0 24px rgba(25,183,255,.18);
  backdrop-filter: blur(16px);
  cursor: pointer;
  font-weight: 900;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.floating-actions a:first-child {
  background: linear-gradient(135deg, #ff2d78, #7c5cff 55%, #19b7ff);
  border-color: transparent;
}
.floating-actions a:nth-child(2) {
  background: linear-gradient(135deg, #13c77a, #19b7ff);
  border-color: transparent;
}
.floating-actions a:hover,
.floating-actions button:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: rgba(105,243,255,.62);
}
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes gridDrift {
  to { background-position: 72px 72px; }
}
@keyframes pulseHalo {
  0%, 100% { transform: scale(.94) rotate(0deg); opacity: .55; }
  50% { transform: scale(1.05) rotate(12deg); opacity: .95; }
}
@keyframes techMarquee {
  to { transform: translateX(-50%); }
}

@media (max-width: 860px) {
  .cursor, .orbital { display: none; }
  .site-header {
    top: 10px;
    width: min(520px, calc(100% - 20px));
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px;
  }
  .brand {
    justify-self: center;
    max-width: 100%;
    transform: translateX(26px);
  }
  .nav-toggle {
    display: grid;
    place-items: center;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .nav-toggle span { width: 26px; margin: 0; }
  .nav-toggle span + span { margin-top: 7px; }
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(3,7,18,.94);
  }
  .nav-links.open { display: flex; }
  .language-switcher {
    grid-column: 1 / -1;
    justify-self: center;
    margin: 0;
  }
  .language-switcher button { min-width: 34px; }
  .full-hero {
    min-height: auto;
    padding: 190px 0 54px;
    justify-items: center;
    text-align: center;
  }
  .page-hero {
    padding: 190px 0 42px;
    text-align: center;
  }
  h1 {
    max-width: 11ch;
    font-size: clamp(3rem, 14vw, 4.8rem);
    line-height: .95;
    text-wrap: balance;
  }
  h2 { text-wrap: balance; }
  .hero-copy { max-width: 34rem; margin-left: auto; margin-right: auto; }
  .hero-logo {
    width: min(330px, 82vw);
    margin: 10px auto 20px;
  }
  .hero-actions {
    justify-content: center;
    width: 100%;
  }
  .hero-actions .btn { flex: 1 1 160px; max-width: 230px; }
  .quick-phone {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }
  .hero-panel {
    width: 100%;
    margin-top: 34px;
  }
  .hero-panel, .stats-band, .split, .contact-layout, form { grid-template-columns: 1fr; }
  .quick-phone { grid-template-columns: 1fr; }
  .service-grid, .service-grid.wide, .portfolio-grid, .achievement-grid, .admin-stats { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .timeline article { grid-template-columns: 1fr; }
  .footer { display: grid; gap: 12px; }
  .brand-logo { width: 38px; height: 38px; }
  .brand span { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
  .page-hero h1 {
    max-width: 11ch;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(2.55rem, 12vw, 4.1rem);
    line-height: 1;
  }
  .section { padding: 62px 0; }
  .premium-card { text-align: left; }
  .floating-actions {
    right: 12px;
    bottom: 12px;
  }
  .floating-actions a,
  .floating-actions button {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 430px) {
  .site-header { width: calc(100% - 16px); }
  .brand { transform: translateX(22px); gap: 8px; }
  .brand-logo { width: 34px; height: 34px; }
  .brand span { max-width: 172px; font-size: .96rem; }
  .language-switcher { transform: scale(.92); transform-origin: top center; }
  .full-hero { padding-top: 178px; }
  h1 { font-size: clamp(2.82rem, 13vw, 4rem); }
  .hero-logo { width: min(300px, 86vw); }
  .eyebrow { font-size: .72rem; letter-spacing: .13em; }
  .btn { width: 100%; }
  .hero-actions .btn { max-width: none; }
  .hero-panel div, .stats-band div { padding: 18px; }
  .floating-actions { grid-template-columns: repeat(4, 44px); }
}

@media (min-width: 861px) and (max-width: 1180px) {
  .site-header { width: calc(100% - 32px); }
  .nav-links a { padding-inline: 9px; }
  .language-switcher button { min-width: 34px; }
  .brand span { max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
}

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