:root {
  --bg: #eeecea;
  --surface: #e4e1dd;
  --ink: #333231;
  --muted: #6b6763;
  --accent: #5c6b54;
  --accent-ink: #ffffff;
  --field-1: #cdc3b6;
  --field-1-ink: #333231;
  --deep: #262524;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);

  --m: clamp(16px, 2.2vw, 32px);
  --gap: clamp(96px, 10vw, 160px);
  --font: "TikTok Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "TikTok Sans", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.45;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.6; }
[lang="ar"] { font-family: var(--font-ar); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { padding-inline: var(--m); }
.grid12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  padding: 16px 28px;
  border: 0;
  transition: transform 0.2s var(--ease-out), background-color 0.2s;
}
.btn:hover { background: #4d5a46; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-dark { background: var(--ink); }
.btn-dark:hover { background: #1f1e1d; }
.textlink { font-size: var(--step-small); text-underline-offset: 4px; transition: color 0.2s; }
.textlink:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: 1fr;
  color: #fff;
  overflow: hidden;
  background: #0d1622;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
  animation: drift 24s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.12) translateX(-1.5%); } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(8, 14, 22, 0.4);
  pointer-events: none;
}
.hero > :not(.hero-img) { position: relative; z-index: 1; }
.nav {
  grid-row: 1; grid-column: 1;
  justify-self: end;
  display: flex; gap: 24px; align-items: center;
  padding: 28px var(--m) 0;
  font-size: 15px;
}
.nav a { text-decoration: none; opacity: 0.9; transition: opacity 0.2s; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.lang {
  font: inherit; font-family: var(--font-ar); font-size: 15px;
  color: var(--ink); background: #fff; border: 0;
  padding: 8px 14px; cursor: pointer;
  transition: transform 0.2s var(--ease-out);
}
.lang:hover { transform: translateY(-2px); }
.lang:active { transform: scale(0.97); }
.hero-title {
  grid-row: 2; grid-column: 1;
  display: grid; grid-template-rows: auto 1fr auto;
  font-weight: 800;
}
.line { display: block; position: relative; z-index: 1; overflow: hidden; line-height: 0.9; padding-block: 0.04em; }
.line > span { display: inline-block; }
.line-1 {
  grid-row: 1; grid-column: 1;
  justify-self: start;
  padding-inline-start: var(--m);
  margin-top: 24px;
  font-size: min(12.4vw, 200px);
  font-weight: 800;
  font-stretch: 150%;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}
.line-2 {
  grid-row: 3;
  justify-self: end;
  padding-inline-end: var(--m);
  margin-bottom: 8px;
  font-family: var(--font-ar);
  font-size: min(15vw, 230px);
  font-weight: 700;
  line-height: 1.15;
}
.hero-mid {
  grid-row: 2; grid-column: 1;
  align-self: center;
  margin-top: -2vh;
  margin-inline-start: 30vw;
  padding-inline-end: var(--m);
  max-width: calc(30vw + 44ch);
}
.hero-lede { font-size: 18px; max-width: 40ch; margin-bottom: 24px; font-weight: 500; }

/* ---------- Intro ---------- */
.intro { padding-top: var(--gap); }
.h-intro {
  font-size: clamp(48px, 6.5vw, 96px);
  line-height: 0.95;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.03em;
}
html[lang="ar"] .h-intro { line-height: 1.2; letter-spacing: 0; }
.captions { display: flex; gap: 48px; margin-top: 28px; }
.captions p { width: 260px; font-size: var(--step-small); line-height: 1.5; }
.panorama { margin-top: 40px; overflow: hidden; }
.panorama img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 60%; }

/* ---------- Services ---------- */
.services { padding-block: var(--gap); }
.services .h-small {
  grid-column: 1 / -1;
  font-size: 28px; font-weight: 700; margin-bottom: 96px;
}
.cols { grid-column: 1 / 10; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.col h3 { font-size: 17px; font-weight: 600; margin-bottom: 1.25em; }
.col li {
  font-size: 17px; line-height: 1.25; padding-block: 4px;
  color: var(--muted); cursor: default;
  transition: color 0.2s, transform 0.25s var(--ease-out);
}
.col li:hover, .col li:focus-visible, .col li.on { color: var(--ink); transform: translateX(4px); }
html[dir="rtl"] .col li:hover, html[dir="rtl"] .col li.on { transform: translateX(-4px); }
.col-sum { display: none; }
.side { grid-column: 10 / 13; display: flex; flex-direction: column; gap: 24px; }
.desc { font-size: 17px; line-height: 1.35; min-height: 4.2em; }
.side img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
figcaption { font-size: var(--step-small); color: var(--muted); margin-top: 10px; }

/* ---------- Process ---------- */
.process { background: var(--ink); color: var(--bg); padding-block: var(--gap); }
.process-text { grid-column: 1 / 6; align-self: start; }
.h-mid {
  font-size: clamp(40px, 4.4vw, 68px);
  line-height: 1; font-weight: 800; font-stretch: 125%;
  letter-spacing: -0.02em; margin-bottom: 28px;
}
html[lang="ar"] .h-mid { line-height: 1.25; letter-spacing: 0; }
.process-text p { max-width: 32ch; }
.reel { margin-top: 48px; width: min(280px, 60%); }
.reel video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #222; }
.process figcaption { color: #b9b4ae; }
.slip {
  grid-column: 7 / 12;
  align-self: start;
  max-width: 480px; width: 100%;
  background: var(--bg); color: var(--ink);
  padding: 8px 28px 52px;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 97.5% 100%, 95% calc(100% - 12px), 92.5% 100%, 90% calc(100% - 12px), 87.5% 100%, 85% calc(100% - 12px), 82.5% 100%, 80% calc(100% - 12px), 77.5% 100%, 75% calc(100% - 12px), 72.5% 100%, 70% calc(100% - 12px), 67.5% 100%, 65% calc(100% - 12px), 62.5% 100%, 60% calc(100% - 12px), 57.5% 100%, 55% calc(100% - 12px), 52.5% 100%, 50% calc(100% - 12px), 47.5% 100%, 45% calc(100% - 12px), 42.5% 100%, 40% calc(100% - 12px), 37.5% 100%, 35% calc(100% - 12px), 32.5% 100%, 30% calc(100% - 12px), 27.5% 100%, 25% calc(100% - 12px), 22.5% 100%, 20% calc(100% - 12px), 17.5% 100%, 15% calc(100% - 12px), 12.5% 100%, 10% calc(100% - 12px), 7.5% 100%, 5% calc(100% - 12px), 2.5% 100%, 0 calc(100% - 12px));
}
.slip h3 { font-size: 16px; font-weight: 700; margin-top: 28px; margin-bottom: 6px; }
.slip dl div { display: flex; align-items: baseline; gap: 8px; padding-block: 4px; }
.slip dt { flex: 0 1 auto; }
.slip dd { flex: 0 0 auto; order: 2; white-space: nowrap; }
.slip dl div::after {
  content: "• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •";
  order: 1; flex: 1 1 24px; min-width: 24px;
  overflow: hidden; white-space: nowrap; direction: ltr;
  color: var(--muted); font-size: 8px; letter-spacing: 2px; line-height: 1;
}
.slip-total {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: 28px -28px 0; padding: 0 28px; min-height: 44px;
  background: var(--ink); color: var(--bg); font-weight: 500;
}

/* ---------- Pricing ---------- */
.pricing { background: var(--field-1); color: var(--field-1-ink); padding-block: var(--gap); }
.price-line {
  font-size: min(9vw, 150px);
  line-height: 0.95; font-weight: 800; font-stretch: 140%;
  letter-spacing: -0.03em; text-transform: uppercase;
}
html[lang="ar"] .price-line { line-height: 1.25; letter-spacing: 0; }
.pl-1, .pl-2 { display: block; }
.price-block {
  display: inline-block;
  background: var(--accent); color: var(--accent-ink);
  padding-inline: 0.15em;
  font-variant-numeric: tabular-nums;
  transition: transform 0.3s var(--ease-out);
}
.price-block.bump { animation: bump 0.45s var(--ease-out); }
@keyframes bump { 0% { transform: translateY(0.06em); opacity: 0.6; } 100% { transform: none; opacity: 1; } }
.builder { display: flex; flex-wrap: wrap; gap: 32px 56px; margin-top: 64px; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
legend { font-size: var(--step-small); font-weight: 600; margin-bottom: 10px; padding: 0; }
.builder label { position: relative; cursor: pointer; }
.builder input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.builder label span {
  display: inline-block; padding: 10px 16px; font-size: 16px;
  background: var(--bg); color: var(--ink);
  transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease-out);
}
.builder label:hover span { transform: translateY(-2px); }
.builder input:checked + span { background: var(--ink); color: var(--bg); }
.builder input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.price-foot {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  margin-top: 64px; align-items: end;
}
.price-foot > p { grid-column: 1 / 7; font-size: 20px; line-height: 1.45; max-width: 60ch; }
.price-actions { grid-column: 9 / 13; justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }

/* ---------- FAQ ---------- */
.faq { padding-block: var(--gap); overflow-x: clip; }
.h-faq {
  grid-column: 1 / -1;
  font-size: 5.5vw; line-height: 1; font-weight: 800; font-stretch: 140%;
  letter-spacing: -0.03em; text-transform: uppercase;
  margin-bottom: 80px;
}
html[lang="ar"] .h-faq { line-height: 1.3; letter-spacing: 0; }
.faq-fig { grid-column: 1 / 4; align-self: start; }
.faq-fig img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 40% 50%; }
.qs { grid-column: 5 / 13; display: flex; flex-direction: column; gap: 12px; }
details { padding: 12px 24px; margin-inline: -24px; transition: background-color 0.25s; }
details[open] { background: var(--surface); }
summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-size: 22px; line-height: 1.3;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: 0 0 auto; width: 12px; height: 12px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-4px);
  transition: transform 0.3s var(--ease-out);
}
details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
summary:hover { color: var(--accent); }
details p { font-size: 17px; max-width: 48ch; padding-top: 14px; padding-bottom: 8px; }

/* ---------- Contact ---------- */
.contact {
  min-height: 82svh;
  background: var(--ink); color: var(--bg);
  display: grid; grid-template-rows: auto 1fr auto auto;
  padding: 40px var(--m) 32px;
}
.contact-lede { font-size: 22px; font-weight: 500; line-height: 1.35; max-width: 30ch; }
.email {
  grid-row: 3;
  display: block; text-decoration: none;
  font-size: 7.8vw; font-weight: 400; font-stretch: 100%; white-space: nowrap;
  letter-spacing: -0.04em; line-height: 0.95;
  margin-bottom: 10vh;
  transition: color 0.3s;
}
.email span { display: block; }
.email:hover { color: #a9b89f; }
.contact-foot { grid-row: 4; display: flex; justify-content: space-between; gap: 24px; font-size: 14px; }
.contact-foot p { display: flex; gap: 20px; flex-wrap: wrap; }
.contact-foot a { text-underline-offset: 4px; transition: color 0.2s; }
.contact-foot a:hover { color: #a9b89f; }

/* ---------- Footer ---------- */
.footer {
  background: var(--deep); color: #b9b4ae;
  overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto auto;
  padding: 40px var(--m) 24px;
}
.fcols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; font-size: 15px; }
.fcols > div { display: flex; flex-direction: column; gap: 6px; }
.fcols > div > :first-child { color: #f2efeb; font-weight: 500; margin-bottom: 4px; }
.fcols a { text-decoration: none; transition: color 0.2s; overflow-wrap: anywhere; }
.fcols a:hover { color: #fff; }
.wordmark {
  grid-row: 3;
  color: #f2efeb;
  font-size: 9.2vw; font-weight: 800; font-stretch: 150%;
  text-transform: uppercase; letter-spacing: -0.04em; line-height: 0.85;
  white-space: nowrap; margin-top: 64px;
}
html[dir="rtl"] .wordmark { direction: ltr; text-align: right; }
.legal p { max-width: 75ch; }
.legal { grid-row: 4; margin-top: 20px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Motion ---------- */
.js .line > span { transform: translateY(105%); }
.js.ready .line > span { transform: none; transition: transform 0.9s var(--ease-out); }
.js.ready .line-2 > span { transition-delay: 0.11s; }
.js .hero-mid { opacity: 0; transform: translateY(16px); }
.js.ready .hero-mid { opacity: 1; transform: none; transition: opacity 0.7s 0.5s, transform 0.7s 0.5s var(--ease-out); }
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity 0.7s var(--d, 0s), transform 0.8s var(--d, 0s) var(--ease-out); }
.panorama img { transform: scale(1.08); transition: transform 0.1s linear; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .hero-img { animation: none; }
  .js .line > span, .js .hero-mid, .js .reveal { transform: none !important; opacity: 1 !important; transition: none !important; }
  .panorama img { transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .cols { grid-column: 1 / -1; }
  .side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 64px; align-items: start; }
  .process-text { grid-column: 1 / -1; margin-bottom: 48px; }
  .slip { grid-column: 1 / -1; justify-self: start; }
  .faq-fig { display: none; }
  .contact { min-height: 64svh; }
  .qs { grid-column: 1 / -1; }
  details { margin-inline: calc(-1 * var(--m)); padding-inline: var(--m); }
  .price-foot > p { grid-column: 1 / -1; margin-bottom: 32px; }
  .price-actions { grid-column: 1 / -1; justify-self: start; align-items: flex-start; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .nav { justify-self: stretch; justify-content: flex-end; gap: 14px; padding-top: 18px; font-size: 14px; }
  .nav a:not([href="#pricing"]):not([href="#contact"]) { display: none; }
  .line-1 { margin-top: 72px; font-size: 13.4vw; }
  .line-2 { font-size: 19vw; margin-bottom: 12px; }
  .hero-mid { margin-inline-start: var(--m); }
  .hero-lede { font-size: 18px; }
  .hero-img { object-position: 62% 50%; }

  .h-intro { font-size: 10.4vw; font-stretch: 100%; }
  .captions { flex-direction: column; gap: 8px; }
  .captions p { width: auto; font-size: 14px; }
  .panorama img { aspect-ratio: 4 / 5; object-position: 52% 50%; }

  .services .h-small { font-size: 24px; margin-bottom: 48px; }
  .cols { grid-template-columns: 1fr; gap: 40px; }
  .col li { font-size: 18px; line-height: 1.4; padding: 0; }
  .col-sum { display: block; color: var(--ink); font-size: 16px; margin-top: 12px; }
  .side { grid-template-columns: 1fr; }
  .desc { display: none; }

  .slip { padding-inline: 18px; }
  .reel { width: 100%; }
  .reel video { aspect-ratio: 4 / 5; }
  .slip-total { margin-inline: -18px; padding-inline: 18px; }

  .price-line { font-size: 11vw; }
  .pl-1 { white-space: nowrap; }
  .builder { gap: 28px; margin-top: 48px; }
  .price-foot > p { font-size: 17px; }
  .price-actions, .price-actions .btn { width: 100%; text-align: center; }

  .h-faq { font-size: 10vw; margin-bottom: 48px; }
  summary { font-size: 19px; }
  details p { font-size: 16px; }

  .contact { min-height: 72svh; }
  .contact-lede { font-size: 18px; }
  .email { font-size: 7.6vw; margin-bottom: 6vh; }
  .contact-foot { flex-direction: column; font-size: 15px; gap: 12px; }

  .fcols { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .wordmark { font-size: 12.6vw; white-space: normal; }
  .legal { font-size: 13px; }
}

/* Latin display pieces keep the Latin face in Arabic mode */
html[lang="ar"] .line-1,
html[lang="ar"] .email,
html[lang="ar"] .wordmark,
html[lang="ar"] .price-block { font-family: var(--font); }
