:root {
  --ivory: #f3eee6;
  --ivory-deep: #e6ddcf;
  --ink: #1b1713;
  --muted: #5d564d;
  --night: #10241c;
  --night-2: #1a3830;
  --emerald: #0e7a4c;
  --emerald-2: #1c9a63;
  --gold: #b5873e;
  --gold-2: #e6cb90;
  --line: rgba(27, 23, 19, 0.16);
  --nav: 78px;
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Manrope", "IBM Plex Sans Arabic", sans-serif;
  --script: "Great Vibes", cursive;
  --shadow: 0 24px 60px rgba(16, 36, 28, 0.16);
  color: var(--ink);
  background: var(--ivory);
  font-family: var(--sans);
}

html[dir="rtl"] {
  --serif: "Aref Ruqaa Ink", "Fraunces", serif;
  --sans: "IBM Plex Sans Arabic", "Manrope", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -40px;
  background: var(--night);
  color: var(--ivory);
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: var(--nav);
  padding: 0 28px;
  background: rgba(243, 238, 230, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: 0.04em; }
.brand-seal {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background:
    radial-gradient(circle at 60% 40%, var(--gold-2), transparent 30%),
    radial-gradient(circle at 40% 60%, var(--emerald), transparent 42%),
    var(--night);
}
.nav nav { display: flex; gap: 18px; margin-inline-end: auto; }
.nav nav a { text-decoration: none; font-size: 0.92rem; }
.nav nav a:hover { color: var(--emerald); }
.lang { position: relative; }
.lang-toggle, .nav-toggle {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  min-height: 40px;
  padding: 0 12px;
  cursor: pointer;
}
.lang-toggle { display: inline-flex; align-items: center; gap: 6px; }
.lang-toggle svg { width: 14px; height: 14px; }
.lang-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 168px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.lang-menu button {
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 12px;
  cursor: pointer;
}
.lang-menu button[aria-selected="true"] { background: var(--night); color: var(--ivory); }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 0; position: relative; }
.nav-toggle span { position: absolute; inset-inline: 11px; height: 1px; background: var(--ink); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: end;
  min-height: calc(100svh - var(--nav));
  padding: 48px 7vw 72px;
}
.kicker {
  margin: 0 0 12px;
  color: var(--emerald);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}
.wordmark { margin: 0; line-height: 0.78; font-weight: 680; font-size: clamp(4.5rem, 12vw, 9rem); font-family: "Fraunces", serif; }
.wordmark em, .footer-mark em { font-family: var(--script); font-style: normal; color: #8d5e28; font-weight: 400; font-size: 0.46em; display: block; margin-top: -0.15em; }
.lede, .body, .note { font-size: 1.15rem; line-height: 1.7; color: var(--muted); max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--ink);
  cursor: pointer;
  background: transparent;
}
.button.solid { background: var(--night); color: var(--ivory); border-color: var(--night); }
.button.solid:hover { background: var(--emerald); border-color: var(--emerald); }
.button.ghost:hover { border-color: var(--gold); color: var(--gold); }
.hero-card {
  margin: 0;
  background: var(--night);
  padding: 18px 18px 12px;
  box-shadow: var(--shadow);
  transform: rotate(-2.5deg);
}
html[dir="ltr"] .hero-card { transform: rotate(2.5deg); }
.hero-card img { width: 100%; height: auto; }
.hero-card figcaption { color: var(--gold-2); font-family: var(--script); font-size: 1.6rem; text-align: center; }

.statement {
  --ink-red: #9a3428;
  position: relative;
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 12vh 10vw;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 30%, rgba(228, 201, 138, 0.22) 0 1px, transparent 1.6px),
    radial-gradient(circle at 72% 60%, rgba(232, 214, 196, 0.16) 0 1px, transparent 1.6px),
    #1c4034;
  color: var(--ink-red);
}
.emulsion {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 14ch;
  max-width: 92vw;
  height: min(78%, 32rem);
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  pointer-events: none;
}
.emulsion i {
  position: absolute;
  inset-inline: -6%;
  display: block;
  border-radius: 40% 18% 46% 22%;
  background:
    repeating-linear-gradient(90deg, transparent 0 3px, rgba(232, 214, 196, 0.04) 3px 4px),
    linear-gradient(90deg, transparent, rgba(232, 214, 196, 0.18) 12%, rgba(244, 236, 224, 0.28) 50%, rgba(232, 214, 196, 0.18) 88%, transparent);
  transform: scaleX(0);
  transform-origin: right center;
  filter: blur(0.3px);
}
html[dir="ltr"] .emulsion i { transform-origin: left center; }
.statement.is-developed .emulsion i { transform: scaleX(1); transition: transform 0.72s cubic-bezier(0.16, 0.72, 0.18, 1); }
.statement p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 12ch;
  font-family: "Aref Ruqaa Ink", "Fraunces", serif;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink-red);
}

.show { padding: 8vh 7vw 6vh; }
.show-deck { background: #efeae2; }
.section-head h2, .about h2, .contact h2 { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 4.4rem); font-weight: 680; line-height: 1.05; margin: 0 0 12px; }
.show .section-head { padding: 0 0 22px; max-width: 40rem; }
#faq-list { margin: 0; padding: 0; }

.vfc {
  --fold: 0.8s cubic-bezier(1, -0.03, 0.413, 0.965);
  position: relative;
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 36px 0 12px;
  touch-action: pan-y;
  user-select: none;
  outline: none;
}
.vfc-land { padding-top: 48px; padding-bottom: 20px; }
.vfc:focus-visible { box-shadow: inset 0 0 0 2px var(--emerald); }
.vfc-window { overflow: hidden; display: grid; place-items: center; max-width: 100%; }
.vfc-stage { position: relative; display: flex; justify-content: flex-start; align-items: center; }
html[dir="rtl"] .vfc-stage,
html[dir="rtl"] .vfc-strip { direction: rtl; }
.vfc-strip { display: flex; width: max-content; align-items: center; }
.vfc.is-ready .vfc-strip { transition: transform var(--spring-ms, 1100ms) var(--spring-ease, ease); }
.vfc-slot { perspective: 900px; }
.vfc-holder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.vfc.is-ready .vfc-holder { transition: width var(--fold), transform var(--fold); }
.vfc-photo {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  background:
    linear-gradient(160deg, rgba(230, 203, 144, 0.28), transparent 42%),
    var(--night);
  color: var(--gold-2);
  -webkit-tap-highlight-color: transparent;
}
.vfc-photo b { font-family: var(--serif); font-size: clamp(2.8rem, 8vw, 4.6rem); font-weight: 520; }
.vfc-photo img, .cd-card img, .card img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; pointer-events: none; }
.cd-card img { position: absolute; inset: 0; }
.vfc-frame {
  position: absolute;
  inset: 0;
  margin: auto;
  border: 2px solid var(--ink);
  border-radius: 16px;
  pointer-events: none;
  box-sizing: content-box;
}
.vfc-frame.is-pulse { animation: vfc-pulse var(--fold) ease-in-out; }
@keyframes vfc-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.045); } 100% { transform: scale(1); } }
.vfc-caption {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 24rem);
  margin: 14px 0 0;
  min-height: 1.6em;
}
.vfc-caption b { flex: none; font-family: "Fraunces", serif; color: var(--gold); font-size: 1.15rem; }
.vfc-caption span {
  flex: 1;
  min-width: 0;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vfc-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}
.vfc-btn, .cd-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.vfc-btn svg, .cd-btn svg { width: 22px; height: 22px; }
.vfc-btn:disabled { opacity: 0.3; cursor: default; }
.vfc-dots { display: flex; justify-content: center; align-items: center; gap: 7px; min-width: 0; max-width: 46vw; flex-wrap: wrap; }
.vfc-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.3;
  cursor: pointer;
}
.vfc-dot[aria-current="true"] { width: 22px; opacity: 1; background: var(--emerald); }
.vfc-count, .cd-count { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; font-size: 0.85rem; letter-spacing: 0.08em; }
.vfc-sr, .cd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cd {
  display: grid;
  justify-items: center;
  gap: 22px;
  width: 100%;
  outline: none;
  touch-action: pan-y;
  user-select: none;
}
.cd:focus-visible { box-shadow: inset 0 0 0 2px var(--emerald); }
.cd-deck {
  position: relative;
  width: min(74vw, 380px, calc(56svh * 0.75));
  aspect-ratio: 3 / 4;
  max-height: 68svh;
  touch-action: pan-y;
}
html[dir="rtl"] .vfc-btn svg,
html[dir="rtl"] .cd-btn svg { transform: scaleX(-1); }
.cd-card {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--night);
  color: var(--gold-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 28px 50px -28px rgba(16, 36, 28, 0.55);
  will-change: transform;
}
.cd.is-ready .cd-card { transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease, filter 0.4s ease; }
.cd-card[data-top="1"] { cursor: grab; }
.cd-card[data-drag="1"] { cursor: grabbing; transition: none; }
.cd-card[data-fly="1"] { transition: transform 0.45s cubic-bezier(0.3, 0.5, 0.3, 1), opacity 0.45s ease; }
.cd-card[data-snap="1"] { transition: none; }
.cd-empty { position: relative; height: 100%; display: grid; place-items: center; padding: 18px; text-align: center; }
.cd-empty b { font-family: "Fraunces", serif; font-size: clamp(3.2rem, 10vw, 5rem); font-weight: 520; }
.cd-empty span {
  position: absolute;
  inset-inline: 16px;
  bottom: 18px;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.3;
}
.cd-meta {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 44px;
  grid-template-areas: "prev title count next";
  align-items: center;
  gap: 12px;
  width: min(100%, 520px);
}
.cd-btn[data-dir="-1"] { grid-area: prev; }
.cd-cap { grid-area: title; }
.cd-count { grid-area: count; }
.cd-btn[data-dir="1"] { grid-area: next; }
.cd-cap { min-width: 0; overflow: hidden; }
.cd-title, .cd-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-title { font-family: var(--sans); font-size: 1rem; color: var(--ink); line-height: 1.3; }
.cd-sub { color: var(--muted); font-size: 0.92rem; min-height: 1.2em; }
.cd-count b { color: var(--ink); font-weight: 650; }
.cd-btn { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.7); }

.section-head, .videos, .services, .faq, .about, .contact { padding: 8vh 7vw; }
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 26vw);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 7vw 20px;
  scrollbar-width: thin;
}
.card {
  scroll-snap-align: start;
  min-height: 420px;
  background: white;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.card .visual { flex: 1; min-height: 280px; position: relative; background: var(--night); color: var(--gold-2); display: grid; place-items: center; overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.card .visual b { font-family: var(--serif); font-size: 3.4rem; position: relative; }
.card footer { padding: 14px 16px 18px; }
.card h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 1.5rem; }
.card p { margin: 0; color: var(--muted); }
.rail-section { padding-top: 4vh; }

.videos { background: var(--ivory-deep); }
.about { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 48px; align-items: center; }
.about aside { background: var(--night); color: var(--gold-2); padding: 16px; }
.about aside p { padding: 8px 8px 4px; line-height: 1.6; }
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.service-grid article { border-top: 1px solid var(--ink); padding-top: 16px; min-height: 180px; }
.service-grid h3 { font-family: var(--serif); font-size: 2rem; margin: 0 0 8px; }
.service-grid p { margin: 0; color: var(--muted); line-height: 1.6; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-size: 1.25rem; font-family: var(--serif); }
.faq p { color: var(--muted); line-height: 1.7; max-width: 46rem; }

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: var(--night); color: var(--ivory); }
.contact .kicker { color: var(--gold-2); }
.contact .body, .contact .form-note { color: rgba(243, 238, 230, 0.78); }
.contact form { display: grid; gap: 12px; }
.contact label { display: grid; gap: 6px; font-size: 0.9rem; }
.contact input, .contact textarea {
  background: transparent;
  border: 1px solid rgba(230, 203, 144, 0.4);
  padding: 12px;
  border-radius: 0;
}
.contact .button.solid { background: var(--gold); color: var(--night); border-color: var(--gold); }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a, .socials span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  text-decoration: none;
}
.socials span { opacity: 0.35; }
.socials svg { width: 18px; height: 18px; fill: currentColor; }

.footer { padding: 8vh 7vw 40px; }
.footer-mark { font-family: "Fraunces", serif; font-size: clamp(4rem, 14vw, 11rem); line-height: 0.8; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; align-items: end; border-top: 1px solid var(--line); padding-top: 18px; }

.chat { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 24; display: grid; justify-items: end; }
.chat-backdrop { position: fixed; inset: 0; background: rgba(16, 36, 28, 0.42); }
.chat-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: var(--emerald);
  color: white;
  border-radius: 999px;
  min-height: 52px;
  padding: 0 16px 0 14px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(14, 122, 76, 0.28);
}
.chat-toggle svg { width: 22px; height: 22px; fill: currentColor; }
.chat-panel {
  width: min(380px, calc(100vw - 28px));
  height: min(520px, 70svh);
  margin-bottom: 10px;
  background: var(--ivory);
  color: var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel header { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--night); color: var(--ivory); }
.chat-seal {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background:
    radial-gradient(circle at 60% 40%, var(--gold-2), transparent 30%),
    radial-gradient(circle at 40% 60%, var(--emerald), transparent 42%),
    var(--night);
}
.chat-panel header strong {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 650;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ivory);
}
.chat-close { width: 36px; height: 36px; border: 1px solid rgba(243, 238, 230, 0.35); border-radius: 50%; background: transparent; color: var(--ivory); cursor: pointer; display: grid; place-items: center; flex: none; appearance: none; }
.chat-close svg { width: 16px; height: 16px; }
.chat-log { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.bubble { margin: 0; padding: 10px 12px; max-width: 86%; line-height: 1.55; border-radius: 16px; }
.bubble.bot { background: white; align-self: flex-start; border-start-start-radius: 4px; }
.bubble.user { background: var(--emerald); color: white; align-self: flex-end; border-start-end-radius: 4px; }
.chat-panel form { display: flex; gap: 8px; align-items: center; padding: 10px; background: white; border-top: 1px solid var(--line); }
.chat-panel input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 12px 14px; background: var(--ivory); }
.chat-panel form button { border: 0; background: var(--night); color: var(--ivory); border-radius: 999px; min-height: 44px; padding: 0 14px; cursor: pointer; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .vfc-strip, .vfc-holder, .cd-card, .vfc-dot, .vfc-btn, .emulsion i { transition: none !important; }
  .vfc-frame { animation: none !important; }
  .statement.is-developed .emulsion i { transform: scaleX(1); }
}

@media (max-width: 860px) {
  .nav { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .brand { font-size: 0.95rem; }
  .nav-toggle { display: inline-block; }
  .nav nav { display: none; order: 4; width: 100%; flex-direction: column; gap: 4px; margin: 0; padding: 8px 0 12px; }
  .nav nav.is-open { display: flex; }
  .nav nav a { min-height: 40px; display: flex; align-items: center; }
  .lang { margin-inline-start: auto; }
  .hero, .about, .contact, .service-grid { grid-template-columns: 1fr; }
  .hero, .statement, .show, .videos, .services, .faq, .about, .contact { padding-left: 16px; padding-right: 16px; }
  .hero { min-height: auto; padding-top: 28px; }
  .hero-card { transform: none; }
  .show { padding-top: 36px; padding-bottom: 28px; }
  .rail { grid-auto-columns: 78vw; padding-inline: 16px; }
  .statement p { max-width: 11ch; }
  .footer { padding-bottom: 96px; }
  .chat { inset-inline-end: 12px; bottom: 12px; }
  .chat-toggle { width: 56px; height: 56px; min-height: 56px; padding: 0; justify-content: center; }
  .chat-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .chat-panel {
    position: fixed;
    inset-inline: 10px;
    bottom: 78px;
    width: auto;
    height: min(62svh, 480px);
    margin: 0;
    border-radius: 22px 22px 18px 18px;
  }
  .show { scroll-margin-top: 72px; }
  .cd-meta {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-areas: "prev title next" "count count count";
  }
  .cd-count { justify-self: center; }
}
body.chat-open { overflow: hidden; }
