:root {
  --brand-purple: #7448e8;
  --brand-purple-deep: #35116b;
  --brand-pink: #eb54cf;
  --brand-rose: #d84f9d;
  --brand-cyan: #24d2c3;
  --ink: #170d2d;
  --muted: #6f6680;
  --line: rgba(116, 72, 232, 0.16);
  --surface: #ffffff;
  --surface-soft: #fbf8ff;
  --surface-tint: #f2ebff;
  --shadow: 0 24px 70px rgba(28, 12, 62, 0.14);
  --radius: 8px;
  --container: min(1180px, calc(100% - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 112px;
}

body {
  margin: 0;
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.75;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  color: #fff;
  background: var(--brand-purple);
}

.progress-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, var(--brand-purple), var(--brand-pink), var(--brand-cyan));
  box-shadow: 0 0 18px rgba(235, 84, 207, 0.45);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(116, 72, 232, 0.12);
}

.top-strip {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 7px 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--brand-purple-deep), var(--brand-purple), var(--brand-pink));
  font-size: 0.85rem;
}

.top-strip a {
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.top-strip a:hover {
  opacity: 1;
}

.navbar {
  width: var(--container);
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  width: clamp(170px, 18vw, 230px);
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-inline-start: auto;
}

.nav-links a {
  position: relative;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #2b2043;
  font-weight: 700;
  font-size: 0.94rem;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--brand-purple);
  background: rgba(116, 72, 232, 0.08);
}

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 18px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1.2;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.nav-cta,
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink));
  box-shadow: 0 16px 34px rgba(116, 72, 232, 0.28);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(10px);
}

.nav-cta:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(116, 72, 232, 0.34);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  margin-inline-start: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: clamp(560px, 84vh, 820px);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(18, 5, 49, 0.92) 0%, rgba(51, 17, 107, 0.78) 48%, rgba(235, 84, 207, 0.46) 100%), url("https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=2200&q=80");
  background-position: center;
  background-size: cover;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -20% -10%;
  height: 34%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 72%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 76%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: var(--container);
  margin: 0 auto;
  padding: 90px 0 120px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand-pink);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: #ffd9f7;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 6.8rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-metrics {
  position: absolute;
  z-index: 3;
  left: 50%;
  right: auto;
  bottom: 22px;
  transform: translateX(-50%);
  width: var(--container);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-metrics div {
  min-height: 112px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px);
}

.hero-metrics strong {
  display: block;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1;
}

.hero-metrics strong::after {
  content: "+";
  color: var(--brand-pink);
}

.hero-metrics span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.section {
  width: var(--container);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 116px) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2,
.why-panel h2,
.contact-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4.8vw, 3.35rem);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 0;
}

.section-heading p:last-child,
.why-panel p,
.contact-copy p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.services-section,
.systems-section,
.projects-section {
  position: relative;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card,
.system-card,
.timeline-card,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 45px rgba(28, 12, 62, 0.07);
}

.service-card {
  min-height: 250px;
  padding: 28px;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.service-card:hover,
.system-card:hover {
  transform: translateY(-5px);
  border-color: rgba(235, 84, 207, 0.34);
  box-shadow: var(--shadow);
}

.service-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink));
  font-weight: 900;
}

.service-card h3,
.system-card h3,
.timeline-card h3,
.project-card h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.35;
  font-size: 1.25rem;
  font-weight: 900;
}

.service-card p,
.system-card p,
.timeline-card p,
.project-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.systems-section {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100% - 1180px) / 2));
  background:
    linear-gradient(135deg, rgba(116, 72, 232, 0.08), rgba(235, 84, 207, 0.07)),
    var(--surface-soft);
}

.systems-section > * {
  max-width: 1180px;
  margin-inline: auto;
}

.systems-toolbar {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 16px 38px rgba(28, 12, 62, 0.06);
}

.search-wrap span {
  color: var(--brand-purple);
  font-size: 1.25rem;
  font-weight: 900;
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid rgba(116, 72, 232, 0.18);
  border-radius: 999px;
  color: #39265c;
  background: #fff;
  font-weight: 800;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.chip:hover,
.chip.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink));
  transform: translateY(-1px);
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.system-card {
  position: relative;
  min-height: 210px;
  padding: 22px;
  overflow: hidden;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--brand-purple), var(--brand-pink), var(--brand-cyan)) 1;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, opacity 0.2s ease;
}

.system-card.is-hidden {
  display: none;
}

.system-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--brand-purple-deep);
  background: rgba(116, 72, 232, 0.1);
  font-size: 0.82rem;
  font-weight: 900;
}

.empty-state {
  padding: 24px;
  border: 1px dashed rgba(116, 72, 232, 0.35);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-weight: 800;
}

.timeline-section {
  overflow: hidden;
}

.timeline {
  position: relative;
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 50%;
  width: 3px;
  transform: translateX(50%);
  background: linear-gradient(var(--brand-purple), var(--brand-pink), var(--brand-cyan));
  border-radius: 999px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 86px 1fr;
  align-items: center;
  min-height: 150px;
}

.timeline-item:nth-child(odd) .timeline-card {
  grid-column: 1;
}

.timeline-item:nth-child(even) .timeline-card {
  grid-column: 3;
}

.timeline-number {
  grid-column: 2;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 62px;
  aspect-ratio: 1;
  border: 6px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink));
  box-shadow: 0 18px 35px rgba(116, 72, 232, 0.28);
  font-weight: 900;
}

.timeline-card {
  padding: 24px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 300px;
  gap: 16px;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: 0 18px 45px rgba(28, 12, 62, 0.12);
  isolation: isolate;
}

.project-card-large {
  grid-column: span 2;
  grid-row: span 2;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.55s ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 4, 40, 0.04), rgba(15, 4, 40, 0.88));
  z-index: 1;
}

.project-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 24px;
  color: #fff;
}

.project-content span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(235, 84, 207, 0.82);
  font-size: 0.78rem;
  font-weight: 900;
}

.project-card h3,
.project-card p {
  color: #fff;
}

.project-card p {
  color: rgba(255, 255, 255, 0.8);
}

.project-card:hover img {
  transform: scale(1.07);
  filter: saturate(1.12);
}

.why-section,
.contact-section {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100% - 1180px) / 2));
}

.why-section {
  background: var(--ink);
}

.why-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 70px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(116, 72, 232, 0.28), rgba(235, 84, 207, 0.15)),
    rgba(255, 255, 255, 0.02);
}

.why-panel h2,
.why-panel p {
  color: #fff;
}

.why-panel p {
  color: rgba(255, 255, 255, 0.75);
}

.why-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.why-list div {
  min-height: 130px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.why-list strong {
  display: block;
  color: var(--brand-pink);
  font-size: 1.55rem;
  line-height: 1;
}

.why-list span {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 28px;
  background:
    linear-gradient(135deg, rgba(116, 72, 232, 0.08), rgba(235, 84, 207, 0.08)),
    #fff;
}

.contact-copy {
  align-self: center;
  max-width: 570px;
}

.contact-links {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.contact-links a {
  width: fit-content;
  color: var(--brand-purple);
  font-weight: 900;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: #34244f;
  font-weight: 900;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  border: 1px solid rgba(116, 72, 232, 0.18);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 4px rgba(116, 72, 232, 0.1);
}

.contact-form .btn {
  width: 100%;
}

.form-note {
  min-height: 24px;
  margin: 0;
  color: var(--brand-purple);
  font-weight: 800;
}

.site-footer {
  display: grid;
  gap: 24px;
  padding: 48px max(16px, calc((100% - 1180px) / 2));
  color: rgba(255, 255, 255, 0.78);
  background: #120531;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand img {
  width: min(230px, 55vw);
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
}

.footer-brand p {
  max-width: 420px;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  color: #fff;
  font-weight: 800;
}

.copyright {
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
}

.floating-actions {
  position: fixed;
  z-index: 850;
  inset-inline-start: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
}

.floating-actions a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink));
  box-shadow: 0 14px 34px rgba(116, 72, 232, 0.28);
  font-weight: 900;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-metrics.reveal {
  transform: translateX(-50%) translateY(22px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-metrics.reveal.is-visible {
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1080px) {
  .nav-cta {
    display: none;
  }

  .services-grid,
  .systems-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .top-strip {
    display: none;
  }

  .navbar {
    min-height: 72px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 72px 0 auto;
    display: grid;
    gap: 8px;
    padding: 18px 16px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 50px rgba(28, 12, 62, 0.12);
    transform: translateY(-120%);
    transition: transform 0.24s ease;
  }

  .menu-open .nav-links {
    transform: translateY(0);
  }

  .nav-links a {
    padding: 13px 16px;
  }

  .hero {
    min-height: 86svh;
  }

  .hero-content {
    padding: 72px 0 160px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-metrics div {
    min-height: auto;
    padding: 14px 16px;
  }

  .timeline::before {
    inset-inline-start: 31px;
    transform: none;
  }

  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
  }

  .timeline-number {
    grid-column: 1;
  }

  .timeline-item:nth-child(odd) .timeline-card,
  .timeline-item:nth-child(even) .timeline-card {
    grid-column: 2;
  }

  .why-panel,
  .contact-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --container: min(100% - 24px, 1180px);
  }

  .brand img {
    width: min(175px, 58vw);
  }

  .hero h1 {
    font-size: clamp(2.45rem, 14vw, 4rem);
  }

  .hero-actions,
  .hero-actions .btn {
    width: 100%;
  }

  .services-grid,
  .systems-grid,
  .projects-grid,
  .why-list {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-auto-rows: 340px;
  }

  .project-card-large {
    grid-column: span 1;
    grid-row: span 1;
  }

  .section {
    padding: 64px 0;
  }

  .section-heading h2,
  .why-panel h2,
  .contact-copy h2 {
    font-size: clamp(1.9rem, 10vw, 2.7rem);
  }

  .systems-section,
  .why-section,
  .contact-section {
    padding-inline: 12px;
  }

  .footer-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .floating-actions {
    inset-inline-start: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}