/* Assila Tex, style A. Logical properties only (RTL first). 4px grid. */
:root {
  --ink: #16120f;
  --ink-2: #4a433e;
  --line: rgba(22, 18, 15, 0.1);
  --paper: #ffffff;
  --stone: #f4f1ee;
  --emerald: #0f5b3e;
  --font-ar: 'IBM Plex Sans Arabic', 'Archivo', system-ui, sans-serif;
  --font-lat: 'Archivo', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block-start: var(--header-h); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-lat);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
}
:lang(ar) body, body:lang(ar) { font-family: var(--font-ar); line-height: 1.7; }
:lang(ar) bdi { font-family: var(--font-lat); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
svg { flex: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 20px;
  text-align: center;
  border-radius: 10px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2b2420; }
.btn-light { background: rgba(255, 255, 255, 0.92); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-light:hover { background: #fff; }

/* Header */
.header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding-inline: 20px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.header.solid { background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.brand { display: block; }
.header .logo { height: 48px; width: auto; }
.header-end { display: flex; align-items: center; gap: 4px; }
.lang { padding: 12px 8px; font-size: 14px; color: var(--ink-2); text-decoration: none; font-family: var(--font-lat); }
.lang:lang(ar) { font-family: var(--font-ar); }
.lang:hover { color: var(--ink); }
.menu-toggle {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--ink);
  cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; }
#menu {
  position: absolute;
  inset-block-start: 100%;
  inset-inline: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 20px 16px;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}
#menu[hidden] { display: none; }
#menu a { padding-block: 12px; font-size: 18px; font-weight: 500; text-decoration: none; border-block-end: 1px solid var(--line); }
#menu a:last-child { border-block-end: 0; }

/* Défilé: scroll-driven hero */
.defile { position: relative; height: calc(var(--scenes, 3) * 100svh); background: #efebe6; }
html:not(.js) .defile { height: 100svh; }
.stage { position: sticky; inset-block-start: 0; height: 100svh; overflow: hidden; }
.scene { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; }
.scene[data-i="0"] { opacity: 1; }
html.js .scene { opacity: 0; }
html.js .scene.is-active { opacity: 1; }
.scene picture, .scene img { width: 100%; height: 100%; }
.scene img { object-fit: cover; object-position: 50% 100%; transform: scale(1.08); transition: transform 1.2s ease-out; }
.scene[data-i="0"] img { transform: scale(1); }
html.js .scene img { transform: scale(1.08); }
html.js .scene.is-active img { transform: scale(1); }

.hero-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 16px) 20px 24px;
}
.hero-text h1 { font-size: 40px; line-height: 1.25; font-weight: 600; text-wrap: balance; max-width: 14ch; }
:lang(fr) .hero-text h1 { font-size: 44px; line-height: 1; font-stretch: 78%; letter-spacing: -0.02em; max-width: 12ch; }
.captions { position: relative; height: 56px; margin-block-start: 16px; }
.caption {
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.caption[data-i="0"] { opacity: 1; }
html.js .caption { opacity: 0; }
html.js .caption.is-active { opacity: 1; }
.caption .t { font-weight: 500; }
.caption .s { font-size: 14px; color: var(--ink-2); }
.bars { display: flex; gap: 6px; width: 120px; margin-block-start: 16px; }
.bar { flex: 1; height: 2px; border-radius: 1px; overflow: hidden; background: rgba(22, 18, 15, 0.16); }
.bar i { display: block; height: 100%; background: var(--ink); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
[dir="rtl"] .bar i { transform-origin: 100% 50%; }
html:not(.js) .bars { display: none; }

.actions {
  margin-block-start: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Collections */
.collections { padding: 64px 20px; max-width: 1200px; margin-inline: auto; }
.collections h2, .card h2 { font-size: 28px; line-height: 1.25; font-weight: 600; }
:lang(fr) .collections h2, :lang(fr) .card h2 { font-stretch: 85%; letter-spacing: -0.01em; }
.lead { margin-block-start: 8px; color: var(--ink-2); }
.col-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.col { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; text-decoration: none; }
.col img { width: 96px; height: 120px; object-fit: cover; border-radius: 10px; }
.col-text { display: flex; flex-direction: column; gap: 4px; }
.col-name { font-weight: 500; }
.col-line { font-size: 15px; color: var(--ink-2); }
.col-ask { font-size: 14px; font-weight: 500; color: var(--emerald); text-decoration: underline; text-underline-offset: 4px; }
.col:hover .col-ask { text-decoration-thickness: 2px; }

/* Shop + wholesale */
.visit { display: grid; gap: 16px; padding: 0 20px 64px; max-width: 1200px; margin-inline: auto; }
.card { border-radius: 16px; padding: 24px; }
.card-shop { background: var(--stone); }
.facts { margin: 20px 0 0; display: grid; gap: 12px; }
.facts dt { font-size: 13px; color: var(--ink-2); }
.facts dd { margin: 0; }
.facts a { text-decoration: none; font-weight: 500; }
.muted { color: var(--ink-2); font-size: 15px; }
.map { margin-block: 20px; }
.map iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; border: 0; border-radius: 12px; background: #e6e1dc; }
.directions { width: 100%; }
.card-wholesale { background: var(--emerald); color: #fff; display: flex; flex-direction: column; gap: 16px; }
.card-wholesale p { color: rgba(255, 255, 255, 0.85); }
.card-wholesale .btn-light { background: #fff; box-shadow: none; align-self: stretch; }

/* Footer */
.footer {
  padding: 40px 20px 56px;
  border-block-start: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
}
.footer .logo { height: 56px; width: auto; align-self: flex-start; margin-block-end: 8px; }
.footer a { text-decoration: none; }

/* Desktop */
@media (min-width: 900px) {
  :root { --header-h: 88px; }
  .header { padding-inline: 48px; }
  .header .logo { height: 56px; }
  .hero-copy { padding: calc(var(--header-h) + 48px) 64px 48px; }
  .hero-text { max-width: 600px; }
  .hero-text h1 { font-size: 60px; }
  :lang(fr) .hero-text h1 { font-size: 72px; }
  .actions { margin-block-start: 32px; flex-direction: row; }
  .collections { padding: 96px 48px; }
  .collections h2, .card h2 { font-size: 36px; }
  .col-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-block-start: 32px; }
  .col { grid-template-columns: 1fr; align-items: start; }
  .col img { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 12px; }
  .visit { grid-template-columns: 3fr 2fr; gap: 24px; padding: 0 48px 96px; align-items: start; }
  .card { padding: 32px; }
  .directions { width: auto; }
  .footer { padding: 48px 48px 64px; max-width: 1200px; margin-inline: auto; border-block-start: 0; }
}

/* Landscape phones: keep both buttons on screen */
@media (max-height: 520px) {
  .hero-copy { padding: calc(var(--header-h) + 4px) 20px 16px; }
  .hero-text h1, :lang(fr) .hero-text h1 { font-size: 28px; max-width: none; }
  .captions, .bars { display: none; }
  .actions { margin-block-start: auto; flex-direction: row; }
  .actions .btn { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene, .caption, .header { transition: none; }
  .scene img, html.js .scene img { transform: none; transition: none; }
}
