/* PharmaBee — marketing site
   Dark slate ground, wide Archivo display in sentence case, the product's own
   interface as the only imagery. Brand palette: teal, amber, off-white, slate. */

:root {
  --bg: #1E2A32;          /* slate: the ground */
  --surface: #26353F;     /* one tone step */
  --surface-2: #314350;   /* two tone steps */
  --ink: #F7F5F0;         /* off-white */
  --muted: #A9B6BD;
  --teal: #0E5D5A;
  --teal-soft: #6CC3BC;   /* teal readable on slate, for small signals */
  --accent: #F5A623;      /* amber: the action */
  --accent-strong: #FFB940;
  --paper: #F7F5F0;       /* interface surfaces */
  --paper-2: #ECEAE4;
  --paper-ink: #1E2A32;
  --paper-muted: #56636C;

  --font: "Archivo", "Noto Kufi Arabic", "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Noto Kufi Arabic", "Geeza Pro", sans-serif;

  /* five sizes */
  --step-display: clamp(4.25rem, 12.5vw, 13.5rem);
  --step-head: clamp(2.5rem, 1rem + 5vw, 6rem);
  --step-statement: clamp(1.375rem, 1rem + 1.2vw, 2.125rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-small: 0.875rem;

  --margin: clamp(16px, 2.6vw, 40px);
  --section: clamp(120px, 13vw, 200px);
  --radius: 999px;        /* one button shape: full pill */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* no CSS smooth scrolling: it turns ScrollTrigger's re-measure into a visible jump.
   In-page links glide via JS instead (main.js). */
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
table { border-collapse: collapse; }
::selection { background: var(--accent); color: var(--paper-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[lang="ar"] { font-family: var(--font-ar); }

.visually-hidden {
  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: var(--margin); top: -60px; z-index: 10; background: var(--accent); color: var(--paper-ink); padding: 10px 16px; }
.skip:focus { top: 12px; }

/* the display setting, shared by every big heading */
.hero__name, .pain__title, .showcase__title, .features__title, .app__title, .edge__title, .day__title, .faq__title, .cta__line, .foot__line {
  font-weight: 700;
  font-stretch: 108%;
  font-variation-settings: "wdth" 108;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

/* ---------- brand mark: amber hexagon with a cross ---------- */
.mark, .hex {
  display: inline-block; position: relative; flex: none;
  aspect-ratio: 1.1547; background: var(--accent);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.mark { width: 30px; }
.mark--sm { width: 26px; }
.mark::before, .mark::after, .hex__cross::before, .hex__cross::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: var(--paper-ink);
  transform: translate(-50%, -50%);
}
.mark::before { width: 38%; height: 13%; }
.mark::after { width: 13%; height: 44%; }
.hex { width: 100%; height: 100%; }
.hex__cross { position: absolute; inset: 0; }
.hex__cross::before { width: 36%; height: 12%; }
.hex__cross::after { width: 12%; height: 42%; }

/* ---------- controls ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  min-height: 52px; padding: 0 28px;
  background: var(--accent); color: var(--paper-ink);
  font-weight: 600; text-decoration: none; border: 0; border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
.button--small { min-height: 44px; padding: 0 20px; font-size: var(--step-small); }
.button--dark { background: var(--paper-ink); color: var(--ink); }
.link {
  text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: 0.25em; text-decoration-thickness: 0.08em;
  transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease;
}
@media (hover: hover) and (pointer: fine) {
  .button:hover { background-color: var(--accent-strong); }
  .button--dark:hover { background-color: #000; }
  .link:hover { text-decoration-color: currentColor; }
}

/* ---------- hero ---------- */
.hero { padding: 0 var(--margin); }
.nav {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: clamp(20px, 4vw, 56px);
  padding-top: 20px;
}
.nav__end { display: flex; align-items: center; gap: 10px; }
.lang {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 2px solid var(--surface-2); border-radius: var(--radius);
  font-size: var(--step-small); font-weight: 600; text-decoration: none;
  transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease;
}
.lang[lang="ar"] { font-family: var(--font-ar); }
.lang__short { display: none; }
/* five links + language + pilot need a desktop width; below it the links collapse */
@media (max-width: 1000px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
}
@media (max-width: 520px) {
  .lang { min-width: 44px; justify-content: center; padding: 0 12px; }
  .lang__long { display: none; }
  .lang__short { display: inline; }
  .nav { gap: 12px; }
  .nav__end { gap: 8px; }
  .nav .button--small { padding: 0 16px; }
}
@media (hover: hover) and (pointer: fine) { .lang:hover { background: var(--surface-2); } }
.nav__mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--step-body); text-decoration: none; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: clamp(20px, 3vw, 44px); font-size: var(--step-small); color: var(--muted); }
.nav__links a { text-decoration-line: underline; text-decoration-color: transparent; }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { color: var(--ink); } }

.hero__body { min-height: calc(78svh - 64px); display: grid; align-content: center; gap: clamp(32px, 5vw, 64px); padding: 6vh 0 4vh; }
.hero__name {
  display: flex; align-items: baseline; justify-content: center; gap: 0.04em;
  font-size: var(--step-display);
}
.mask { display: block; overflow: hidden; padding: 0 0.02em 0.1em; margin-bottom: -0.1em; }
.mask > span { display: block; }
.hero__hex { display: block; height: 0.7em; width: 0.81em; margin: 0 0.05em; }

.hero__foot { display: flex; justify-content: space-between; align-items: end; gap: 32px; }
.hero__lead { font-size: var(--step-statement); line-height: 1.22; max-width: 34ch; letter-spacing: -0.015em; }
.hero__tag { font-size: var(--step-statement); line-height: 1.4; color: var(--accent); }

/* the POS, set on a perspective stage so GSAP can tilt it up into view */
.stage { perspective: 1600px; padding-bottom: var(--section); }
.pos {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 190px minmax(0, 1fr) 300px;
  background: var(--paper); color: var(--paper-ink);
  border-radius: 16px; overflow: hidden;
  font-size: var(--step-small); line-height: 1.35;
  transform-origin: 50% 0%;
  will-change: transform;
  backface-visibility: hidden;
}
.pos__side { background: var(--paper-ink); color: #C9D2D7; padding: 20px 14px; }
.pos__side .mark { margin: 0 0 20px 8px; }
.pos__side li { padding: 9px 10px; border-radius: 8px; }
.pos__side li.is-on { background: var(--teal); color: var(--paper); font-weight: 600; }
.pos__main { padding: 18px 22px 26px; min-width: 0; }
.pos__tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { padding: 7px 14px; border-radius: 8px; background: var(--paper-2); }
.tab.is-on { background: var(--paper-ink); color: var(--paper); font-weight: 600; }
.pos__status { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--paper-muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); display: inline-block; flex: none; }
.dot--amber { background: var(--accent); }
.pos__scan {
  display: flex; align-items: center; padding: 14px 16px; border-radius: 10px;
  background: #fff; border: 2px solid var(--teal); color: var(--paper-muted); font-size: var(--step-body); margin-bottom: 14px;
}
.pos__caret { width: 2px; height: 1.2em; background: var(--teal); margin-inline-start: 4px; animation: blink 1.05s steps(1) infinite; }
.pos__cart { width: 100%; font-variant-numeric: tabular-nums; }
.pos__cart th { text-align: start; font-weight: 500; color: var(--paper-muted); padding: 8px 10px; }
.pos__cart td { padding: 13px 10px; background: #fff; border-top: 4px solid var(--paper); }
.pos__cart td:first-child { font-weight: 600; border-radius: 8px 0 0 8px; }
.pos__cart td:last-child { border-radius: 0 8px 8px 0; }
.pos__cart .num { text-align: end; }
.pos__cart tr.is-new td { background: #FFF3DC; }
.pos__pay { background: var(--paper-2); padding: 22px; display: flex; flex-direction: column; }
.pos__label { color: var(--paper-muted); }
.pos__total { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 4px; }
.pos__total span { font-size: var(--step-small); font-weight: 600; letter-spacing: 0; }
.pos__usd { margin-top: 4px; color: var(--paper-muted); }
.pos__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 24px; }
.pbtn { padding: 12px; border-radius: 10px; background: #fff; text-align: center; font-weight: 600; }
.pbtn--go { grid-column: 1 / -1; background: var(--accent); }
.pos__hint { margin-top: 12px; color: var(--paper-muted); }

@media (max-width: 1000px) {
  .pos { grid-template-columns: minmax(0, 1fr) 260px; }
  .pos__side { display: none; }
}
@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
  .hero__body { min-height: auto; padding: 10vh 0 6vh; }
  .hero__name { flex-direction: column; align-items: center; font-size: 21vw; gap: 0.04em; }
  .hero__hex { height: 0.8em; width: 0.92em; margin: 0.02em 0 0.06em; }
  .hero__foot { flex-direction: column; align-items: start; gap: 12px; }
  .hero__tag { order: -1; }
  .pos { grid-template-columns: minmax(0, 1fr); border-radius: 12px; }
  .pos__main { padding: 14px; }
  .pos__status, .hide-sm { display: none; }
  .pos__pay { padding: 16px; }
  .pos__btns { padding-top: 16px; }
}

/* ---------- a pharmacist's day: each headache struck through, its fix beside it ---------- */
.pain { background: #141C22; padding: var(--section) var(--margin); }
.pain__intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px; align-items: end; margin-bottom: clamp(48px, 6vw, 96px); }
.pain__title { font-size: var(--step-head); }
.pain__lead { color: var(--muted); max-width: 36ch; }
.pain__list { display: grid; gap: clamp(36px, 4vw, 56px); }
.pain__row {
  display: grid; grid-template-columns: 6ch minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(16px, 3vw, 56px); align-items: start;
}
.pain__time { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 0.45em; }
/* final state (no script, reduced motion): struck through in amber and dimmed */
.pain__problem {
  font-size: var(--step-statement); line-height: 1.25; letter-spacing: -0.015em; font-weight: 500;
  color: var(--muted);
  text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 0.09em;
}
/* when GSAP splits the words, each word carries its own strike so it can be drawn in order */
.pain__problem.is-split { text-decoration: none; }
.pain__problem .w { text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 0.09em; }
.pain__fix { display: flex; gap: 16px; align-items: flex-start; padding-top: 0.3em; }
.pain__fix p { color: var(--ink); max-width: 40ch; }
.tick {
  position: relative; flex: none; width: 38px; aspect-ratio: 1.1547; background: var(--accent);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.tick::after {
  content: ""; position: absolute; left: 50%; top: 46%; width: 20%; height: 42%;
  border: solid var(--paper-ink); border-width: 0 3px 3px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}
@media (max-width: 860px) {
  .pain__intro { grid-template-columns: minmax(0, 1fr); }
  .pain__row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pain__time { padding-top: 0; }
}

/* ---------- showcase ---------- */
.showcase { padding: var(--section) var(--margin); }
.showcase__title { font-size: var(--step-head); margin-bottom: clamp(40px, 5vw, 72px); }
.showcase__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.showcase__line { position: relative; background: var(--surface); border-radius: 18px; padding: 18px 22px; }
.showcase__input {
  display: block; width: 100%;
  border: 0; background: transparent; padding: 0; margin: 0;
  font-size: var(--step-statement); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2;
  caret-color: transparent; outline: none;
}
.showcase__line:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.showcase__mirror {
  position: absolute; left: 22px; top: 18px; visibility: hidden; white-space: pre;
  font-size: var(--step-statement); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2;
}
.showcase__caret {
  position: absolute; top: 22px; left: 22px;
  width: 3px; height: calc(var(--step-statement) * 1.05);
  background: var(--accent);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .showcase__caret, .pos__caret { animation: none; } }
.showcase__note { margin-top: 24px; max-width: 44ch; color: var(--ink); }
.examples { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.example {
  min-height: 46px; padding: 0 20px; border: 0; border-radius: var(--radius);
  background: var(--surface); cursor: pointer; font-weight: 500;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.example:active { transform: scale(0.96); }
.example[aria-pressed="true"] { background: var(--ink); color: var(--paper-ink); }
@media (hover: hover) and (pointer: fine) { .example:hover { background: var(--surface-2); } .example[aria-pressed="true"]:hover { background: var(--ink); } }

.answer { background: var(--paper); color: var(--paper-ink); border-radius: 18px; padding: 18px; }
.answer__meta { font-size: var(--step-small); color: var(--paper-muted); margin: 0 4px 12px; }
.rate { color: var(--paper-ink); white-space: nowrap; }
.rate input {
  width: 6.5ch; border: 0; border-bottom: 2px solid var(--accent); background: transparent; color: var(--paper-ink);
  font-weight: 600; text-align: right; padding: 0 2px; font-variant-numeric: tabular-nums;
}
.answer__rows { display: grid; gap: 6px; }
.row {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 20px;
  padding: 14px 16px; background: #fff; border-radius: 10px;
  transition: background-color var(--t-hover) ease;
}
.row:first-child { background: var(--paper-ink); color: var(--paper); }
.row:first-child .row__sub { color: #BAC5CB; }
.row__name { font-weight: 600; }
.row__price { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.row__sub { font-size: var(--step-small); color: var(--paper-muted); }
.row__usd { font-size: var(--step-small); font-variant-numeric: tabular-nums; text-align: right; }
.row__rx { display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: 6px; background: var(--accent); color: var(--paper-ink); font-size: var(--step-small); font-weight: 600; }
.row--empty { grid-template-columns: 1fr; }
@media (hover: hover) and (pointer: fine) { .row:not(:first-child):hover { background: var(--paper-2); } }
@media (max-width: 860px) {
  .showcase__grid { grid-template-columns: minmax(0, 1fr); }
  .example { flex: 1; }
}

/* ---------- features on the teal field ---------- */
.features { background: var(--teal); padding: var(--section) var(--margin); }
.features__title { font-size: var(--step-head); max-width: 12em; margin-bottom: clamp(72px, 9vw, 140px); }
.feat {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 7vw, 120px);
  align-items: center; margin-top: clamp(80px, 9vw, 140px);
}
.feat:first-of-type { margin-top: 0; }
.feat:nth-of-type(even) .feat__text { order: 2; }
.feat__head { font-size: var(--step-statement); line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 14px; }
/* the icon sits beside the title, in the same hexagon as the tiles */
.feat__head { display: flex; align-items: center; gap: 14px; }
.badge--sm { width: 46px; }
.badge--sm svg { width: 22px; height: 22px; }
.feat__text p { max-width: 42ch; }
.feat__ui { display: flex; justify-content: center; }
.feat:nth-of-type(even) .feat__ui { justify-content: flex-start; }

/* interface fragments */
.ui {
  width: min(440px, 100%);
  background: var(--paper); color: var(--paper-ink);
  border-radius: 16px; padding: 22px;
  font-size: var(--step-small); line-height: 1.4;
}
.ui__title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--step-body); margin-bottom: 16px; }
.ui__foot { margin-top: 16px; color: var(--paper-muted); }
.ui-list { display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.ui-list li { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 12px; align-items: center; background: #fff; padding: 11px 14px; border-radius: 10px; }
.ui-fefo .ui-list li { grid-template-columns: 1fr 1fr 1fr 6.5em; }
.ui-list .ok { color: var(--teal); font-weight: 600; }
.ui-list li.is-next { background: #FFF3DC; }
.tag { justify-self: end; background: var(--accent); padding: 2px 10px; border-radius: 6px; font-weight: 600; white-space: nowrap; }
.ui-pay__grid { display: grid; grid-template-columns: 1fr auto auto; gap: 10px 16px; font-variant-numeric: tabular-nums; }
.ui-pay__grid dt { color: var(--paper-muted); }
.ui-pay__grid dd { text-align: end; }
.ui-pay__grid .soft { color: var(--paper-muted); }
.ui-pay__grid .strong { color: var(--paper-ink); font-weight: 700; font-size: var(--step-body); padding-top: 10px; }
.ui-rx__warn { background: var(--accent); padding: 10px 14px; border-radius: 10px; font-weight: 600; margin-bottom: 16px; }
.ui-rx__field { display: grid; gap: 6px; color: var(--paper-muted); }
.ui-rx__input { display: block; background: #fff; color: var(--paper-ink); padding: 12px 14px; border-radius: 10px; border: 2px solid var(--teal); }
.ui-rx__actions { display: flex; gap: 8px; margin-top: 16px; }
.ui-rx__btn { background: var(--teal); color: var(--paper); padding: 10px 18px; border-radius: 10px; font-weight: 600; }
.ui-rx__ghost { background: var(--paper-2); padding: 10px 18px; border-radius: 10px; }
.ui-tix { display: grid; gap: 8px; }
.ui-tix__row { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 12px; align-items: center; padding: 16px 18px; border-radius: 12px; background: #fff; font-variant-numeric: tabular-nums; }
.ui-tix__row.is-on { background: var(--paper-ink); color: var(--paper); }
.ui-tix__row b { font-size: var(--step-body); }

@media (max-width: 860px) {
  .feat { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 72px; }
  .feat:nth-of-type(even) .feat__text { order: 0; }
  .feat__ui, .feat:nth-of-type(even) .feat__ui { justify-content: flex-start; }
  .ui { padding: 16px; }
}

/* ---------- phone companion ---------- */
.app { padding: var(--section) var(--margin) 0; }
.app__intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px; align-items: end; margin-bottom: clamp(48px, 6vw, 96px); }
.app__title { font-size: var(--step-head); }
.app__lead { color: var(--muted); max-width: 36ch; }
.app__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); }
.app__list { display: grid; align-content: start; padding-bottom: 14vh; }
.app__item {
  /* a button centres its content vertically; pin it to the top so the marker meets the title */
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch;
  width: 100%; text-align: start; cursor: pointer;
  background: none; border: 0; padding: 0; margin: 0;
  min-height: 48vh; color: var(--muted);
  position: relative;
  transition: color var(--t-ui) ease;
}
.app__item.is-on { color: var(--ink); }
.app__head { display: block; font-size: var(--step-statement); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 14px; }
.app__text { display: block; max-width: 44ch; padding-inline-start: 60px; }
@media (max-width: 860px) { .app__text { padding-inline-start: 0; } }
@media (hover: hover) and (pointer: fine) { .app__item:not(.is-on):hover { color: var(--ink); } }
.app__stage { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; justify-content: center; }
.app__trust { max-width: 60ch; margin: clamp(48px, 6vw, 80px) 0 0; color: var(--muted); }

/* the app's own screen, built in HTML */
.phone {
  position: relative; width: 330px; height: min(590px, 82svh); overflow: hidden;
  background: var(--paper); color: var(--paper-ink);
  border: 10px solid #0F161B; border-radius: 46px;
  font-size: var(--step-small); line-height: 1.35;
}
.phone__bar { display: flex; align-items: center; gap: 8px; padding: 18px 18px 12px; font-weight: 700; }
.mark--xs { width: 20px; }
.phone__net { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--paper-muted); }
.screen { position: absolute; inset: 60px 14px 14px; display: none; flex-direction: column; gap: 12px; }
.screen.is-on { display: flex; }
.screen__title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; padding: 0 4px; }
.screen__hint { color: var(--paper-muted); text-align: center; }
.viewfinder {
  position: relative; height: 190px; border-radius: 20px; background: #0F161B; overflow: hidden;
  display: flex; align-items: end; justify-content: center; padding-bottom: 14px; flex: none;
}
.viewfinder__line { position: absolute; left: 12%; right: 12%; top: 50%; height: 3px; border-radius: 2px; background: var(--accent); }
.viewfinder__code { color: #E8ECEE; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.card { background: #fff; border-radius: 18px; padding: 16px; }
.card__name { font-weight: 700; font-size: var(--step-body); }
.card__sub { color: var(--paper-muted); }
.card__price { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.card__rows { display: grid; gap: 6px; margin-top: 12px; }
.card__rows li { display: flex; justify-content: space-between; background: var(--paper-2); padding: 9px 12px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.card__rows .count { color: var(--paper-ink); background: var(--accent); padding: 0 10px; border-radius: 6px; }
.card__rows--list b { color: var(--teal); }
.card__note { margin-top: 12px; color: var(--paper-muted); }
.phone__btn { margin-top: auto; display: block; text-align: center; padding: 14px; border-radius: 14px; background: var(--teal); color: var(--paper); font-weight: 600; }
.sheet { position: relative; margin: 6px 12px 12px 4px; }
.sheet::before, .sheet::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.sheet::before { background: var(--paper-2); transform: translate(10px, 10px) rotate(2deg); }
.sheet::after { background: #E3E1DA; transform: translate(5px, 5px) rotate(1deg); }
.sheet__page { position: relative; z-index: 1; background: #fff; border-radius: 10px; padding: 16px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.sheet__page b { display: block; margin-bottom: 6px; }
.sheet__page p { display: flex; justify-content: space-between; gap: 8px; }
.sheet__page .tot { margin-top: 8px; font-weight: 700; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { background: #fff; border-radius: 16px; padding: 14px; display: grid; gap: 4px; }
.tile span { color: var(--paper-muted); }
.tile b { font-size: 1.75rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile--dark { background: var(--paper-ink); color: var(--paper); }
.tile--dark span { color: #BAC5CB; }
.tile--amber { background: var(--accent); }
.tile--amber span { color: var(--paper-ink); }

@media (max-width: 860px) {
  .app__intro { grid-template-columns: minmax(0, 1fr); }
  .app__grid { grid-template-columns: minmax(0, 1fr); }
  .app__stage { position: static; height: auto; order: -1; padding-bottom: 8px; }
  .phone { width: min(330px, 100%); height: 560px; }
  .app__list { gap: 8px; padding-bottom: 0; }
  .app__item { min-height: 0; padding: 16px; border-radius: 16px; background: var(--surface); }
  .app__item:not(.is-on) .app__text { display: none; }
  .app__head { font-size: 1.25rem; margin-bottom: 8px; }
  .app__item:not(.is-on) .app__head { margin-bottom: 0; }
  .app__trust { padding-inline-start: 0; }
}

/* ---------- what sets it apart: icon tiles on a tone step ---------- */
.edge { margin-top: var(--section); background: var(--surface); color: var(--ink); padding: var(--section) var(--margin); }
.edge__title { font-size: var(--step-head); max-width: 10em; margin-bottom: clamp(48px, 6vw, 96px); }
.edge__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.edge__tile {
  display: grid; align-content: start; gap: 14px;
  background: var(--bg); border-radius: 24px; padding: clamp(24px, 2.6vw, 36px);
  transition: background-color var(--t-ui) ease, transform var(--t-ui) var(--ease-out);
}
/* icon and title share one line */
.edge__top { display: flex; align-items: center; gap: 16px; }
.edge__head { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); }
.edge__tile p { color: var(--muted); }
/* the icon sits in the PharmaBee hexagon */
.badge {
  display: grid; place-items: center; flex: none; width: 54px; aspect-ratio: 1.1547;
  background: var(--accent); color: var(--paper-ink);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  transition: transform var(--t-ui) var(--ease-out), background-color var(--t-ui) ease;
}
.badge svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
@media (hover: hover) and (pointer: fine) {
  .edge__tile:hover { background: #18232A; transform: translateY(-4px); }
  .edge__tile:hover .badge { transform: rotate(-8deg) scale(1.06); background: var(--accent-strong); }
}
@media (max-width: 1100px) { .edge__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .edge__grid { grid-template-columns: minmax(0, 1fr); } }

/* phone-app list icons */
.app__head { display: flex; align-items: center; gap: 14px; }
/* the hexagon marks the active feature: amber when on, quiet slate otherwise */
.app__item:not(.is-on) .app__badge { background: var(--surface-2); color: var(--muted); }
.app__item .app__badge { transition: background-color var(--t-ui) ease, color var(--t-ui) ease; }

/* ---------- a day: the bar ---------- */
.day { padding: var(--section) var(--margin) 0; }
.day__title { font-size: var(--step-head); margin-bottom: 64px; }
.bar { display: flex; gap: 6px; }
.seg { min-width: 12%; }
.seg__time {
  display: block; height: 22vh; min-height: 150px; padding: 20px;
  background: var(--c); color: var(--on); border-radius: 14px;
  font-size: var(--step-statement); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1;
  transform-origin: left center;
}
.seg__text { display: block; padding: 16px 12px 0 4px; max-width: 22ch; }
.seg--open { --c: var(--accent); --on: var(--paper-ink); flex: 2 1 0; }
.seg--sell { --c: var(--teal); --on: var(--paper); flex: 70 1 0; }
.seg--recv { --c: var(--paper); --on: var(--paper-ink); flex: 5 1 0; }
.seg--close { --c: var(--surface-2); --on: var(--ink); flex: 3 1 0; }
@media (max-width: 1100px) {
  .day__title { margin-bottom: 40px; }
  .bar { flex-direction: column; }
  .seg { min-width: 0; background: var(--c); color: var(--on); padding: 18px; min-height: 96px; border-radius: 14px; }
  .seg__time { height: auto; min-height: 0; padding: 0; background: none; font-size: 22px; }
  .seg__text { padding: 8px 0 0; max-width: none; font-size: 16px; }
  .seg--sell { min-height: 36svh; }
}

/* ---------- stats ---------- */
.stats { min-height: 80svh; display: flex; align-items: center; padding: var(--section) var(--margin); }
.stats__p {
  margin-inline-start: calc(100% / 12); max-width: 40ch;
  font-size: var(--step-statement); line-height: 1.3; color: var(--ink); letter-spacing: -0.015em;
}
.stats__p b { color: var(--accent); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.stats__p b { display: inline-block; transform-origin: 50% 70%; }
.stats__p .w { display: inline; }
.stats__p .nb { white-space: nowrap; }
@media (max-width: 760px) { .stats { min-height: 70svh; } .stats__p { margin-inline-start: 0; } }

/* ---------- faq ---------- */
.faq { padding: 0 var(--margin) var(--section); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__title { font-size: var(--step-head); position: sticky; top: 15vh; }
.faq__list { display: grid; gap: 8px; }
.faq details { background: var(--surface); border-radius: 16px; padding: 6px 24px; transition: background-color var(--t-ui) ease; }
.faq details[open] { background: var(--surface-2); padding-bottom: 22px; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-size: var(--step-body); line-height: 1.3; font-weight: 600;
  padding: 16px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-inline-end: 4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform var(--t-ui) var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(3px) rotate(225deg); }
.faq details p { max-width: 56ch; }
@media (hover: hover) and (pointer: fine) { .faq details:not([open]):hover { background: var(--surface-2); } }
@media (max-width: 860px) {
  .faq { grid-template-columns: minmax(0, 1fr); }
  .faq__title { position: static; }
  .faq details { padding: 4px 18px; }
}

/* ---------- cta ---------- */
.cta { padding: var(--section) var(--margin); background: var(--surface); }
.cta__line {
  font-size: var(--step-head);
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.25em; row-gap: 0.08em;
  line-height: 1.12; /* matches the inline field, so two rows measure as two lines */
  max-width: 14em;
}
.cta__end { white-space: nowrap; }
.cta__field, .cta__btn {
  font: inherit; letter-spacing: inherit; font-stretch: inherit; font-variation-settings: inherit;
  height: 1.06em; line-height: 1; border: 0; border-radius: var(--radius);
  padding: 0 0.35em;
}
.cta__field { width: 8.4em; background: var(--bg); color: var(--ink); }
.cta__field::placeholder { color: var(--muted); opacity: 1; }
.cta__btn {
  margin-inline-start: 0.1em; background: var(--accent); color: var(--paper-ink); cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.cta__btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .cta__btn:hover { background: var(--accent-strong); } }
.cta__note { margin-top: 32px; max-width: 56ch; color: var(--muted); }
@media (max-width: 760px) {
  .cta__line { font-size: 7vw; column-gap: 0.2em; }
  .cta__field { width: 7.8em; }
}

/* ---------- footer: the amber field ---------- */
.foot {
  position: relative; overflow: hidden;
  background: #141C22; color: var(--ink);
  padding: var(--section) var(--margin) clamp(32px, 4vw, 56px);
  display: grid; gap: clamp(64px, 8vw, 120px); grid-template-columns: minmax(0, 1fr);
}
.foot a { color: var(--ink); }
.foot .button { color: var(--paper-ink); }
.foot__top { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px; align-items: start; }
.foot__line { font-size: var(--step-head); margin-bottom: 36px; }
.foot__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.foot__mail { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-weight: 500; color: var(--muted); }
.foot__addr { color: var(--ink); }
.foot__addr { font-weight: 700; user-select: all; }
.foot__copy {
  min-height: 44px; padding: 0 16px; border: 2px solid var(--surface-2); border-radius: var(--radius);
  background: transparent; color: var(--ink); font-weight: 600; font-size: var(--step-small); cursor: pointer;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.foot__copy:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .foot__copy:hover { background: var(--surface-2); } }
.foot__links { display: grid; gap: 12px; justify-items: start; font-weight: 500; font-size: var(--step-statement); letter-spacing: -0.015em; padding-top: 0.4em; }
.foot__legal {
  display: flex; justify-content: space-between; align-items: end; gap: 32px;
  font-size: var(--step-small); color: var(--muted);
}
.foot__tag { font-weight: 700; color: var(--accent); }
@media (max-width: 760px) {
  .foot__top { grid-template-columns: 1fr; gap: 48px; }
  .foot__cta .button { width: 100%; }
  .foot__links { grid-template-columns: 1fr 1fr; width: 100%; font-size: var(--step-body); padding-top: 0; }
  .foot__legal { flex-direction: column; align-items: start; gap: 12px; }
}

/* ---------- Arabic, right to left ---------- */
/* the wordmark and its hexagon always read left to right */
.hero__name { direction: ltr; }
[dir="rtl"] body { line-height: 1.75; }
/* Arabic letters join: no negative tracking, and more air between lines */
[dir="rtl"] .hero__lead, [dir="rtl"] .pain__title, [dir="rtl"] .pain__problem, [dir="rtl"] .showcase__title, [dir="rtl"] .features__title, [dir="rtl"] .app__title,
[dir="rtl"] .edge__title, [dir="rtl"] .day__title, [dir="rtl"] .faq__title, [dir="rtl"] .cta__line, [dir="rtl"] .foot__line,
[dir="rtl"] .feat__head, [dir="rtl"] .app__head, [dir="rtl"] .edge__head, [dir="rtl"] .seg__time, [dir="rtl"] .stats__p {
  letter-spacing: 0;
}
[dir="rtl"] .pain__title, [dir="rtl"] .showcase__title, [dir="rtl"] .features__title, [dir="rtl"] .app__title, [dir="rtl"] .edge__title,
[dir="rtl"] .day__title, [dir="rtl"] .faq__title, [dir="rtl"] .foot__line { line-height: 1.3; font-weight: 700; }
[dir="rtl"] .cta__line { line-height: 1.5; }
[dir="rtl"] .hero__lead, [dir="rtl"] .feat__head, [dir="rtl"] .app__head, [dir="rtl"] .edge__head { line-height: 1.45; }
[dir="rtl"] .stats__p { line-height: 1.7; }
[dir="rtl"] .seg__time { transform-origin: right center; }
[dir="rtl"] .seg__text { padding: 16px 4px 0 12px; }
/* the English tagline in Arabic mode */
.hero__tag[lang="en"], .foot__tag[lang="en"] { font-family: var(--font); }
.foot__tag[lang="ar"] { font-family: var(--font-ar); }
/* hold the page until the Arabic text is in place (head script sets this; i18n.js clears it) */
.i18n-pending body { visibility: hidden; }
/* Arabic is more compact than "your pharmacy": size the blank to its own placeholder */
[dir="rtl"] .cta__field { width: 5.2em; }
@media (max-width: 760px) { [dir="rtl"] .cta__field { width: 5.6em; } }
