/* ==========================================================================
   Lavaggio Qatar
   Palette checked with WebAIM's contrast checker; easings from easings.net.
   ========================================================================== */

:root {
  /* brand: the yellow and red of the Lavaggio logo, on the dark of their studio */
  --ink: #0e0f13;
  --ink-2: #13151a;
  --ink-3: #1b1d23;
  --paper: #f5f3ee;
  --paper-2: rgba(245, 243, 238, 0.9);
  --paper-3: rgba(245, 243, 238, 0.7);
  --line: rgba(245, 243, 238, 0.14);
  --line-2: rgba(245, 243, 238, 0.36);
  --yellow: #efd13f;
  --yellow-hi: #f8de63;
  --red: #c42b20;
  --red-deep: #9e1f17;
  --light: #efd13f;
  --light-line: rgba(20, 18, 10, 0.22);
  --text-on-light: #14130f;
  --text-on-light-2: #3a3317;
  --accent-on-light: #9e1f17;
  --open: #8fc79a;

  --f-display: "Poppins", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Poppins", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);    /* easeOutExpo */
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);  /* easeOutQuart */
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);    /* easeInOutCubic */

  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 76px;
  --dir: 1;
  color-scheme: dark;
}

[dir="rtl"] { --dir: -1; }

[lang="ar"] {
  --f-display: "IBM Plex Sans Arabic", "Poppins", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "Poppins", system-ui, sans-serif;
}

/* Arabic letters must stay joined: never track them out. */
[lang="ar"] body * { letter-spacing: 0 !important; }

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ink);
  scroll-behavior: auto;
}

html.i18n-pending body { opacity: 0; }

/* first paint: hidden until the entrance runs (head script adds .preload) */
.preload .car,
.preload .intro-head > *,
.preload .intro-side > *,
.preload .site-header { opacity: 0; }

main,
.dock { transition: opacity 0.28s ease; }
.lang-switching main,
.lang-switching .site-header,
.lang-switching .dock { opacity: 0 !important; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: opacity 0.35s ease;
}

/* film grain, after fffuel's nnnoise */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
em { font-style: italic; }

:focus-visible { outline: 1px solid var(--yellow); outline-offset: 4px; }

::selection { background: var(--yellow); color: var(--ink); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: fixed;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip:focus { transform: none; }

.ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico-fill { fill: currentColor; stroke: none; }
[dir="rtl"] .ico:has(use[href="#i-arrow"]) { transform: scaleX(-1); }

.wrap { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- type ---------- */

.display,
.display-lg,
.ch-title {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.display em,
.display-lg em { font-style: normal; color: var(--yellow); }

.display-lg { font-size: clamp(38px, 5.6vw, 90px); line-height: 1.02; }
[lang="ar"] .display-lg { line-height: 1.35; font-size: clamp(34px, 5vw, 76px); }

.eyebrow,
.label {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--yellow);
}
[lang="ar"] .eyebrow,
[lang="ar"] .label { font-size: 15px; font-weight: 600; text-transform: none; }

.label { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); }
.label-num {
  font-family: "Poppins", sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--paper-3);
}
.label-num::after {
  content: "";
  display: inline-block;
  width: 36px;
  height: 1px;
  margin-inline-start: 14px;
  vertical-align: middle;
  background: currentColor;
  opacity: 0.6;
}

.lede { font-size: clamp(19px, 1.5vw, 22px); line-height: 1.55; color: var(--paper); }
[lang="ar"] .lede { line-height: 1.8; }
[lang="ar"] body { line-height: 1.8; }

.muted { color: var(--paper-3); font-size: 16px; }

/* ---------- buttons ---------- */

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  --h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 24px;
  border-radius: 2px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-sm { --h: 42px; padding: 0 16px; font-size: 15px; }
.btn-lg { --h: 60px; padding: 0 30px; font-size: 17px; }

.btn-brand { background: var(--yellow); color: #111111; }
.btn-brand:hover { background: var(--yellow-hi); }

.btn-line { border: 1px solid var(--line-2); color: var(--paper); }
.btn-line:hover { border-color: var(--yellow); color: var(--yellow-hi); }

.btn-ivory { background: var(--paper); color: var(--ink); }
.btn-ivory:hover { background: var(--yellow-hi); }


.num { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  transition: background-color 0.5s var(--ease-out), border-color 0.5s var(--ease-out), opacity 1.2s ease 0.2s;
  border-bottom: 1px solid transparent;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -40px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(14, 15, 19, 0.8), rgba(14, 15, 19, 0));
  transition: opacity 0.5s;
}
.site-header.is-solid {
  background: rgba(14, 15, 19, 0.92);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
}
.site-header.is-solid::before { opacity: 0; }

.brand { display: inline-flex; align-items: center; justify-self: start; min-height: 44px; }
.brand-logo { width: auto; height: 50px; display: block; }
.nav { display: flex; gap: clamp(20px, 2.6vw, 40px); }
.nav a {
  position: relative;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-2);
  padding: 8px 0;
  transition: color 0.3s;
}
[lang="ar"] .nav a { font-size: 16px; font-weight: 500; text-transform: none; }
.nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 2px;
  height: 1px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.nav a:hover { color: var(--paper); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-actions { justify-self: end; display: flex; align-items: center; gap: 16px; }

.lang {
  min-height: 40px;
  padding: 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--paper);
  transition: color 0.3s;
}
.lang:hover { color: var(--yellow-hi); }
.lang .lang-ar { font-family: "IBM Plex Sans Arabic", sans-serif; font-size: 15px; }
.lang .lang-en { font-family: "Poppins", sans-serif; letter-spacing: 0.06em; }
[lang="en"] .lang .lang-en,
[lang="ar"] .lang .lang-ar { display: none; }

/* ==========================================================================
   Stage: hero + services around the car
   ========================================================================== */

.stage-section { position: relative; height: 1150vh; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.stage-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 46% at 50% 60%, rgba(255, 246, 228, 0.085), rgba(255, 246, 228, 0) 70%),
    radial-gradient(90% 30% at 50% 100%, rgba(239, 209, 63, 0.07), rgba(0, 0, 0, 0) 70%),
    linear-gradient(to bottom, #0e0f13 0%, #0e0e10 55%, #0a0a0b 100%);
}

/* the car */
.car-frame {
  --car-w: min(1400px, 90vw, 128svh);
  position: absolute;
  left: 50%;
  top: 61%;
  width: var(--car-w);
  aspect-ratio: 1200 / 420;
  transform: translate(-50%, -50%);
}
.car-frame::after {
  /* polished studio floor */
  content: "";
  position: absolute;
  left: -40%;
  right: -40%;
  top: 88.5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 238, 230, 0.12) 30%, rgba(242, 238, 230, 0.12) 70%, transparent);
  z-index: -1;
}
.car-cam { width: 100%; height: 100%; transform-origin: 50% 50%; }
.car {
  position: relative;
  width: 100%;
  height: 100%;
  -webkit-box-reflect: below calc(var(--car-w) * -0.08) linear-gradient(to bottom, transparent 62%, rgba(255, 255, 255, 0.13));
}
[dir="rtl"] .car { transform: scaleX(-1); }
@media (hover: none) and (max-width: 820px) {
  /* keep phones smooth: the floor reflection doubles the paint work while scrolling */
  .car { -webkit-box-reflect: none; }
}

.car-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* colour change: the red picture is revealed from the back of the car to the front */
.car-pic-new { clip-path: inset(0 calc(100% - var(--new, 0%)) 0 0); }

.js .car.drive-in { animation: car-in 2.4s var(--ease-quart) both; }
@keyframes car-in { from { translate: calc(-75vw * var(--dir)) 0; } to { translate: 0 0; } }

/* 3D car (stage3d.js). The illustrated SVG car stays as the fallback. */
.car3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s ease;
}
.has-3d .car3d { opacity: 1; }
.webgl .car-frame { display: none; }
.webgl:not(.has-3d) .stage::after {
  /* loading: a thin line drawing across where the car will be */
  content: "";
  position: absolute;
  left: 50%;
  top: 64%;
  width: min(320px, 50vw);
  height: 1px;
  translate: -50% 0;
  background: linear-gradient(90deg, transparent, var(--yellow), transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: loading 1.4s var(--ease-io) infinite;
  opacity: 0.8;
}
@keyframes loading { from { background-position: -100% 0; } to { background-position: 200% 0; } }

/* Labels the 3D stage pins on the car: a dot on the paint, a thin leader line
   and a pill. Red dot = the problem, yellow pill = what Lavaggio does about it. */
.fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fx > * {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}
.fx > .on { opacity: 1; }
.fx-tag { --tag: #ff5a4a; width: 0; height: 0; }
.fx-tag.is-good { --tag: var(--yellow); }
.fx-tag::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tag);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5);
}
.fx-tag::after {
  content: "";
  position: absolute;
  left: -0.5px;
  bottom: 5px;
  width: 1px;
  height: 34px;
  background: linear-gradient(to top, var(--tag), rgba(255, 255, 255, 0.35));
}
.fx-tag span,
.fx-swatches,
.fx-heat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 15, 19, 0.84);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--paper);
  font: 600 13px/1.1 var(--f-body);
  white-space: nowrap;
}
.fx-tag span {
  position: absolute;
  left: 0;
  bottom: 39px;
  translate: calc(-50% + var(--sx, 0px)) 0;
  scale: 0.92;
  transition: scale 0.45s var(--ease-out);
}
.fx-tag.on span { scale: 1; }
.fx-tag span::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tag);
}
.fx-tag.is-good span { background: var(--yellow); border-color: transparent; color: #14130f; }
.fx-tag.is-good span::before {
  width: 9px;
  height: 5px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  border-radius: 0;
  background: none;
  rotate: -45deg;
  translate: 0 -2px;
}

.fx-swatches { translate: calc(-50% + var(--sx, 0px)) 26px; }
.fx-sw { display: flex; gap: 8px; }
.fx-sw i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  transition: scale 0.3s var(--ease-out), box-shadow 0.3s;
}
.fx-swatches[data-active="0"] i:nth-child(1),
.fx-swatches[data-active="1"] i:nth-child(2),
.fx-swatches[data-active="2"] i:nth-child(3) {
  scale: 1.3;
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 3.5px var(--paper);
}

.fx-heat { --heat: 1; translate: calc(-50% + var(--sx, 0px)) calc(-100% - 12px); }
.fx-heat .ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: color-mix(in srgb, #ff6a10 calc(var(--heat) * 100%), #7fb4ff);
  stroke-width: 2;
}
.fx-heat-bar {
  position: relative;
  width: 72px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.fx-heat-bar i {
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(calc(0.12 + var(--heat) * 0.88));
  background: color-mix(in srgb, #ff5a1f calc(var(--heat) * 100%), #7fb4ff);
}
[dir="rtl"] .fx-heat-bar i { transform-origin: right; }
.fx-heat-txt { display: grid; }
.fx-heat-txt b { grid-area: 1 / 1; font-weight: 600; }
.fx-hot { opacity: clamp(0, calc((var(--heat) - 0.4) * 6), 1); }
.fx-cool { opacity: clamp(0, calc((0.6 - var(--heat)) * 6), 1); }

@media (max-width: 820px) {
  .fx-tag span,
  .fx-swatches,
  .fx-heat { font-size: 12px; padding: 7px 11px; }
  .fx-tag::after { height: 24px; }
  .fx-tag span { bottom: 29px; }
}

/* intro copy */
.intro {
  position: absolute;
  top: calc(var(--header-h) + 3.5svh);
  inset-inline: var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  column-gap: clamp(32px, 5vw, 96px);
  align-items: end;
  z-index: 2;
}
.intro .eyebrow { margin-bottom: 22px; }
.intro-title { font-size: clamp(34px, min(4.5vw, 7svh), 74px); line-height: 1.02; max-width: 14ch; }
[lang="ar"] .intro-title { line-height: 1.35; font-size: clamp(32px, min(4.2vw, 6.8svh), 66px); max-width: 15ch; }
.intro-side { display: grid; gap: 26px; padding-bottom: 6px; }
.intro-side .lede { font-size: clamp(17px, 1.3vw, 19px); max-width: 38ch; }

/* chapters */
.chapters {
  position: absolute;
  top: calc(var(--header-h) + 3.5svh);
  inset-inline-start: var(--gutter);
  width: min(620px, 46vw);
  z-index: 2;
}
/* soft shade behind the copy for when a close-up passes underneath */
.js .chapter::before {
  content: "";
  position: absolute;
  inset: -48px -72px -40px -72px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(14, 15, 19, 0.72), rgba(14, 15, 19, 0));
}
.js .chapter {
  position: absolute;
  inset: 0 0 auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
}
.js .chapter.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.8s var(--ease-out) 0.12s, transform 0.9s var(--ease-out) 0.12s, visibility 0s;
}
.ch-num {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Poppins", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  font-size: 14px;
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 14px;
}
.ch-num i { width: 40px; height: 1px; background: var(--line-2); }
.ch-badge {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-inline-end: 4px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--red);
  box-shadow: inset 0 0 0 2px var(--yellow), inset 0 0 0 4px var(--red), 0 0 0 3px rgba(245, 243, 238, 0.12);
}
.ch-badge .ico { width: 22px; height: 22px; stroke-width: 2; }
.chapter-final .ch-num { font-family: var(--f-body); font-style: normal; font-size: 13px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
[lang="ar"] .chapter-final .ch-num { font-size: 15px; }
.ch-title { font-size: clamp(30px, min(3.6vw, 6.4svh), 58px); line-height: 1.04; margin-bottom: 16px; }
[lang="ar"] .ch-title { line-height: 1.35; font-size: clamp(28px, min(3.3vw, 6svh), 52px); }
.ch-body { color: var(--paper-2); max-width: 46ch; font-size: clamp(17px, 1.25vw, 19px); line-height: 1.6; margin-bottom: 18px; }
[lang="ar"] .ch-body { line-height: 1.85; }
.ch-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--paper);
  padding: 6px 0;
  border-bottom: 1px solid var(--line-2);
  transition: color 0.3s, border-color 0.3s;
}
.ch-link .ico { width: 16px; height: 16px; transition: transform 0.4s var(--ease-out); }
.ch-link:hover { color: var(--yellow-hi); border-color: var(--yellow); }
.ch-link:hover .ico { transform: translate(2px, -2px); }
[dir="rtl"] .ch-link:hover .ico { transform: scaleX(-1) translate(2px, -2px); }

/* progress rail */
.rail {
  position: absolute;
  top: calc(var(--header-h) + 3.5svh);
  inset-inline-end: var(--gutter);
  display: grid;
  justify-items: end;
  gap: 2px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}
.rail.on { opacity: 1; }
.rail button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--paper-3);
  transition: color 0.4s;
}
[lang="ar"] .rail button { font-size: 15px; }
.rail-num { order: 2; font-family: "Poppins", sans-serif; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; min-width: 20px; text-align: center; }
.rail-label { order: 1; }
.rail button::after {
  content: "";
  order: 3;
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
  transition: width 0.6s var(--ease-out), background-color 0.4s, opacity 0.4s;
}
.rail button.is-active { color: var(--paper); }
.rail button.is-active .rail-num { color: var(--yellow); }
.rail button.is-active::after { width: 36px; background: var(--yellow); opacity: 1; }
.rail button.is-done { color: var(--paper-2); }
.rail button:hover { color: var(--paper); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  translate: -50% 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-3);
  transition: opacity 0.5s;
}
.scroll-cue i {
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, var(--yellow), transparent);
  transform-origin: top;
  animation: cue 2.2s var(--ease-io) infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.scroll-cue.off { opacity: 0; }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { position: relative; padding-block: clamp(96px, 15vh, 180px); }

.reveal { will-change: auto; }
.js.motion .reveal { opacity: 0; transform: translateY(28px); }

/* Studio (brand yellow) */
.studio { background: var(--light); color: var(--text-on-light); }
.studio .label { color: var(--accent-on-light); }
.studio .label-num { color: var(--text-on-light-2); }
.studio .lede { color: var(--text-on-light); }
.studio p { color: var(--text-on-light-2); }
.studio ::selection { background: var(--text-on-light); color: var(--light); }

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
}
.studio .display-lg { font-size: clamp(34px, 4.4vw, 70px); }
.studio-copy { display: grid; gap: 22px; max-width: 46ch; }

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(64px, 10vw, 128px);
  border-top: 1px solid var(--light-line);
}
.fact {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 10px;
  padding: 28px 28px 0 0;
}
[dir="rtl"] .fact { padding: 28px 0 0 28px; }
.fact + .fact { border-inline-start: 1px solid var(--light-line); padding-inline-start: 28px; }
.fact dd {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: clamp(36px, 4.2vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--text-on-light);
  font-variant-numeric: lining-nums;
}
[dir="rtl"] .fact dd { text-align: right; }
.fact .dash { margin-inline: 0.08em; color: var(--accent-on-light); }
.fact dt { font-size: 16px; font-weight: 500; color: var(--text-on-light-2); }

.coachline {
  height: 5px;
  margin-block: clamp(72px, 10vw, 128px) clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--accent-on-light);
  border-bottom: 1px solid var(--accent-on-light);
  opacity: 0.55;
  transform-origin: left;
}
[dir="rtl"] .coachline { transform-origin: right; }
.js.motion .coachline { transform: scaleX(0); transition: transform 1.6s var(--ease-io); }
.js.motion .coachline.in { transform: scaleX(1); }

.steps-head .label { margin-bottom: 36px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); }
.step { display: grid; gap: 10px; align-content: start; }
.step-num {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--accent-on-light);
  margin-bottom: 8px;
}
.step h4 { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.01em; font-size: clamp(21px, 1.8vw, 25px); line-height: 1.2; color: var(--text-on-light); }
[lang="ar"] .step h4 { line-height: 1.5; }
.step p { font-size: 17px; max-width: 34ch; }

/* All services (names as in the company profile, EN + AR) */
.services-all { background: var(--ink); border-top: 1px solid var(--line); }
.services-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(24px, 5vw, 96px); align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.services-head .lede { max-width: 40ch; color: var(--paper-2); }
.svc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px clamp(16px, 2vw, 28px); }
.svc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 58px;
  border-radius: 3px;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.svc > span { display: flex; align-items: center; padding: 10px 18px; font-weight: 600; font-size: 16px; line-height: 1.3; }
.svc-en { background: #ececec; color: #1b1b1b; font-family: "Poppins", sans-serif; }
.svc-ar { background: var(--yellow); color: #111; font-family: "IBM Plex Sans Arabic", sans-serif; font-size: 17px !important; justify-content: flex-end; direction: rtl; }
.svc .ico { width: 0; opacity: 0; align-self: center; margin: 0; transition: width 0.4s var(--ease-out), opacity 0.3s, margin 0.4s var(--ease-out); color: var(--yellow); }
.svc:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.svc:hover .ico { width: 20px; opacity: 1; margin: 0 14px; }
[dir="rtl"] .svc { direction: ltr; }
.svc .svc-d {
  grid-column: 1 / -1;
  display: block;
  padding: 10px 18px 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--paper-2);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}
[dir="rtl"] .svc .svc-d { direction: rtl; text-align: right; font-size: 15px; }

/* Workshop reels: real clips from Lavaggio's Instagram */
.reels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, 290px));
  gap: clamp(16px, 2vw, 28px);
  align-items: center;
  margin-top: clamp(56px, 8vw, 96px);
}
.reels-copy { display: grid; gap: 18px; max-width: 36ch; }
.why .reels .label { color: var(--yellow); }
.reels-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(28px, 3vw, 44px); line-height: 1.08; letter-spacing: -0.03em; color: var(--paper); }
[lang="ar"] .reels-title { letter-spacing: 0; line-height: 1.35; }
.reels-body { color: var(--paper-2); font-size: 17px; }
.reels-body a { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; }
.reel { margin: 0; position: relative; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: var(--ink-3); }
.reel video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 48px 16px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  pointer-events: none;
}

/* About (brand yellow) */
.about-copy { display: grid; gap: 24px; align-content: end; }
.about-copy p { max-width: 52ch; }
.about-photo { margin: 0; border-radius: 3px; overflow: hidden; box-shadow: 0 30px 60px rgba(20, 18, 10, 0.25); aspect-ratio: 4 / 5; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Values, team, mission + gallery */
.why { background: var(--ink-2); border-top: 1px solid var(--line); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); }
.pillar { border-top: 2px solid var(--yellow); padding-top: 22px; display: grid; gap: 12px; align-content: start; }
.pillar h3 { font-family: var(--f-display); font-size: clamp(22px, 2vw, 28px); font-weight: 700; letter-spacing: -0.02em; }
.pillar p { color: var(--paper-2); font-size: 17px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(56px, 8vw, 96px);
}
.shot { margin: 0; position: relative; border-radius: 3px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--ink-3); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease-out); }
.shot:hover img { transform: scale(1.05); }
.shot figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 36px 14px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}
.why .coachline { border-color: var(--line-2); opacity: 1; }
.why .steps-head .label { color: var(--yellow); }
.why .step-num { color: var(--yellow); }
.why .step h4 { color: var(--paper); }
.why .step p { color: var(--paper-2); }

/* Thabt */
.thabt {
  background:
    radial-gradient(50% 60% at 85% 40%, rgba(239, 209, 63, 0.08), transparent 70%),
    var(--ink-2);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
[dir="rtl"] .thabt { background: radial-gradient(50% 60% at 15% 40%, rgba(239, 209, 63, 0.08), transparent 70%), var(--ink-2); }
.thabt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 112px);
  align-items: center;
}
.thabt-copy { display: grid; gap: 24px; justify-items: start; }
.thabt-copy .label { margin-bottom: 8px; }
.thabt-copy > p:not(.label) { max-width: 52ch; color: var(--paper-2); }
.thabt-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3em 0.45em;
  font-weight: 400;
  line-height: 1;
}
.thabt-logo { width: clamp(220px, 24vw, 320px); height: auto; display: block; }
.thabt .lede { color: var(--paper); font-weight: 500; font-size: clamp(21px, 1.9vw, 26px); line-height: 1.4; max-width: 32ch; }
[lang="ar"] .thabt .lede { line-height: 1.75; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chips li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 15px;
  font-weight: 500;
  color: var(--paper-2);
}

.thabt-art { position: relative; }
.mount-art { width: 100%; height: auto; overflow: hidden; }
.mount-art .la { fill: none; stroke: var(--paper); stroke-opacity: 0.55; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.mount-art .la-dim { stroke-opacity: 0.2; }
.mount-art .la-gold { stroke: var(--yellow); stroke-opacity: 1; }
.mount-art .la-phone { stroke-opacity: 0.95; stroke-width: 2; }
.mount-art .la-thick { stroke-width: 3; }
.mount-art .la-route { stroke: var(--yellow); stroke-opacity: 0.55; stroke-dasharray: 3 5; }
.mount-art .la-road { stroke-opacity: 0.3; }
.js.motion .thabt-art.in .mount-art .la-road { stroke-dasharray: 6 8; stroke-dashoffset: 0; animation: road 1.2s linear infinite 2.4s; }
@keyframes road { to { stroke-dashoffset: -28; } }
.mount-caption {
  margin-top: 18px;
  font-size: 16px;
  font-weight: 500;
  color: var(--paper-3);
  text-align: center;
}
.js.motion .mount-art .la:not(.la-route) { stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); }
.js.motion .mount-art .la-route { opacity: 0; transition: opacity 1s ease 2.2s; }
.js.motion .thabt-art.in .mount-art .la-route { opacity: 1; }
.js.motion .thabt-art.in .mount-art .la { stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s var(--ease-io) calc(var(--d, 0) * 1s); }
.js.motion .mount-art .mount { transform: translateY(-14px); opacity: 0; }
.js.motion .thabt-art.in .mount-art .mount { transform: none; opacity: 1; transition: transform 1.2s var(--ease-out) 0.9s, opacity 0.8s ease 0.9s; }

/* Visit */
.visit { border-top: 1px solid var(--line); }
.visit .display-lg { max-width: 16ch; }
.big-number {
  display: inline-block;
  margin-block: clamp(36px, 5vw, 64px) clamp(28px, 3vw, 40px);
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: clamp(32px, 8.4vw, 128px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--yellow);
  transition: color 0.4s;
  white-space: nowrap;
}
.big-number:hover { color: var(--yellow-hi); }

.visit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(64px, 9vw, 120px);
  border-top: 1px solid var(--line);
}
.visit-item { display: grid; gap: 8px; align-content: start; padding: 28px 28px 0 0; }
[dir="rtl"] .visit-item { padding: 28px 0 0 28px; }
.visit-item + .visit-item { border-inline-start: 1px solid var(--line); padding-inline-start: 28px; }
.visit-h { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--yellow); margin-bottom: 6px; }
[lang="ar"] .visit-h { font-size: 15px; text-transform: none; }
.visit-h .ico { width: 16px; height: 16px; }
.visit-item p { color: var(--paper-2); }
.visit-item .links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 6px; }
.visit-item a { display: inline-flex; align-items: center; gap: 6px; color: var(--paper); border-bottom: 1px solid var(--line-2); transition: color 0.3s, border-color 0.3s; }
.visit-item a .ico { width: 14px; height: 14px; }
.visit-item a:hover { color: var(--yellow-hi); border-color: var(--yellow); }
.open-status { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.open-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--paper-3); }
.open-status.is-open::before { background: var(--open); box-shadow: 0 0 0 4px rgba(143, 199, 154, 0.16); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 calc(36px + env(safe-area-inset-bottom)); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.brand-footer .brand-logo { height: 58px; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 15px; color: var(--paper-3); }
.footer-meta a:hover { color: var(--paper); }
.footer-meta .sep { opacity: 0.5; }
.credit { margin-top: 20px; font-size: 13px; line-height: 1.5; color: var(--paper-3); text-align: left; }
.credit a { text-decoration: underline; text-underline-offset: 2px; }
.credit a:hover { color: var(--paper); }

/* Mobile action dock */
.dock {
  position: fixed;
  inset: auto 0 0;
  z-index: 60;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--line);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.6s var(--ease-out), opacity 0.28s ease;
}
.dock.on { transform: none; }
.dock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 58px;
  font-size: 16px;
  font-weight: 600;
  background: rgba(14, 15, 19, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.dock-wa { background: var(--yellow); color: #111111; }

/* ==========================================================================
   No JavaScript: show everything as a normal page
   ========================================================================== */

.no-js .stage-section { height: auto; }
.no-js .stage { position: relative; height: auto; min-height: 100vh; overflow: visible; padding-bottom: 80px; }
.no-js .intro,
.no-js .chapters { position: relative; top: auto; inset: auto; width: auto; padding: calc(var(--header-h) + 40px) var(--gutter) 0; }
.no-js .car-frame { position: relative; top: auto; left: auto; transform: none; margin: 60px auto; }
.no-js .chapter { margin-bottom: 56px; }
.no-js .rail,
.no-js .scroll-cue { display: none; }

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

@media (min-width: 821px) and (max-height: 800px) {
  .car-frame { top: 64%; }
}

@media (max-width: 1100px) and (min-width: 821px) {
  .facts,
  .visit-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .nav { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
}

@media (max-width: 820px) {
  :root { --header-h: 64px; }
  body { font-size: 16px; }
  .brand-logo { height: 38px; }
  .header-actions { gap: 10px; }
  .header-actions .btn-sm .num { display: none; }
  .header-actions .btn-sm { padding: 0 12px; }

  .dock { display: grid; }

  .stage-section { height: 860vh; }
  .car-frame { --car-w: min(96vw, 560px); top: 47%; }

  .intro { grid-template-columns: 1fr; top: calc(var(--header-h) + 18px); bottom: calc(26px + env(safe-area-inset-bottom)); align-content: space-between; }
  .intro .eyebrow { margin-bottom: 14px; }
  .intro-title { font-size: clamp(30px, 8.6vw, 44px); max-width: 13ch; }
  [lang="ar"] .intro-title { font-size: clamp(28px, 8vw, 40px); }
  .intro-head { align-self: start; }
  .intro-side { align-self: end; gap: 18px; }
  .intro-side .lede { font-size: 15.5px; }
  .intro-side .btn { flex: 1; }
  .scroll-cue { display: none; }

  .chapters {
    top: auto;
    bottom: calc(58px + 22px + env(safe-area-inset-bottom));
    inset-inline: var(--gutter);
    width: auto;
  }
  .js .chapter { inset: auto 0 0; }
  .ch-num { margin-bottom: 8px; font-size: 13px; }
  .ch-title { font-size: clamp(30px, 8.6vw, 40px); margin-bottom: 10px; }
  .ch-body { font-size: 15.5px; margin-bottom: 12px; }

  .rail {
    top: calc(var(--header-h) + 14px);
    inset-inline: var(--gutter);
    display: flex;
    justify-content: space-between;
    gap: 4px;
  }
  .rail button { display: block; padding: 8px 2px 4px; flex: 1; text-align: center; border-top: 1px solid var(--line); }
  .rail button.is-active { border-top-color: var(--yellow); }
  .rail button.is-done { border-top-color: var(--line-2); }
  .rail button::after { display: none; }
  .rail-label { display: none; }

  .studio-grid,
  .thabt-grid,
  .services-head,
  .pillars { grid-template-columns: 1fr; }
  .svc-list { grid-template-columns: 1fr; }
  .reels { grid-template-columns: 1fr 1fr; gap: 12px; }
  .reels-copy { grid-column: 1 / -1; max-width: none; }
  .gallery { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .shot { scroll-snap-align: start; }
  .thabt-art { max-width: 420px; justify-self: center; width: 100%; }
  .about-photo { aspect-ratio: 4 / 3; }
  .facts,
  .steps,
  .visit-grid { grid-template-columns: 1fr; }
  .fact,
  .fact + .fact,
  [dir="rtl"] .fact { border-inline-start: 0; padding: 22px 0; border-bottom: 1px solid var(--light-line); }
  .visit-item,
  .visit-item + .visit-item,
  [dir="rtl"] .visit-item { border-inline-start: 0; padding: 24px 0; border-bottom: 1px solid var(--line); }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .fact,
  .fact + .fact,
  [dir="rtl"] .fact { padding: 22px 0; }
  .fact:nth-child(2) { grid-column: 1 / -1; order: 4; border-bottom: 0; }
  .fact dd { font-size: 34px; }
  .fact dt { font-size: 14px; }
  .site-footer { padding-bottom: calc(36px + 58px + env(safe-area-inset-bottom)); }
}

@media (max-width: 820px) and (max-height: 700px) {
  .intro-side .lede { display: none; }
  .ch-body { font-size: 14.5px; line-height: 1.5; }
}

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