/* ==========================================================================
   Binaa — Landing page styles
   Extends the app's petrol-teal / sand system (see src/Binaa.Web/wwwroot/css/app.css).
   Self-contained: this file imports the same palette via :root so the landing
   can be hosted independently from the .NET app.
   ========================================================================== */

:root {
  /* Brand palette — built around the identity green #088A54 (HSL 155°,88%,29%)
     + champagne gold. Ladder runs darkest (900) → lightest (100). */
  --imd-teal-900: #044C2F;
  --imd-teal-800: #066D43;
  --imd-teal-700: #088A54;   /* main identity green */
  --imd-teal-600: #0BAE6A;
  --imd-teal-100: #D9EFE3;
  /* Sand/gold accents remapped to teal-green so landing page has no yellow.
     Kept variable names to avoid touching every selector; values now read
     as teal (--imd-sand-600=teal-700, 500=teal-600, 100=teal-100). */
  --imd-sand-600: #088A54;
  --imd-sand-500: #0BAE6A;
  --imd-sand-100: #D9EFE3;

  --imd-ink: #0B1F18;
  --imd-muted: #5B6B65;
  --imd-line: #E6E3D9;
  --imd-paper: #FAF8F3;
  --imd-card: #ffffff;

  --bs-primary: var(--imd-teal-700);
  --bs-body-bg: var(--imd-paper);
  --bs-body-color: var(--imd-ink);
  --bs-body-font-family: "Tajawal", system-ui, sans-serif;
  --bs-border-color: var(--imd-line);
  --bs-link-color: var(--imd-teal-600);
  --bs-link-hover-color: var(--imd-teal-900);
}

* { font-feature-settings: "ss01"; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

html, body { overflow-x: hidden; }

body {
  font-family: var(--bs-body-font-family);
  /* background:
    radial-gradient(1200px 600px at 100% -10%, rgba(11,174,106,.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(11,174,106,.07), transparent 55%),
    var(--imd-paper); */
    background-color: #fbfbfb !important;
  color: var(--imd-ink);
}

.text-sand { color: var(--imd-sand-500) !important; }

/* ---- Nav --------------------------------------------------------------- */
.imd-nav {
  background: var(--imd-teal-900);
  border-bottom: 3px solid var(--imd-sand-500);
  padding-block: .65rem;
}
.imd-brand {
  font-weight: 700; letter-spacing: .3px; color: #fff !important;
  display: flex; align-items: center; gap: .55rem; text-decoration: none;
}
.imd-brand .mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--imd-sand-500), var(--imd-sand-600));
  color: var(--imd-teal-900); font-weight: 800;
  display: grid; place-items: center; font-size: 1.05rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.imd-nav .nav-link { color: #D9E6DF !important; font-weight: 500; }
.imd-nav .nav-link:hover { color: #fff !important; }
.imd-nav .navbar-toggler { border-color: rgba(255,255,255,.2); }
.imd-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* ---- Hero -------------------------------------------------------------- */
.imd-hero-wrap { padding: 2.25rem 0 0; }
.imd-hero {
  background: linear-gradient(135deg, var(--imd-teal-900), var(--imd-teal-700) 70%);
  color: #F0F5F1; border-radius: 22px; overflow: hidden; position: relative;
}
.imd-hero::after {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: -10%;
  width: 55%;
  background: radial-gradient(closest-side, rgba(11,174,106,.22), transparent);
  pointer-events: none;
}
.imd-hero h1 { font-weight: 800; line-height: 1.2; }
.imd-eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .72rem;
  color: var(--imd-sand-600); font-weight: 700;
}
.imd-eyebrow-light { color: var(--imd-sand-500); }

.imd-hero-card {
  background: rgba(255,255,255,.96);
  color: var(--imd-ink);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 20px 50px -25px rgba(0,0,0,.55);
  position: relative; z-index: 1;
}
.hero-row { display: flex; justify-content: space-between; padding: .35rem 0; font-size: .95rem; }
.hero-row span { color: var(--imd-muted); }
.imd-pill {
  display: inline-block; font-size: .75rem; padding: .2rem .55rem; border-radius: 999px;
  background: var(--imd-teal-100); color: var(--imd-teal-900); margin-inline-start: .25rem;
}
.imd-pill-best { background: var(--imd-sand-100); color: var(--imd-sand-600); }

/* ---- Stats ------------------------------------------------------------- */
.imd-stats {
  padding: 3rem 0 1rem;
}
.stat-num {
  font-size: 2.25rem; font-weight: 800; color: var(--imd-teal-900); line-height: 1;
}
.stat-label { color: var(--imd-muted); margin-top: .4rem; font-size: .95rem; }

/* ---- Sections ---------------------------------------------------------- */
.imd-section { padding: 4rem 0; }
.imd-section-alt { background: #fff; border-block: 1px solid var(--imd-line); }
.imd-section-spacer { height: 10rem; }
.imd-section-title { font-weight: 800; color: var(--imd-teal-900); }

/* ---- Section header (reusable) ---------------------------------------- */
/* Common section heading: a "live" glassy pill eyebrow + a gradient-highlight
   title underscored by a short gradient accent bar. Inspired by — but
   intentionally distinct from — the AEiK section head, on Binaa's all-teal
   palette (no yellow). Highlight words in the title by wrapping them in
   <span>. Modifiers:
     .imd-shead--start  → start-aligned, for use inside 2-column rows
     .imd-shead--light  → for dark / teal backgrounds
   Usage:
     <div class="imd-shead">
       <span class="imd-shead__eyebrow">الأسئلة الشائعة</span>
       <h2 class="imd-shead__title">إجابات سريعة عن <span>أكثر ما يُسأل</span></h2>
     </div>                                                                */
.imd-shead {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  margin-block: 2rem 3.25rem;
  padding: 1.25rem 1rem;
}

/* Eyebrow — glassy gradient pill with a live accent dot */
.imd-shead__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .72rem;
  letter-spacing: .1em;
  font-weight: 700;
  color: var(--imd-teal-800);
  background: linear-gradient(180deg, rgba(8, 138, 84, .10), rgba(8, 138, 84, .05));
  border: 1px solid rgba(8, 138, 84, .18);
  padding: 1rem;
  border-radius: 999px;
  margin-bottom: 2rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 8px 18px -14px rgba(8, 138, 84, .65);
}
.imd-shead__eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--imd-teal-600);
  box-shadow: 0 0 0 3px rgba(11, 174, 106, .18);
  animation: imd-shead-pulse 2.4s ease-in-out infinite;
}

/* Title — clamp-scaled, gradient highlight, short accent bar beneath */
.imd-shead__title {
  position: relative;
  display: block;
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  font-weight: 800;
  color: var(--imd-teal-900);
  line-height: 1.22;
  margin: 0;
  padding-bottom: 1.8rem;
  transition: filter .3s ease;
}
.imd-shead__title span {
  color: var(--imd-teal-700); /* fallback when background-clip:text isn't honored */
  background: linear-gradient(120deg, var(--imd-teal-700), var(--imd-teal-600), var(--imd-teal-700));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Keep the gradient intact when the span wraps onto a second line, and
     leave a little vertical room so Arabic glyphs aren't clipped. */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  /* Extend the gradient paint area above/below the line so the stacked
     Arabic marks (the dots of ث, the shadda) aren't cut off — with
     background-clip:text, marks outside this box have no gradient to show. */
  padding-block: 0.25em;
  margin-block: -0.25em;
}
.imd-shead__title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--imd-teal-700), var(--imd-teal-600));
}
.imd-shead__lead {
  color: var(--imd-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 1.1rem 0 0;
}

@keyframes imd-shead-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(11, 174, 106, .18); }
  50%      { box-shadow: 0 0 0 6px rgba(11, 174, 106, .04); }
}
/* Shine hover — a band of light glides across the highlighted words from
   right to left (following the Arabic reading direction), over a steady
   teal glow. No flicker. */
.imd-shead__title:hover { filter: drop-shadow(0 0 10px rgba(11, 174, 106, .45)); }
.imd-shead__title:hover span { animation: imd-shead-shine 2.6s linear infinite; }
.imd-shead--light .imd-shead__title:hover { filter: drop-shadow(0 0 12px rgba(217, 239, 227, .55)); }

@keyframes imd-shead-shine {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

@media (prefers-reduced-motion: reduce) {
  .imd-shead__eyebrow::before,
  .imd-shead__title:hover,
  .imd-shead__title:hover span { animation: none; }
}

/* Start-aligned — for headers inside 2-column sections */
.imd-shead--start {
  align-items: flex-start;
  text-align: start;
  max-width: none;
  margin-inline: 0;
  margin-block: 0 1.25rem;
  padding-inline: 0;
}
.imd-shead--start .imd-shead__title::after {
  left: auto;
  transform: none;
  inset-inline-start: 0;
}

/* On dark / teal backgrounds */
.imd-shead--light .imd-shead__eyebrow {
  color: #EAF6EF;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06));
  border-color: rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 18px -14px rgba(0, 0, 0, .45);
}
.imd-shead--light .imd-shead__eyebrow::before {
  background: var(--imd-teal-100);
  box-shadow: 0 0 0 3px rgba(217, 239, 227, .25);
}
.imd-shead--light .imd-shead__title { color: #fff; }
.imd-shead--light .imd-shead__title span {
  color: var(--imd-teal-100); /* fallback */
  background: linear-gradient(120deg, var(--imd-teal-100), #fff, var(--imd-teal-100));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-block: 0.25em;
  margin-block: -0.25em;
}
.imd-shead--light .imd-shead__title::after {
  background: linear-gradient(90deg, var(--imd-teal-100), #fff);
}

/* ---- Cards ------------------------------------------------------------- */
.imd-card {
  background: var(--imd-card);
  border: 1px solid var(--imd-line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(11,31,24,.04), 0 12px 28px -22px rgba(11,31,24,.45);
}
.imd-card-pad { padding: 1.5rem 1.6rem; }

.step-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--imd-teal-100); color: var(--imd-teal-700);
  display: grid; place-items: center; font-size: 1.5rem; margin-bottom: .9rem;
}
.step-num {
  position: absolute; left: 1.2rem; top: 1.2rem;
  font-weight: 800; color: var(--imd-sand-500); font-size: 1.2rem;
}
.imd-card { position: relative; }

/* ---- Category cards ---------------------------------------------------- */
.imd-cat-card {
  position: relative;
  background: #fff; border: 1px solid var(--imd-line); border-radius: 16px;
  height: 100%; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s ease, border-color .35s ease;
}
.imd-cat-card:hover {
  transform: translateY(-6px);
  border-color: var(--imd-teal-600);
  box-shadow: 0 26px 50px -26px rgba(11,31,24,.5);
}

/* media: real photo over a themed gradient, so a failed/removed <img> still
   shows a branded panel instead of a broken-image box */
.imd-cat-card__media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: linear-gradient(135deg, var(--imd-teal-700), var(--imd-teal-900));
}
.imd-cat-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .6s cubic-bezier(.2,.7,.3,1), filter .4s ease;
}
.imd-cat-card:hover .imd-cat-card__media img { transform: scale(1.08); }
/* legibility scrim that deepens on hover */
.imd-cat-card__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(11,31,24,0) 35%, rgba(11,31,24,.55) 100%);
  transition: background .4s ease;
}
.imd-cat-card:hover .imd-cat-card__media::after {
  background: linear-gradient(180deg, rgba(11,31,24,.12) 0%, rgba(11,31,24,.68) 100%);
}

/* icon badge straddling the media / body edge */
.imd-cat-card__icon {
  position: absolute; z-index: 2; bottom: -26px; inset-inline-start: 18px;
  width: 60px; height: 60px; border-radius: 16px;
  display: grid; place-items: center;
  background: #fff; color: var(--imd-teal-700); font-size: 1.65rem;
  box-shadow: 0 10px 24px -10px rgba(11,31,24,.45);
  transition: transform .35s cubic-bezier(.2,.7,.3,1), background .35s ease, color .35s ease;
}
.imd-cat-card:hover .imd-cat-card__icon {
  transform: translateY(-4px) rotate(-6deg);
  background: var(--imd-teal-700); color: #fff;
}

.imd-cat-card__body { padding: 2.4rem 1.4rem 1.6rem; text-align: start; }
.imd-cat-card__body h6 { font-weight: 700; font-size: 1.15rem; color: var(--imd-teal-900); margin-bottom: .45rem; }
.imd-cat-card__body small { font-size: .95rem; color: var(--imd-muted); line-height: 1.6; }

/* one large card per row on phones */
@media (max-width: 575.98px) {
  .imd-cat-card__media { aspect-ratio: 16 / 10; }
  .imd-cat-card__icon { width: 64px; height: 64px; font-size: 1.8rem; }
  .imd-cat-card__body { padding: 2.6rem 1.5rem 1.8rem; }
  .imd-cat-card__body h6 { font-size: 1.25rem; }
  .imd-cat-card__body small { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .imd-cat-card,
  .imd-cat-card__media img,
  .imd-cat-card__icon,
  .imd-cat-card__media::after { transition: none; }
  .imd-cat-card:hover,
  .imd-cat-card:hover .imd-cat-card__media img,
  .imd-cat-card:hover .imd-cat-card__icon { transform: none; }
}

/* ---- Check list -------------------------------------------------------- */
.imd-check-list { list-style: none; padding: 0; margin: 0; }
.imd-check-list li {
  padding: .55rem 0; display: flex; gap: .6rem; align-items: flex-start; color: var(--imd-ink);
}
.imd-check-list li i { color: var(--imd-teal-600); font-size: 1.2rem; flex-shrink: 0; }

/* ---- Illustration blocks ---------------------------------------------- */
.imd-illu {
  background: #fff; border: 1px solid var(--imd-line); border-radius: 18px;
  padding: 1rem 1.25rem;
  box-shadow: 0 16px 40px -24px rgba(11,31,24,.45);
}
.illu-row {
  display: flex; align-items: center; gap: .65rem;
  padding: .85rem .25rem; border-bottom: 1px dashed var(--imd-line); font-weight: 500;
}
.illu-row:last-child { border-bottom: 0; }
.illu-row i {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: var(--imd-teal-100); color: var(--imd-teal-700);
  display: grid; place-items: center;
}
.illu-row.best i { background: var(--imd-sand-100); color: var(--imd-sand-600); }

/* ---- Badges (status) — same as app ------------------------------------ */
.imd-badge {
  font-size: .76rem; font-weight: 700; padding: .28rem .6rem; border-radius: 8px;
  border: 1px solid transparent;
}
.imd-badge.open       { background: var(--imd-teal-100); color: var(--imd-teal-900); border-color:#B7D4C9; }
.imd-badge.awarded    { background: var(--imd-sand-100); color: var(--imd-sand-600); border-color:#B7D4C9; }
.imd-badge.inprogress { background:#e3effa; color:#1c5a90; border-color:#c6ddf2; }

/* ============================================================
   Buyer Journey Timeline — replaces the buyer illustration card.
   Editorial RTL horizontal timeline (steps left→right, node above
   the text): a brand spine fills on scroll (RTL, from the right),
   nodes stagger in, the "best offer" node breathes, and the final
   "awarded" node self-draws a check. Collapses back to a vertical
   timeline on phones (≤575.98px).
   Everything is scoped under .imd-timeline so the sibling
   supplier card is untouched. Reveal driven by a tiny IO snippet
   (adds .js then .in-view); degrades to fully-visible without JS.
   ============================================================ */
.imd-timeline {
  --tl-g900: var(--imd-teal-900, #044C2F);
  --tl-g700: var(--imd-teal-700, #088A54);
  --tl-g600: var(--imd-teal-600, #0BAE6A);
  --tl-g100: var(--imd-teal-100, #D9EFE3);
  --tl-ink:  var(--imd-ink, #0B1F18);
  --tl-muted:var(--imd-muted, #5B6B65);
  --tl-line: var(--imd-line, #E6E3D9);

  position: relative; direction: rtl;
  font-family: 'Tajawal', system-ui, sans-serif;
  background: #fff;
  border: 1px solid var(--tl-line);
  border-radius: 18px;
  box-shadow: 0 16px 40px -24px rgba(11, 31, 24, .45);
  padding: 1.35rem 1.4rem 1.2rem;
  overflow: hidden;
}
.imd-timeline::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 100% 0%, rgba(11, 174, 106, .07), transparent 55%);
}

/* ---- Header ------------------------------------------------ */
.imd-tl-topbar {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin-bottom: 1.05rem;
}
.imd-tl-kicker {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 800; color: var(--tl-g700);
  background: var(--tl-g100); border: 1px solid #B7D4C9;
  padding: .34rem .72rem; border-radius: 999px;
}
.imd-tl-kicker i { font-size: .92rem; }
.imd-tl-count {
  display: inline-flex; align-items: center; gap: .32rem;
  font-size: .78rem; font-weight: 700; color: var(--tl-muted);
}
.imd-tl-count i { color: var(--tl-g600); font-size: .9rem; }

/* ---- Track + flowing spine (horizontal) -------------------- */
.imd-tl-track {
  position: relative;
  display: flex; align-items: flex-start; gap: 1rem;
}
.imd-tl-spine {
  position: absolute; z-index: 0;
  left: calc(.55rem + 23px); right: calc(.55rem + 23px);
  top: calc(23px - 1.5px);            /* centre the 3px spine on the 46px node row */
  height: 3px; border-radius: 3px;
  background: var(--tl-line); overflow: hidden;
}
.imd-tl-flow {
  position: absolute; inset: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--tl-g600), var(--tl-g700) 60%, var(--tl-g900));
  transform: scaleX(1); transform-origin: right center;   /* no-JS: spine pre-filled (RTL → fills from right) */
}

/* ---- Steps (stacked: node above, body below) --------------- */
.imd-tl-step {
  position: relative; z-index: 1;
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: .6rem;
  padding: .55rem 0;
}

/* ---- Node token ------------------------------------------- */
.imd-tl-node {
  position: relative; flex: 0 0 auto;
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--tl-g100); color: var(--tl-g700); font-size: 1.15rem;
  box-shadow: inset 0 0 0 1px rgba(8, 138, 84, .14), 0 6px 14px -10px rgba(4, 76, 47, .6);
  transition: transform .28s cubic-bezier(.2, .7, .3, 1), box-shadow .28s ease, color .28s ease;
}
.imd-tl-node i {
  line-height: 1; display: block;
  transition: transform .28s cubic-bezier(.2, .7, .3, 1);
}

/* ---- Hover interaction ------------------------------------- */
.imd-tl-step { cursor: default; transition: transform .28s cubic-bezier(.2, .7, .3, 1); }
.imd-tl-title,
.imd-tl-meta { transition: color .28s ease; }

.imd-tl-step:hover { transform: translateY(-4px); }
.imd-tl-step:hover .imd-tl-node {
  transform: translateY(-3px) scale(1.06);
  box-shadow: inset 0 0 0 1px rgba(8, 138, 84, .2), 0 16px 30px -14px rgba(4, 76, 47, .8);
}
.imd-tl-step:hover .imd-tl-node i { transform: scale(1.08) rotate(-3deg); }
.imd-tl-step:hover .imd-tl-title { color: var(--tl-g700); }
.imd-tl-step:hover .imd-tl-meta  { color: var(--tl-g600); }

/* filled nodes get a deeper, brand-tinted lift */
.is-best .imd-tl-step:hover .imd-tl-node,
.imd-tl-step.is-best:hover .imd-tl-node,
.imd-tl-step.is-done:hover .imd-tl-node {
  box-shadow: 0 18px 34px -14px rgba(8, 138, 84, .9);
}

/* best-offer node: filled gradient + breathing ring */
.is-best .imd-tl-node {
  background: linear-gradient(145deg, var(--tl-g600), var(--tl-g700));
  color: #fff; box-shadow: 0 10px 22px -10px rgba(8, 138, 84, .75);
}
.imd-tl-ring {
  position: absolute; inset: 0; border-radius: 13px;
  border: 2px solid var(--tl-g600); opacity: 0;
  animation: imd-tl-pulse 2.1s ease-out infinite;
}
@keyframes imd-tl-pulse {
  0%   { transform: scale(1);    opacity: .55; }
  70%  { transform: scale(1.42); opacity: 0; }
  100% { transform: scale(1.42); opacity: 0; }
}

/* awarded node: green; clipboard fades as the check self-draws */
.is-done .imd-tl-node { background: var(--tl-g700); color: #fff; }
.is-done .imd-tl-node i { transition: opacity .3s ease; }
.imd-tl-check { position: absolute; width: 26px; height: 26px; color: #fff; }
.imd-tl-check path { stroke-dasharray: 30; stroke-dashoffset: 30; }

/* ---- Text -------------------------------------------------- */
.imd-tl-body { min-width: 0; width: 100%; }
.imd-tl-head {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
}
.imd-tl-title {
  font-weight: 700; color: var(--tl-ink); font-size: 1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.is-best .imd-tl-title { color: var(--tl-g900); }
.imd-tl-meta {
  font-size: .82rem; color: var(--tl-muted);
  font-weight: 500; white-space: nowrap;
}

/* gradient price chip — the monetary payoff focal point */
.imd-tl-value {
  display: inline-flex; align-items: baseline; gap: .28rem;
  background: linear-gradient(135deg, var(--tl-g700), var(--tl-g900));
  color: #fff; font-weight: 800; font-size: .95rem;
  padding: .32rem .62rem; border-radius: 10px; white-space: nowrap;
  box-shadow: 0 9px 20px -10px rgba(8, 138, 84, .75);
}
.imd-tl-cur { font-size: .72rem; font-weight: 600; opacity: .85; }

/* ---- Status pills ----------------------------------------- */
.imd-tl-pill {
  font-size: .74rem; font-weight: 700;
  padding: .26rem .6rem; border-radius: 8px; border: 1px solid transparent; white-space: nowrap;
}
.imd-tl-pill.open    { background: var(--tl-g100); color: var(--tl-g900); border-color: #B7D4C9; }
.imd-tl-pill.awarded { background: var(--tl-g700); color: #fff; border-color: var(--tl-g700); }

/* ---- Scroll reveal: JS adds .js (arms) then .in-view (plays) */
.imd-timeline.js .imd-tl-step { opacity: 0; transform: translateY(14px); }
.imd-timeline.js .imd-tl-flow { transform: scaleX(0); }
.imd-timeline.js .imd-tl-ring { animation-play-state: paused; }

.imd-timeline.js.in-view .imd-tl-step {
  opacity: 1; transform: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .3, 1);
  transition-delay: calc(var(--i) * .14s);
}
.imd-timeline.js.in-view .imd-tl-flow {
  transform: scaleX(1);
  transition: transform 1.1s cubic-bezier(.22, .61, .36, 1) .15s;
}
.imd-timeline.js.in-view .imd-tl-ring { animation-play-state: running; }
.imd-timeline.js.in-view .is-done .imd-tl-node i { opacity: 0; }
.imd-timeline.js.in-view .imd-tl-check path {
  animation: imd-tl-draw .55s ease forwards;
  animation-delay: calc((var(--i) * .14s) + .4s);
}
@keyframes imd-tl-draw { to { stroke-dashoffset: 0; } }

/* ---- Responsive: stack back to a vertical timeline on phones */
@media (max-width: 575.98px) {
  .imd-timeline { padding: 1.1rem 1.05rem .95rem; }

  /* vertical track + spine */
  .imd-tl-track { flex-direction: column; align-items: stretch; gap: 0; }
  .imd-tl-spine {
    left: auto; top: calc(.55rem + 21px); bottom: calc(.55rem + 21px);
    right: calc(21px - 1.5px); width: 3px; height: auto;
  }
  .imd-tl-flow {
    background: linear-gradient(180deg, var(--tl-g600), var(--tl-g700) 60%, var(--tl-g900));
    transform: scaleY(1); transform-origin: top center;
  }

  /* steps: node beside the text again */
  .imd-tl-step {
    flex: 0 0 auto; flex-direction: row; align-items: center; text-align: right;
    gap: .85rem; padding: .55rem 0;
  }
  .imd-tl-step + .imd-tl-step {
    border-top: 1px dashed var(--tl-line);
    margin-top: .15rem; padding-top: .8rem;
  }
  .imd-tl-body { flex: 1 1 auto; }
  .imd-tl-head { flex-direction: row; align-items: center; gap: .5rem; }
  .imd-tl-meta, .imd-tl-value, .imd-tl-pill { margin-inline-start: auto; }

  /* drive the fill vertically again */
  .imd-timeline.js .imd-tl-flow { transform: scaleY(0); }
  .imd-timeline.js.in-view .imd-tl-flow { transform: scaleY(1); }

  .imd-tl-node  { width: 42px; height: 42px; border-radius: 12px; font-size: 1.05rem; }
  .imd-tl-title { font-size: .95rem; }
}

/* ---- Reduced motion: snap to the finished state, no motion -- */
@media (prefers-reduced-motion: reduce) {
  .imd-tl-flow { transform: scaleX(1) !important; }
  .imd-tl-ring { animation: none; opacity: 0; }
  .imd-timeline.js .imd-tl-step,
  .imd-timeline.js.in-view .imd-tl-step { opacity: 1; transform: none; transition: none; }
  .imd-timeline.js.in-view .imd-tl-flow { transition: none; }
  .is-done .imd-tl-node i { opacity: 0; }
  .imd-tl-check path { stroke-dashoffset: 0; animation: none !important; }

  /* keep hover feedback as a colour shift only — no movement */
  .imd-tl-step:hover,
  .imd-tl-step:hover .imd-tl-node,
  .imd-tl-step:hover .imd-tl-node i { transform: none !important; }
}

/* Buyers + Suppliers sections: replace sand/yellow accents with teal (brand green) */
#buyers .imd-eyebrow,
#suppliers .imd-eyebrow { color: var(--imd-teal-700); }
#buyers .illu-row.best i,
#suppliers .illu-row.best i { background: var(--imd-teal-100); color: var(--imd-teal-700); }
#buyers .imd-badge.awarded,
#suppliers .imd-badge.awarded { background: var(--imd-teal-100); color: var(--imd-teal-900); border-color:#B7D4C9; }

/* ---- Buttons (sand override) ------------------------------------------ */
.btn-primary {
  --bs-btn-bg: var(--imd-teal-700); --bs-btn-border-color: var(--imd-teal-700);
  --bs-btn-hover-bg: var(--imd-teal-900); --bs-btn-hover-border-color: var(--imd-teal-900);
  --bs-btn-active-bg: var(--imd-teal-900);
  font-weight: 600;
}
.btn-sand {
  background: var(--imd-sand-500); border: 1px solid var(--imd-sand-600);
  color: var(--imd-teal-900); font-weight: 700;
}
.btn-sand:hover { background: var(--imd-sand-600); color: #fff; }
.btn-outline-primary {
  --bs-btn-color: var(--imd-teal-700); --bs-btn-border-color: var(--imd-teal-600);
  --bs-btn-hover-bg: var(--imd-teal-700); --bs-btn-hover-border-color: var(--imd-teal-700);
}
/* Contact email button: keep outline look on click/active/focus (no fill flash) */
#contact .btn-outline-primary:active,
#contact .btn-outline-primary.active,
#contact .btn-outline-primary:focus,
#contact .btn-outline-primary:focus-visible {
  background-color: transparent;
  color: var(--imd-teal-700);
  border-color: var(--imd-teal-600);
  box-shadow: none;
}
.btn-outline-light { font-weight: 600; }

/* ---- Saudi cities on jsVectorMap (contact section) --------------------- */
.sa-vector-map {
  width: 100%;
  height: 460px;
  border-radius: 12px;
  background: var(--imd-paper);
  overflow: hidden;
}
.jvm-tooltip {
  background: var(--imd-teal-900) !important; color: #fff;
  border: 0; border-radius: 6px;
  padding: .25rem .55rem; font-size: .8rem; font-family: inherit;
}
.jvm-zoom-btn {
  background: var(--imd-teal-700) !important; color: #fff;
}

/* ---- Forms ------------------------------------------------------------- */
.form-control, .form-select {
  border-radius: 11px; border-color: var(--imd-line); padding: .6rem .85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--imd-teal-600);
  box-shadow: 0 0 0 .2rem rgba(11,174,106,.15);
}
.form-label { font-weight: 600; font-size: .9rem; color: var(--imd-teal-900); }

/* ---- FAQ accordion ----------------------------------------------------- */
.imd-accordion .accordion-item {
  border: 1px solid var(--imd-line); border-radius: 12px !important;
  margin-bottom: .75rem; overflow: hidden;
}
.imd-accordion .accordion-button {
  font-weight: 600; color: var(--imd-teal-900); background: #fff;
}
.imd-accordion .accordion-button:not(.collapsed) {
  background: var(--imd-teal-100); color: var(--imd-teal-900); box-shadow: none;
}
.imd-accordion .accordion-button:focus { box-shadow: none; border-color: var(--imd-teal-600); }

/* ---- Footer ------------------------------------------------------------
   Footer styles moved to the shared /app/css/chrome.css (single source of
   truth, used by both this landing page and the /app/ SPA). */

/* ---- Hero carousel + photo overlay (luxury feel) ---------------------- */
.imd-hero-carousel { border-radius: 22px; overflow: hidden; }
.imd-hero-photo {
  position: relative;
  background:
    linear-gradient(135deg, rgba(4,76,47,.62), rgba(6,109,67,.52) 65%, rgba(4,76,47,.60)),
    url("https://images.unsplash.com/photo-1497366216548-37526070297c?w=1800&q=80") center/cover no-repeat;
  min-height: 460px;
}
.imd-hero-photo::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(900px 500px at 90% 20%, rgba(11,174,106,.15), transparent 60%);
  pointer-events: none;
}
.imd-hero-slide-2 {
  background:
    linear-gradient(135deg, rgba(4,76,47,.61), rgba(6,109,67,.50) 65%, rgba(4,76,47,.60)),
    url("https://images.unsplash.com/photo-1582407947304-fd86f028f716?w=1800&q=80") center/cover no-repeat;
}
.imd-hero-slide-3 {
  background:
    linear-gradient(135deg, rgba(4,76,47,.63), rgba(6,109,67,.52) 65%, rgba(4,76,47,.62)),
    url("https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?w=1800&q=80") center/cover no-repeat;
}

/* Carousel controls + indicators tuned to brand */
.imd-carousel-indicators { bottom: .5rem; margin-bottom: 0; }
.imd-carousel-indicators button {
  width: 28px !important; height: 4px !important; border-radius: 2px;
  background-color: rgba(255,255,255,.4) !important;
  border: 0;
}
.imd-carousel-indicators .active { background-color: var(--imd-sand-500) !important; }
.imd-carousel-ctrl {
  width: 7%; opacity: .65;
}
.imd-carousel-ctrl:hover { opacity: 1; }
.imd-carousel-ctrl .carousel-control-prev-icon,
.imd-carousel-ctrl .carousel-control-next-icon {
  background-color: rgba(4,76,47,.35);
  border-radius: 999px;
  width: 38px; height: 38px;
  background-size: 18px;
  background-position: center;
}
/* In RTL: prev points RIGHT (backward in reading direction),
   next points LEFT (forward in reading direction). */
[dir="rtl"] .carousel-control-prev-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}
[dir="rtl"] .carousel-control-next-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
}

/* City list + step list inside hero cards */
.hero-city {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem 0; border-bottom: 1px dashed var(--imd-line);
  font-size: .95rem;
}
.hero-city:last-child { border-bottom: 0; }
.hero-city i { font-size: 1.05rem; }
.hero-city span { font-weight: 700; color: var(--imd-teal-900); }
.hero-city small { color: var(--imd-muted); margin-inline-start: auto; font-size: .8rem; }

.hero-step {
  display: flex; align-items: center; gap: .75rem;
  padding: .55rem 0; border-bottom: 1px dashed var(--imd-line);
}
.hero-step:last-child { border-bottom: 0; }
.hero-step .step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--imd-teal-100); color: var(--imd-teal-700);
  display: grid; place-items: center; font-weight: 800; font-size: .9rem;
  flex-shrink: 0;
}
.hero-step.active .step-dot { background: var(--imd-sand-500); color: var(--imd-teal-900); }
.hero-step strong { display: block; color: var(--imd-teal-900); font-size: .95rem; line-height: 1.2; }
.hero-step small { color: var(--imd-muted); font-size: .78rem; }

/* ---- Hero carousel: white-out all gold/sand accents -------------------
   Scoped overrides — only the .imd-hero-wrap section uses white where the
   rest of the page keeps the champagne-gold accent. */
.imd-hero-wrap .imd-eyebrow-light,
.imd-hero-wrap .text-sand { color: #fff !important; }

.imd-hero-wrap .btn-sand {
  background: #fff;
  border-color: #fff;
  color: var(--imd-teal-900);
}
.imd-hero-wrap .btn-sand:hover {
  background: rgba(255,255,255,.88);
  border-color: rgba(255,255,255,.88);
  color: var(--imd-teal-900);
}

.imd-hero-wrap .imd-pill-best,
.imd-hero-wrap .imd-badge.awarded {
  background: #fff;
  color: var(--imd-teal-900);
  border-color: #fff;
}

.imd-hero-wrap .imd-carousel-indicators .active { background-color: #fff !important; }

.imd-hero-wrap .hero-step.active .step-dot {
  background: #fff;
  color: var(--imd-teal-900);
}

/* ---- Brands marquee --------------------------------------------------- */
.imd-brands { padding: 3.5rem 0 4rem; background: #fff; border-block: 1px solid var(--imd-line); }
.imd-brands-heading {
  text-align: center; color: var(--imd-teal-900);
  font-weight: 500; margin-bottom: 1.75rem; font-size: 1.5rem;
}
.imd-brands-heading b { color: var(--imd-sand-600); font-weight: 700; }
.imd-brands-track-wrap {
  overflow: hidden; position: relative;
  margin: 20px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.imd-brands-track {
  display: flex; gap: 1.25rem; width: max-content;
  animation: imdBrandsScroll 45s linear infinite;
}
.imd-brands-track-wrap:hover .imd-brands-track { animation-play-state: paused; }
.brand-card {
  flex: 0 0 auto;
  /* Card height is the single knob: the logo fills the space above the name, the name is pinned
     below — so the logo can never push the name out, whatever its aspect ratio. Want a bigger
     logo? Increase this height. */
  min-width: 200px; height: 150px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--imd-line);
  border-radius: 14px;
  padding: 14px 1.25rem;
  margin: 20px;
  background: #fff;
  color: var(--imd-teal-900);
  font-weight: 600;
  font-size: 1rem;
  font-family: "Tajawal", sans-serif;
  letter-spacing: .2px;
  text-align: center;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  direction: rtl;
}
/* Name-only wordmark (vendors without a logo) keeps the brand gradient. */
.brand-card span {
  display: inline-block;
  background: linear-gradient(135deg, var(--imd-sand-600), var(--imd-sand-500));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-weight: 800;
  font-size: 1.15rem;
  margin-inline-start: .35rem;
}
.brand-card img {
  /* Fill the area above the name; shrink to fit, never overflow (min-height:0 enables shrink). */
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%; max-width: 160px;
  object-fit: contain;
}
/* The vendor name shown UNDER an uploaded logo: solid, readable (overrides the gradient span),
   and pinned (never shrinks) so it's always visible. */
.brand-card .brand-name {
  flex: 0 0 auto;
  background: none;
  -webkit-background-clip: border-box; background-clip: border-box;
  color: var(--imd-teal-900);
  font-size: .9rem; font-weight: 700;
  max-width: 175px; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-card:hover {
  border-color: var(--imd-sand-500);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -16px rgba(4,76,47,.45);
}
@keyframes imdBrandsScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (max-width: 576px) {
  .brand-card { min-width: 160px; height: 124px; font-size: .9rem; }
  .brand-card img { max-width: 130px; }
  .brand-card .brand-name { font-size: .82rem; max-width: 140px; }
  .brand-card span { font-size: 1.05rem; }
}

/* ---- Trust band (image + features) ------------------------------------ */
.imd-trustband { padding: 4rem 0; background: #fff; border-block: 1px solid var(--imd-line); }
.imd-photo-frame {
  position: relative; border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(4,76,47,.55), 0 4px 12px rgba(4,76,47,.1);
  border: 1px solid var(--imd-line);
}
.imd-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4/3; }
.imd-photo-frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(4,76,47,.25), transparent 45%);
  pointer-events: none;
}
.imd-photo-tag {
  position: absolute; inset-inline-end: 1rem; inset-block-end: 1rem;
  background: rgba(255,255,255,.95); color: var(--imd-teal-900);
  border: 1px solid var(--imd-line); border-radius: 12px;
  padding: .5rem .85rem; font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; gap: .5rem;
  box-shadow: 0 10px 25px -10px rgba(4,76,47,.45);
}
.imd-photo-tag i { color: var(--imd-sand-600); }

.imd-feature {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: .85rem 1rem;
  border: 1px solid var(--imd-line); border-radius: 12px; background: #fff;
  transition: border-color .2s, transform .15s;
}
.imd-feature:hover { border-color: var(--imd-teal-600); transform: translateY(-2px); }
.imd-feature i {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px;
  background: var(--imd-teal-100); color: var(--imd-teal-700);
  display: grid; place-items: center; font-size: 1.15rem;
}
.imd-feature strong { display: block; color: var(--imd-teal-900); font-weight: 700; }
.imd-feature small { color: var(--imd-muted); }

/* ---- App stores — coming soon ----------------------------------------- */
.imd-appsoon { padding: 4rem 0; }
.imd-appsoon-card {
  background:
    linear-gradient(135deg, var(--imd-teal-900) 0%, var(--imd-teal-700) 70%);
  color: #F0F5F1;
  border-radius: 24px;
  padding: 2.5rem 2rem;
  position: relative; overflow: hidden;
  box-shadow: 0 25px 60px -25px rgba(4,76,47,.65);
  margin: 0;
}
.imd-appsoon-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(11,174,106,.22), transparent 60%),
    radial-gradient(500px 300px at 100% 100%, rgba(11,174,106,.18), transparent 55%);
  pointer-events: none;
}
.imd-appsoon-card > * { position: relative; z-index: 1; }
.imd-section-title-light { font-weight: 800; color: #fff; }
.opacity-85 { opacity: .85; }

.imd-store-badge {
  display: inline-flex; align-items: center; gap: .75rem;
  background: #2C2F36; color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: .55rem 1.1rem;
  text-decoration: none; min-width: 200px;
  transition: transform .15s, border-color .2s, background .2s;
  position: relative;
}
.imd-store-badge:hover {
  transform: translateY(-2px);
  background: #3a3e47; border-color: rgba(255,255,255,.18); color: #fff;
}
.imd-store-badge .store-ico { width: 30px; height: 30px; flex-shrink: 0; }
.imd-store-badge small { display: block; font-size: .7rem; opacity: .75; line-height: 1; }
.imd-store-badge strong { display: block; font-size: 1.1rem; font-weight: 700; line-height: 1.2; margin-top: .15rem; }
.imd-soon-pill {
  position: absolute; top: -8px; inset-inline-end: -8px;
  background: var(--imd-sand-500); color: var(--imd-teal-900);
  font-size: .7rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px;
  border: 2px solid var(--imd-teal-900);
}

.imd-phone-mock {
  display: inline-block; padding: 14px 14px 18px;
  background: linear-gradient(160deg, #1c2926, #0a1413);
  border-radius: 36px;
  box-shadow:
    0 30px 70px -30px rgba(0,0,0,.7),
    inset 0 0 0 2px rgba(11,174,106,.25);
  position: relative;
}
.imd-phone-mock::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 6px; border-radius: 4px; background: #0a0a0a;
}
.imd-phone-screen {
  background: var(--imd-paper); border-radius: 26px;
  padding: 1.75rem 1rem 1.25rem; min-width: 260px; max-width: 280px;
  text-align: start;
}
.phone-row {
  display: flex; gap: .65rem; align-items: flex-start;
  padding: .7rem .15rem; border-bottom: 1px dashed var(--imd-line);
}
.phone-row:last-child { border-bottom: 0; }
.phone-row .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .45rem; flex-shrink: 0; }
.phone-row .dot.teal { background: var(--imd-teal-600); }
.phone-row .dot.sand { background: var(--imd-sand-500); }
.phone-row .dot.green { background: #1f7a52; }
.phone-row strong { display: block; color: var(--imd-teal-900); font-size: .92rem; }
.phone-row small { color: var(--imd-muted); font-size: .78rem; }

/* ---- Floating WhatsApp FAB (icon-only, fixed visual left) ------------- */
.imd-wa-fab {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 1080;
  width: 56px;
  height: 56px;
  display: inline-grid; place-items: center;
  background: #25D366;
  color: #fff !important;
  text-decoration: none;
  border-radius: 50%;
  box-shadow: 0 12px 30px -8px rgba(37,211,102,.55), 0 4px 10px rgba(0,0,0,.18);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.imd-wa-fab:hover {
  background: #1ebe5b; color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -10px rgba(37,211,102,.7), 0 6px 14px rgba(0,0,0,.22);
}
.imd-wa-icon { display: inline-grid; place-items: center; }
.imd-wa-pulse {
  position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37,211,102,.55);
  animation: imdWaPulse 2s infinite;
  pointer-events: none;
}
@keyframes imdWaPulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,.55); }
  70%  { box-shadow: 0 0 0 18px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ---- Floating "back to top" FAB (right side) -------------------------- */
.imd-top-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1080;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--imd-teal-700);
  color: #fff !important;
  border: 0; cursor: pointer;
  text-decoration: none;
  border-radius: 50%;
  font-size: 1.4rem;
  box-shadow: 0 12px 30px -8px rgba(8,138,84,.55), 0 4px 10px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s, visibility .25s, transform .25s, background .2s, box-shadow .2s;
}
.imd-top-fab.is-visible {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.imd-top-fab:hover {
  background: var(--imd-teal-900);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -10px rgba(8,138,84,.7), 0 6px 14px rgba(0,0,0,.22);
}
/* Scroll-progress ring drawn around the back-to-top icon */
.imd-top-ring {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transform: rotate(-90deg);  /* start the stroke at 12 o'clock */
  pointer-events: none;
}
.imd-top-ring circle { fill: none; stroke-width: 3; }
.imd-top-ring-bg   { stroke: rgba(255,255,255,.22); }
.imd-top-ring-fill {
  stroke: #fff;
  stroke-linecap: round;
  transition: stroke-dashoffset .12s linear;
}
.imd-top-fab i { position: relative; z-index: 1; }

/* ---- Luxury full-bleed hero (Swiper) ----------------------------------
   Hero is pinned to the visible viewport (height minus sticky nav) so
   the whole slide — image, caption, pagination, scroll cue — fits
   without scroll. The image is shown fully via `contain`; the side
   bars left over when the viewport ratio differs from the image's
   3:2 are filled with a softly blurred copy of the same image
   (see .slide-bg::before below) so the letterbox visually disappears. */
.imd-hero-bleed {
  position: relative;
  width: 100%;
  height: calc(100vh - 76px);
  height: calc(100svh - 76px);
  max-height: 1080px;
  min-height: 480px;
  overflow: hidden;
  background: var(--imd-teal-900);
  margin: 0;
  padding: 0;
}
.imd-hero-bleed .swiper,
.imd-hero-bleed .swiper-wrapper,
.imd-hero-bleed .swiper-slide {
  width: 100%;
  height: 100%;
}
.imd-hero-bleed .swiper-slide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* The inline `background-image` set on .slide-bg cascades to the two
   pseudos below via `inherit`. The source element itself paints
   nothing (background-size: 0 hides its own copy of the image);
   ::before renders the soft-blurred backdrop, ::after renders the
   sharp `contain`-fitted image on top. Source order (::before paints
   first, ::after paints after) keeps the sharp image on top — no
   need for negative z-index. */
.imd-hero-bleed .slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--imd-teal-900);
  background-size: 0;
  background-repeat: no-repeat;
}
.imd-hero-bleed .slide-bg::before {
  content: "";
  position: absolute;
  inset: -8%;
  background-image: inherit;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  filter: blur(42px) brightness(.55) saturate(1.1);
}
.imd-hero-bleed .slide-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: inherit;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Slide entry — blurred backdrop blooms in, sharp image emerges with
   a focus pull (scale up + blur→0). Runs whenever a slide becomes
   active, so it replays each time the carousel loops back. */
.imd-hero-bleed .swiper-slide-active .slide-bg::before {
  animation: imdBlurBloom 2.8s cubic-bezier(.2, .65, .25, 1) both;
}
.imd-hero-bleed .swiper-slide-active .slide-bg::after {
  animation: imdImgFocus 3.2s .35s cubic-bezier(.2, .65, .25, 1) both;
}
@keyframes imdBlurBloom {
  0%   { opacity: 0; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes imdImgFocus {
  0%   { opacity: 0; transform: scale(.94); filter: blur(10px); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1);   filter: blur(0); }
}

/* Localized scrim — dark only in the caption corner so the
   explainer's central content stays bright and readable. */
.imd-hero-bleed .slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(620px 420px at 95% 95%, rgba(0, 0, 0, .6), transparent 70%),
    linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .25));
  pointer-events: none;
}

/* Slide content — small caption pinned to the bottom-start corner */
.imd-hero-bleed .slide-content {
  position: absolute;
  z-index: 2;
  bottom: 88px;
  inset-inline-start: 5%;
  max-width: 460px;
  color: #F4F8F4;
  text-align: start;
}
.imd-hero-bleed .slide-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .7rem;
  font-weight: 700;
  color: var(--imd-sand-500);
  padding: .35rem .85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(201, 169, 97, .4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(16px);
}
.imd-hero-bleed .slide-title {
  font-weight: 800;
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -.3px;
  margin: 0 0 1rem;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .5);
  opacity: 0;
  transform: translateY(20px);
}
.imd-hero-bleed .slide-title em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(120deg, var(--imd-sand-500) 0%, #D9EFE3 50%, var(--imd-sand-500) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: imdShine 7s linear infinite;
}
@keyframes imdShine {
  to { background-position: 220% center; }
}
.imd-hero-bleed .slide-cta {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--imd-sand-500);
  text-decoration: none;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--imd-sand-500);
  transition: gap .25s ease, color .2s ease, border-color .2s ease;
  opacity: 0;
  transform: translateY(20px);
}
.imd-hero-bleed .slide-cta:hover {
  color: #D9EFE3;
  border-color: #D9EFE3;
  gap: .9rem;
}
.imd-hero-bleed .slide-cta i { font-size: 1.05rem; }

/* Staggered reveal when slide becomes active */
.imd-hero-bleed .swiper-slide-active .slide-eyebrow { animation: imdReveal 1.4s 1.2s ease-out forwards; }
.imd-hero-bleed .swiper-slide-active .slide-title   { animation: imdReveal 1.5s 1.5s ease-out forwards; }
.imd-hero-bleed .swiper-slide-active .slide-cta     { animation: imdReveal 1.5s 1.9s ease-out forwards; }
@keyframes imdReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* Pagination — sand accents */
.imd-hero-bleed .swiper-pagination {
  bottom: 32px !important;
}
.imd-hero-bleed .swiper-pagination-bullet {
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,.35);
  opacity: 1;
  margin: 0 5px !important;
  transition: background .3s, width .3s;
}
.imd-hero-bleed .swiper-pagination-bullet-active {
  background: var(--imd-sand-500);
  width: 52px;
}

/* Nav arrows — glassy circle */
.imd-hero-bleed .swiper-button-prev,
.imd-hero-bleed .swiper-button-next {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  transition: background .25s, border-color .25s, transform .25s, color .25s;
  top: 50%;
  margin-top: -27px;
}
.imd-hero-bleed .swiper-button-prev { left: 28px; right: auto; }
.imd-hero-bleed .swiper-button-next { right: 28px; left: auto; }
.imd-hero-bleed .swiper-button-prev:hover,
.imd-hero-bleed .swiper-button-next:hover {
  background: var(--imd-sand-500);
  border-color: var(--imd-sand-500);
  color: var(--imd-teal-900);
  transform: scale(1.08);
}
.imd-hero-bleed .swiper-button-prev::after,
.imd-hero-bleed .swiper-button-next::after {
  font-size: 18px;
  font-weight: 800;
}

/* Scroll cue */
.imd-hero-scroll-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  color: rgba(255,255,255,.75);
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  animation: imdHeroCue 2.6s ease-in-out infinite;
}
.imd-hero-scroll-cue:hover { color: var(--imd-sand-500); }
.imd-hero-scroll-cue .cue-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, transparent, var(--imd-sand-500));
}
.imd-hero-scroll-cue i { font-size: .9rem; color: var(--imd-sand-500); }
@keyframes imdHeroCue {
  0%, 100% { transform: translate(-50%, 0); opacity: .9; }
  50%      { transform: translate(-50%, 8px); opacity: .55; }
}

@media (max-width: 991.98px) {
  .imd-hero-bleed .swiper-button-prev,
  .imd-hero-bleed .swiper-button-next { display: none; }
}
@media (max-width: 576px) {
  .imd-hero-bleed { min-height: 480px; }
  .imd-hero-bleed .slide-content {
    bottom: 70px;
    inset-inline-start: 5%;
    inset-inline-end: 5%;
    max-width: none;
  }
  .imd-hero-scroll-cue { bottom: 56px; font-size: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .imd-hero-bleed .slide-title em,
  .imd-hero-scroll-cue,
  .imd-hero-bleed .swiper-slide-active .slide-bg::before,
  .imd-hero-bleed .swiper-slide-active .slide-bg::after,
  .imd-hero-bleed .swiper-slide-active .slide-eyebrow,
  .imd-hero-bleed .swiper-slide-active .slide-title,
  .imd-hero-bleed .swiper-slide-active .slide-cta {
    animation: none !important;
  }
  .imd-hero-bleed .slide-eyebrow,
  .imd-hero-bleed .slide-title,
  .imd-hero-bleed .slide-cta { opacity: 1; transform: none; }
}

/* ======================================================================
   PARALLAX INTERSTITIAL  —  full-bleed divider between two sections.
   A calm band with a small line of text + a CTA button over a background
   image (or video) that drifts as the page scrolls.
   Works without JS (static cover image); JS adds the drift on top.
   ====================================================================== */
.imd-parallax {
  position: relative;
  overflow: hidden;                 /* clip the oversized, drifting media */
  isolation: isolate;               /* keep the overlay/media z-index local */
  min-height: clamp(520px, 72vh, 760px);
  display: grid;
  place-items: center;
  color: #fff;
}

/* The media layer is taller than the band so vertical drift never
   reveals an edge. JS sets --py (px); CSS falls back to centered. */
.imd-parallax__media {
  position: absolute;
  inset: -55% 0;                    /* extra height top & bottom for travel */
  z-index: 0;
  will-change: transform;
  transform: translate3d(0, var(--py, 0), 0);
}
.imd-parallax__media img,
.imd-parallax__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Neutral grey wash so text stays legible over the skyline photo. */
.imd-parallax__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(28,30,32,.58) 0%, rgba(16,18,20,.74) 100%),
    radial-gradient(120% 80% at 50% 0%, rgba(120,124,128,.28), transparent 60%);
}

/* Horizontal band: text block at the start, CTA at the end, on one row. */
.imd-parallax__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1140px;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  text-align: start;
}
.imd-parallax__text { min-width: 0; }
.imd-parallax__eyebrow {
  display: inline-block;
  font-weight: 700;
  letter-spacing: .04em;
  color: #D8DADC;
  font-size: .95rem;
  margin-bottom: .5rem;
}
.imd-parallax__title {
  font-weight: 800;
  font-size: clamp(1.35rem, 1.1rem + 1.4vw, 2.1rem);
  line-height: 1.3;
  margin: 0;
  color: #fff;
}
.imd-parallax__title span { color: #EDEEEF; }
.imd-parallax__content .btn-sand { flex: 0 0 auto; white-space: nowrap; }

.imd-parallax .btn-sand {
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
}

/* Honour reduced-motion: pin the media, drop the JS drift. */
@media (prefers-reduced-motion: reduce) {
  .imd-parallax__media {
    transform: none !important;
    inset: 0;
  }
}

/* ---- Responsive tweaks ------------------------------------------------- */
@media (max-width: 768px) {
  .imd-hero { border-radius: 16px; }
  .imd-section { padding: 3rem 0; }
  .stat-num { font-size: 1.75rem; }
  .imd-appsoon-card { padding: 1.75rem 1.25rem; border-radius: 18px; }
  .imd-store-badge { min-width: unset; flex: 1; }
  .imd-parallax { min-height: 460px; }
  .imd-parallax__content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.25rem 1.25rem;
    gap: 1.25rem;
  }
}
