/* =========================================================
   Rachma / رشمة — association site
   Single warm-editorial theme (no dark mode / no toggle).
   Shape lock: pill buttons / nav, 14px cards, 10px inputs.
   Language: ar (default, rtl) / fr / en, switched at runtime.

   Palette (fixed, five values — everything else is an opacity
   variant of --text or --bg, never a new hue):
     Background   #F9F8F3   60%
     White        #FEFEFE   20%  (cards, inputs, device screens)
     Beige        #D6D1CC   10%  (secondary surfaces / hover fills)
     Taupe        #BEB7B0    7%  (dividers, device chrome accents)
     Dark text    #2E2924    3%  (text, and the site's single
                                  functional "accent": every hover,
                                  icon, link, and button uses it —
                                  there is no color accent.)
   ========================================================= */

:root {
  --bg: #f9f8f3;
  --surface: #fefefe;
  --beige: #d6d1cc;
  --taupe: #beb7b0;
  --text: #2e2924;
  --text-strong: #211d19;

  --muted: rgba(46, 41, 36, 0.62);
  --border: rgba(46, 41, 36, 0.10);
  --border-strong: rgba(46, 41, 36, 0.18);

  --nav-bg: rgba(249, 248, 243, 0.86);

  --radius-card: 14px;
  --radius-input: 10px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Outfit", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-rtl: "Alexandria", "Cairo", "Segoe UI", Tahoma, "Noto Naskh Arabic", system-ui, sans-serif;

  --shadow-dropdown: 0 20px 40px rgba(46, 41, 36, 0.14);
  --shadow-mobile-menu: 0 20px 44px -8px rgba(46, 41, 36, 0.20);
  --shadow-card-hover: 0 24px 48px -18px rgba(46, 41, 36, 0.18), 0 4px 12px -6px rgba(46, 41, 36, 0.08);
  --shadow-photo: 0 30px 60px -26px rgba(46, 41, 36, 0.24), 0 14px 30px -20px rgba(46, 41, 36, 0.12);
  --shadow-photo-hover: 0 38px 72px -24px rgba(46, 41, 36, 0.28), 0 18px 36px -16px rgba(46, 41, 36, 0.16);

  /* hero + full-bleed photo moments (quote) always force light text,
     independent of anything else — the imagery underneath is dark. */
  --hero-text: #f7f3ee;
  --hero-subtext: rgba(247, 243, 238, 0.86);
  --hero-overlay-1: rgba(20, 17, 14, 0.55);
  --hero-overlay-2: rgba(20, 17, 14, 0.4);
  --hero-overlay-3: rgba(20, 17, 14, 0.88);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

a, button, input {
  touch-action: manipulation;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Arabic script: use an Arabic-capable stack and never fragment joined
   letters with tracking meant for latin display type. */
:root[dir="rtl"] body { font-family: var(--font-rtl); }
:root[dir="rtl"] * { letter-spacing: normal !important; }

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

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

/* keyboard-only focus ring; mouse/touch interaction never triggers :focus-visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 4px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 24px;
}

.section-heading {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

/* subtle fixed grain to avoid flat digital surfaces */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.025;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  transform: translateZ(0);
  will-change: transform;
}

/* =========================================================
   Buttons + links
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn--primary:hover {
  background: var(--text-strong);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.about__facts strong {
  color: var(--text);
}

.about__support {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.about__support-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.about__support-link svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.about__support-link:hover {
  border-color: #2b4e35;
  background: #ffffff;
  color: #2b4e35;
  transform: translateY(-2px);
}
.btn--ghost:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease);
}
.link-arrow:hover {
  border-color: var(--text);
}

/* =========================================================
   Nav — logo pinned physical-left, links centered, contact
   pinned physical-right, in every language (ar/fr/en alike).
   ========================================================= */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease), -webkit-backdrop-filter 0.35s var(--ease), padding 0.35s var(--ease), color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;

  /* Unscrolled, the nav floats transparently over the hero video: it always needs a
     light scrim treatment, independent of the page theme (the video underneath
     never changes). Only once scrolled onto page chrome does it remap to the
     page tokens, right below. */
  --nav-fg: rgba(249, 248, 243, 0.94);
  --nav-fg-strong: #fefefe;
  --nav-border: rgba(249, 248, 243, 0.32);
  --nav-chip-bg: rgba(46, 41, 36, 0.34);
  --nav-link: rgba(249, 248, 243, 0.82);
}

.nav.nav--scrolled {
  padding: 13px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--border);

  --nav-fg: rgba(46, 41, 36, 0.76);
  --nav-fg-strong: var(--text);
  --nav-border: var(--border-strong);
  --nav-chip-bg: var(--surface);
  --nav-link: rgba(46, 41, 36, 0.76);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1.25rem;
  /* Physical left-to-right order regardless of document direction — the brand
     stays at the true left edge and Contact at the true right edge in ar/fr/en. */
  direction: ltr;
}

.nav__brand {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--nav-fg-strong);
  transition: color 0.35s var(--ease);
}

.nav__logo {
  height: 88px;
  width: auto;
  display: block;
  flex: none;
  transition: height 0.35s var(--ease);
}

.nav--scrolled .nav__logo { height: 66px; }

.footer__logo { height: 75px !important; }

.nav__links {
  grid-column: 2;
  justify-self: center;
  display: flex;
  gap: 1.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.nav__links a {
  position: relative;
  color: var(--nav-fg);
  padding-bottom: 4px;
  transition: color 0.25s var(--ease);
}

.nav__links a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease);
}

.nav__links a:hover {
  color: var(--nav-fg-strong);
}
.nav__links a:hover::after {
  transform: scaleX(1);
}

.nav__links-contact { display: none; }

.nav__controls {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--nav-chip-bg);
  border: 1px solid var(--nav-border);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.lang-switch__btn {
  min-width: 2.1rem;
  min-height: 2.1rem;
  padding: 0.5rem 0.85rem;
  border: none;
  background: transparent;
  color: var(--nav-fg);
  font-size: 0.83rem;
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: 0.03em;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
/* the "ع" label is Arabic, not Latin — render it in the Arabic-capable stack
   so it doesn't silently fall back to a mismatched glyph inside an Outfit run */
.lang-switch__btn[data-lang-btn="ar"] {
  font-family: var(--font-rtl);
  font-size: 0.92rem;
  letter-spacing: normal;
}
.lang-switch__btn:hover { color: var(--nav-fg-strong); }
.lang-switch__btn.is-active {
  background: var(--text);
  color: var(--bg);
}
.nav--scrolled .lang-switch__btn.is-active { background: var(--text); color: var(--bg); }

.nav__cta {
  padding: 0.68rem 1.5rem;
  font-size: 0.9rem;
}

.nav__toggle {
  grid-column: 4;
  justify-self: end;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  flex: none;
  background: transparent;
  border: 1px solid var(--nav-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.35s var(--ease);
}
.nav__toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--nav-fg-strong);
  transition: background-color 0.35s var(--ease), transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =========================================================
   Hero — video + headline + subtext, forced-light scrim so it
   reads regardless of the page theme underneath. Content sits
   toward the bottom of the frame, with a copyright/location
   line under the CTA.
   ========================================================= */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #14110e;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--hero-overlay-2) 0%, var(--hero-overlay-1) 45%, var(--hero-overlay-3) 100%),
    radial-gradient(circle at 50% 30%, transparent 0%, rgba(20,17,14,0.35) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 24px;
  padding-bottom: clamp(2.5rem, 2rem + 2vw, 4.5rem);
  width: 100%;
  color: var(--hero-text);
}

.hero__headline {
  font-size: clamp(2.5rem, 1.9rem + 3.2vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.14;
  margin: 0 0 1.25rem;
  max-width: 18ch;
  color: var(--hero-text);
}

:root[dir="rtl"] .hero__headline { letter-spacing: normal; }

.hero__subtext {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  color: var(--hero-subtext);
  max-width: 46ch;
  margin: 0 0 2.25rem;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.hero__meta {
  margin: 2rem 0 0;
  font-size: 0.85rem;
  color: var(--hero-subtext);
  text-shadow: 0 1px 10px rgba(0,0,0,0.6);
}

.hero__meta-sep {
  display: inline-block;
  margin-inline: 0.55em;
  opacity: 0.6;
}

/* =========================================================
   Reveal on scroll
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}
.hero__content.reveal { transition-delay: 0.1s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   About — minimal copy, a vertical photo with a horizontal
   photo layered on top of it.
   ========================================================= */

.about {
  padding: clamp(9rem, 7rem + 5vw, 12.5rem) 0;
  content-visibility: auto;
  contain-intrinsic-size: 1px 600px;
}

.about__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.15fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.about__body {
  text-align: center;
}

.about__body .section-heading {
  margin-inline: auto;
}

.about__visual {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 3 / 4;
  margin-inline: auto;
}

.about__photo {
  position: absolute;
  display: block;
  /* The <img> tags carry width/height attributes (for layout-shift
     prevention before CSS loads); left at "auto" those attributes win
     over aspect-ratio below once a CSS width is set, blowing the photo
     up to its raw pixel height. Force auto so aspect-ratio governs it. */
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-card);
  border: 6px solid var(--surface);
  box-shadow: var(--shadow-photo);
  filter: saturate(0.94) contrast(1.03);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.about__visual--left .about__photo--vertical {
  width: 76%;
  aspect-ratio: 3 / 4;
  top: 0;
  inset-inline-start: 0;
  z-index: 1;
}

.about__visual--left .about__photo--horizontal {
  width: 65%;
  aspect-ratio: 4 / 3;
  bottom: 0;
  inset-inline-end: 0;
  z-index: 2;
  box-shadow: var(--shadow-photo-hover);
}

.about__visual--right .about__photo--vertical {
  width: 76%;
  aspect-ratio: 3 / 4;
  top: 0;
  inset-inline-end: 0;
  z-index: 1;
}

.about__visual--right .about__photo--horizontal {
  width: 65%;
  aspect-ratio: 4 / 3;
  bottom: 0;
  inset-inline-start: 0;
  z-index: 2;
  box-shadow: var(--shadow-photo-hover);
}

.about__visual:hover .about__photo--vertical { transform: translateY(-3px); }
.about__visual:hover .about__photo--horizontal { transform: translateY(-8px); }

.about__lead {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: var(--text);
  margin: 0 auto 1.1rem;
  max-width: 42ch;
}

.about__text {
  color: var(--muted);
  max-width: 48ch;
  margin: 0 auto;
}

.about__facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2.5rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.about__fact-link {
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.about__fact-link:hover {
  color: #2b4e35;
  text-decoration: underline;
}

.about__facts li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem;
  padding: 1rem 0.85rem;
  background: var(--surface-elevated, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.about__facts li:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.about__facts span {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent, #d97a4d);
}

.about__facts strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}

/* =========================================================
   Quarawain — looping animation (left) + typed intro (right)
   ========================================================= */

.quarawain {
  padding: clamp(9.5rem, 7rem + 5vw, 13rem) 0;
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

.quarawain__showcase {
  display: grid;
  grid-template-columns: 1fr auto 1.15fr;
  gap: 3.5rem;
  align-items: center;
  /* image pinned physical-left, divider middle, copy physical-right, in every language */
  direction: ltr;
}

.quarawain__divider {
  width: 1px;
  height: 240px;
  background: linear-gradient(180deg, transparent 0%, var(--border-strong) 25%, var(--border-strong) 75%, transparent 100%);
  align-self: center;
}

:root[dir="rtl"] .quarawain__content {
  direction: rtl;
  text-align: right;
}

.quarawain__devices {
  position: relative;
  width: 100%;
  max-width: 420px;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quarawain__image {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.25));
  transition: transform 0.4s var(--ease);
}

.quarawain__image:hover {
  transform: translateY(-6px);
}

.quarawain__header-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.quarawain__brand-badge {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.45s var(--ease);
}

.quarawain.is-visible .quarawain__brand-badge,
.quarawain__content.is-visible .quarawain__brand-badge {
  transform: scale(1);
  opacity: 1;
}

.quarawain__text-block {
  flex: 1;
}

.quarawain__emblem {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}

.quarawain__brand-badge:hover .quarawain__emblem {
  transform: translateY(-3px) scale(1.05);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.22));
}

.quarawain__content .section-heading {
  margin-bottom: 0.25rem;
  color: #2b4e35;
}

.quarawain__tagline {
  min-height: 1.6em;
  font-size: 1.05rem;
  font-weight: 500;
  color: #b19254;
  margin: 0;
}

.quarawain__intro {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 1.5rem;
}

.quarawain__socials {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-top: 6px;
  padding-bottom: 6px;
  margin-top: -4px;
}

.quarawain__socials::-webkit-scrollbar {
  display: none;
}

.quarawain__link {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.quarawain__link svg {
  width: 14px;
  height: 14px;
  flex: none;
  transition: transform 0.25s var(--ease);
}

.quarawain__link:hover {
  border-color: #2b4e35;
  background: #ffffff;
  color: #2b4e35;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(43, 78, 53, 0.16);
}

.quarawain__link:hover svg {
  transform: scale(1.1);
}

.quarawain__link:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.quarawain__social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.quarawain__social-icon svg {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease);
}

.quarawain__social-icon:hover {
  border-color: #2b4e35;
  background: #ffffff;
  color: #2b4e35;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(43, 78, 53, 0.16);
}

.quarawain__social-icon:hover svg {
  transform: scale(1.15);
}

.quarawain__social-icon:active {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.type-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-inline-start: 3px;
  vertical-align: -0.15em;
  background: currentColor;
  animation: type-blink 0.9s steps(1) infinite;
}
@keyframes type-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .type-cursor { animation: none; } }



/* =========================================================
   Quote / mission statement & Footer overlay
   ========================================================= */

.quote {
  position: relative;
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 1px 260px;
}

.quote__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center 50%;
  filter: saturate(1.02) contrast(1.05);
}

.quote::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  height: 100%;
  z-index: 1;
  background: radial-gradient(circle at 50% 30%, rgba(20,17,14,0.22), transparent 65%);
  pointer-events: none;
}

.quote__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
}

.quote__body {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.quote__mark {
  display: block;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--hero-text);
  opacity: 0.7;
  margin-bottom: 0.25rem;
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 2px 18px rgba(0,0,0,0.7);
}

.quote__body p {
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.5;
  margin: 0 0 0.85rem;
  color: var(--hero-text);
  text-shadow: 0 2px 18px rgba(0,0,0,0.7);
}

:root[dir="rtl"] .quote__body p { letter-spacing: normal; }

.quote__signature {
  color: var(--hero-text);
  font-weight: 700;
  font-size: 0.95rem;
  text-shadow: 0 2px 14px rgba(0,0,0,0.85);
}

.quote__footer-bar {
  width: 100%;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(247, 243, 238, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--hero-subtext);
  font-size: 0.88rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

.quote__copyright { margin: 0; }

.quote__footer-bar .footer__brand { color: var(--hero-text); }

.quote__footer-bar .footer__top {
  font-weight: 600;
  color: var(--hero-text);
  transition: opacity 0.2s var(--ease);
}
.quote__footer-bar .footer__top:hover { opacity: 0.75; }

/* =========================================================
   Contact Card & Interactive Channels
   ========================================================= */

.contact {
  padding: 4.5rem 0 5.5rem;
  content-visibility: auto;
  contain-intrinsic-size: 1px 400px;
  scroll-margin-top: 92px;
}

.contact__card {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.75rem 2rem;
  background: var(--surface-elevated, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.contact__header {
  margin-bottom: 2rem;
}

.subheading {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}

.contact__header p {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0;
}

.contact__direct {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact__channel {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  direction: ltr !important;
  unicode-bidi: isolate;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.contact__channel-info,
.phone-number {
  direction: ltr !important;
  unicode-bidi: isolate;
}

:root[dir="rtl"] .contact__channel,
:root[dir="rtl"] .contact__channel-info,
:root[dir="rtl"] .phone-number,
:root[dir="rtl"] a[href^="tel:"],
:root[dir="rtl"] a[href^="mailto:"] {
  direction: ltr !important;
  unicode-bidi: isolate;
}

.contact__channel:hover {
  border-color: var(--accent, #d97a4d);
  background: var(--beige);
  transform: translateY(-2px);
}

.contact__channel-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--surface-elevated-2, rgba(217, 122, 77, 0.12));
  color: var(--accent, #d97a4d);
}

.contact__channel-icon svg {
  width: 17px;
  height: 17px;
}

.contact__socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.contact__socials a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.contact__socials a:hover {
  border-color: var(--accent, #d97a4d);
  background: var(--beige);
  transform: translateY(-2px);
}
.contact__socials svg { width: 19px; height: 19px; }



/* =========================================================
   Responsive
   ========================================================= */

/* --- Tablet & small desktop (≤ 1080px) --- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }

  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px;
    inset-inline: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 1.25rem;
    gap: 1rem;
    box-shadow: var(--shadow-mobile-menu);
    z-index: 110;
  }

  /* The flyout is always an opaque page-colored (light) card, even while the nav
     bar itself still reads the light --nav-fg tokens (unscrolled, over the hero
     video). --nav-link tracks THAT scroll state and is near-white when unscrolled
     — using it here rendered the links invisible (light text on a light card)
     until the page had been scrolled. Pin to the fixed, scroll-independent page
     text tokens instead, so the flyout is legible immediately. */
  .nav__links.is-open a { color: var(--muted); }
  .nav__links.is-open a:hover { color: var(--text); }
  .nav__links-contact { display: block; }

  /* The bar itself stays pinned left-to-right (logo/contact per brief), but the
     flyout menu is a normal block list — restore proper reading order in Arabic. */
  :root[dir="rtl"] .nav__links.is-open { direction: rtl; text-align: right; }

  .nav__cta { display: none; }
}

/* --- Tablet portrait (≤ 1024px) --- */
@media (max-width: 1024px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about__visual { max-width: 380px; }
}

/* --- Mobile landscape / small tablet (≤ 768px) --- */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 72px;
  }

  /* Nav */
  .nav { padding: 12px 0; }
  .nav.nav--scrolled { padding: 10px 0; }
  .nav__logo { height: 72px; }
  .nav--scrolled .nav__logo { height: 56px; }
  .nav__inner { gap: 0.75rem; }
  .nav__links.is-open { top: 68px; }

  /* Hero */
  .hero { min-height: 100dvh; }
  .hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 2.5rem;
  }
  .hero__headline {
    max-width: 100%;
    font-size: clamp(2rem, 1.6rem + 2.5vw, 3rem);
  }
  .hero__subtext {
    font-size: 1rem;
    max-width: 100%;
  }
  .hero__actions {
    gap: 1rem;
    justify-content: center;
    width: 100%;
  }

  /* About */
  .about { padding: 5rem 0; }
  .about__grid { gap: 2rem; }
  .about__visual { max-width: 300px; }
  .about__lead {
    font-size: 1.15rem;
    max-width: 100%;
  }
  .about__text { max-width: 100%; }
  .about__facts {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  /* Quarawain */
  .quarawain { padding: 5rem 0; }
  .quarawain__showcase {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .quarawain__divider {
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-strong) 25%, var(--border-strong) 75%, transparent 100%);
    margin: 0 auto;
  }
  .quarawain__devices { max-width: 320px; margin-inline: auto; }
  .quarawain__image { max-width: 300px; }
  .quarawain__header-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .quarawain__brand-badge { width: 90px; height: 90px; }
  .quarawain__intro { max-width: 100%; font-size: 0.95rem; text-align: center; }
  .quarawain__socials {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
  }
  .quarawain__link {
    font-size: 0.78rem;
    padding: 0.3rem 0.65rem;
  }
  .quarawain__social-icon {
    width: 38px;
    height: 38px;
  }

  /* Contact */
  .contact { padding: 4rem 0; }
  .contact__card {
    padding: 2rem 1.5rem;
  }
  .contact__direct {
    flex-direction: column;
    align-items: stretch;
  }
  .contact__channel {
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
  .contact__socials a {
    width: 44px;
    height: 44px;
  }

  /* Quote / Footer */
  .quote { padding-top: 2.5rem; padding-bottom: 1.5rem; }
  .quote__body p { font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.3rem); }
  .quote__footer-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    font-size: 0.82rem;
  }
  .footer__logo { height: 48px !important; }
}

/* --- Mobile portrait (≤ 480px) --- */
@media (max-width: 480px) {
  .section-inner { padding-inline: 16px; }
  .nav__inner { padding-inline: 12px; gap: 0.5rem; }

  /* Nav */
  .nav__logo { height: 62px; }
  .nav--scrolled .nav__logo { height: 48px; }
  .lang-switch__btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.74rem;
    min-width: 1.8rem;
    min-height: 1.8rem;
  }
  .nav__toggle { width: 40px; height: 40px; }
  .nav__links.is-open {
    top: 60px;
    inset-inline: 10px;
    padding: 1rem;
    gap: 0.85rem;
  }

  /* Hero */
  .hero { min-height: 100dvh; }
  .hero__headline {
    font-size: clamp(1.75rem, 1.4rem + 2vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  .hero__subtext {
    font-size: 0.92rem;
    margin-bottom: 1.75rem;
    line-height: 1.65;
  }
  .btn {
    padding: 0.75rem 1.3rem;
    font-size: 0.88rem;
  }
  .hero__meta { font-size: 0.78rem; }

  /* About */
  .about { padding: 3.5rem 0; }
  .about__visual { max-width: 260px; }
  .about__lead { font-size: 1.05rem; }
  .about__text { font-size: 0.92rem; }
  .about__facts {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .about__facts li {
    padding: 0.85rem 0.7rem;
    flex-direction: row;
    gap: 0.5rem;
  }
  .about__facts span { font-size: 0.68rem; }
  .about__facts strong { font-size: 0.85rem; }
  .section-heading {
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  }

  /* Quarawain */
  .quarawain { padding: 3.5rem 0; }
  .quarawain__devices { max-width: 260px; }
  .quarawain__image { max-width: 240px; }
  .quarawain__brand-badge { width: 72px; height: 72px; }
  .quarawain__header-row { gap: 0.75rem; margin-bottom: 1rem; }
  .quarawain__tagline { font-size: 0.92rem; }
  .quarawain__intro { font-size: 0.88rem; line-height: 1.65; }
  .quarawain__socials { gap: 0.4rem; }
  .quarawain__link {
    font-size: 0.74rem;
    padding: 0.28rem 0.55rem;
  }
  .quarawain__link svg { width: 12px; height: 12px; }
  .quarawain__social-icon { width: 34px; height: 34px; }
  .quarawain__social-icon svg { width: 14px; height: 14px; }

  /* Contact */
  .contact { padding: 3rem 0; }
  .contact__card {
    padding: 1.75rem 1.25rem;
    border-radius: 12px;
  }
  .subheading { font-size: 1.25rem; }
  .contact__header p { font-size: 0.92rem; }
  .contact__channel {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    gap: 0.5rem;
    border-radius: 12px;
  }
  .contact__channel-icon { width: 28px; height: 28px; }
  .contact__channel-icon svg { width: 15px; height: 15px; }
  .contact__socials a { width: 42px; height: 42px; }
  .contact__socials svg { width: 17px; height: 17px; }
  .contact__socials { gap: 0.5rem; }

  /* Quote / Footer */
  .quote { padding-top: 2rem; padding-bottom: 1.25rem; }
  .quote__mark { font-size: 2rem; }
  .quote__signature { font-size: 0.85rem; }
  .quote__inner { gap: 1.5rem; }
  .footer__logo { height: 40px !important; }
  .quote__footer-bar {
    padding-top: 1rem;
    font-size: 0.78rem;
  }
}

/* --- Very small phones (≤ 360px) --- */
@media (max-width: 360px) {
  .section-inner { padding-inline: 12px; }
  .nav__inner { padding-inline: 8px; }

  .nav__logo { height: 42px; }
  .nav--scrolled .nav__logo { height: 36px; }
  .lang-switch__btn {
    padding: 0.3rem 0.4rem;
    font-size: 0.68rem;
    min-width: 1.6rem;
    min-height: 1.6rem;
  }

  .hero__headline {
    font-size: 1.6rem;
    line-height: 1.22;
  }
  .hero__subtext { font-size: 0.85rem; }
  .btn { padding: 0.65rem 1.1rem; font-size: 0.82rem; }

  .about__visual { max-width: 220px; }
  .quarawain__devices { max-width: 220px; }
  .quarawain__brand-badge { width: 60px; height: 60px; }
  .quarawain__social-icon { width: 32px; height: 32px; }
  .quarawain__social-icon svg { width: 13px; height: 13px; }

  .contact__card { padding: 1.25rem 1rem; }
  .contact__socials a { width: 38px; height: 38px; }
}

/* Touch-device safe areas (notch phones) */
@supports (padding: env(safe-area-inset-bottom)) {
  .quote__footer-bar {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .nav {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
}
