:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #111111;
  --surface-3: #171717;

  --ink: #ffffff;
  --ink-2: #ededed;
  --muted: #888888;
  --muted-2: #666666;

  --line: #1f1f1f;
  --line-2: #2e2e2e;

  --brand-woo: #7f54b3;
  --brand-book: #159b83;

  --radius: 18px;
  --container: 1120px;

  font-family: Inter, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;

  color-scheme: dark;
}

/* RESET */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

/* GLOBAL LAYOUT */

.container {
  width: min(var(--container), calc(100% - 44px));
  margin-inline: auto;
}

.section-space {
  padding-block: 100px;
}

.eyebrow {
  display: inline-block;
  color: var(--ink-2);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* BUTTONS */

.button {
  min-height: 47px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 12px 19px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 700;
  transition: transform .2s, background .2s, border-color .2s;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--ink);
  color: var(--bg);
}

.button-primary:hover {
  background: #d4d4d4;
}

.button-secondary {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--surface-2);
  border-color: #444444;
}

.button-light {
  flex-shrink: 0;
  background: var(--ink);
  color: var(--bg);
}

.button-light:hover {
  background: #d4d4d4;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 850;
  letter-spacing: -.055em;
  color: var(--ink);
}

.brand img {
  width: 34px;
  height: 34px;
  filter: brightness(0) invert(1);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 550;
}

.main-nav a {
  transition: color .2s;
}

.main-nav a:hover {
  color: var(--ink);
}

.header-contact {
  padding: 10px 17px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: .88rem;
  font-weight: 700;
  transition: background .2s;
}

.header-contact:hover {
  background: #d4d4d4;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

/* HERO */

.hero-section {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.hero-content {
  position: relative;
  min-height: 570px;
  padding-block: 80px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 65px;
}

.hero-copy h1 {
  max-width: 650px;
  margin: 18px 0;
  font-size: clamp(3rem, 6vw, 5.1rem);
  line-height: 1.04;
  letter-spacing: -.045em;
  color: var(--ink);
}

.hero-copy h1 span {
  color: var(--ink);
}

.hero-copy > p {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* HERO VISUAL */

.hero-visual {
  position: relative;
  padding: 20px;
}

.hero-visual-card {
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 35px 75px rgba(0, 0, 0, .7);
  transform: rotate(2deg);
}

.visual-header {
  height: 47px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-inline: 17px;
  border-bottom: 1px solid var(--line);
  background: #050505;
}

.visual-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333333;
}

.visual-label {
  margin-left: auto;
  color: var(--muted-2);
  font-size: .65rem;
  letter-spacing: .1em;
}

.visual-content {
  min-height: 310px;
  padding: 35px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.visual-icon {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-size: 3rem;
}

.visual-line {
  height: 9px;
  margin-top: 17px;
  border-radius: 20px;
  background: var(--line-2);
}

.visual-line-long {
  width: 75%;
}

.visual-line-medium {
  width: 48%;
  margin-top: 9px;
}

.visual-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.visual-tools span {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 1.3rem;
}

.visual-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.visual-bottom span {
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .68rem;
}

.hero-floating-label {
  position: absolute;
  right: -5px;
  bottom: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 17px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: 0 10px 35px rgba(0, 0, 0, .6);
  font-size: .83rem;
  font-weight: 700;
}

.hero-floating-label i {
  color: var(--ink);
}

/* TECHNOLOGIES */

.technology-section {
  padding-block: 35px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.technology-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}

.technology-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.technology-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.technology-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 650;
  transition: color .2s;
}

.technology-item i {
  color: var(--ink-2);
  font-size: 1.5rem;
}

.technology-item svg {
  color: var(--ink-2);
}

.technology-item:hover,
.technology-item:hover i,
.technology-item:hover svg {
  color: var(--ink);
}

/* SECTION HEADINGS */

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 35px;
}

.section-heading h2,
.about-heading h2 {
  margin: 7px 0 0;
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -.04em;
  color: var(--ink);
}

.section-heading > p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
}

/* ABOUT */

.about-section {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
}

.about-heading h2 {
  max-width: 480px;
}

.about-content {
  color: var(--muted);
  font-size: .96rem;
}

.about-content p:first-child {
  margin-top: 0;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 650;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--ink);
  font-weight: 800;
  transition: color .2s;
}

.text-link:hover {
  color: var(--muted);
}

/* CONTACT */

.contact-section {
  padding-block: 65px;
  background: var(--surface-2);
  color: var(--ink);
  border-top: 1px solid var(--line-2);
}

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}

.contact-inner h2 {
  margin: 8px 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -.04em;
  color: var(--ink);
}

.contact-inner p {
  max-width: 500px;
  margin-bottom: 0;
  color: var(--muted);
}

/* FOOTER */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-inner {
  padding-block: 38px 22px;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 32px;
}

.footer-description {
  max-width: 330px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .88rem;
}

.footer-links {
  display: flex;
  gap: 65px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: .85rem;
}

.footer-column strong {
  margin-bottom: 4px;
  font-size: .83rem;
  color: var(--ink);
}

.footer-column a {
  color: var(--muted);
  transition: color .2s;
}

.footer-column a:hover {
  color: var(--ink);
}

.footer-bottom {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted-2);
  font-size: .8rem;
}

/* FLOATING LANGUAGE SWITCHER */

.lang-switcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;

  display: inline-flex;
  align-items: center;
  gap: 4px;

  padding: 5px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(10, 10, 10, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
}

html[dir="rtl"] .lang-switcher {
  right: auto;
  left: 20px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;

  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.lang-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.lang-btn.is-active {
  background: var(--ink);
  color: var(--bg);
}

.lang-flag {
  display: inline-flex;
  width: 18px;
  height: 12px;
  overflow: hidden;
  border-radius: 2px;
}

.lang-flag svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ARABIC / RTL */

html[dir="rtl"] body {
  font-family: "Cairo", Inter, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[dir="rtl"] .hero-actions .button i,
html[dir="rtl"] .text-link i {
  transform: scaleX(-1);
}

html[dir="rtl"] .text-link:hover i {
  transform: scaleX(-1) translateX(4px);
}

html[dir="rtl"] .hero-floating-label {
  right: auto;
  left: -5px;
}

html[dir="rtl"] .hero-visual-card {
  transform: rotate(-2deg);
}

/* =========================================================
   WELCOME MODAL
   ========================================================= */

.welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.welcome-modal.is-open {
  display: flex;
}

.welcome-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(6px);
  animation: welcome-fade .25s ease-out;
}

.welcome-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 36px 32px 32px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .8);
  animation: welcome-pop .3s ease-out;
}

.welcome-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.welcome-close:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: #444;
}

html[dir="rtl"] .welcome-close {
  right: auto;
  left: 12px;
}

.welcome-content {
  text-align: center;
}

.welcome-eyebrow {
  display: inline-block;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.welcome-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.2;
  color: var(--ink);
}

.welcome-title-ar {
  margin: 6px 0 0;
  font-family: "Cairo", Inter, sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink);
}

.welcome-sub {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.welcome-sub-ar {
  margin: 6px 0 0;
  font-family: "Cairo", Inter, sans-serif;
  color: var(--muted);
  font-size: .92rem;
}

.welcome-langs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
}

.welcome-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}

.welcome-lang-btn:hover {
  background: var(--surface-2);
  border-color: #444;
  transform: translateY(-1px);
}

.welcome-lang-btn .lang-flag {
  width: 22px;
  height: 15px;
}

@keyframes welcome-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes welcome-pop {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: 1; transform: scale(1); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }

  .hero-copy h1 {
    font-size: clamp(2.8rem, 6vw, 4rem);
  }

  .about-layout {
    gap: 45px;
  }

  .technology-list {
    justify-content: flex-start;
    column-gap: 28px;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(var(--container), calc(100% - 32px));
  }

  .section-space {
    padding-block: 70px;
  }

  .header-inner {
    min-height: 68px;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .header-contact {
    display: none;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    gap: 17px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero-content {
    min-height: auto;
    padding-block: 65px;
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .hero-copy h1 {
    max-width: 550px;
    font-size: clamp(3rem, 12vw, 4.5rem);
  }

  /* Hide hero visual on mobile */
  .hero-visual {
    display: none;
  }

  .technology-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .technology-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .contact-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-main {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
    gap: 55px;
  }

  .lang-switcher {
    right: 14px;
    bottom: 14px;
  }

  html[dir="rtl"] .lang-switcher {
    right: auto;
    left: 14px;
  }

  html[dir="rtl"] .main-nav {
    text-align: right;
  }

  .welcome-card {
    padding: 30px 24px 26px;
  }

  .welcome-langs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-floating-label {
    right: -8px;
    bottom: -8px;
  }

  html[dir="rtl"] .hero-floating-label {
    right: auto;
    left: -8px;
    bottom: -8px;
  }

  .visual-content {
    padding: 23px;
  }

  .footer-links {
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 5px;
  }

  .welcome-title {
    font-size: 1.4rem;
  }

  .welcome-title-ar {
    font-size: 1.3rem;
  }
}