/* Al-Matraash static marketing site.
   Tokens follow docs/design.md (colors, type, radii, shadows). Borderless: separate by tone + shadow.
   Mobile-first; breakpoints 480 / 768 / 1024 / 1280 / 1536. Logical properties only. */

:root {
  --deep: #0a2e25;
  --primary: #0f5c47;
  --primary-hover: #0c4c3b;
  --copper: #b58b3c; /* shapes only, never small text on sand */
  --sand: #f4eee2;
  --ink: #14201c;
  --muted: #5b6660;
  --surface: #ffffff;
  --fill: #ede6d8;
  --track: #d5cbb6;
  --primary-tint: #e3eee9;
  --copper-tint: #f6ead2;
  --copper-ink: #6b4a12;
  --notice: #fbf3e2;
  --danger-bg: #fbe4e1;
  --danger: #8c1d18;
  --sand-muted: #c9d3cd; /* secondary text on deep, 9:1 */

  --shadow-card: 0 1px 2px rgba(20, 32, 28, 0.04), 0 2px 8px rgba(20, 32, 28, 0.05);
  --shadow-floating: 0 4px 16px rgba(20, 32, 28, 0.1);
  --shadow-sheet: 0 -8px 32px rgba(20, 32, 28, 0.12);

  --r-badge: 8px;
  --r-control: 12px;
  --r-card: 16px;
  --r-hero: 24px;

  --font: 'Tajawal', system-ui, 'Segoe UI', Tahoma, sans-serif;

  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
  --max: 80rem; /* 1280px */
  --nav-h: 4.25rem;

  --fs-display: clamp(2rem, 1.35rem + 3.2vw, 3.5rem);
  --fs-h2: clamp(1.625rem, 1.2rem + 1.9vw, 2.5rem);
  --fs-h3: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-body: 1rem;
  --fs-caption: 0.875rem;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--nav-h) + 1rem);
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  min-block-size: 100vh;
  min-block-size: 100dvh;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.7;
  font-weight: 500;
  overflow-x: clip;
}
body.is-locked {
  overflow: hidden;
}
img,
svg,
picture {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
dl,
dd {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.3;
  color: var(--deep);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
p {
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
a {
  color: var(--primary);
  text-underline-offset: 0.2em;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}
.cta :focus-visible,
.strip :focus-visible,
.site-footer :focus-visible,
.nav-overlay :focus-visible {
  outline-color: var(--sand);
}
.visually-hidden {
  position: absolute !important;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -10rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--deep);
  color: var(--sand);
  border-radius: var(--r-control);
  font-weight: 700;
}
.skip-link:focus {
  inset-block-start: 1rem;
}
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Material Symbols: fixed box so the ligature text never widens layout while the font loads. */
.icon {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 1.5rem;
  line-height: 1;
  inline-size: 1em;
  block-size: 1em;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  direction: ltr;
  flex-shrink: 0;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
  user-select: none;
}

/* ---------- Layout ---------- */
.container {
  inline-size: 100%;
  max-inline-size: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-right))
    max(var(--gutter), env(safe-area-inset-left));
}
.section {
  padding-block: var(--section-y);
}
.section--white {
  background: var(--surface);
}
.section-head {
  max-inline-size: 46rem;
  margin-block-end: clamp(2rem, 4vw, 3rem);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-caption);
  font-weight: 700;
  color: var(--primary);
  margin-block-end: 0.75rem;
}
.eyebrow::before {
  content: '';
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-radius: 50%;
  background: var(--copper);
}
.section-title {
  font-size: var(--fs-h2);
}
.section-lead {
  margin-block-start: 1rem;
  font-size: var(--fs-lead);
  color: var(--muted);
}

.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: 1fr;
}
.grid > * {
  min-inline-size: 0;
}
.grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}
@media (min-width: 768px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-block-size: 3rem;
  min-inline-size: 2.75rem;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: var(--r-control);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 0.2s,
    box-shadow 0.2s;
}
.btn .icon {
  font-size: 1.25rem;
}
.btn--primary {
  background: var(--primary);
  color: #fff;
}
.btn--secondary {
  /* "outline" in the brief; the borderless rule turns it into a tinted fill. */
  background: var(--primary-tint);
  color: var(--primary);
}
.btn--ghost {
  background: var(--fill);
  color: var(--ink);
}
.btn--light {
  background: var(--sand);
  color: var(--deep);
}
.btn--on-deep {
  background: rgba(244, 238, 226, 0.12);
  color: var(--sand);
}
.btn--danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.btn--sm {
  min-block-size: 2.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
}
.btn--block {
  inline-size: 100%;
}
.btn[disabled],
.btn[aria-busy='true'] {
  opacity: 0.7;
  cursor: not-allowed;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
@media (hover: hover) {
  .btn--primary:hover {
    background: var(--primary-hover);
  }
  .btn--secondary:hover {
    background: #d3e6dd;
  }
  .btn--ghost:hover {
    background: var(--track);
  }
  .btn--light:hover {
    background: #fff;
  }
  .btn--on-deep:hover {
    background: rgba(244, 238, 226, 0.2);
  }
  .btn--danger:hover {
    background: #f6d2cd;
  }
  .icon-btn:hover {
    background: var(--fill);
  }
  a:hover {
    text-decoration-thickness: 2px;
  }
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn-row > .btn {
  flex: 1 1 12rem;
}
@media (min-width: 480px) {
  .btn-row > .btn {
    flex: 0 1 auto;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--r-badge);
  font-size: var(--fs-caption);
  font-weight: 700;
  line-height: 1.6;
}
.badge--copper {
  background: var(--copper-tint);
  color: var(--copper-ink);
}
.badge--copper::before {
  content: '';
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-radius: 50%;
  background: var(--copper);
}
.badge--ok {
  background: var(--primary-tint);
  color: var(--deep);
}
.badge--warn {
  background: #fbefd9;
  color: #7a5410;
}
.badge--muted {
  background: var(--fill);
  color: var(--muted);
}

/* ---------- Logo (official #hz lockup from assets/brand.svg) ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  color: var(--deep);
  text-decoration: none;
  min-block-size: 2.75rem;
  flex-shrink: 0;
}
/* px on purpose: the logo is a graphic and should not grow with text zoom. */
.logo svg {
  inline-size: auto;
  block-size: 44px;
  aspect-ratio: 680 / 275;
}

/* 3D logo. The official paths are untouched (CLAUDE.md: never redraw the logo); depth and motion
   come from CSS only: stacked drop-shadows extrude it, it turns into place on load, tilts on
   hover, and a copper ring pings from the pin's dot like a location beacon. */
.logo {
  position: relative;
  perspective: 600px;
  --extrude-1: var(--primary);
  --extrude-2: #0b4a39;
  --extrude-soft: rgba(10, 46, 37, 0.35);
}
.site-footer .logo,
.menu-open .site-header .logo {
  --extrude-1: #c9bea6;
  --extrude-2: #9d937e;
  --extrude-soft: rgba(0, 0, 0, 0.45);
}
.logo svg {
  filter: drop-shadow(0.6px 1px 0 var(--extrude-1)) drop-shadow(0.6px 1px 0 var(--extrude-2))
    drop-shadow(0 5px 6px var(--extrude-soft));
  transform-origin: 70% 50%;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.site-header .logo svg {
  animation: logo-in 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@media (hover: hover) {
  .logo:hover svg {
    transform: rotateY(-16deg) rotateX(8deg) scale(1.04);
  }
}
/* Beacon: centred on the copper dot of the pin. The dot sits at (578, 107.7) in the #hz
   viewBox (680 x 275), i.e. 85% / 39.2% of the drawn logo. Physical left on purpose: it
   follows the artwork, which never mirrors. */
.logo::after {
  content: '';
  position: absolute;
  left: 85%;
  top: 39.2%;
  inline-size: 0.5rem;
  block-size: 0.5rem;
  margin: -0.25rem 0 0 -0.25rem;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--copper);
  opacity: 0;
  pointer-events: none;
  animation: logo-ping 3.2s ease-out 1.2s infinite;
}
@keyframes logo-in {
  0% {
    opacity: 0;
    transform: rotateY(75deg) translateY(-6px);
  }
  55% {
    opacity: 1;
    transform: rotateY(-12deg);
  }
  80% {
    transform: rotateY(5deg);
  }
  100% {
    transform: none;
  }
}
@keyframes logo-ping {
  0% {
    opacity: 0.9;
    transform: scale(0.4);
  }
  45%,
  100% {
    opacity: 0;
    transform: scale(3.2);
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .logo svg,
  .logo::after {
    animation: none;
  }
}

/* ---------- Navbar ---------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 50;
  padding-block-start: env(safe-area-inset-top);
  background: rgba(244, 238, 226, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  transition: box-shadow 0.2s;
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-floating);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-block-size: var(--nav-h);
}
.nav-links {
  display: none;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-cta {
  display: none !important;
}
.nav-toggle {
  background: var(--fill);
  border-radius: var(--r-control);
}
/* AR/EN switch: a small raised 3D key (light from the top, a solid "side" below, soft drop shadow)
   that presses down when tapped. Visually ~34px; the ::before keeps a 44px touch target. */
.lang-switch {
  position: relative;
  display: inline-grid;
  place-items: center;
  block-size: 2.125rem;
  min-inline-size: 2.75rem;
  padding-inline: 0.625rem;
  margin-block-end: 3px; /* room for the key's side */
  border-radius: 999px;
  background: linear-gradient(180deg, #1c7a60 0%, var(--primary) 55%, #0c4f3d 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 3px 0 var(--deep),
    0 6px 12px rgba(10, 46, 37, 0.28);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}
.lang-switch::before {
  content: '';
  position: absolute;
  inset: -0.3125rem -0.125rem; /* 34px -> 44px tall hit area */
}
.lang-switch:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 0 0 var(--deep),
    0 2px 4px rgba(10, 46, 37, 0.25);
}
@media (hover: hover) {
  .lang-switch:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
  }
  .lang-switch:active {
    transform: translateY(3px);
  }
}
@media (min-width: 480px) {
  .nav-cta {
    display: inline-flex !important;
  }
}
@media (min-width: 1024px) {
  /* Under large text the links scroll sideways inside the bar instead of pushing the page. */
  .nav > nav {
    flex: 0 1 auto;
    min-inline-size: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav > nav::-webkit-scrollbar {
    display: none;
  }
  .nav-actions {
    flex-shrink: 0;
  }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .nav-links a {
    display: inline-flex;
    align-items: center;
    min-block-size: 2.75rem;
    padding-inline: 0.75rem;
    border-radius: var(--r-control);
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }
  .nav-links a[aria-current='page'] {
    color: var(--primary);
    background: var(--primary-tint);
  }
  .nav-toggle {
    display: none;
  }
}
@media (min-width: 1024px) and (hover: hover) {
  .nav-links a:hover {
    background: var(--fill);
  }
}
@media (min-width: 1280px) {
  .nav-links a {
    padding-inline: 1rem;
  }
}
.page-offset {
  padding-block-start: calc(var(--nav-h) + env(safe-area-inset-top));
}

/* Full-screen menu under 1024px; scrollable for short landscape screens.
   It opens as a circle growing from the toggle (--ox/--oy, set by script) and the page links
   slide in one after another (--i). While it is open the header sits above it, so the same
   toggle, now an X, closes it. */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at var(--ox, 50%) var(--oy, 2rem), #145c48 0, var(--deep) 60%);
  color: var(--sand);
  padding: calc(var(--nav-h) + env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right)) env(safe-area-inset-bottom)
    max(var(--gutter), env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  clip-path: circle(0 at var(--ox, 50%) var(--oy, 2rem));
  transition:
    clip-path 0.45s cubic-bezier(0.7, 0, 0.3, 1),
    visibility 0s 0.45s;
}
.nav-overlay.is-open {
  visibility: visible;
  clip-path: circle(150vmax at var(--ox, 50%) var(--oy, 2rem));
  /* Visible at once on open so focus can move into the menu. */
  transition:
    clip-path 0.55s cubic-bezier(0.7, 0, 0.3, 1),
    visibility 0s;
}
.nav-overlay__links {
  list-style: none;
  margin: 0;
  padding: 1rem 0 2rem;
  display: grid;
  gap: 0.625rem;
}
.nav-overlay__links li,
.nav-overlay__foot {
  opacity: 0;
  translate: 0 18px;
  transition:
    opacity 0.25s ease,
    translate 0.3s ease;
}
.nav-overlay.is-open .nav-overlay__links li,
.nav-overlay.is-open .nav-overlay__foot {
  opacity: 1;
  translate: none;
  transition:
    opacity 0.35s ease,
    translate 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(0.18s + var(--i, 0) * 60ms);
}
.nav-overlay__links a {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-block-size: 3.75rem;
  padding-inline: 0.75rem 1rem;
  border-radius: var(--r-card);
  color: var(--sand);
  font-size: clamp(1.25rem, 1rem + 1.5vw, 1.625rem);
  font-weight: 800;
  text-decoration: none;
  background: rgba(244, 238, 226, 0.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 3px 0 rgba(0, 0, 0, 0.25);
  transition:
    background-color 0.2s,
    transform 0.15s;
}
.nav-overlay__links a[aria-current='page'] {
  background: rgba(244, 238, 226, 0.13);
}
.nav-overlay__links a:active {
  transform: translateY(2px);
}
.nav-overlay__icon.icon {
  display: grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  flex-shrink: 0;
  border-radius: var(--r-control);
  background: rgba(244, 238, 226, 0.08);
  color: #f0d9a8;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}
@media (hover: hover) {
  .nav-overlay__links a:hover {
    background: rgba(244, 238, 226, 0.1);
  }
  .nav-overlay__links a:hover .nav-overlay__icon {
    transform: translateY(-3px) rotate(-6deg) scale(1.06);
  }
}
.nav-overlay__foot {
  margin-block-start: auto;
  padding-block: 1rem 2rem;
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 1024px) {
  .nav-overlay {
    display: none;
  }
}

/* Header while the menu is open: see-through and above the overlay. */
.menu-open .site-header {
  z-index: 70;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.menu-open .site-header .logo {
  color: var(--sand);
}
.menu-open .nav-cta {
  visibility: hidden;
}

/* Burger: three equal rounded lines that fold into an X when the menu is open. */
.burger {
  position: relative;
  display: block;
  inline-size: 1.375rem;
  block-size: 1rem;
}
.burger span {
  position: absolute;
  inset-inline: 0;
  inset-block-start: calc(50% - 1.25px);
  block-size: 2.5px;
  border-radius: 2px;
  background: currentColor;
  transition:
    translate 0.3s cubic-bezier(0.7, 0, 0.3, 1),
    rotate 0.3s cubic-bezier(0.7, 0, 0.3, 1) 0.1s,
    scale 0.25s ease,
    opacity 0.2s ease;
}
.burger span:nth-child(1) {
  translate: 0 -0.40625rem;
}
.burger span:nth-child(3) {
  translate: 0 0.40625rem;
}
[aria-expanded='true'] .burger span {
  /* Lines meet in the middle first, then turn. */
  transition:
    translate 0.25s cubic-bezier(0.7, 0, 0.3, 1),
    rotate 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s,
    scale 0.2s ease,
    opacity 0.15s ease;
}
[aria-expanded='true'] .burger span:nth-child(1) {
  translate: 0 0;
  rotate: 45deg;
}
[aria-expanded='true'] .burger span:nth-child(2) {
  opacity: 0;
  scale: 0.2 1;
}
[aria-expanded='true'] .burger span:nth-child(3) {
  translate: 0 0;
  rotate: -45deg;
}
@media (hover: hover) {
  .nav-toggle[aria-expanded='false']:hover .burger span:nth-child(2) {
    scale: 0.6 1;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(2rem, 5vw, 4.5rem) var(--section-y);
}
.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__grid > * {
  min-inline-size: 0;
}
.hero__title {
  font-size: var(--fs-display);
  line-height: 1.3;
  margin-block: 1rem;
}
.hero__title em {
  font-style: normal;
  color: var(--primary);
}
.hero__lead {
  font-size: var(--fs-lead);
  color: var(--muted);
  max-inline-size: 36rem;
  margin-block-end: 2rem;
}
.hero__media {
  position: relative;
  inline-size: min(100%, 26rem);
  margin-inline: auto;
}
.hero__chip {
  position: absolute;
  inset-block-end: 1.25rem;
  inset-inline-start: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-inline-size: calc(100% - 1.5rem);
  padding: 0.75rem 1rem;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-floating);
  font-weight: 700;
  font-size: var(--fs-caption);
  line-height: 1.5;
}
.hero__chip .icon {
  color: var(--primary);
}
@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
  .hero__media {
    inline-size: 100%;
    max-inline-size: 30rem;
  }
  .hero__chip {
    inset-inline-start: -1.5rem;
  }
}
/* Short landscape phones: less vertical padding, smaller media. */
@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    padding-block: 1.25rem 2.5rem;
  }
  .hero__title {
    margin-block: 0.5rem;
  }
  .hero__lead {
    margin-block-end: 1.25rem;
  }
  .hero__media {
    inline-size: min(100%, 16rem);
  }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  box-shadow: var(--shadow-card);
  min-inline-size: 0;
}
.section--white .card {
  background: var(--sand);
  box-shadow: none;
}
.card__icon {
  display: inline-grid;
  place-items: center;
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: var(--r-control);
  background: var(--primary-tint);
  color: var(--primary);
  margin-block-end: 1rem;
}
.card__title {
  font-size: var(--fs-h3);
  margin-block-end: 0.5rem;
}
.card__text {
  color: var(--muted);
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  position: relative;
}
.step__num {
  position: absolute;
  inset-block-start: clamp(1.25rem, 2.5vw, 1.75rem);
  inset-inline-end: clamp(1.25rem, 2.5vw, 1.75rem);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--track);
}

/* Strip */
.strip {
  background: var(--deep);
  color: var(--sand);
  padding-block: clamp(1.25rem, 3vw, 2rem);
}
.strip__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem clamp(1rem, 4vw, 3rem);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: clamp(1.25rem, 1rem + 1.4vw, 2rem);
  font-weight: 800;
}
.strip__list li {
  display: inline-flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
}
.strip__list li + li::before {
  content: '';
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-radius: 50%;
  background: var(--copper);
}

/* ---------- Split (image + text) ---------- */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split > * {
  min-inline-size: 0;
}
@media (min-width: 1024px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* RTL: the first grid column is on the right; reverse moves the media there. */
  .split--reverse .split__media {
    order: -1;
  }
}

/* ---------- About ---------- */
.about {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about > * {
  min-inline-size: 0;
}
.about .points {
  margin-block-end: 0;
}
.about__card {
  background: var(--deep);
  color: var(--sand);
  border-radius: var(--r-hero);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.about__card h3 {
  color: var(--sand);
  font-size: var(--fs-h3);
  margin-block-end: 1.25rem;
}
.about__card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.about__card li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.about__card li > div {
  min-inline-size: 0;
}
.about__card .icon {
  color: var(--copper);
  margin-block-start: 0.125rem;
}
.about__card strong {
  display: block;
  font-weight: 800;
}
.about__card p {
  color: var(--sand-muted);
}
@media (min-width: 1024px) {
  .about {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
}

/* ---------- FAQ ---------- */
.faq {
  max-inline-size: 50rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}
.faq details {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.section--white .faq details {
  background: var(--sand);
  box-shadow: none;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  overflow-wrap: anywhere;
  min-block-size: 3.5rem;
  padding: 1rem 1.25rem;
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-card);
  color: var(--deep);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .icon {
  color: var(--primary);
  transition: transform 0.2s;
}
.faq details[open] summary .icon {
  transform: rotate(180deg);
}
.faq__answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--muted);
}
.faq__answer p + p {
  margin-block-start: 0.5rem;
}
.faq-contact {
  max-inline-size: 50rem;
  margin: 1.5rem auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--r-card);
  background: var(--primary-tint);
}
.faq-contact > div {
  min-inline-size: 0;
  flex: 1 1 14rem;
}
.faq-contact h3 {
  font-size: 1.125rem;
}
.faq-contact p {
  color: var(--muted);
}
.todo {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.875em;
  font-weight: 700;
  background: var(--notice);
  color: var(--copper-ink);
  padding-inline: 0.25em;
  border-radius: 4px;
  direction: ltr;
  unicode-bidi: isolate;
}

/* ---------- CTA ---------- */
.cta {
  background: var(--deep);
  color: var(--sand);
  text-align: center;
}
.cta h2 {
  color: var(--sand);
  font-size: var(--fs-h2);
}
.cta p {
  color: var(--sand-muted);
  margin-block: 1rem 2rem;
  margin-inline: auto;
  max-inline-size: 36rem;
  font-size: var(--fs-lead);
}
.cta .btn-row {
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep);
  color: var(--sand-muted);
  padding-block: clamp(3rem, 6vw, 4.5rem) calc(2rem + env(safe-area-inset-bottom));
}
.cta + .site-footer {
  padding-block-start: 0;
}
.cta + .site-footer .footer-grid {
  padding-block-start: clamp(2.5rem, 5vw, 3.5rem);
  box-shadow: inset 0 1px 0 rgba(244, 238, 226, 0.1);
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
.footer-grid > * {
  min-inline-size: 0;
}
.site-footer .logo {
  color: var(--sand);
}
.site-footer .logo svg {
  block-size: 3.25rem;
}
.footer-about {
  margin-block-start: 0.75rem;
  max-inline-size: 22rem;
}
.footer-col h2 {
  color: var(--sand);
  font-size: 1rem;
  margin-block-end: 0.5rem;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
  min-inline-size: 2.75rem; /* short English labels ("FAQ") still get a 44px target */
  color: var(--sand-muted);
  text-decoration: none;
}
@media (hover: hover) {
  .footer-col a:hover {
    color: var(--sand);
    text-decoration: underline;
  }
}
.footer-bottom {
  margin-block-start: 2.5rem;
  padding-block-start: 1.5rem;
  box-shadow: inset 0 1px 0 rgba(244, 238, 226, 0.1);
  font-size: var(--fs-caption);
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Reveal on scroll ---------- */
/* Uses `translate`, not `transform`, so cards can still tilt with `transform` (3D layer below). */
.js .reveal {
  opacity: 0;
  translate: 0 16px;
  transition:
    opacity 0.6s ease,
    translate 0.6s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  translate: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    translate: none;
  }
}

/* =====================================================================
   Product-first layer (2026-10-27). The page shows the app itself (rider list,
   rider offer, store page, trip) instead of decoration. Calm surfaces per
   docs/design.md; the only flourishes are the copper route and the 3D logo.
   ===================================================================== */

/* Buttons: solid, with a short edge underneath that disappears when pressed. */
.btn {
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease,
    background-color 0.2s ease;
}
.btn--primary {
  box-shadow: 0 3px 0 var(--deep);
}
.btn--secondary {
  box-shadow: 0 3px 0 #c3dccf;
}
.btn--light {
  box-shadow: 0 3px 0 #c9bea6;
}
.btn--on-deep {
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}
.btn:active {
  transform: translateY(3px);
  box-shadow: none;
}
.nav-toggle {
  color: var(--ink);
  box-shadow: 0 3px 0 var(--track);
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
}
.nav-toggle:active {
  transform: translateY(3px);
  box-shadow: none;
}
.icon--fill {
  font-variation-settings:
    'FILL' 1,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

.section--band {
  background: var(--fill);
}
.section-title + .facts--grid,
.section-title + .route {
  margin-block-start: clamp(1.75rem, 3vw, 2.5rem);
}

/* ----- Facts: icon + short title + one line, no cards ----- */
.facts {
  list-style: none;
  margin: 1.75rem 0 2rem;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.facts li {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}
.facts li > div {
  min-inline-size: 0;
}
.facts .icon {
  color: var(--primary);
  margin-block-start: 0.125rem;
}
.facts h3 {
  font-size: 1.0625rem;
  margin-block-end: 0.125rem;
}
.facts p {
  color: var(--muted);
}
.facts--grid {
  margin-block-end: 0;
  gap: 1.75rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}
@media (min-width: 1024px) {
  .facts--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .facts--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ----- Route: the steps sit on one dashed copper line, each with the brand pin ----- */
.route {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}
.route::before {
  content: '';
  position: absolute;
  inset-block: 1.25rem 1.25rem;
  inset-inline-start: 1.0625rem;
  border-inline-start: 2px dashed var(--copper);
  opacity: 0.7;
}
.route__stop {
  position: relative;
  padding-inline-start: 3.25rem;
}
.route__pin {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0;
  display: grid;
  place-items: center;
  inline-size: 2.25rem;
  block-size: 2.5rem;
  background: var(--sand);
  color: var(--primary);
}
.section--white .route__pin {
  background: var(--surface);
}
.route__pin svg {
  inline-size: 1.75rem;
  block-size: 1.75rem;
}
.route__num {
  display: block;
  font-size: var(--fs-caption);
  font-weight: 800;
  color: var(--muted);
}
.route__stop h3 {
  font-size: var(--fs-h3);
  margin-block: 0.125rem 0.375rem;
}
.route__stop p {
  color: var(--muted);
}
@media (min-width: 768px) {
  .route {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
  .route--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* From the first pin to the last one: the line stops one column (minus the pin offset) short. */
  .route::before {
    inset-block: 1.25rem auto;
    inset-inline: 1.125rem calc((100% - 4.5rem) / 4 - 1.125rem);
    border-inline-start: 0;
    border-block-start: 2px dashed var(--copper);
  }
  .route--three::before {
    inset-inline-end: calc((100% - 3rem) / 3 - 1.125rem);
  }
  .route__stop {
    padding-inline-start: 0;
    padding-block-start: 3.25rem;
  }
}

/* ----- App screens shown on the page (illustrative data, captioned) ----- */
.mock-caption {
  margin-block-start: 0.875rem;
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--muted);
}
.mock > .offer,
.mock > .store,
.mock > .trip {
  max-inline-size: 26rem;
  margin-inline: auto;
}
.phone {
  inline-size: min(100%, 22rem);
  margin-inline: auto;
}
.phone__screen {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem 1rem 1rem;
  border-radius: 2rem;
  background: var(--sand);
  /* The device frame. */
  box-shadow:
    0 0 0 10px var(--deep),
    0 28px 50px -18px rgba(10, 46, 37, 0.5);
}
.phone__head strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--deep);
}
.phone__head span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--fs-caption);
  color: var(--muted);
}
.phone__head span::before {
  content: '';
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-radius: 50%;
  background: var(--primary);
  animation: live 2s ease-in-out infinite;
}
@keyframes live {
  50% {
    opacity: 0.35;
  }
}
.phone__cta {
  display: grid;
  place-items: center;
  min-block-size: 2.75rem;
  border-radius: var(--r-control);
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 3px 0 var(--deep);
}

.riders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.rider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.rider.is-selected {
  background: var(--primary-tint);
}
.rider__avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border-radius: 50%;
  background: var(--fill);
  color: var(--deep);
  font-weight: 800;
}
.is-selected .rider__avatar {
  background: var(--primary);
  color: #fff;
}
.rider__info {
  flex: 1;
  display: grid;
  min-inline-size: 0;
}
.rider__info strong {
  font-weight: 800;
  color: var(--deep);
}
.rider__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--fs-caption);
  color: var(--muted);
}
.rider__star {
  font-size: 1rem;
  color: var(--copper);
}
.rider__new {
  padding: 0 0.375rem;
  margin-inline-start: 0.25rem;
  font-size: 0.6875rem;
}
.rider__radio {
  flex-shrink: 0;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #c9bea6;
}
.is-selected .rider__radio {
  box-shadow: inset 0 0 0 6px var(--primary);
}
.price {
  display: grid;
  gap: 0.375rem;
  padding: 0.875rem 1rem;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.price__label {
  font-size: var(--fs-caption);
  color: var(--muted);
}
.price__value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--deep);
}
.price__track {
  block-size: 0.375rem;
  border-radius: 999px;
  background: var(--fill);
  overflow: hidden;
}
.price__track span {
  display: block;
  inline-size: 40%;
  block-size: 100%;
  border-radius: inherit;
  background: var(--primary);
}
.price__hint {
  justify-self: start;
  padding: 0.125rem 0.5rem;
  border-radius: var(--r-badge);
  background: #fbefd9;
  color: #7a5410;
  font-size: var(--fs-caption);
  font-weight: 700;
}

/* Rider offer (dark, like the rider app's "new order" sheet). */
.offer {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--r-hero);
  background: var(--deep);
  color: var(--sand);
  box-shadow: 0 28px 50px -22px rgba(10, 46, 37, 0.6);
}
.offer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.offer__top strong {
  font-size: 1.25rem;
  font-weight: 800;
}
.offer__timer {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: rgba(181, 139, 60, 0.2);
  color: #f0d9a8;
  font-weight: 800;
  direction: ltr;
}
.offer__timer .icon {
  font-size: 1.125rem;
}
.offer__rows {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}
.offer__rows div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.offer__rows dt {
  color: var(--sand-muted);
}
.offer__rows dd {
  margin: 0;
  font-weight: 700;
  text-align: end;
}
.offer__money {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.offer__money div {
  display: grid;
  gap: 0.125rem;
  padding: 0.75rem;
  border-radius: var(--r-control);
  background: rgba(244, 238, 226, 0.08);
}
.offer__money span {
  font-size: var(--fs-caption);
  color: var(--sand-muted);
}
.offer__money strong {
  font-size: 1.125rem;
  font-weight: 800;
}
.offer__earn {
  color: #9fdcc2;
}
.offer__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 0.5rem;
}
.offer__btn {
  display: grid;
  place-items: center;
  min-block-size: 2.75rem;
  border-radius: var(--r-control);
  background: var(--sand);
  color: var(--deep);
  font-weight: 800;
  box-shadow: 0 3px 0 #c9bea6;
}
.offer__btn--ghost {
  background: rgba(244, 238, 226, 0.1);
  color: var(--sand);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}

/* Store page. */
.mock > .store,
.mock > .trip {
  padding: 1.25rem;
  border-radius: var(--r-hero);
  background: var(--sand);
  box-shadow: var(--shadow-floating);
}
.section--white .mock > .store {
  background: var(--sand);
}
.store {
  display: grid;
  gap: 0.75rem;
}
.store__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.store__head > div {
  display: grid;
  min-inline-size: 0;
}
.store__head strong {
  font-weight: 800;
  color: var(--deep);
}
.store__head span {
  font-size: var(--fs-caption);
  color: var(--muted);
}
.store__logo {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: 50%;
  background: #6b3f2a;
  color: #f6e7d6;
  font-size: 1.25rem;
  font-weight: 800;
}
.store__link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  max-inline-size: 100%;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: var(--primary-tint);
  color: var(--primary);
  font-size: var(--fs-caption);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.store__link .icon {
  font-size: 1rem;
}
.store__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
}
.store__grid li {
  display: grid;
  gap: 0.125rem;
  padding: 0.5rem;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  min-inline-size: 0;
}
.store__grid strong {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--deep);
}
.store__grid span:not(.store__thumb) {
  font-size: var(--fs-caption);
  color: var(--muted);
}
/* Product photos (Unsplash, free licence; see README). */
.store__thumb {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-block-end: 0.25rem;
  border-radius: var(--r-control);
  background: var(--fill);
}

/* Trip. */
.trip {
  display: grid;
  gap: 1rem;
}
.trip__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.trip__head strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--deep);
}
.trip__arrow::before {
  content: '←';
}
[dir='ltr'] .trip__arrow::before {
  content: '→';
}
.trip__stops {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.trip__stops li {
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--fs-caption);
  font-weight: 700;
  color: var(--muted);
}
.trip__stops li:first-child,
.trip__stops li:last-child {
  background: var(--primary-tint);
  color: var(--deep);
}
.trip .offer__rows dt {
  color: var(--muted);
}
.trip .offer__rows dd {
  color: var(--ink);
}

/* About card: a plain deep panel. */
.about__card .icon {
  color: #f0d9a8;
}

@media (prefers-reduced-motion: reduce) {
  .phone__head span::before {
    animation: none;
  }
}

/* ===== Motion graphics (inline SVG + CSS; no images, no libraries) =====
   The live map in the hero phone and the trip road.
   Animations run only while on screen (script.js adds .is-playing) and stop under reduced motion. */
/* Live map in the hero phone: riders idle, the customer pin pulses, the route shows distance. */
.mapcard {
  position: relative;
  border-radius: var(--r-control);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.mapcard svg {
  display: block;
  inline-size: 100%;
  block-size: auto;
}
.mapcard__chip {
  position: absolute;
  inset-block-start: 38%;
  inset-inline-start: 46%;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--deep);
  color: var(--sand);
  font-size: 0.75rem;
  font-weight: 800;
  unicode-bidi: plaintext;
}
.map-route {
  animation: map-route 1.2s linear infinite;
}
@keyframes map-route {
  to {
    stroke-dashoffset: -13;
  }
}
.map-rider {
  animation: map-rider 4s ease-in-out infinite;
}
@keyframes map-rider {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(var(--dx), var(--dy));
  }
}
.map-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: map-pulse 2s ease-out infinite;
}
@keyframes map-pulse {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(3);
  }
}

/* Trip road: the rider marker runs from the first stop to the last. */
.trip__road svg {
  display: block;
  inline-size: 100%;
  block-size: auto;
}
.trip-dash {
  animation: map-route 1.2s linear infinite reverse;
}
.trip-marker {
  animation: trip-marker 7s ease-in-out infinite;
}
@keyframes trip-marker {
  0%,
  8% {
    transform: translateX(0);
  }
  92%,
  100% {
    transform: translateX(-268px);
  }
}

/* Off screen: pause. Reduced motion: no motion at all, smoke shown still. */
.js .anim:not(.is-playing) *,
.js .anim:not(.is-playing) {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .anim,
  .anim * {
    animation: none !important;
  }
}

/* ===== Tarroush, the mascot, follows the visitor =====
   Fixed in the corner; floats, leans with the scroll, changes mood and says a line per section,
   and jumps when tapped (script.js). Decorative: hidden from screen readers except the button. */
.tarroush {
  position: fixed;
  z-index: 40;
  inset-block-end: 16px;
  inset-inline-end: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.5s ease,
    transform 0.6s cubic-bezier(0.2, 1.4, 0.4, 1);
}
[dir='rtl'] .tarroush {
  align-items: flex-start;
}
.tarroush.is-ready {
  opacity: 1;
  transform: none;
}
.menu-open .tarroush {
  display: none;
}
.tarroush__btn {
  pointer-events: auto;
  inline-size: 84px;
  block-size: 84px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  transform: translateY(var(--ty, 0)) rotate(var(--tilt, 0deg));
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tarroush__img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  filter: drop-shadow(0 8px 10px rgba(10, 46, 37, 0.28));
  animation: t-float 3.2s ease-in-out infinite;
}
.tarroush__img.is-pop {
  animation:
    t-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1),
    t-float 3.2s ease-in-out 0.5s infinite;
}
.tarroush.is-jump .tarroush__img {
  animation: t-jump 0.75s cubic-bezier(0.3, 1.5, 0.5, 1);
}
@keyframes t-float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}
@keyframes t-pop {
  0% {
    transform: scale(0.7) rotate(-8deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}
@keyframes t-jump {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  40% {
    transform: translateY(-30px) rotate(-10deg);
  }
  70% {
    transform: translateY(-6px) rotate(6deg);
  }
}
.tarroush__say {
  position: relative;
  max-inline-size: 210px;
  margin: 0 0 8px;
  padding: 0.5rem 0.85rem;
  border-radius: 16px;
  background: var(--deep);
  color: var(--sand);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: 0 10px 24px -10px rgba(10, 46, 37, 0.55);
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transform-origin: bottom;
  transition:
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.tarroush__say::after {
  content: '';
  position: absolute;
  inset-block-end: -6px;
  inset-inline-start: 30px;
  inline-size: 12px;
  block-size: 12px;
  background: var(--deep);
  transform: rotate(45deg);
  border-radius: 2px;
}
.tarroush__say.is-on {
  opacity: 1;
  transform: none;
}
@media (max-width: 600px) {
  .tarroush {
    inset-block-end: 12px;
    inset-inline-end: 10px;
  }
  .tarroush__btn {
    inline-size: 64px;
    block-size: 64px;
  }
  .tarroush__say {
    max-inline-size: 170px;
    font-size: 0.8125rem;
  }
  .tarroush__say::after {
    inset-inline-start: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tarroush,
  .tarroush__btn,
  .tarroush__say {
    transition: none;
  }
  .tarroush__img,
  .tarroush__img.is-pop,
  .tarroush.is-jump .tarroush__img {
    animation: none;
  }
}
