:root {
  --teal: #358c7e;
  --teal-deep: #2a7367;
  --teal-soft: #c4ddd9;
  --teal-mist: #e8f3f0;
  --navy: #24265d;
  --navy-deep: #18193a;
  --ink: #1c1d33;
  --muted: #5c6078;
  --paper: #f7faf9;
  --white: #ffffff;
  --line: rgba(36, 38, 93, 0.12);
  --shadow-soft: 0 18px 50px rgba(36, 38, 93, 0.12);
  --radius: 4px;
  --header-h: 76px;
  --max: 1120px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Sora", system-ui, sans-serif;
  --font-display-ar: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-body-ar: "Cairo", "Segoe UI", Tahoma, sans-serif;
}

html[lang="ar"] {
  --font-display: var(--font-display-ar);
  --font-body: var(--font-body-ar);
}

html[lang="ar"] body {
  line-height: 1.75;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 {
  letter-spacing: 0;
  font-weight: 700;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(53, 140, 126, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(36, 38, 93, 0.08), transparent 50%),
    var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  background: var(--navy);
  color: var(--white);
  padding: 0.6rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(14px);
  background: rgba(247, 250, 249, 0.78);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(36, 38, 93, 0.06);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 100%;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand img {
  width: 108px;
  height: auto;
}

.nav {
  display: flex;
  gap: 1.4rem;
  margin-inline-start: auto;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--navy);
}

.nav a {
  position: relative;
  padding: 0.25rem 0;
}

.nav a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

[dir="rtl"] .nav a::after {
  transform-origin: right;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.lang-btn {
  min-width: 44px;
  min-height: 32px;
  padding: 0.25rem 0.65rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-btn.is-active,
.lang-btn[aria-pressed="true"] {
  background: var(--navy);
  color: var(--white);
}

.lang-btn:hover:not(.is-active):not([aria-pressed="true"]) {
  background: var(--teal-mist);
}

.mobile-lang {
  width: fit-content;
  margin: 0.35rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 550;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--teal-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

.btn-nav {
  background: var(--navy);
  color: var(--white);
  min-height: 42px;
  padding-inline: 1rem;
}

.btn-nav:hover {
  background: var(--navy-deep);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-inline-start: auto;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 6px auto;
  background: var(--navy);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.25rem 1.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.mobile-nav a {
  font-weight: 500;
  color: var(--navy);
  padding: 0.35rem 0;
}

.mobile-nav .btn {
  margin-top: 0.5rem;
  background: var(--teal);
  color: var(--white);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: hero-zoom 12s ease-out forwards;
}

.hero-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(24, 25, 58, 0.82) 8%, rgba(36, 38, 93, 0.68) 46%, rgba(42, 115, 103, 0.58) 100%),
    radial-gradient(ellipse at 50% 42%, rgba(24, 25, 58, 0.35), transparent 55%),
    linear-gradient(to top, rgba(24, 25, 58, 0.65), transparent 45%);
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(rgba(255, 255, 255, 0.25) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 4.5rem 1.5rem 5rem;
  text-align: center;
}

.hero-logo {
  width: min(340px, 72vw);
  height: auto;
  margin: 0 auto 1.75rem;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
}

.hero-title {
  color: var(--white);
  font-size: clamp(2rem, 4.5vw, 3.35rem);
  margin-bottom: 0.85rem;
}

.hero-text {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 34rem;
  margin: 0 auto 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.hero-midline {
  position: absolute;
  top: 12%;
  bottom: 10%;
  left: 50%;
  width: 1px;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(196, 221, 217, 0.85),
    rgba(53, 140, 126, 0.9),
    rgba(36, 38, 93, 0.2),
    transparent
  );
  animation: midline-draw 1.4s 0.35s ease forwards;
  pointer-events: none;
  z-index: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s ease forwards;
}

.reveal-delay-1 {
  animation-delay: 0.15s;
}

.reveal-delay-2 {
  animation-delay: 0.3s;
}

.reveal-delay-3 {
  animation-delay: 0.45s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes midline-draw {
  to {
    transform: translateX(-50%) scaleY(1);
  }
}

@keyframes hero-zoom {
  to {
    transform: scale(1);
  }
}

/* Shared section bits */
.section-head {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
  padding: 0 1.25rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.eyebrow.light {
  color: var(--teal-soft);
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
}

.lede.light {
  color: rgba(255, 255, 255, 0.78);
}

.services {
  padding: 6rem 0 4rem;
}

.service-stack {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  gap: 2.5rem;
}

.service-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2rem;
  align-items: center;
}

.service-row.invert .service-visual {
  order: 2;
}

.service-row.invert .service-copy {
  order: 1;
}

.service-visual {
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 280px;
  background: var(--navy);
}

.service-visual img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.service-row:hover .service-visual img {
  transform: scale(1.03);
}

.service-copy h3 {
  font-size: 1.7rem;
  margin-bottom: 0.55rem;
}

.service-copy p {
  color: var(--muted);
  margin: 0;
  max-width: 36ch;
}

/* Craft */
.craft {
  position: relative;
  margin-top: 4rem;
  padding: 5.5rem 1.25rem;
  color: var(--white);
  overflow: hidden;
}

.craft-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 48%, #2f6f66 100%);
}

.craft-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(196, 221, 217, 0.18), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(53, 140, 126, 0.25), transparent 40%);
}

.craft-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
}

.craft h2 {
  color: var(--white);
  max-width: 16ch;
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
}

.pillars {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 2rem;
}

.pillars li {
  display: grid;
  gap: 0.55rem;
}

.pillars strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.pillars span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}

/* About */
.about {
  padding: 6rem 1.25rem;
}

.about-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.about-copy p {
  color: var(--muted);
}

.about-figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 360px;
  box-shadow: var(--shadow-soft);
}

.about-figure img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

/* Contact */
.contact {
  padding: 0 1.25rem 6rem;
}

.contact-panel {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  padding: 2.5rem;
  background:
    linear-gradient(160deg, var(--white), var(--teal-mist));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-intro h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.contact-intro > p {
  color: var(--muted);
}

.contact-meta {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.contact-meta li {
  display: grid;
  gap: 0.15rem;
}

.contact-meta span:first-child {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
}

.contact-meta a {
  color: var(--navy);
  font-weight: 500;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy);
}

.contact-form .full {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(36, 38, 93, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.85);
  padding: 0.8rem 0.9rem;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(53, 140, 126, 0.18);
}

.form-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--teal-deep);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--white);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner img {
  width: 88px;
  height: auto;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
}

/* Scroll reveal for lower sections */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* RTL refinements */
[dir="rtl"] .service-row.invert .service-visual {
  order: 1;
}

[dir="rtl"] .service-row.invert .service-copy {
  order: 2;
}

[dir="rtl"] .hero-wash {
  background:
    linear-gradient(240deg, rgba(24, 25, 58, 0.82) 8%, rgba(36, 38, 93, 0.68) 46%, rgba(42, 115, 103, 0.58) 100%),
    radial-gradient(ellipse at 50% 42%, rgba(24, 25, 58, 0.35), transparent 55%),
    linear-gradient(to top, rgba(24, 25, 58, 0.65), transparent 45%);
}

/* Responsive */
@media (max-width: 900px) {
  .nav,
  .header-actions .btn-nav {
    display: none;
  }

  .header-actions {
    margin-inline-start: auto;
  }

  .menu-toggle {
    display: block;
    margin-inline-start: 0;
  }

  .mobile-nav.is-open {
    display: flex;
  }

  .service-row,
  .service-row.invert {
    grid-template-columns: 1fr;
  }

  .service-row.invert .service-visual,
  .service-row.invert .service-copy {
    order: initial;
  }

  .pillars,
  .about-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    padding: 1.5rem;
  }

  .hero-midline {
    opacity: 0.45;
  }
}

@media (max-width: 640px) {
  .contact-form {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding-top: 3.5rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .hero-image,
  .hero-midline,
  [data-animate] {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
