/* ===================================================================
   Lambda International — styles
   Colors & gradients from design_tokens.css

   Layout strategy:
   - Desktop (>980px): original reference mockup — hero text left /
     logo right, wide background, form + WhatsApp card side by side,
     text form labels, full footer.
   - Mobile (≤980px): client mobile mockup — centered stack, square
     background, icon form labels, WhatsApp bar, minimal footer.
   =================================================================== */

:root {
  --navy: #070B16;
  --indigo: #1C2146;
  --blue: #6EC6FF;
  --peach: #FFC6A3;
  --lilac: #B48CFF;
  --white: #FFFFFF;

  --logo-gradient: linear-gradient(135deg, #FFC6A3 0%, #B48CFF 45%, #6EC6FF 100%);
  --cta-gradient: linear-gradient(90deg, #2F6BFF 0%, #B48CFF 52%, #FFC6A3 100%);
  --text-gradient: linear-gradient(100deg, #6EC6FF 0%, #B48CFF 60%, #FFC6A3 100%);

  --card-bg: rgba(13, 18, 35, 0.55);
  --card-border: rgba(255, 255, 255, 0.16);
  --card-radius: 18px;
  --glow-shadow: 0 24px 80px rgba(110, 198, 255, 0.12), 0 16px 60px rgba(255, 198, 163, 0.10);

  --text: #EEF1F8;
  --muted: #9aa3bd;
  --muted-2: #6f7896;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.08; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.br-desktop { display: inline; }

.grad-text {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Shared eyebrow / overline */
.overline {
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted-2);
  margin-bottom: 1.1rem;
}
.overline.center { text-align: center; }

.section { padding-block: clamp(56px, 9vw, 104px); }
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }

/* ===================================================================
   HEADER
   =================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-block: 16px;
  background: rgba(7, 11, 22, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-logo { height: 34px; width: auto; }

.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: clamp(20px, 3vw, 40px);
}
.nav a {
  font-size: 0.95rem;
  color: #d7dcec;
  font-weight: 400;
  transition: color 0.2s ease;
}
.nav a:hover { color: #fff; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #cfd6ea;
  transition: color 0.2s ease, background 0.2s ease;
}
.icon-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
  color: #e7ebf6;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.lang-chip:hover { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.05); }
.lang-chip svg { color: var(--muted); }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 38px;
  padding: 0 9px;
  border: none;
  border-radius: 10px;
  background: transparent;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #e7ebf6;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================================================================
   HERO — desktop: text left, logo right (logo is IN the background
   image: exact client asset with glowing logo + planet + orange arc)
   =================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  /* track the background image's aspect (941/1672 ≈ 56.3vw) so the
     logo's position — and the text alignment — hold at every width */
  min-height: 56.3vw;
  padding-top: clamp(30px, 5vw, 64px);
  padding-bottom: clamp(48px, 6vw, 88px);
}
/* Background on a pseudo-element so it can be mirrored for RTL (logo -> left) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    url("../assets/backgrounds/hero_desktop_with_logo.png")
    right bottom / cover no-repeat;
}
[dir="rtl"] .hero::before { transform: scaleX(-1); }
/* melt the bottom of the background into the page navy */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 0;
  height: clamp(120px, 20vh, 220px);
  background: linear-gradient(to bottom, transparent, var(--navy));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-areas:
    "text  visual"
    "cards visual";
  align-content: center;
  column-gap: clamp(24px, 4vw, 56px);
  /* lift the block slightly so its center matches the logo's center
     (the logo sits a touch above the section middle, over the planet) */
  transform: translateY(-2.7vw);
}
.hero-text { grid-area: text; }
.hero-visual { grid-area: visual; }
.choice-cards { grid-area: cards; }

.hero-title {
  font-size: clamp(3rem, 6.5vw, 5.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.0;
  margin-bottom: 1.3rem;
}
.hero-sub {
  color: #b9c1d8;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  margin-bottom: 2.2rem;
  max-width: 34ch;
}

/* Desktop: the logo lives in the background's right side — no spacer needed */
.hero-visual { display: none; }

.choice-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 580px;
}
.choice-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 20px 20px;
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.choice-card:hover {
  transform: translateY(-3px);
  border-color: rgba(180, 140, 255, 0.5);
  background: rgba(20, 26, 48, 0.7);
  box-shadow: var(--glow-shadow);
}
.choice-icon { color: var(--blue); align-self: start; margin-top: 2px; }
.choice-icon.lilac { color: var(--lilac); }
.choice-body h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 5px; }
.choice-body p { font-size: 0.86rem; color: var(--muted); line-height: 1.45; }
.choice-arrow { color: #e2e7f5; transition: transform 0.25s ease, color 0.25s ease; }
.choice-card:hover .choice-arrow { transform: translateX(4px); color: #fff; }

/* ===================================================================
   ABOUT
   =================================================================== */
.about .lead {
  color: var(--muted);
  font-size: clamp(0.98rem, 1.25vw, 1.08rem);
  max-width: 52ch;
  margin: 1.4rem auto 0;
}

/* ===================================================================
   SERVICES — desktop: left-aligned cards (reference)
   =================================================================== */
.services .overline { margin-bottom: 2.2rem; }
.service-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 2.5vw, 26px);
}
.service-card {
  position: relative;
  padding: clamp(28px, 3vw, 40px);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(110, 198, 255, 0.4);
  box-shadow: var(--glow-shadow);
}
.service-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--blue);
  margin-bottom: 22px;
  background: radial-gradient(circle at 50% 40%, rgba(110, 198, 255, 0.12), transparent 70%);
}
.service-icon.lilac {
  color: var(--lilac);
  background: radial-gradient(circle at 50% 40%, rgba(180, 140, 255, 0.14), transparent 70%);
}
.service-card h3 { font-size: clamp(1.2rem, 1.7vw, 1.45rem); font-weight: 600; }
.title-underline {
  display: block;
  width: 46px;
  height: 3px;
  border-radius: 3px;
  background: var(--logo-gradient);
  margin: 14px 0 18px;
}
.service-card p { color: var(--muted); font-size: 0.96rem; margin-bottom: 20px; max-width: 42ch; }
.learn-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 500;
  transition: gap 0.2s ease;
}
.service-card:nth-child(2) .learn-more { color: var(--lilac); }
.learn-more:hover { gap: 12px; }

/* ===================================================================
   CONTACT — desktop: form left + WhatsApp tall card right (reference)
   =================================================================== */
.contact .section-title { margin-bottom: clamp(34px, 4vw, 52px); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(18px, 2.5vw, 28px);
  align-items: stretch;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: clamp(24px, 3vw, 38px);
}

/* Form fields — text label (desktop) / icon (mobile) */
.field {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 15px;
}
.field-top { align-items: start; }
.field-top .field-label { padding-top: 12px; }
.field-label { color: var(--muted); font-size: 0.9rem; }
.field-icon { display: none; place-items: center; color: var(--muted); }

.field input,
.field textarea,
.select-wrap select {
  width: 100%;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 106px; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field input:focus,
.field textarea:focus,
.select-wrap select:focus {
  outline: none;
  border-color: rgba(180, 140, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(180, 140, 255, 0.12);
}
.field input:invalid:not(:placeholder-shown) { border-color: rgba(255, 120, 120, 0.5); }

.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
}
.select-wrap select:required:invalid { color: var(--muted-2); }
.select-wrap option { color: #111; }
.select-chevron { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* CTA button (gradient) */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  padding: 15px 22px;
  border: none;
  border-radius: 13px;
  background: var(--cta-gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 34px rgba(120, 90, 220, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-cta svg { transition: transform 0.2s ease; }
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(120, 90, 220, 0.45); filter: brightness(1.05); }
.btn-cta:hover svg { transform: translateX(4px); }
.btn-cta:active { transform: translateY(0); }

.form-status { margin-top: 14px; font-size: 0.9rem; min-height: 1.2em; text-align: center; }
.form-status.ok { color: #8ee6b0; }
.form-status.err { color: #ff9a9a; }

/* WhatsApp card — desktop: tall centered card with email (reference) */
.whatsapp-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.wa-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wa-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid rgba(110, 231, 183, 0.35);
  color: #4fe08a;
  background: radial-gradient(circle at 50% 40%, rgba(79, 224, 138, 0.15), transparent 70%);
  margin-bottom: 20px;
}
.wa-text h3 { font-size: 1.3rem; font-weight: 600; }
.wa-text p { color: var(--muted); margin: 8px 0 22px; }
.wa-btn { max-width: 320px; }
.wa-email { margin-top: 26px; }
.wa-email-label { color: var(--muted); font-size: 0.9rem; margin-bottom: 4px; }
.wa-email a { color: #d7dcec; font-size: 0.98rem; transition: color 0.2s ease; }
.wa-email a:hover { color: var(--blue); }

/* ===================================================================
   FOOTER — desktop: logo | socials + copyright | nav (reference)
   =================================================================== */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-block: 32px;
  margin-top: clamp(16px, 3vw, 32px);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer .brand-logo { height: 30px; }
.footer-center { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-socials { display: flex; gap: 10px; }
.copyright { color: var(--muted-2); font-size: 0.85rem; }
.footer-nav { display: flex; gap: clamp(18px, 2.5vw, 34px); }
.footer-nav a { color: #c4cbe0; font-size: 0.92rem; transition: color 0.2s ease; }
.footer-nav a:hover { color: #fff; }

/* ===================================================================
   MOBILE (≤980px) — client mobile mockup: centered stack,
   SQUARE background, icon form labels, WhatsApp bar, minimal footer
   =================================================================== */
@media (max-width: 980px) {
  /* --- header: logo + instagram + hamburger --- */
  .nav {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    transform: none;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px var(--gutter) 26px;
    background: rgba(7, 11, 22, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-height: calc(100vh - 66px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav a { padding: 12px; width: 100%; text-align: center; font-size: 1.05rem; }
  .menu-toggle { display: flex; }
  .hide-mobile { display: none; }

  /* --- hero: centered stack over the PORTRAIT background (with logo) --- */
  .hero { min-height: 0; }
  .hero::before {
    background-image: url("../assets/backgrounds/hero_mobile_with_logo.png");
    background-position: center top;
  }
  /* portrait logo is centered — never mirror it on mobile */
  [dir="rtl"] .hero::before { transform: none; }
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: none;
  }
  .hero-text { padding-top: 0; align-self: auto; }
  .hero-title { font-size: clamp(2.9rem, 11vw, 4.4rem); }
  .hero-sub { max-width: none; margin-bottom: 0; }

  /* spacer that reserves the background logo's area between text and cards */
  .hero-visual {
    display: block;
    width: 100%;
    height: clamp(240px, 68vw, 420px);
  }

  .choice-cards {
    grid-template-columns: 1fr;
    gap: 16px;
    width: min(680px, 100%);
    max-width: none;
    margin-top: 10px;
  }
  .choice-card { padding: 20px 22px; gap: 16px; }
  .choice-icon { align-self: center; margin-top: 0; }

  /* --- services: centered cards --- */
  .service-card { text-align: center; }
  .service-icon { margin-inline: auto; }
  .title-underline { margin-inline: auto; }
  .service-card p { margin-inline: auto; }

  /* --- contact: single column, icon labels, WhatsApp bar --- */
  .contact-grid { grid-template-columns: 1fr; max-width: 760px; margin-inline: auto; }
  .field { grid-template-columns: 34px 1fr; gap: 12px; }
  .field-label {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .field-icon { display: grid; }
  .field-top .field-icon { margin-top: 12px; }

  .whatsapp-card {
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    text-align: left;
    padding-block: 18px;
  }
  [dir="rtl"] .whatsapp-card { text-align: right; }
  .wa-left { flex-direction: row; align-items: center; gap: 16px; }
  .wa-icon { width: 54px; height: 54px; margin-bottom: 0; }
  .wa-text h3 { font-size: 1.08rem; }
  .wa-text p { margin: 2px 0 0; font-size: 0.9rem; }
  .wa-btn { width: auto; max-width: none; margin-top: 0; flex: none; }
  .wa-email { display: none; }

  /* --- footer: socials + copyright only --- */
  .footer-brand, .footer-nav { display: none; }
  .footer-inner { justify-content: center; }
}

/* Phones */
@media (max-width: 640px) {
  .service-cards { grid-template-columns: 1fr; }
  .br-desktop { display: none; }

  .whatsapp-card { flex-direction: column; text-align: center; }
  [dir="rtl"] .whatsapp-card { text-align: center; }
  .wa-left { flex-direction: column; text-align: center; }
  .wa-text p { margin-top: 6px; }
  .wa-btn { width: 100%; margin-top: 14px; }

  .choice-card { padding: 18px 18px; gap: 14px; }
}

/* ===================================================================
   LANGUAGE SWITCHER DROPDOWN
   =================================================================== */
.lang-switch { position: relative; }
.lang-chip { cursor: pointer; }
.lang-chip svg { transition: transform 0.2s ease; }
.lang-switch.open .lang-chip svg { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 152px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(13, 18, 35, 0.98);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li { margin: 0; }
.lang-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  text-align: start;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #d7dcec;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-option:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.lang-option[aria-selected="true"] { color: #fff; background: rgba(180, 140, 255, 0.16); }

/* ===================================================================
   ARABIC TYPOGRAPHY + RTL
   =================================================================== */
:lang(ar) {
  font-family: "Cairo", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:lang(ar) .hero-title { line-height: 1.2; }
:lang(ar) .section-title { line-height: 1.35; }
:lang(ar) .overline { letter-spacing: normal; font-weight: 600; }

/* Text alignment */
[dir="rtl"] .choice-card { text-align: right; }

/* Flip directional arrows (→ becomes ←) */
[dir="rtl"] .choice-arrow svg,
[dir="rtl"] .learn-more svg,
[dir="rtl"] .btn-cta svg { transform: scaleX(-1); }
[dir="rtl"] .choice-card:hover .choice-arrow { transform: translateX(-4px); }
[dir="rtl"] .btn-cta:hover svg { transform: scaleX(-1) translateX(4px); }

/* Form: chevron + select padding move to the left edge */
[dir="rtl"] .select-chevron { right: auto; left: 14px; }
[dir="rtl"] .select-wrap select { padding-right: 15px; padding-left: 42px; }

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
