:root {
  --blue: #0a1f9c;
  --blue-deep: #06145f;
  --blue-soft: #e8eefc;
  --red: #e03131;
  --red-deep: #b41f1f;
  --flame: #f5a623;
  --cyan: #3ec6e8;
  --ink: #101828;
  --muted: #5b6475;
  --line: rgba(10, 31, 156, 0.12);
  --white: #ffffff;
  --bg: #f7f9fc;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(6, 20, 95, 0.12);
  --header-h: 76px;
  --font-ar: "Cairo", sans-serif;
  --font-en: "Outfit", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ar);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 800;
}

p {
  margin: 0 0 1em;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(224, 49, 49, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 45% at 0% 30%, rgba(62, 198, 232, 0.1), transparent 50%),
    linear-gradient(180deg, #fbfcff 0%, #f3f6fb 45%, #eef3fa 100%);
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(224, 49, 49, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(224, 49, 49, 0.36);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  color: var(--red);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--blue-deep);
}

.section-desc {
  color: var(--muted);
  margin: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(6, 20, 95, 0.06);
  background: rgba(255, 255, 255, 0.94);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  width: auto;
  height: 48px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-inline: auto 1rem;
}

.nav a {
  font-weight: 600;
  color: var(--blue-deep);
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.25s var(--ease);
}

.nav a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 10px;
  margin-inline-start: auto;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--blue-deep);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(6, 20, 95, 0.94) 0%, rgba(10, 31, 156, 0.9) 48%, rgba(180, 31, 31, 0.72) 100%),
    linear-gradient(180deg, #06145f, #0a1f9c);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: floatGlow 9s ease-in-out infinite;
}

.hero-glow--flame {
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  background: radial-gradient(circle, rgba(245, 166, 35, 0.7), transparent 70%);
  top: -8%;
  left: -5%;
}

.hero-glow--cool {
  width: min(52vw, 480px);
  height: min(52vw, 480px);
  background: radial-gradient(circle, rgba(62, 198, 232, 0.55), transparent 70%);
  bottom: -12%;
  right: -8%;
  animation-delay: -3s;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  opacity: 0.5;
}

.hero-content {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 0 5rem;
  animation: riseIn 0.9s var(--ease) both;
}

.hero-logo-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
  padding: 1rem 1.6rem;
  background: #ffffff;
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.28);
}

.hero-brand {
  width: min(300px, 70vw);
  height: auto;
  margin: 0;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.8vw, 3.1rem);
  max-width: 16ch;
  margin-inline: auto;
  margin-bottom: 0.85rem;
  text-wrap: balance;
}

.hero-lead {
  max-width: 34rem;
  margin: 0 auto 1.75rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.hero-scroll {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  opacity: 0.75;
  letter-spacing: 0.08em;
}

.hero-scroll i {
  width: 1px;
  height: 28px;
  background: linear-gradient(transparent, #fff);
  animation: scrollPulse 1.8s ease-in-out infinite;
}

/* Services */
.services-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.service-block {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.service-block::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 4px;
}

.service-block--safety::before {
  background: linear-gradient(90deg, var(--red), var(--flame));
}

.service-block--hvac::before {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.service-visual {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

.service-visual svg {
  width: 100%;
  height: 100%;
}

.service-block h3 {
  font-size: 1.35rem;
  color: var(--blue-deep);
  margin-bottom: 0.5rem;
}

.service-block > p {
  color: var(--muted);
}

.service-block ul {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.service-block li {
  position: relative;
  padding-inline-start: 1.35rem;
  color: var(--ink);
  font-weight: 600;
}

.service-block li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}

.service-block--safety li::before {
  background: var(--red);
}

.service-block--hvac li::before {
  background: var(--cyan);
}

/* About */
.about {
  background:
    linear-gradient(180deg, transparent, rgba(10, 31, 156, 0.04)),
    radial-gradient(ellipse 50% 60% at 90% 40%, rgba(224, 49, 49, 0.06), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  color: var(--blue-deep);
}

.about-copy p {
  color: var(--muted);
  max-width: 38rem;
}

.about-stats {
  display: grid;
  gap: 1rem;
}

.stat {
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--blue-deep), var(--blue));
  color: var(--white);
  box-shadow: 0 16px 40px rgba(6, 20, 95, 0.22);
}

.stat strong {
  display: block;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-family: var(--font-en);
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.stat strong::after {
  content: "+";
  margin-inline-start: 0.1em;
  font-size: 0.75em;
}

.stat span {
  opacity: 0.85;
  font-weight: 600;
}

/* Process */
.process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  counter-reset: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.process li {
  padding: 1.4rem 1.2rem 1.5rem;
  border-top: 3px solid var(--blue);
  background: transparent;
}

.process li:nth-child(even) {
  border-top-color: var(--red);
}

.step-num {
  display: block;
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--red);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.process h3 {
  font-size: 1.1rem;
  color: var(--blue-deep);
  margin-bottom: 0.4rem;
}

.process p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Contact */
.contact {
  padding-bottom: clamp(4.5rem, 9vw, 7rem);
}

.contact-shell {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.88)),
    linear-gradient(135deg, rgba(10, 31, 156, 0.08), rgba(224, 49, 49, 0.08));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.contact-intro h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  color: var(--blue-deep);
}

.contact-intro > p {
  color: var(--muted);
}

.contact-meta {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

.contact-meta li {
  display: grid;
  gap: 0.15rem;
}

.contact-meta span:first-child {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.contact-meta a,
.contact-meta li > span:last-child {
  font-weight: 700;
  color: var(--blue-deep);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
}

.contact-form label.full,
.contact-form .full {
  grid-column: 1 / -1;
}

.contact-form span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue-deep);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font: inherit;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--blue) 55%, white);
  box-shadow: 0 0 0 4px rgba(10, 31, 156, 0.1);
}

.contact-form .btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.form-note.is-error {
  color: var(--red);
}

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.footer-inner {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.75rem;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

.copy {
  font-size: 0.9rem;
}

/* Motion */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes floatGlow {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(18px, -14px) scale(1.08);
  }
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.25;
    transform: scaleY(0.6);
    transform-origin: top;
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .services-split,
  .about-grid,
  .contact-shell,
  .process {
    grid-template-columns: 1fr;
  }

  .process {
    gap: 0;
  }

  .process li {
    border-top: 0;
    border-inline-start: 3px solid var(--blue);
    padding-inline-start: 1.25rem;
  }

  .process li:nth-child(even) {
    border-inline-start-color: var(--red);
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .stat {
    text-align: start;
    padding: 1.25rem 1.4rem;
  }
}

@media (max-width: 780px) {
  :root {
    --header-h: 68px;
  }

  .brand-logo {
    height: 42px;
  }

  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    margin: 0;
    padding: 1rem 1.25rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(6, 20, 95, 0.1);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s ease;
  }

  .nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.85rem 0.5rem;
    border-radius: 10px;
  }

  .nav a:hover {
    background: var(--blue-soft);
  }

  .nav a::after {
    display: none;
  }

  .hero {
    min-height: calc(100svh - var(--header-h));
  }

  .hero-logo-plate {
    padding: 0.85rem 1.15rem;
    border-radius: 18px;
  }

  .hero-brand {
    width: min(230px, 68vw);
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(1120px, calc(100% - 1.5rem));
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }
}
