/* ---------------------------------------------------------------------- */
/* Design tokens                                                          */
/* ---------------------------------------------------------------------- */
:root {
  --color-bg: #FFFFFF;
  --color-bg-soft: #FAFAF7;
  --color-section-tint: #F0F5F1;
  --color-accent: #2F6B4F;
  --color-accent-dark: #234E39;
  --color-accent-soft: #E4EFE8;
  --color-text: #1A1F1C;
  --color-text-muted: #4B554E;
  --color-border: #E1E7E2;
  --color-white: #FFFFFF;
  --color-warn: #B5762F;

  --font-display-en: "Fraunces", "Georgia", serif;
  --font-body-en: "Work Sans", "Segoe UI", sans-serif;
  --font-display-ar: "Cairo", "Tajawal", sans-serif;
  --font-body-ar: "Tajawal", "Cairo", sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 4px 20px rgba(26, 31, 28, 0.06);
  --shadow-lift: 0 12px 40px rgba(47, 107, 79, 0.16);

  --container-w: 1120px;
}

body.lang-ar {
  --font-display: var(--font-display-ar);
  --font-body: var(--font-body-ar);
}
body.lang-en {
  --font-display: var(--font-display-en);
  --font-body: var(--font-body-en);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body, var(--font-body-ar));
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.display {
  font-family: var(--font-display, var(--font-display-ar));
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--color-text);
}

h1.display { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2.display { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3, h4 { font-family: var(--font-display, var(--font-display-ar)); margin: 0 0 8px; }

p { margin: 0 0 16px; color: var(--color-text-muted); }

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  background: var(--color-accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.eyebrow {
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-lift);
}
.btn-primary:hover { background: var(--color-accent-dark); }

.btn-ghost {
  background: transparent;
  color: var(--color-accent-dark);
  border-color: var(--color-accent);
}
.btn-ghost:hover { background: var(--color-accent-soft); }

/* ---------------------------------------------------------------------- */
/* Header                                                                 */
/* ---------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display, var(--font-display-ar));
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-text);
}
.brand:hover { text-decoration: none; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: var(--color-text);
  font-weight: 500;
}
.primary-nav a:hover { color: var(--color-accent); }
.primary-nav a.nav-cta,
.primary-nav a.nav-cta:hover { color: #fff; }

.lang-switch {
  display: flex;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-switch button {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--color-text-muted);
}
.lang-switch button[aria-pressed="true"] {
  background: var(--color-accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                   */
/* ---------------------------------------------------------------------- */
.hero {
  background: linear-gradient(180deg, var(--color-section-tint), var(--color-bg) 70%);
  padding-block: 48px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-name {
  display: block;
  color: var(--color-accent-dark);
  font-size: 0.55em;
  font-weight: 600;
  margin-bottom: 6px;
}

.hero-tagline {
  font-size: 1.1rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.hero-media { display: flex; justify-content: center; }

.hero-photo {
  width: auto;
  height: auto;
  max-width: min(480px, 100%);
  max-height: min(80vh, 580px);
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}

.about-video {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.photo-placeholder-icon { font-size: 2.4rem; }

/* ---------------------------------------------------------------------- */
/* Trust bar                                                              */
/* ---------------------------------------------------------------------- */
.trust-bar {
  background: var(--color-accent);
  color: #fff;
}
.trust-bar-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-block: 28px;
  text-align: center;
}
.trust-num {
  display: block;
  font-family: var(--font-display, var(--font-display-ar));
  font-size: 2rem;
  font-weight: 700;
}
.trust-label {
  display: block;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ---------------------------------------------------------------------- */
/* Generic section layout                                                */
/* ---------------------------------------------------------------------- */
.section { padding-block: 76px; }
.section-tint { background: var(--color-bg-soft); }

.section-heading {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 44px;
}
.section-sub { font-size: 1.05rem; }

.card-grid {
  display: grid;
  gap: 24px;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

/* ---------------------------------------------------------------------- */
/* About                                                                  */
/* ---------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.value-list-heading {
  font-size: 1.1rem;
  margin: 28px 0 4px;
}
.value-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.value-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
}
.check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.cert-box {
  background: var(--color-section-tint);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 24px;
}
.cert-box h3 { font-size: 1rem; }
.cert-box ul { margin: 0; padding-inline-start: 20px; color: var(--color-text-muted); }
.cert-box li { margin-bottom: 6px; }

/* ---------------------------------------------------------------------- */
/* Services                                                               */
/* ---------------------------------------------------------------------- */
.services-grid { grid-template-columns: repeat(3, 1fr); }
.service-card { text-align: center; }
.service-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.service-card h3 { font-size: 1.1rem; }
.service-card p { font-size: 0.94rem; margin-bottom: 0; }

/* ---------------------------------------------------------------------- */
/* Journey (scroll-linked progress animation)                            */
/* ---------------------------------------------------------------------- */
.journey-section {
  position: relative;
  min-height: 250vh;
}
.journey-pin {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--color-bg);
}
.journey-pin .container { width: 100%; }

.journey-visual {
  position: relative;
  width: 200px;
  height: 340px;
  margin: 0 auto 28px;
}
.journey-figure {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.2s linear;
}
.journey-figure-before { opacity: 1; }
.journey-figure-after { opacity: 0; }

.journey-progress-track {
  max-width: 320px;
  height: 6px;
  margin: 0 auto;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}
.journey-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  border-radius: inherit;
  transition: width 0.2s linear;
}

.journey-labels {
  display: flex;
  justify-content: space-between;
  max-width: 320px;
  margin: 10px auto 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .journey-figure-before { opacity: 0 !important; }
  .journey-figure-after { opacity: 1 !important; }
  .journey-progress-fill { width: 100% !important; }
}

/* ---------------------------------------------------------------------- */
/* Tool                                                                   */
/* ---------------------------------------------------------------------- */
.tool-card {
  max-width: 920px;
  margin-inline: auto;
  background: var(--color-white);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lift);
}

.tool-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 28px;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-soft);
  font: inherit;
  color: var(--color-text);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.phone-group {
  display: flex;
  gap: 8px;
}
.phone-group .phone-code-select {
  width: auto;
  flex: 0 0 auto;
  min-width: 92px;
  padding-inline: 8px;
}
.phone-group input[type="tel"] {
  flex: 1 1 auto;
  min-width: 0;
}

.tool-submit { width: 100%; margin-top: 8px; }

.tool-result {
  background: var(--color-section-tint);
  border-radius: var(--radius-md);
  padding: 24px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tool-empty {
  color: var(--color-text-muted);
  text-align: center;
  margin: 0;
}

.tool-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.tool-result-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
.tool-result-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
.tool-result-value {
  font-family: var(--font-display, var(--font-display-ar));
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent-dark);
}
.tool-result-tag {
  align-self: center;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 999px;
}

.bmi-gauge { margin-bottom: 16px; }
.bmi-gauge-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(to right, #C9A34E 0%, var(--color-accent) 30%, var(--color-accent) 62%, #C9752F 78%, #B5432F 100%);
}
.bmi-gauge-marker {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--color-text);
  transform: translate(-50%, -50%);
}
[dir="rtl"] .bmi-gauge-marker { transform: translate(50%, -50%); }
.bmi-gauge-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.tool-disclaimer {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
  text-align: center;
}

/* ---------------------------------------------------------------------- */
/* Testimonials                                                          */
/* ---------------------------------------------------------------------- */
.testimonials-grid { grid-template-columns: repeat(3, 1fr); margin-bottom: 24px; }
.testimonial-card { margin: 0; }
.stars { color: #E0A526; letter-spacing: 2px; margin-bottom: 12px; }
.testimonial-card blockquote {
  margin: 0 0 16px;
  font-style: normal;
  color: var(--color-text);
}
.testimonial-card figcaption {
  font-weight: 600;
  color: var(--color-text-muted);
}
/* ---------------------------------------------------------------------- */
/* Contact                                                                */
/* ---------------------------------------------------------------------- */
.contact-card {
  max-width: 640px;
  margin-inline: auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

.contact-success {
  text-align: center;
  padding: 24px 0;
}
.contact-success-icon { font-size: 2.4rem; display: block; margin-bottom: 12px; }

/* Honeypot spam-trap field: kept in the layout and visible to the DOM (not
   display:none) but moved off-screen so real visitors never see or tab
   into it — only bots that blindly fill every field trip it. */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.contact-error {
  color: #B3261E;
  background: #FBECEC;
  border: 1px solid #F1C4C1;
  border-radius: var(--radius-sm, 8px);
  padding: 10px 14px;
  margin: 0 0 16px;
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                 */
/* ---------------------------------------------------------------------- */
.site-footer {
  background: var(--color-text);
  color: #D8DFDA;
  padding-block: 48px 24px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-name {
  font-family: var(--font-display, var(--font-display-ar));
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 4px;
}
.footer-tagline { font-size: 0.9rem; }
.footer-location { font-size: 0.9rem; margin: 0; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 12px; }
.footer-col p, .footer-col a { display: block; font-size: 0.9rem; margin-bottom: 8px; color: #D8DFDA; }
.footer-col a:hover { color: #fff; }
.footer-rights {
  text-align: center;
  font-size: 0.82rem;
  margin: 20px 0 0;
  color: #98A398;
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                             */
/* ---------------------------------------------------------------------- */
@media (max-width: 960px) {
  .services-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 320px; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 20px 24px 28px;
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 16px; }
  .lang-switch { align-self: flex-start; }
  .nav-cta { text-align: center; }

  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-media { order: -1; }
  .hero-actions { justify-content: center; }

  .tool-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .trust-bar-inner { grid-template-columns: 1fr; gap: 18px; }
  .services-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding-block: 52px; }
  .tool-card { padding: 24px; }
  .contact-card { padding: 24px; }
}
