/* ==========================================================================
   Pafitte — قالب کفش پافیته
   Luxury organic-minimal, RTL, single-page
   ========================================================================== */

/* ---------- Fonts ---------- */
/* Body / UI — Vazirmatn (real weights, no faux bold) */
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
/* Display — Gandom (distinctive geometric face for Persian headings) */
@font-face { font-family: "Gandom"; src: url("../fonts/Gandom.woff2") format("woff2"), url("../fonts/Gandom.woff") format("woff"); font-weight: 400 900; font-style: normal; font-display: swap; }
/* English display — Sora (latin subset; loads only when lang=en) */
@font-face { font-family: "Sora"; src: url("../fonts/Sora-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Sora"; src: url("../fonts/Sora-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
/* Arabic display — Cairo (arabic subset; loads only when lang=ar) */
@font-face { font-family: "Cairo"; src: url("../fonts/Cairo-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cairo"; src: url("../fonts/Cairo-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
/* Arabic body — IBM Plex Sans Arabic (arabic subset; loads only when lang=ar) */
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/PlexArabic-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/PlexArabic-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/PlexArabic-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Design tokens ---------- */
:root {
  /* palette */
  --brand: #34A437;
  --brand-deep: #2A8A2D;
  /* anchor/dark sections now use the provided brand green (deepened for legible white text) */
  --forest: #1C7C29;
  --forest-2: #14601F;
  --accent: #F2E604;      /* yellow accent for select text & icons */
  --beige: #E8E2D5;
  --sand: #EFE9DD;
  --offwhite: #FAFAF7;
  --ink: #1C221C;
  --muted: #5B6459;
  --ink-dark: #0E2714;         /* single deep tone for overlays / dark image backdrops */
  --ink-dark-rgb: 14, 39, 20;  /* same tone for rgba() usage */
  --line: rgba(20, 53, 27, 0.12);
  --line-light: rgba(255, 255, 255, 0.14);

  /* type */
  --font: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --font-display: "Gandom", "Vazirmatn", Tahoma, sans-serif;

  /* radius + shadow */
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 30px;
  --shadow-sm: 0 4px 18px rgba(20, 53, 27, 0.08);
  --shadow: 0 18px 50px -20px rgba(20, 53, 27, 0.28);
  --shadow-lg: 0 40px 90px -35px rgba(20, 53, 27, 0.45);

  /* layout */
  --container: 1200px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);
  --drawer-hide: -100%; /* mobile drawer's hidden offset; flips to +100% in LTR */

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Per-language type families ----------
   Persian keeps Gandom/Vazirmatn. English gets a bold geometric Latin display
   (Sora) so headings carry real weight and match the brand. Arabic gets native
   Arabic faces (Cairo display + IBM Plex Sans Arabic body) for idiomatic
   letterforms (correct kaf/yeh). These only download in their own language. */
html[dir="ltr"] { --drawer-hide: 100%; }
html[lang="en"] { --font-display: "Sora", "Vazirmatn", Tahoma, sans-serif; }
/* English hero headline: longer Latin words push the display size to 3 lines,
   so use Bold (700) instead of ExtraBold + a lower size cap to keep it ≤ 2 lines */
html[lang="en"] .hero__title { font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.4rem); }
html[lang="ar"] {
  --font: "IBM Plex Sans Arabic", "Vazirmatn", Tahoma, sans-serif;
  --font-display: "Cairo", "Vazirmatn", Tahoma, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; scroll-padding-top: 74px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--offwhite);
  line-height: 1.85;
  font-size: 1.0625rem;
  font-synthesis: none; /* rely on real weights, never faux-bold */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
/* <picture> wraps some images for WebP/JPEG fallback. display:contents removes its
   box so rules like `.ba__layer img { height: 100% }` still resolve against the
   original parent — do not change this to block. */
picture { display: contents; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: 0; }
/* distinctive display face for the primary headings */
.hero__title, .section__title, .step__num, .size__name {
  font-family: var(--font-display);
  letter-spacing: 0;
}
p { margin: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* Readable by screen readers and crawlers, invisible on screen. Used for the
   #trust heading, which the design has no visual room for. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand-deep);
  margin: 0 0 0.9rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.eyebrow--light { color: var(--accent); }
.eyebrow--light::before { background: var(--accent); }

.section__title {
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0;
}
.section__lead {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 56ch;
  font-size: 1.08rem;
}
/* was .72 → only 3.55:1 on --forest; .9 gives 5.2:1 */
.section__lead--light { color: rgba(255, 255, 255, 0.9); }
.section__head { margin-bottom: clamp(2.2rem, 5vw, 3.6rem); max-width: 720px; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .eyebrow { justify-content: center; }
.section__head--center .section__lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              color 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: 1.05rem 2.1rem; font-size: 1.05rem; }
.btn--block { width: 100%; }
/* --forest, not --brand: white on #34A437 is only 3.23:1 and fails WCAG AA for
   the button label. #1C7C29 gives 5.30:1 with the same brand hue. */
.btn--solid {
  background: var(--forest);
  color: #fff;
  box-shadow: 0 12px 26px -12px rgba(52, 164, 55, 0.75);
}
.btn--solid:hover { background: var(--forest-2); box-shadow: 0 18px 34px -14px rgba(52, 164, 55, 0.85); }
.btn--outline { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--outline:hover { border-color: var(--brand); color: var(--brand-deep); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.18); border-color: #fff; }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), padding 0.35s var(--ease);
  padding-block: 1.1rem;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.logo { height: 30px; width: auto; color: #fff; transition: color 0.35s var(--ease); }
.nav__menu { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.1rem); }
.nav__link {
  position: relative;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
  font-weight: 500;
  transition: color 0.25s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  inset-block-end: -6px; inset-inline-end: 0;
  width: 0; height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.28s var(--ease);
}
.nav__link:hover::after { width: 100%; }
.nav__actions { display: flex; align-items: center; gap: 0.8rem; }
.nav__cta { padding-block: 0.7rem; }

/* scrolled state */
.nav.is-scrolled {
  background: rgba(250, 250, 247, 0.9);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 8px 30px -18px rgba(20, 53, 27, 0.4);
  padding-block: 0.65rem;
}
.nav.is-scrolled .logo { color: var(--forest); }
.nav.is-scrolled .nav__link { color: var(--ink); }

/* mobile toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: transparent;
  border: 0;
  padding: 0;
}
.nav__toggle span {
  height: 2px; width: 24px;
  margin-inline: auto;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.is-scrolled .nav__toggle span { background: var(--forest); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
/* slideshow */
.hero__slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s var(--ease);
  will-change: opacity, transform;
}
/* desktop (landscape) slide images; mobile portrait versions override below.
   Each is declared twice: the plain url() is the fallback for engines that do not
   understand image-set()'s type(), which then simply keep the JPEG. */
.hero__slide--1 {
  background-image: url("../img/hero-1.jpg");
  background-image: image-set(url("../img/hero-1.webp") type("image/webp"), url("../img/hero-1.jpg") type("image/jpeg"));
}
.hero__slide--2 {
  background-image: url("../img/hero-2.jpg");
  background-image: image-set(url("../img/hero-2.webp") type("image/webp"), url("../img/hero-2.jpg") type("image/jpeg"));
}
.hero__slide--3 {
  background-image: url("../img/hero-3.jpg");
  background-image: image-set(url("../img/hero-3.webp") type("image/webp"), url("../img/hero-3.jpg") type("image/jpeg"));
}
.hero__slide.is-active {
  opacity: 1;
  animation: heroKen 7s ease-out forwards;
}
@keyframes heroKen { from { transform: scale(1.12); } to { transform: scale(1); } }

.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 90% at 80% 10%, rgba(52, 164, 55, 0.16), transparent 55%),
    linear-gradient(to top, rgba(var(--ink-dark-rgb), 0.92) 6%, rgba(var(--ink-dark-rgb), 0.5) 45%, rgba(var(--ink-dark-rgb), 0.55) 100%);
}

/* rotating captions (crossfade; grid-stack sizes to tallest caption) */
.hero__captions { display: grid; }
.hero__caption {
  grid-area: 1 / 1;
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  pointer-events: none;
}
.hero__caption.is-active { opacity: 1; transform: none; pointer-events: auto; }

/* dots with synced progress fill */
.hero__dots { display: flex; gap: 0.6rem; margin-top: 1.8rem; }
.hero__dot {
  position: relative; overflow: hidden;
  width: 34px; height: 5px; border: 0; padding: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.3s var(--ease), width 0.3s var(--ease);
}
.hero__dot:hover { background: rgba(255, 255, 255, 0.55); }
.hero__dot::after {
  content: "";
  position: absolute; inset-block: 0; inset-inline-start: 0;
  width: 0; background: var(--accent);
}
.hero__dot.is-active { width: 48px; background: rgba(255, 255, 255, 0.3); }
.hero__dot.is-active::after { animation: dotFill 5.5s linear forwards; }
@keyframes dotFill { from { width: 0; } to { width: 100%; } }
.hero__inner { position: relative; z-index: 2; padding-block: 8rem 6rem; max-width: 780px; }
.hero__title {
  font-size: clamp(2.4rem, 6.2vw, 4.6rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 0;
  margin-bottom: 1.4rem;
}
.hero__title .hl { color: #fff; position: relative; white-space: nowrap; }
.hero__title .hl::after {
  content: "";
  position: absolute;
  inset-inline: -2px; inset-block-end: 0.08em;
  height: 0.34em;
  background: var(--accent);
  z-index: -1;
  border-radius: 4px;
  opacity: 0.95;
}
.hero__sub {
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  color: rgba(255, 255, 255, 0.86);
  max-width: 56ch;
  margin-bottom: 2.2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero__scroll {
  position: absolute;
  inset-block-end: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.hero__scroll-line {
  display: block;
  width: 2px; height: 46px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.1), #fff);
  border-radius: 2px;
  overflow: hidden;
  animation: scrollPulse 2.2s var(--ease) infinite;
}
@keyframes scrollPulse {
  0% { transform: scaleY(0); transform-origin: top; }
  40% { transform: scaleY(1); transform-origin: top; }
  60% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ==========================================================================
   TRUST STRIP
   ========================================================================== */
.trust {
  background: var(--forest);
  color: #fff;
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.trust__item { display: flex; align-items: center; gap: 1rem; }
.trust__item + .trust__item { position: relative; }
.trust__icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  padding: 9px;
  border-radius: 12px;
  background: rgba(242, 230, 4, 0.14);
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trust__title { font-size: 1.02rem; font-weight: 700; }
/* was .66 → only 3.24:1 on --forest; .9 gives 4.6:1 */
.trust__text { font-size: 0.9rem; color: rgba(255, 255, 255, 0.9); }

/* ==========================================================================
   INTRO
   ========================================================================== */
.intro { background: var(--offwhite); }
.intro__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.intro__media { position: relative; }
.intro__media img {
  width: 100%;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--sand), var(--beige));
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.intro__badge {
  position: absolute;
  inset-block-end: 22px; inset-inline-start: -14px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  box-shadow: 0 14px 30px -12px rgba(52, 164, 55, 0.7);
}
.intro__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-block: 1.6rem 2rem; }
.intro__col p { color: var(--muted); font-size: 1rem; }
.intro__tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.7rem;
}
.intro__tag--pain { background: rgba(28, 34, 28, 0.06); color: var(--ink); }
.intro__tag--fix { background: rgba(52, 164, 55, 0.14); color: var(--brand-deep); }

/* ==========================================================================
   BEFORE / AFTER (signature)
   ========================================================================== */
.compare { background: var(--beige); }
.ba {
  position: relative;
  max-width: 960px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  cursor: ew-resize;
  user-select: none;
  touch-action: pan-y;
  background: var(--ink-dark);
}
.ba__layer { position: absolute; inset: 0; }
.ba__layer img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* before layer sits on top, revealed on the right; clip-path keeps both images
   perfectly aligned regardless of container width */
.ba__before { clip-path: inset(0 0 0 50%); }
.ba__label {
  position: absolute;
  inset-block-start: 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(var(--ink-dark-rgb), 0.55);
  backdrop-filter: blur(4px);
}
.ba__label--before { inset-inline-end: 16px; }
.ba__label--after { inset-inline-start: 16px; background: rgba(52, 164, 55, 0.75); }
.ba__handle {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 50%;
  margin-inline-start: -1px; /* centre the 2px line on its position (dir-agnostic) */
  width: 2px;
  background: #fff;
  z-index: 4;
  pointer-events: none;
}
.ba__handle-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* physical centring works in LTR & RTL */
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.45);
}
.ba__handle-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--forest); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* invisible native range kept for keyboard accessibility; pointer handled by JS drag */
.ba__range {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; opacity: 0;
  z-index: 5;
  pointer-events: none;
}
.ba:has(.ba__range:focus-visible) .ba__handle-btn {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

/* ==========================================================================
   FEATURES (dark anchor)
   ========================================================================== */
.features { background: var(--forest); color: #fff; }
.features__stage {
  max-width: 820px;
  margin: 0 auto clamp(2.4rem, 5vw, 3.6rem);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--forest-2);
}
.features__video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.feature {
  padding: 1.9rem 1.6rem;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.feature:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(52, 164, 55, 0.5);
}
.feature__ico {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  margin-bottom: 1.1rem;
  background: rgba(242, 230, 4, 0.14);
  color: var(--accent);
}
.feature__ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature__title { font-size: 1.16rem; font-weight: 700; margin-bottom: 0.5rem; }
/* was .66 → only 3.3:1 on the --forest section; .9 gives 4.6:1 */
.feature__text { color: rgba(255, 255, 255, 0.9); font-size: 0.97rem; }

/* ==========================================================================
   USE CASES
   ========================================================================== */
.usecases { background: var(--offwhite); }
.uc__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.uc {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.uc:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.uc__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); }
.uc__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity 0.7s var(--ease), transform 4s var(--ease);
}
.uc__slide.is-active { opacity: 1; }
.uc:hover .uc__slide.is-active { transform: scale(1.05); }
.uc__more {
  position: absolute;
  inset-block-start: 12px; inset-inline-start: 12px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(20, 96, 31, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  z-index: 2;
  transition: background 0.3s var(--ease);
}
.uc:hover .uc__more { background: var(--brand); }
.uc__more svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.uc__body { padding: 1.4rem 1.4rem 1.7rem; position: relative; }
.uc__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.45rem; }
.uc__text { color: var(--muted); font-size: 0.96rem; }

/* ==========================================================================
   HOW TO USE
   ========================================================================== */
.how {
  background:
    linear-gradient(to bottom, rgba(240, 238, 231, 0.94) 0%, rgba(240, 238, 231, 0.8) 48%, rgba(228, 222, 209, 0.6) 100%),
    url("../img/steps-bg.jpg") center 60% / cover no-repeat;
  /* WebP override; the shorthand above stays as the fallback */
  background-image:
    linear-gradient(to bottom, rgba(240, 238, 231, 0.94) 0%, rgba(240, 238, 231, 0.8) 48%, rgba(228, 222, 209, 0.6) 100%),
    image-set(url("../img/steps-bg.webp") type("image/webp"), url("../img/steps-bg.jpg") type("image/jpeg"));
  background-attachment: scroll, fixed;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  counter-reset: step;
  position: relative;
}
.step { text-align: center; padding-inline: 0.5rem; }
.step__num {
  display: grid;
  place-items: center;
  width: 72px; height: 72px;
  margin: 0 auto 1.3rem;
  border-radius: 50%;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--brand-deep);
  background: var(--offwhite);
  border: 2px solid var(--brand);
  box-shadow: var(--shadow-sm);
}
.step__title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.step__text { color: var(--muted); max-width: 32ch; margin-inline: auto; }

/* ==========================================================================
   BRANDS (social proof)
   ========================================================================== */
.brands { background: var(--sand); }
.brands__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.7rem, 2vw, 1.25rem);
  max-width: 900px;
  margin-inline: auto;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(84px, 12vw, 120px);
  padding: 1rem 0.75rem;
  text-align: center;
  background: var(--offwhite);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.brand:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(28, 124, 41, 0.3); }
/* Logo files are pre-tinted
   --forest-2, so they sit in one tone; the fixed box keeps square and wide
   marks visually balanced. */
.brand__logo {
  width: auto;
  height: clamp(40px, 6vw, 68px);
  max-width: 82%;
  object-fit: contain;
  opacity: 0.88;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.brand:hover .brand__logo { opacity: 1; transform: scale(1.04); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { background: var(--offwhite); }
.contact__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact__list { margin-top: 2rem; display: grid; gap: 1.1rem; }
.contact__list li { display: flex; align-items: center; gap: 0.9rem; color: var(--muted); }
.contact__list svg {
  width: 44px; height: 44px; flex-shrink: 0;
  padding: 10px;
  border-radius: 12px;
  background: rgba(52, 164, 55, 0.1);
  color: var(--brand-deep);
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.contact__list strong { display: block; color: var(--ink); font-size: 0.86rem; margin-bottom: 2px; }
.contact__list a { color: var(--muted); }
.contact__list a:hover { color: var(--brand-deep); }

.contact__panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  box-shadow: var(--shadow);
}
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
/* floating-label fields */
.field { position: relative; }
.field input, .field textarea, .field select {
  font: inherit;
  width: 100%;
  padding: 1.45rem 1rem 0.5rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--offwhite);
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; padding-top: 1.6rem; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6459' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.9rem center;
  background-size: 18px;
  padding-inline-end: 2.6rem;
  cursor: pointer;
}
.field > label {
  position: absolute;
  inset-block-start: 0.95rem;
  inset-inline-start: 1rem;
  color: var(--muted);
  font-weight: 500;
  pointer-events: none;
  transform-origin: right center;
  transition: transform 0.18s var(--ease), color 0.18s var(--ease);
}
.field__opt { color: var(--muted); }
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field--select > label {
  transform: translateY(-0.7rem) scale(0.8);
  color: var(--brand-deep);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brand);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(52, 164, 55, 0.12);
}
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: #cf3b3b; box-shadow: 0 0 0 4px rgba(207, 59, 59, 0.1); }
.field.is-invalid > label { color: #cf3b3b; }
.field.is-valid input, .field.is-valid textarea, .field.is-valid select { border-color: rgba(52, 164, 55, 0.55); }
/* inline green check (opposite the floated label) */
.field.is-valid:not(.field--select)::after {
  content: "";
  position: absolute;
  inset-block-start: 0.8rem; inset-inline-end: 0.85rem;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4 10-11'/%3E%3C/svg%3E") center / 12px no-repeat;
  animation: popIn 0.28s var(--ease);
}
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* multi-size order grid */
.order-sizes {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0.3rem 1rem 0.9rem;
  margin: 0;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.order-sizes.is-invalid { border-color: #cf3b3b; box-shadow: 0 0 0 4px rgba(207, 59, 59, 0.08); }
.order-sizes legend { font-size: 0.9rem; font-weight: 700; color: var(--ink); padding: 0 0.4rem; }
.order-sizes legend .field__opt { font-weight: 500; }
.order-size {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0;
}
.order-size + .order-size { border-top: 1px solid var(--line); }
.order-size__info b { display: block; font-weight: 700; font-size: 0.98rem; color: var(--ink); }
.order-size__info span { font-size: 0.8rem; color: var(--muted); }
.stepper {
  display: inline-flex; align-items: center; flex-shrink: 0;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--offwhite); overflow: hidden;
}
.stepper__btn {
  width: 36px; height: 36px; border: 0; background: transparent;
  font-size: 1.25rem; line-height: 1; color: var(--brand-deep);
  cursor: pointer; transition: background 0.2s var(--ease);
}
.stepper__btn:hover { background: rgba(52, 164, 55, 0.12); }
.stepper__btn:active { background: rgba(52, 164, 55, 0.22); }
.stepper input {
  width: 42px; text-align: center;
  border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--ink);
  padding: 0.4rem 0; -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }
.order-sizes__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.8rem; }
.order-sizes__total { font-size: 0.92rem; font-weight: 700; color: var(--brand-deep); }

.form__minorder {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  background: rgba(52, 164, 55, 0.09);
  border: 1px solid rgba(52, 164, 55, 0.22);
  color: var(--brand-deep);
  font-size: 0.92rem;
  font-weight: 600;
}
.form__minorder strong { color: var(--ink); }
.form__minorder svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--brand-deep); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.field__error { display: block; font-size: 0.8rem; color: #cf3b3b; min-height: 0; margin-top: 0.35rem; }
.form__note { font-size: 0.92rem; font-weight: 600; min-height: 0; }
.form__note.is-ok { color: var(--brand-deep); }
.form__note.is-err { color: #cf3b3b; }

/* honeypot: pushed off-screen rather than display:none, which bots skip */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* animated success state */
.form__success {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  border-radius: var(--r-sm);
  background: rgba(52, 164, 55, 0.09);
  border: 1px solid rgba(52, 164, 55, 0.28);
}
.form__success[hidden] { display: none; }
.form__success p { font-size: 0.95rem; font-weight: 600; color: var(--brand-deep); }
.form__success p span { display: block; font-weight: 500; color: var(--muted); font-size: 0.82rem; margin-top: 2px; }
.form__check { width: 46px; height: 46px; flex-shrink: 0; }
.form__check circle { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-dasharray: 150; stroke-dashoffset: 150; }
.form__check path { fill: none; stroke: var(--brand); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.form__success.is-shown .form__check circle { animation: drawCircle 0.55s var(--ease) forwards; }
.form__success.is-shown .form__check path { animation: drawCheck 0.35s var(--ease) 0.4s forwards; }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

.contact__map {
  max-width: var(--container);
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  padding-inline: var(--gutter);
}
.contact__map iframe {
  width: 100%;
  height: 340px;
  border: 0;
  border-radius: var(--r-lg);
  filter: grayscale(0.25) contrast(1.02);
  box-shadow: var(--shadow-sm);
}
.contact__map-note { text-align: center; margin-top: 0.8rem; font-size: 0.84rem; color: var(--muted); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--forest-2); color: #fff; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 2rem;
  align-items: start;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.footer__logo { height: 34px; color: #fff; }
/* was .6 → only 3.9:1 on --forest-2; .82 gives 5.8:1 */
.footer__tag { margin-top: 1.1rem; max-width: 44ch; color: rgba(255, 255, 255, 0.82); font-size: 0.96rem; }
.footer__nav { display: grid; gap: 0.8rem; }
.footer__nav a { color: rgba(255, 255, 255, 0.75); transition: color 0.2s var(--ease); font-size: 0.98rem; }
.footer__nav a:hover { color: #A9E0AB; }
.footer__social { display: flex; gap: 0.7rem; }
.social {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.social:hover { background: var(--brand); border-color: var(--brand); transform: translateY(-3px); }
.social svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.footer__bar { border-top: 1px solid var(--line-light); }
.footer__bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 1.3rem;
  font-size: 0.85rem;
  /* was .5 → only 3.2:1 on --forest-2; .75 gives 5.1:1 */
  color: rgba(255, 255, 255, 0.75);
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   SIZES
   ========================================================================== */
.sizes { background: var(--offwhite); padding-bottom: clamp(2rem, 4vw, 3.5rem); }
/* tighten the gap between the sizes and use-cases sections */
.usecases { padding-top: clamp(2rem, 4vw, 3.5rem); }
.sizes__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: center;
}
.sizes__media img {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  background: var(--ink-dark);
  aspect-ratio: 16 / 11;
  object-fit: cover;
}
.sizes__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.size {
  padding: 1.3rem 1.3rem 1.4rem;
  border-radius: var(--r);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.size:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(52, 164, 55, 0.45); }
.size__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.size__name { font-size: 1.2rem; font-weight: 800; color: var(--brand-deep); }
.size__badge {
  font-size: 0.72rem; font-weight: 700;
  padding: 0.24rem 0.6rem; border-radius: 999px;
  background: rgba(20, 96, 31, 0.08); color: var(--muted);
}
.size__fit { font-size: 0.95rem; color: var(--ink); margin-bottom: 1rem; min-height: 2.8em; }
.size__specs { display: flex; gap: 0.5rem; }
.size__specs li {
  flex: 1;
  text-align: center;
  background: var(--offwhite);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.2rem;
}
.size__specs span { display: block; font-size: 0.68rem; color: var(--muted); margin-bottom: 2px; }
.size__specs b { font-size: 1rem; font-weight: 800; color: var(--ink); }
.sizes__unit { text-align: center; margin-top: 1.6rem; font-size: 0.85rem; color: var(--muted); }

/* ==========================================================================
   BACK TO TOP
   ========================================================================== */
.to-top {
  position: fixed;
  inset-block-end: 22px; inset-inline-start: 22px;
  z-index: 90;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--forest); /* matches .btn--solid after the contrast fix */
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(52, 164, 55, 0.8);
  opacity: 0; visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s var(--ease), background 0.25s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--forest-2); transform: translateY(-3px); }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   LOGO ANIMATION
   ========================================================================== */
.logo__bar { transform-box: fill-box; transform-origin: right center; }
.nav__logo:hover .logo__bar,
.footer__brand:hover .logo__bar { animation: barWave 0.9s var(--ease); }
.nav__logo:hover .logo__bar:nth-child(2),
.footer__brand:hover .logo__bar:nth-child(2) { animation-delay: 0.09s; }
.nav__logo:hover .logo__bar:nth-child(3),
.footer__brand:hover .logo__bar:nth-child(3) { animation-delay: 0.18s; }
@keyframes barWave {
  0% { transform: scaleX(1); }
  40% { transform: scaleX(0.45); opacity: 0.85; }
  100% { transform: scaleX(1); }
}
/* gentle intro on load */
.logo__bar { animation: barIn 0.6s var(--ease) both; }
.logo__bar:nth-child(2) { animation-delay: 0.1s; }
.logo__bar:nth-child(3) { animation-delay: 0.2s; }
@keyframes barIn { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* ==========================================================================
   MICRO-INTERACTIONS
   ========================================================================== */
/* CTA arrow slide-in */
.btn__arrow {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.28s var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(-4px); }
/* LTR: mirror the arrow so it points/slides toward the reading direction */
html[dir="ltr"] .btn__arrow { transform: scaleX(-1); }
html[dir="ltr"] .btn:hover .btn__arrow { transform: scaleX(-1) translateX(-4px); }

/* Cursive RTL scripts must not be letter-tracked; keep tracking only on the Latin eyebrow */
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
/* Arabic: a touch more leading for diacritics/stacked marks */
html[lang="ar"] body { line-height: 1.9; }

/* ==========================================================================
   LANGUAGE SWITCHER
   ========================================================================== */
.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.42rem 0.6rem; border: 0; background: transparent;
  color: rgba(255, 255, 255, 0.9); font-weight: 700; font-size: 0.9rem;
  border-radius: 999px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.lang__btn:hover { background: rgba(255, 255, 255, 0.14); }
.nav.is-scrolled .lang__btn { color: var(--ink); }
.nav.is-scrolled .lang__btn:hover { background: rgba(20, 53, 27, 0.06); }
.lang__globe { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lang__cur { line-height: 1; min-width: 1.6em; text-align: center; }
.lang__menu {
  position: absolute;
  inset-inline-end: 0; inset-block-start: calc(100% + 8px);
  min-width: 156px; margin: 0; padding: 0.4rem;
  list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s var(--ease);
  z-index: 60;
}
.lang__menu.is-open { opacity: 1; visibility: visible; transform: none; }
.lang__opt {
  display: block; width: 100%; text-align: start;
  padding: 0.55rem 0.8rem; border: 0; background: transparent;
  color: var(--ink); font-weight: 600; font-size: 0.95rem; border-radius: 8px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.lang__opt:hover { background: rgba(52, 164, 55, 0.1); }
.lang__opt.is-active { color: var(--brand-deep); background: rgba(52, 164, 55, 0.12); }

/* active nav link (scroll-spy) */
.nav__link.is-active::after { width: 100%; }

/* feature icon on hover */
.feature__ico { transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease); }
.feature:hover .feature__ico { transform: translateY(-3px) scale(1.06); background: rgba(242, 230, 4, 0.22); }

/* use-case indicator dots */
.uc__dots {
  position: absolute; inset-block-end: 12px; inset-inline: 0;
  display: flex; justify-content: center; gap: 5px; z-index: 2;
  pointer-events: none;
}
.uc__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: background 0.3s var(--ease), width 0.3s var(--ease), border-radius 0.3s var(--ease);
}
.uc__dot.is-active { width: 16px; border-radius: 3px; background: #fff; }

/* ==========================================================================
   REVEAL ANIMATION
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .intro__grid { grid-template-columns: 1fr; }
  .intro__media { max-width: 460px; margin-inline: auto; }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .uc__grid { grid-template-columns: repeat(2, 1fr); }
  .sizes__grid { grid-template-columns: 1fr; }
  .sizes__media { max-width: 560px; margin-inline: auto; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  /* tighter vertical rhythm + denser copy on phones */
  :root { --section-y: clamp(3rem, 8vw, 4.25rem); }
  body { line-height: 1.75; font-size: 1rem; }
  .section__lead { font-size: 1rem; }

  /* nav → mobile */
  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed;
    inset-block-start: 0; inset-inline-end: 0;
    height: 100vh; height: 100svh; /* vh fallback for older iOS Safari */
    width: min(72vw, 264px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.4rem;
    padding: 2rem 1.9rem;
    background: var(--forest);
    box-shadow: 0 0 60px -10px rgba(0, 0, 0, 0.5);
    /* hidden offset comes from --drawer-hide (flips per dir); .is-open wins in
       both directions because no dir-scoped rule competes with it */
    transform: translateX(var(--drawer-hide));
    transition: transform 0.4s var(--ease);
  }
  .nav__menu.is-open { transform: translateX(0); }
  .nav__menu .nav__link { color: #fff; font-size: 1.15rem; }
  .nav__cta { display: none; }
  .nav.is-scrolled .nav__toggle span { background: var(--forest); }
  .nav__menu.is-open ~ .nav__actions .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }

  .trust__grid { grid-template-columns: 1fr; gap: 1rem; }
  .intro__cols { grid-template-columns: 1fr; }
  .features__grid { grid-template-columns: 1fr; }
  .uc__grid { grid-template-columns: 1fr; }
  .sizes__cards { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .size__fit { min-height: 0; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .form__row { grid-template-columns: 1fr; }
  .hero__inner { padding-block: 7rem 5rem; }

  /* mobile: portrait hero slides + vertical steps background (img/mobile) */
  .hero__slide--1 {
    background-image: url("../img/mobile/slide-1.jpg");
    background-image: image-set(url("../img/mobile/slide-1.webp") type("image/webp"), url("../img/mobile/slide-1.jpg") type("image/jpeg"));
  }
  .hero__slide--2 {
    background-image: url("../img/mobile/slide-2.jpg");
    background-image: image-set(url("../img/mobile/slide-2.webp") type("image/webp"), url("../img/mobile/slide-2.jpg") type("image/jpeg"));
  }
  .hero__slide--3 {
    background-image: url("../img/mobile/slide-3.jpg");
    background-image: image-set(url("../img/mobile/slide-3.webp") type("image/webp"), url("../img/mobile/slide-3.jpg") type("image/jpeg"));
  }
  .how {
    background:
      linear-gradient(to bottom, rgba(240, 238, 231, 0.94) 0%, rgba(240, 238, 231, 0.8) 48%, rgba(228, 222, 209, 0.6) 100%),
      url("../img/mobile/steps-bg.jpg") center / cover no-repeat;
    background-image:
      linear-gradient(to bottom, rgba(240, 238, 231, 0.94) 0%, rgba(240, 238, 231, 0.8) 48%, rgba(228, 222, 209, 0.6) 100%),
      image-set(url("../img/mobile/steps-bg.webp") type("image/webp"), url("../img/mobile/steps-bg.jpg") type("image/jpeg"));
    background-attachment: scroll, scroll;
  }

  /* larger, comfortable touch targets */
  .stepper__btn { width: 44px; height: 44px; font-size: 1.4rem; }
  .stepper input { width: 46px; }
  .contact__list li { align-items: flex-start; }
  .contact__list a { display: inline-block; padding-block: 0.35rem; }
  .form__minorder { align-items: flex-start; line-height: 1.55; }

  /* footer: center the stacked columns instead of a lopsided left gap */
  .footer__grid { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1.6rem; }
  .footer__tag { margin-inline: auto; }
  .footer__nav { justify-items: center; }
  .footer__bar-inner { justify-content: center; text-align: center; }
}

@media (max-width: 560px) {
  /* size cards: two columns are too cramped for the Persian labels → single column */
  .sizes__cards { grid-template-columns: 1fr; gap: 0.85rem; }
  .size__head { flex-wrap: wrap; }
  .size__name { white-space: nowrap; }
  .size__fit { min-height: 0; }
}

@media (max-width: 420px) {
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__title { font-size: 2.2rem; }
  .section__title { font-size: 1.7rem; }
  /* brands stay 3-up (9 = 3×3); shrink logos to fit ~100px cards */
  .brand { padding-inline: 0.4rem; }
  .brand__logo { height: 38px; max-width: 88%; }
}

/* burger open animation (JS toggles .is-open on menu; style toggle via body class) */
body.menu-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: #fff; }
body.menu-open .nav__toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: #fff; }

/* ==========================================================================
   MOTION PREFERENCES
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
