/* BIVO Lab landing page: follows the team's design (live orderbivo.com/pages/bivo-lab + Drive "BIVO LAB").
   Mobile first: phone → tablet (700px) → desktop (1100px). Colours sampled from the design. */
@font-face { font-family: "BIVO Riyal"; src: url("../fonts/riyal.woff2") format("woff2"); unicode-range: U+20C1; font-display: block; }
@font-face { font-family: "Graphik Arabic"; src: url("../fonts/graphik-ar-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Graphik Arabic"; src: url("../fonts/graphik-ar-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Graphik Arabic"; src: url("../fonts/graphik-ar-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Graphik Arabic"; src: url("../fonts/graphik-ar-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --bg: #fdfbf0;          /* page ivory */
  --grid: #efede1;        /* graph-paper lines */
  --ink: #111111;
  --ink-2: #4d4b45;
  --orange: #fe600d;      /* buttons, badges, stars, band title */
  --orange-dark: #e45200;
  --purple: #6969d6;      /* step labels, timeline, FAQ title */
  --cyan: #85e5e8;        /* tape, arrows, before/after tags */
  --yellow: #ffe420;      /* band */
  --card: #f2f2f2;
  --red: #db1115;         /* sale price */
  --line: #e4e2d7;
  --font: "BIVO Riyal", "Graphik Arabic", "Segoe UI", Tahoma, sans-serif;
  --wrap: 1260px;
  --pad: clamp(16px, 4vw, 40px);
  --gap: clamp(12px, 2vw, 28px);
  --section: clamp(44px, 7vw, 96px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  /* graph paper, as in the banner */
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 52px 52px;
  background-position: center top;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 10; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--section); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 26px;
  border: 0; border-radius: 999px; background: var(--orange); color: #fff; text-decoration: none; cursor: pointer;
  font: 700 16px/1.2 var(--font); transition: background-color .15s, transform .15s; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--orange-dark); }
.btn:active { transform: scale(.98); }

/* ---------- 1. Hero ---------- */
.hero { padding-top: clamp(8px, 2vw, 24px); }
.hero-art { position: relative; width: 100%; max-width: 1260px; margin-inline: auto; padding-inline: var(--pad); }
.hero-img { width: 100%; }
.btn-hero { display: flex; width: max-content; margin: 12px auto 0; font-weight: 500; font-size: 16px; padding-inline: 34px; }
@media (min-width: 700px) {
  /* over the banner, bottom left of the artwork, as in the design */
  .btn-hero { position: absolute; margin: 0; left: calc(var(--pad) + 2.3%); top: 76%; font-size: clamp(14px, 1.35vw, 18px); min-height: clamp(44px, 3.4vw, 50px); }
}

/* ---------- Product cards (rail + band) ---------- */
.card { display: flex; flex-direction: column; min-width: 0; background: var(--card); border-radius: 22px; overflow: hidden; }
.card-media { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--card); overflow: hidden; }
.card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .35s ease; }
.card-img-alt { opacity: 0; }
@media (hover: hover) { .card:hover .card-img-alt { opacity: 1; } }
.badge {
  position: absolute; top: 14px; inset-inline-start: 14px; z-index: 1;
  background: var(--orange); color: #fff; font: 500 13px/1 var(--font); padding: 6px 11px; border-radius: 999px;
}
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 4px 16px 18px; flex: 1; }
.card-title { font-size: clamp(14px, 1.3vw, 17px); font-weight: 400; line-height: 1.5; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.price .now { color: var(--red); font-weight: 700; font-size: clamp(15px, 1.3vw, 18px); }
.price .was { color: #8a8a8a; font-size: clamp(13px, 1.1vw, 16px); }
.sar { font-family: "BIVO Riyal", var(--font); }
.btn-card { margin-top: auto; width: 100%; min-height: 44px; }

/* ---------- 2. Rail: starts at the page's right edge (RTL start), runs off the left edge ---------- */
.rail-section { padding-top: clamp(20px, 3vw, 40px); }
.rail {
  --edge: max(var(--pad), calc((100vw - var(--wrap)) / 2));
  --card-w: clamp(210px, 62vw, 300px);
  display: flex; gap: clamp(14px, 2.2vw, 32px);
  contain: paint; /* without it Chrome lets a right-to-left scroller widen the page, and phones zoom out */
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding-inline-start: var(--edge); padding-inline-end: var(--pad); scroll-padding-inline: var(--edge);
  padding-block: 4px 10px; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail .card { flex: 0 0 var(--card-w); scroll-snap-align: start; }
@media (min-width: 700px) { .rail { --card-w: clamp(220px, 27vw, 300px); } }
@media (min-width: 1100px) { .rail { --card-w: clamp(240px, 20.5vw, 315px); } }

/* ---------- 3. Inspiration ---------- */
.inspo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 1160px; margin-inline: auto; }
.inspo-item { display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 2vw, 22px); text-align: center; font-weight: 900; font-size: clamp(13px, 1.5vw, 18px); line-height: 1.3; }
.inspo-item img { width: clamp(62px, 9vw, 96px); }

/* ---------- 4. Steps + timeline ---------- */
.steps-section { padding-top: 0; }
.steps { position: relative; display: flex; flex-direction: column; gap: clamp(48px, 7vw, 110px); }
.step { display: flex; flex-direction: column; align-items: center; gap: clamp(20px, 4vw, 70px); }
.step-label { background: var(--purple); color: #fff; font-size: clamp(17px, 1.7vw, 22px); line-height: 1; padding: 9px 36px 11px; border-radius: 4px; }
.step-row { display: grid; justify-items: center; gap: 18px; width: 100%; }
.step-img { width: min(82vw, 420px); }
.step-dot { display: none; }
.step-body { text-align: center; max-width: 34rem; }
.step-title { font-size: clamp(28px, 3.4vw, 44px); font-weight: 900; line-height: 1.3; margin-bottom: 10px; }
.step-body p { color: var(--ink-2); font-size: clamp(15px, 1.3vw, 17px); }
.step-body p + p { margin-top: 14px; }
@media (min-width: 900px) {
  /* faint line down the middle, a dot per step with short dashes either side */
  .steps::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: #ecebe3; }
  .step-label { position: relative; z-index: 1; }
  .step-row { grid-template-columns: 1fr 120px 1fr; align-items: center; justify-items: stretch; gap: 0; }
  .step-img { grid-column: 1; justify-self: center; width: min(100%, 420px); }
  .step-dot {
    display: block; grid-column: 2; justify-self: center; position: relative; z-index: 1;
    width: 11px; height: 11px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 6px var(--bg);
  }
  .step-dot::before, .step-dot::after { content: ""; position: absolute; top: 5px; width: 46px; height: 1px; background: #e2e1d8; }
  .step-dot::before { right: calc(100% + 8px); }
  .step-dot::after { left: calc(100% + 8px); }
  .step-body { grid-column: 3; text-align: start; max-width: 30rem; justify-self: start; padding-inline-start: 24px; }
  /* every other step: picture on the other side */
  .step-flip .step-img { grid-column: 3; grid-row: 1; }
  .step-flip .step-body { grid-column: 1; grid-row: 1; justify-self: end; padding-inline: 0 24px; }
}

/* ---------- 5. Yellow band ---------- */
.band { background: var(--yellow); padding-block: clamp(40px, 5vw, 64px); }
.band-title { color: var(--orange); text-align: center; font-weight: 900; font-size: clamp(24px, 3.3vw, 44px); line-height: 1.35; margin-bottom: clamp(24px, 3.5vw, 48px); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 32px); max-width: 1180px; margin-inline: auto; }
.band .card { background: var(--card); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* "load more": the first row(s) only, until tapped (only when JS is on: it adds .is-collapsed) */
.grid.is-collapsed .card:nth-child(n + 5) { display: none; }
@media (min-width: 700px) { .grid.is-collapsed .card:nth-child(n + 5) { display: flex; } .grid.is-collapsed .card:nth-child(n + 7) { display: none; } }
@media (min-width: 1100px) { .grid.is-collapsed .card:nth-child(n + 6) { display: none; } }
.more { display: flex; justify-content: center; margin-top: clamp(20px, 2.6vw, 34px); }
.btn-more { font-weight: 400; font-size: 16px; min-height: 44px; padding-inline: 32px; }

/* ---------- 6. Reviews + before/after ---------- */
.proof { display: grid; gap: clamp(28px, 5vw, 60px); align-items: center; }
@media (min-width: 900px) { .proof { grid-template-columns: 1fr 1fr; } }
.reviews { position: relative; min-width: 0; max-width: 520px; justify-self: center; width: 100%; }
@media (min-width: 900px) { .reviews { justify-self: start; padding-inline-start: clamp(0px, 4vw, 60px); } }
.quote { width: 52px; height: 44px; color: #a9a8a2; margin-bottom: 10px; transform: scaleX(-1); }
.review-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; contain: paint; /* see .rail */
  overscroll-behavior-x: contain; scrollbar-width: none; scroll-behavior: smooth;
}
.review-track::-webkit-scrollbar { display: none; }
.review { flex: 0 0 100%; scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-block: 4px; }
.stars { display: flex; gap: 4px; }
.stars svg { width: 20px; height: 20px; fill: var(--orange); }
.review blockquote p { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.7; }
.review-name { font-weight: 700; font-size: 16px; }
.review-nav { display: flex; gap: 10px; margin-top: 24px; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--cyan); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; transition: opacity .15s; }
.round svg { width: 22px; height: 22px; }
.round:disabled { opacity: .45; cursor: default; }
.review-dots { display: flex; gap: 6px; margin-top: 14px; }
.review-dots button { width: 24px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.review-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c9c7bf; transition: background .2s, transform .2s; }
.review-dots button[aria-current="true"]::before { background: var(--ink); transform: scale(1.3); }

.compare {
  --pos: 50%;
  position: relative; width: 100%; max-width: 600px; justify-self: center; aspect-ratio: 1 / 1;
  user-select: none; -webkit-user-select: none; touch-action: pan-y; overflow: hidden;
}
@media (min-width: 900px) { .proof .compare { grid-column: 2; grid-row: 1; } .proof .reviews { grid-column: 1; grid-row: 1; } }
.compare img, .compare-before { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare img { object-fit: contain; }
.compare-before { clip-path: inset(0 0 0 var(--pos)); } /* "before" on the right, read first */
.compare-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; background: rgba(17, 17, 17, .35); pointer-events: none; }
.compare-line::before { /* handle at the top, as in the design */
  content: ""; position: absolute; top: 0; left: 50%; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%;
  background: var(--cyan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.compare-tag { position: absolute; bottom: 4%; padding: 3px 26px; border-radius: 999px; background: var(--cyan); color: #fff; font-size: 14px; pointer-events: none; }
.compare-tag-before { left: calc(var(--pos) + 10px); }
.compare-tag-after { right: calc(100% - var(--pos) + 10px); }
.compare-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; direction: ltr;
  -webkit-appearance: none; appearance: none; background: transparent;
}
.compare-range::-webkit-slider-thumb { -webkit-appearance: none; width: 48px; height: 600px; }
.compare-range::-moz-range-thumb { width: 48px; height: 600px; border: 0; }
.compare:has(.compare-range:focus-visible) .compare-line::before { outline: 3px solid var(--purple); outline-offset: 3px; }

/* ---------- 7. FAQ ---------- */
.faq-wrap { display: grid; gap: 18px; }
.faq-title { color: var(--purple); font-weight: 900; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.25; }
@media (min-width: 900px) {
  .faq-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr); gap: clamp(40px, 8vw, 130px); align-items: start; }
  .faq-title { text-align: center; }
}
.faq-group { border-bottom: 1px solid var(--line); }
.faq-group > summary, .faq > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-group > summary::-webkit-details-marker, .faq > summary::-webkit-details-marker { display: none; }
.faq-group > summary { min-height: 60px; padding-block: 12px; font-size: clamp(16px, 1.4vw, 19px); }
.faq-group > summary::after, .faq > summary::after {
  content: ""; flex: none; width: 18px; height: 18px; transition: transform .2s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
}
.faq-group[open] > summary::after, .faq[open] > summary::after { transform: rotate(45deg); }
.faq-group[open] > summary { font-weight: 700; }
.faq-items { padding: 0 0 14px; }
.faq { background: rgba(255, 255, 255, .7); border-radius: 12px; border: 1px solid var(--line); }
.faq + .faq { margin-top: 8px; }
.faq > summary { min-height: 52px; padding: 10px 16px; font-weight: 500; font-size: 15px; line-height: 1.55; }
.faq > summary::after { width: 14px; height: 14px; }
.faq > p { padding: 0 16px 14px; color: var(--ink-2); font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  html, .review-track { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
