/* ==========================================================
   Landing page styles (index.html only).
   Colors, fonts and sizes come from shared/variables.css.
   Buttons, cards, chips and pills come from shared/shared.css.
   The motion that needs JavaScript is in index.js.

   Contents
     1. Page, headings and section spacing
     2. Motion: scroll path, reveal on scroll
     3. Hero
     4. Sources strip
     5. Feature blocks (shared by several sections)
     6. Chat preview
     7. Score
     8. Similar startups
     9. Roadmap path
    10. Report
    11. Explorers
    13. About: phone and cards
    14. Call to action
    15. Tablet and phone
   ========================================================== */

/* ---------- 1. Page, headings and section spacing ---------- */

.landing {
  display: flex;
  flex-direction: column;
  gap: 112px;
  padding-bottom: 96px;
  overflow-x: clip;
}

/* a top-bar link jumps to a section: leave room for the floating top bar */
.landing [id] {
  scroll-margin-top: 104px;
}

.headline {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}
html[dir="rtl"] .headline {
  line-height: 1.35;
  letter-spacing: 0;
}
.headline-lg { font-size: clamp(28px, 4vw, 44px); }
.headline-md { font-size: clamp(24px, 3.2vw, 34px); }

.lead {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-2);
}

/* centered title block above a section */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

/* arrows point the other way in Arabic */
html[dir="rtl"] .flip-rtl {
  transform: scaleX(-1);
}

/* ---------- 2. Motion ---------- */

/* The "path": a thin line at the very top that fills as you scroll.
   index.js sets --progress from 0 to 1. */
.scroll-path {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 300;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--navy));
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}
html[dir="rtl"] .scroll-path {
  transform-origin: right;
}

/* Reveal on scroll: add data-reveal to an element.
   index.js adds "is-visible" when it enters the screen.
   style="--i: 1" makes it wait a little longer than its neighbor. */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 3. Hero ----------
   Riyadh in the morning. When the page opens the haze lifts off the city
   from the ground up, and the photo settles into place. As you scroll,
   the city moves more slowly than the page, so it feels far away. */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(860px, 100vh);
  padding: 132px 0 96px;
  overflow: hidden;
  background: var(--bg);
}

/* The photo. To change it, replace the file assets/images/hero-riyadh.jpg. */
.hero-photo {
  position: absolute;
  inset: -4% 0 0;
  background: url('assets/images/hero-riyadh.jpg') 70% 100% / cover no-repeat;
  /* index.js sets --shift while you scroll (the slow, far-away movement) */
  translate: 0 var(--shift, 0px);
  animation: photo-settle 3.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes photo-settle {
  from { scale: 1.12; }
  to   { scale: 1; }
}
/* in Arabic the photo is mirrored, so the open sky stays behind the text */
html[dir="rtl"] .hero-photo {
  transform: scaleX(-1);
}

/* soft white behind the text and at the bottom edge, so both stay clean */
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.55) 34%, transparent 62%),
    linear-gradient(0deg, var(--bg) 2%, transparent 20%);
}

/* The haze: a tall white sheet that slides up and away */
.hero-haze {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  height: 190%;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 62%, transparent 100%);
  pointer-events: none;
  animation: haze-lift 3s cubic-bezier(0.5, 0, 0.2, 1) 0.2s both;
}
@keyframes haze-lift {
  from { transform: translateY(0); }
  to   { transform: translateY(-100%); }
}

.hero-inner {
  position: relative;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  max-width: 680px;
}

.hero-title {
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
html[dir="rtl"] .hero-title {
  font-size: clamp(36px, 4.8vw, 66px);
  line-height: 1.2;
}
.hero-title .accent {
  color: var(--teal);
}

/* each headline line rises out from behind an invisible edge */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
}
.line > span {
  display: inline-block;
  animation: line-up 1s var(--ease) 1.1s both;
}
.line:nth-child(2) > span {
  animation-delay: 1.25s;
}
@keyframes line-up {
  from { transform: translateY(110%); }
  to   { transform: none; }
}

.hero-lead,
.hero-actions {
  animation: fade-up 0.8s var(--ease) both;
}
/* the words arrive after the haze has started to lift */
.hero-lead    { animation-delay: 1.5s; max-width: 540px; font-size: 17.5px; color: var(--text-nav); }
.hero-actions { animation-delay: 1.9s; }

/* The prompt box. The text inside is typed by index.js. */
.composer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(560px, 100%);
  padding: 18px 18px 14px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.82);
  animation: fade-up 0.8s var(--ease) 1.7s both;
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    border-color var(--dur);
}
.composer:hover {
  transform: translateY(-3px);
  border-color: var(--navy);
  box-shadow: var(--shadow-panel);
}
.composer-text {
  min-height: 54px;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-inline-start: 2px;
  background: var(--navy);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}
.composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.composer-row .pill {
  color: var(--navy);
}
.composer-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  transition: transform var(--dur) var(--ease);
}
/* index.js adds "is-sending" for a moment after each phrase is typed */
.composer-send.is-sending {
  transform: translateY(-4px) scale(1.1);
}
/* index.js adds "is-ready" when a phrase is fully typed: one soft pulse */
.composer-send.is-ready {
  animation: send-pulse 0.9s ease-out;
}
@keyframes send-pulse {
  from { box-shadow: 0 0 0 0 rgba(31, 142, 151, 0.5); }
  to   { box-shadow: 0 0 0 12px rgba(31, 142, 151, 0); }
}

/* the arrow on the main button slides forward on hover */
.hero-actions .btn-primary svg {
  transition: translate var(--dur) var(--ease);
}
.hero-actions .btn-primary:hover svg {
  translate: 4px 0;
}
html[dir="rtl"] .hero-actions .btn-primary:hover svg {
  translate: -4px 0;
}

/* list with small check marks */
.ticks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-nav);
}
.ticks li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ticks svg {
  flex-shrink: 0;
  color: var(--teal);
}
.ticks-column {
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
}

/* ---------- 4. Sources strip ---------- */

.strip {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 8px;
  padding-block: 18px;
  border-block: 1px solid var(--border);
}
.strip-label {
  flex-shrink: 0;
  max-width: 140px;
  font-size: 10.5px;
  line-height: 1.5;
}
.marquee {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: marquee 44s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-nav);
  white-space: nowrap;
}
.marquee-item b {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--navy-tint);
  color: var(--navy);
  font-size: 10.5px;
}
/* each official source is shown by its logo */
.marquee-track:has(.marquee-logo) {
  align-items: center;
  gap: 56px;
  padding-inline-end: 56px;   /* the same space after the last logo, so the loop has no jump */
}
.marquee-logo {
  flex-shrink: 0;
  height: 40px;
  width: auto;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* "Supported by": one framed row. The words on one side, the supporters' logos
   on the other, with a thin line between each logo. */
.supporters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: -64px;   /* sits close to the strip above it */
  padding: 26px 36px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg-subtle);
}
.supporters-label {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.supporters-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 20px 0;
}
.supporters-logos img {
  box-sizing: content-box;
  height: 52px;
  width: auto;
  padding-inline: 40px;
  border-inline-start: 1px solid var(--border-strong);
}
.supporters-logos img:first-child {
  border-inline-start: none;
}
.supporters-logos img:last-child {
  padding-inline-end: 0;
}
@media (max-width: 760px) {
  .supporters {
    flex-direction: column;
    align-items: center;
    margin-top: -32px;
    padding: 24px 20px;
  }
  .supporters-logos {
    justify-content: center;
    gap: 20px 0;
  }
  .supporters-logos img,
  .supporters-logos img:last-child {
    height: 40px;
    padding-inline: 18px;
  }
}

/* ---------- 5. Feature blocks ---------- */

/* text on one side, picture on the other */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  align-items: center;
}
.split-reverse .split-text {
  order: 2;
}
.split-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* small label above a feature title */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: var(--teal-tint);
  color: var(--teal-text);
  font-size: 12px;
  font-weight: 700;
}
.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.step-number {
  font-size: 15px;
  font-weight: 800;
  color: var(--teal);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.link-arrow svg {
  transition: translate var(--dur) var(--ease);
}
.link-arrow:hover svg {
  translate: 4px 0;
}
html[dir="rtl"] .link-arrow:hover svg {
  translate: -4px 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* grey bars that stand in for text in the preview cards */
.lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.lines span {
  height: 9px;
  border-radius: var(--r-pill);
  background: var(--bg-muted);
}
.lines span:first-child { width: 70%; background: var(--border-strong); }
.lines span:last-child  { width: 45%; }

/* ---------- 6. Feature grid ----------
   Six boxes in three columns. Each box is a small picture of the feature
   (.feat-art) with its name and one sentence under it (.feat-text).
   The pictures are built from white "plates" on a soft tinted background,
   with small pieces (.float) that hover gently over them. */

/* Extra colors for the landing page pictures. Navy and teal stay the main colors;
   these four sit beside them. "-text" is dark enough to write with,
   "-surface" is the pale version used behind a picture. */
.landing {
  --purple: #9275DF;  --purple-text: #5F45B5;  --purple-surface: #EDE7FB;
  --coral:  #ED937B;  --coral-text:  #B9553A;  --coral-surface:  #FDEAE3;
  --gold:   #E8B847;  --gold-text:   #8A6410;  --gold-surface:   #FCF2D6;
  --mint:   #A9D7C4;  --mint-text:   #2C6E57;  --mint-surface:   #E0F2EA;
  --teal-surface: #DDF0F2;
  --navy-surface: #E7EEF5;
}
.chip-purple { background: var(--purple-surface); color: var(--purple-text); }
.chip-coral  { background: var(--coral-surface);  color: var(--coral-text); }

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: -56px;   /* sits closer to its title than a new section would */
}
.feat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg);
  /* the box lifts a little under the mouse ("translate" is separate from the reveal movement) */
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease),
    translate 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.35s;
  transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s, 0s, 0s;
}
.feat:hover {
  translate: 0 -6px;
  border-color: var(--teal);
  box-shadow: var(--shadow-panel);
}
.feat-wide { grid-column: span 2; }
.feat-full { grid-column: 1 / -1; }

.feat-art {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 236px;
  padding: 26px 22px;
  overflow: hidden;
  /* a soft pastel background: one color glows from the top corner (--c1),
     another from the bottom corner (--c2) */
  background:
    radial-gradient(90% 80% at 85% 0%, var(--c1), transparent 62%),
    radial-gradient(80% 90% at 0% 100%, var(--c2), transparent 60%),
    var(--bg-subtle);
}
/* The two colors of a picture are always neighbours (teal with blue, purple with blue,
   gold with peach), so they blend instead of clashing. */
.feat-chat    { --c1: rgba(31, 142, 151, 0.10);  --c2: rgba(92, 143, 214, 0.08); }   /* teal and blue */
.feat-score   { --c1: rgba(169, 215, 196, 0.26); --c2: rgba(31, 142, 151, 0.07); }   /* mint and teal */
.feat-similar { --c1: rgba(146, 117, 223, 0.10); --c2: rgba(92, 143, 214, 0.08); }   /* purple and blue */
.feat-market  { --c1: rgba(92, 143, 214, 0.10);  --c2: rgba(31, 142, 151, 0.07); }   /* blue and teal */
.feat-road    { --c1: rgba(92, 143, 214, 0.09);  --c2: rgba(31, 142, 151, 0.08); }   /* blue and teal */
.feat-report  { --c1: rgba(146, 117, 223, 0.09); --c2: rgba(31, 142, 151, 0.07); }   /* purple and teal */

/* The report's four ticks pop in one by one when the box comes into view. */
.report-inside > span {
  opacity: 0;
  scale: 0.8;
  transition: opacity 0.3s, scale 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.is-visible .report-inside > span {
  opacity: 1;
  scale: 1;
}
.report-inside > .is-1 { transition-delay: 0.3s; }
.report-inside > .is-2 { transition-delay: 0.5s; }
.report-inside > .is-3 { transition-delay: 0.7s; }
.report-inside > .is-4 { transition-delay: 0.9s; }

.feat-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 24px 24px;
}
.feat-text h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.feat-text p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.features-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  text-align: center;
  color: var(--text-3);
}

/* A small piece that hovers over the picture. --tilt turns it a little. */
.float {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow-float);
  rotate: var(--tilt, 0deg);
  animation: hover-up 5s ease-in-out infinite;
}
@keyframes hover-up {
  50% { translate: 0 -7px; }
}

/* 1. Chat window */
.feat-chat {
  padding-block: 28px;
}
.chat-window {
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--shadow-panel);
  transition: rotate 0.5s var(--ease);
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.chat-head div {
  display: flex;
  flex-direction: column;
  font-size: 13.5px;
  line-height: 1.4;
}
.chat-head small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-3);
}
.chat-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--teal), var(--navy));
  color: #fff;
}
/* the Darb mark, turned white */
.chat-avatar img {
  width: 19px;
  height: 19px;
  filter: brightness(0) invert(1);
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px var(--good-tint);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink {
  50% { opacity: 0.35; }
}
.chat-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}
/* the messages arrive one after another once the box is on screen */
.bubble {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: calc(0.3s + var(--i) * 0.55s);
}
.is-visible .bubble {
  opacity: 1;
  transform: none;
}
.bubble-bot {
  align-self: flex-start;
  background: var(--bg-muted);
  border-end-start-radius: 4px;
}
.bubble-user {
  align-self: flex-end;
  background: var(--navy);
  color: #fff;
  border-end-end-radius: 4px;
}
.typing {
  display: inline-flex;
  gap: 4px;
  padding-block: 13px;
}
.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typing 1.2s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  50% { opacity: 0.3; translate: 0 -3px; }
}
.float-noted {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
}
.float .eyebrow {
  font-size: 10px;
}
.noted-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.float-noted {
  --tilt: 3deg;
  inset-block-start: 26px;
  inset-inline-end: 22px;
}
/* 2. Score: the gauge on a white plate, with what raised and lowered the score */
.score-plate,
.market-plate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 24px 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--shadow-float);
}
.gauge {
  position: relative;
  width: 184px;
  max-width: 100%;
}
.gauge svg {
  display: block;
  width: 100%;
}
.gauge-number {
  position: absolute;
  inset-inline: 0;
  inset-block-end: -6px;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: center;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.float-up,
.float-down {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-nav);
}
.float-up svg   { color: var(--good-text); }
.float-down svg { color: var(--risk-text); }
.float-up {
  --tilt: -5deg;
  inset-block-start: 22px;
  inset-inline-start: 14px;
}
.float-down {
  --tilt: 4deg;
  inset-block-end: 22px;
  inset-inline-end: 14px;
  animation-delay: -2.5s;
}

/* 3. Similar startups: three cards, the closest one in front */
.feat-similar {
  align-items: stretch;
}
.similar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.similar-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow-card);
  /* the cards slide in from the side, one after another */
  opacity: 0;
  transform: translateX(36px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: calc(0.2s + var(--i) * 0.14s);
}
html[dir="rtl"] .similar-list li {
  transform: translateX(-36px);
}
.is-visible .similar-list li,
html[dir="rtl"] .is-visible .similar-list li {
  opacity: 1;
  transform: none;
}
/* the closest one is bigger; the others step back a little */
.similar-list li:first-child {
  box-shadow: var(--shadow-float);
}
.similar-list li:nth-child(2) { margin-inline: 10px; }
.similar-list li:nth-child(3) { margin-inline: 20px; }
.is-visible .similar-list li:nth-child(3) { opacity: 0.8; }
.similar-list .chips {
  width: 100%;
}
.similar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}
/* a logo file, when there is one, covers the letter; the tile gets wider
   so a logo made of a word (like Sary or Foodics) can still be read */
.similar-logo {
  position: relative;
}
/* [class] makes this rule stronger than the colored tiles below, so a real logo
   has no color, no letter and no box behind it */
.similar-logo[class]:has(img) {
  width: 92px;
  height: 40px;
  border: 0;
  border-radius: 0;
  background: none;
  color: transparent;
}
.similar-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg);
}
/* a real logo stands by itself, with no box around it */
.similar-logo:has(img) img {
  background: none;
  object-position: center;
}
.similar-logo.is-1 { background: var(--purple); }
.similar-logo.is-2 { background: var(--teal); }
.similar-logo.is-3 { background: var(--navy); }
.similar-logo.is-4 { background: var(--coral); }
.similar-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.35;
}
.similar-name small {
  overflow: hidden;
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-3);
}
.similar-match {
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--purple-surface);
  font-size: 12px;
  font-weight: 800;
  color: var(--purple-text);
}

/* 4. Market: a small dashboard on a white plate.
      Top: the activity and place. Then the main number with its change, and the employees.
      Then two parts side by side: establishments by year, and the split by size.
      The four sizes always use the same colors: navy, teal, purple, gold. */
.feat-market {
  padding: 22px;
}
.market-plate {
  align-items: stretch;
  gap: 12px;
  width: min(540px, 100%);
  padding: 14px 18px 12px;
}
.market-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.market-top img {
  width: auto;
  height: 28px;
}
.market-where {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
}
.market-where small {
  font-size: 12px;
  color: var(--text-2);
}
.market-main {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.market-figure {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-2);
}
.market-figure b {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
/* the employees: a supporting number, pushed to the far side */
.market-figure.is-small {
  margin-inline-start: auto;
  padding-inline-start: 14px;
  border-inline-start: 2px solid var(--gold);
}
.market-figure.is-small b {
  font-size: 18px;
}
.market-change {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 4px;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  background: var(--bg-muted);
  font-size: 11.5px;
  color: var(--text-2);
}
.market-change b {
  font-size: 12.5px;
  color: var(--text);
}
.market-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}
.market-part {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.market-part .eyebrow {
  font-size: 10px;
}
/* one column per year, with the year under it */
.columns {
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 74px;
}
.col {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.col b {
  width: 100%;
  height: calc(var(--h) * 0.78);
  border-radius: 6px 6px 2px 2px;
  background: rgba(31, 142, 151, 0.32);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.8s var(--ease);
}
.col:last-child b { background: var(--teal); }
.col:nth-child(2) b { transition-delay: 0.08s; }
.col:nth-child(3) b { transition-delay: 0.16s; }
.col:nth-child(4) b { transition-delay: 0.24s; }
.col:nth-child(5) b { transition-delay: 0.32s; }
.is-visible .col b {
  transform: none;
}
.col i {
  font-size: 10.5px;
  font-style: normal;
  color: var(--text-3);
}
.col:last-child i {
  font-weight: 800;
  color: var(--text);
}
/* one bar cut into the four sizes; together they are 100% */
.size-strip {
  display: flex;
  gap: 2px;
  height: 12px;
}
.size-strip span {
  flex: var(--w);
  min-width: 5px;
  border-radius: 3px;
}
.size-names {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 16px;
  font-size: 12px;
  color: var(--text-2);
}
.size-names > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.size-names i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}
.size-names b {
  margin-inline-start: auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.size-strip span:nth-child(1), .size-names > span:nth-child(1) i { background: var(--navy); }
.size-strip span:nth-child(2), .size-names > span:nth-child(2) i { background: var(--teal); }
.size-strip span:nth-child(3), .size-names > span:nth-child(3) i { background: var(--purple); }
.size-strip span:nth-child(4), .size-names > span:nth-child(4) i { background: var(--gold); }
.market-source {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-3);
}

/* 5. Report: two pages that straighten when the box is hovered, and a download button */
.report-stack {
  position: relative;
}
.report-page {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 150px;
  padding: 18px 16px 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow-float);
  rotate: -4deg;
  transition: rotate 0.5s var(--ease), translate 0.5s var(--ease);
}
.report-back {
  position: absolute;
  inset: 0;
  rotate: 7deg;
  translate: 22px 4px;
  opacity: 0.75;
}
.feat:hover .report-page {
  rotate: -1deg;
  translate: 0 -4px;
}
.feat:hover .report-back {
  rotate: 10deg;
  translate: 34px 2px;
}
.report-arc {
  width: 74px;
  margin: 0 auto 4px;
}
.report-page span {
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--bg-muted);
}
.report-page span:nth-of-type(1) { width: 60%; background: var(--navy); }
.report-page span:nth-of-type(2) { background: var(--gold-surface); }
.report-page span:nth-of-type(3) { width: 80%; background: var(--purple-surface); }
.report-page span:nth-of-type(4) { width: 50%; background: var(--teal-surface); }
.report-page b {
  position: absolute;
  inset-block-end: 12px;
  inset-inline-start: 16px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  font-size: 10.5px;
}
.report-inside {
  --tilt: 3deg;
  display: flex;
  flex-direction: column;
  gap: 7px;
  inset-block-start: 22px;
  inset-inline-end: 14px;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-nav);
  animation-delay: -2.5s;
}
.report-inside > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.report-inside svg {
  padding: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #fff;
}
/* each part of the report has the color of its own box above */
.report-inside .is-1 svg { background: var(--mint-text); }   /* score */
.report-inside .is-2 svg { background: var(--gold); }        /* market */
.report-inside .is-3 svg { background: var(--purple); }      /* similar startups */
.report-inside .is-4 svg { background: var(--teal); }        /* roadmap */
.feat-report {
  align-items: flex-start;
  padding-inline-start: 34px;
}
.report-download {
  display: flex;
  align-items: center;
  justify-content: center;
  inset-block-end: -14px;
  inset-inline-end: -30px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

/* 6. Roadmap path
   A line runs through the five steps and fills as you scroll.
   index.js sets --progress (0 to 1) on .road and adds "is-on"
   to each step the line has reached. */
.feat-road {
  padding: 28px 18px;
}
.road {
  position: relative;
  width: 100%;
}
.road-line {
  position: absolute;
  inset-block-start: 17px;
  inset-inline: 10%;
  height: 3px;
  border-radius: var(--r-pill);
  background: var(--border-strong);
}
.road-fill {
  position: relative;
  width: calc(var(--progress, 0) * 100%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--navy));
}
html[dir="rtl"] .road-fill {
  background: linear-gradient(270deg, var(--teal), var(--navy));
}
/* the dot travelling at the head of the line */
.road-fill::after {
  content: '';
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: -6px;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 0 5px rgba(31, 142, 151, 0.25);
}
.road-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.road-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.road-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-3);
  font-size: 14px;
  font-weight: 800;
  transition: background 0.4s, border-color 0.4s, color 0.4s, scale 0.4s var(--ease);
}
/* each step is a white card with the authority's logo */
.road-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
  padding: 16px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  background: var(--bg);
  font-size: 14px;
  opacity: 0.5;
  translate: 0 8px;
  transition: opacity 0.5s, translate 0.5s var(--ease), box-shadow 0.5s;
}
.road-card img {
  width: auto;
  height: 30px;
  margin-bottom: 8px;
  filter: grayscale(1);
  transition: filter 0.5s;
}
.road-card strong {
  font-size: 13px;
  line-height: 1.35;
}
.road-card .text-3 {
  font-size: 11.5px;
}
/* a step the line has passed: teal */
.road-step.is-on .road-dot {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}
.road-step.is-on .road-card {
  opacity: 1;
  translate: 0 0;
  box-shadow: var(--shadow-card);
}
/* the step the line is on now: navy, a little bigger, with a ring */
.road-step.is-current .road-dot {
  border-color: var(--navy);
  background: var(--navy);
  scale: 1.12;
  box-shadow: 0 0 0 5px rgba(27, 68, 103, 0.16);
}
.road-step.is-current .road-card {
  border-color: var(--navy);
  box-shadow: var(--shadow-float);
}
.road-step.is-on .road-card img {
  filter: none;
}

/* ---------- 11. Explorers ----------
   Three explorers in one block. The names are on one side; the preview of the
   selected one shows on the other. index.js moves "is-active" between them. */

.x-explore {
  display: flex;
  flex-direction: column;
  gap: 104px;
  margin-top: -56px;   /* sits closer to its title above */
}
/* One explorer per row: the words on one side, the preview on the other.
   Every second row swaps sides, so the page reads as a zigzag. */
.x-item {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 64px;
  --tilt: -5deg;
}
html[dir="rtl"] .x-item {
  --tilt: 5deg;
}
.x-item:nth-child(even) {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  --tilt: 5deg;
}
html[dir="rtl"] .x-item:nth-child(even) {
  --tilt: -5deg;
}
.x-item:nth-child(even) .x-panel {
  order: -1;
}
.x-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}
.x-number {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(90deg, var(--teal), var(--navy));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.x-title {
  color: var(--text);
}
.x-more > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 14px;
}
.x-more .lead {
  font-size: 16px;
}
/* The preview leans back a little in space, and straightens when you reach for it. */
.x-panel > :first-child {
  position: relative;
  transform-style: preserve-3d;
  /* index.js sets --mouse-x and --mouse-y, so the card follows the mouse a little */
  transform:
    perspective(1400px)
    rotateY(calc(var(--tilt) + var(--mouse-x, 0deg)))
    rotateX(var(--mouse-y, 0deg));
  transition: transform 0.5s var(--ease);
}
.x-panel.is-following > :first-child {
  transition: transform 0.12s linear;
}
.x-panel:focus-within > :first-child {
  transform: perspective(1400px);
}
/* Depth: a second card sits behind the preview, and the pieces inside stand above it. */
.x-panel .mock,
.x-panel .req-list {
  --behind: 18px;
  box-shadow:
    var(--behind) 18px 0 -1px var(--teal-tint),
    var(--behind) 18px 0 0 var(--border),
    0 24px 50px rgba(27, 68, 103, 0.14);
}
html[dir="rtl"] .x-panel .mock,
html[dir="rtl"] .x-panel .req-list {
  --behind: -18px;
}
.mock-search,
#startup-demo .chips,
.mock-count {
  transform: translateZ(14px);
}
/* the pieces inside a preview arrive one after another */
.x-panel .mock-tile,
.x-panel .req-row {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.is-visible .x-panel .mock-tile,
.is-visible .x-panel .req-row {
  opacity: 1;
  transform: none;
}
.is-visible .x-panel :is(.mock-tile, .req-row):nth-child(1) { transition-delay: 0.15s; }
.is-visible .x-panel :is(.mock-tile, .req-row):nth-child(2) { transition-delay: 0.25s; }
.is-visible .x-panel :is(.mock-tile, .req-row):nth-child(3) { transition-delay: 0.35s; }
.is-visible .x-panel :is(.mock-tile, .req-row):nth-child(4) { transition-delay: 0.45s; }

.mock {
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-float);
}
.mock-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding-inline: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-size: 13px;
}
.mock .pill {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  cursor: default;
}
.mock-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mock-tile {
  gap: 12px;
}
/* The startups preview really works: the chips and the search filter these tiles.
   The fixed height keeps the box still when fewer tiles are showing. */
#startup-demo .mock-tiles {
  align-content: start;
  min-height: 228px;
}
.mock-tile.is-hidden {
  display: none;
}
/* Each tile is a white card that stands above the preview, and rises under the mouse. */
.x-panel a.mock-tile {
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 10px 24px rgba(27, 68, 103, 0.1);
  color: inherit;
  translate: 0 0 30px;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), translate 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}
.x-panel a.mock-tile:hover {
  border-color: var(--teal);
  box-shadow: 0 18px 36px rgba(27, 68, 103, 0.18);
  translate: 0 -4px 60px;
}
/* The logo on its own plate, the same size for all, with the name under it.
   [class] is needed to beat the older logo rule. */
.mock-brand {
  flex-direction: column;
  align-items: flex-start;
}
.mock-brand .similar-logo[class]:has(img) {
  width: 100%;
  height: 58px;
  border-radius: 10px;
  background: var(--bg-subtle);
}
.mock-brand .similar-logo img {
  inset: 11px 32px;
  width: calc(100% - 64px);
  height: calc(100% - 22px);
  background: none;
  mix-blend-mode: multiply;   /* a logo with a white background melts into the plate */
}
/* how many startups each chip would show, in a small number beside its name */
#startup-demo .pill::after {
  content: attr(data-tally);
  font-size: 11px;
  opacity: 0.6;
}
.mock-count {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
}
.mock-tile.is-back {
  animation: tile-back 0.35s var(--ease);
}
@keyframes tile-back {
  from { opacity: 0; scale: 0.96; }
}
.mock-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  color: var(--text);
}
.mock-search input::placeholder {
  color: var(--text-3);
}
.mock-search:focus-within {
  border-color: var(--teal);
}
.mock-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 0;
  font-size: 13.5px;
  text-align: center;
  color: var(--text-3);
}
/* a startup's logo beside its name */
.mock-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Every logo in the previews sits in the same white square, so they line up
   whatever their shape. The real explorer pages do the same. */
.req-logo {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: var(--shadow-card);
}
/* the authority's logo at the start of a requirement row */
.req-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.req-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.req-demo {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.req-list {
  width: 100%;
  padding: 6px 18px;
  box-shadow: var(--shadow-float);
}
.req-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 12px;
  border-bottom: 1px solid var(--divider);
}
.req-list {
  transition: border-color 0.25s;
}
.req-list:hover {
  border-color: var(--teal);
}
.req-row:last-child {
  border-bottom: none;
}
.req-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
}
.req-text .text-3 {
  font-size: 12px;
}
.req-note {
  margin-top: 24px;   /* clears the second card behind the list */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--link-text);
}

/* ---------- Incubators and accelerators: floating cards ----------
   Six program cards in two columns, the second column set lower. They pop in one by
   one when the row comes into view, then keep floating gently. */
.net-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 32px;
}
.net-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #FFFFFF;
  box-shadow: 0 14px 34px rgba(27, 68, 103, 0.12);
  color: inherit;
  opacity: 0;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}
.net-card:nth-child(even) {
  position: relative;
  top: 32px;
}
.is-visible .net-card {
  animation:
    net-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay) both,
    float-gently 6s ease-in-out calc(var(--delay) + 0.55s) infinite;
}
@keyframes net-pop {
  from { opacity: 0; scale: 0.7; }
  to   { opacity: 1; scale: 1; }
}
.net-card:hover {
  z-index: 2;
  border-color: var(--teal);
  transform: scale(1.04);
  box-shadow: 0 22px 48px rgba(27, 68, 103, 0.2);
}
.net-card.is-1 { --delay: 0.1s; }
.net-card.is-2 { --delay: 0.2s; }
.net-card.is-3 { --delay: 0.3s; }
.net-card.is-4 { --delay: 0.4s; }
.net-card.is-5 { --delay: 0.5s; }
.net-card.is-6 { --delay: 0.6s; }
.net-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-subtle);
  font-size: 18px;
  font-weight: 800;
  color: var(--teal-text);
}
/* the logo covers the first letter, which only shows if the logo cannot load */
.net-logo {
  position: relative;
  overflow: hidden;
}
.net-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 6px;
  background: #FFFFFF;
  object-fit: contain;
}
.net-words {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.net-words strong {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--text);
}

/* ---------- 13. About: the words on one side, a floating phone on the other ----------
   The words come first, so in Arabic they are on the right and the phone on the left. */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}
.about-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.about-text .eyebrow {
  color: var(--teal-text);
}
/* the two paragraphs: the same width, even line lengths, a small gap between them */
.about-text .lead {
  max-width: 560px;
  text-wrap: pretty;
}
.about-text .lead + .lead {
  margin-top: -6px;
}
/* the three things Darb is built on: an icon, a title and one line each */
.about-points {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin: 12px 0 4px;
  padding: 0;
  list-style: none;
}
.about-point {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.about-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 13px;
}
.about-point.is-1 .about-icon { background: var(--teal-surface);   color: var(--teal-text); }
.about-point.is-2 .about-icon { background: var(--purple-surface); color: var(--purple-text); }
.about-point.is-3 .about-icon { background: var(--navy-surface);   color: var(--navy); }
.about-words {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}
.about-words strong {
  font-size: 15.5px;
  color: var(--text);
}

/* a very pale panel with the whole phone in the middle of it */
.about-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 560px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(160deg, #F0F8F9, #F3F5FB);
}

/* three soft circles behind the phone */
.about-orbits i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2);
  border: 1px solid rgba(31, 142, 151, 0.12);
  border-radius: 50%;
}
.about-orbits i:nth-child(1) { --size: 360px; background: rgba(255, 255, 255, 0.6); }
.about-orbits i:nth-child(2) { --size: 520px; }
.about-orbits i:nth-child(3) { --size: 680px; }

/* The phone itself: a white frame with a soft shadow. It rises into place first. */
.device {
  position: relative;
  width: 240px;
  aspect-ratio: 9 / 19;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 38px;
  background: #FFFFFF;
  box-shadow: 0 24px 60px rgba(27, 68, 103, 0.16);
  translate: 0 50px;
  transition: translate 0.9s var(--ease);
}
.is-visible .device {
  translate: 0 0;
}
@keyframes float-gently {
  50% { translate: 0 -8px; }
}
.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 30px;
  background: var(--bg);
}

/* the small white cards: one on each side, resting on the edge of the phone.
   They pop in after the phone has risen, then keep floating gently. */
.about-float {
  position: absolute;
  top: calc(50% - 150px);   /* a little above the middle of the phone */
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 116px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 12px 30px rgba(27, 68, 103, 0.12);
  opacity: 0;
  scale: 0.7;
  transition: opacity 0.35s 0.8s, scale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s;
  animation: float-gently 6s ease-in-out infinite;
}
.is-visible .about-float {
  opacity: 1;
  scale: 1;
}
.about-float-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--teal-tint);
  color: var(--teal-text);
}
.about-float.is-2 .about-float-icon {
  background: var(--purple-surface);
  color: var(--purple-text);
}
.about-float-words {
  display: flex;
  flex-direction: column;
}
.about-float small {
  font-size: 11.5px;
  color: var(--text-2);
}
.about-float strong {
  font-size: 14px;
  color: var(--text);
}
/* measured from the middle of the panel, so each card overlaps the phone's edge by 30px */
.about-float.is-1 { inset-inline-start: calc(50% - 206px); }
.about-float.is-2 { inset-inline-end: calc(50% - 206px); transition-delay: 1.05s; animation-delay: -3s; }
/* no room beside the phone in a narrower two-column layout */
@media (max-width: 1180px) {
  .about-float {
    display: none;
  }
}

/* The small pill at the top of the phone. */
.phone-screen::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 34%;
  width: 32%;
  height: 16px;
  border-radius: var(--r-pill);
  background: var(--bg-muted);
  z-index: 2;
}

/* The assessment page inside the phone. It is built 360px wide, like on a real phone,
   then shrunk to the width of the phone's screen. index.js measures the screen and sets
   --fit (for example 0.55), so it always fits, whatever the size of the window. */
.phone-app {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 360px;
  height: calc(100% / var(--fit, 0.55));   /* exactly as tall as the screen, before it is shrunk */
  padding: 0 18px 34px;
  background: linear-gradient(180deg, #F3F7FA 0, var(--bg) 260px);
  transform: scale(var(--fit, 0.55));
  transform-origin: 0 0;
}
/* status bar: the time left of the notch, the icons right of it (like a real iPhone) */
.app-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 2px 8px 0 24px;
  color: var(--text);
}
.app-time {
  font-family: -apple-system, 'SF Pro Text', var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.app-status-icons {
  display: flex;
  align-items: center;
  gap: 3px;
  fill: currentColor;
  scale: 0.68;
  transform-origin: right center;
}
.app-battery {
  position: relative;
  width: 24px;
  height: 11.5px;
  padding: 1.5px;
  border: 1.2px solid rgba(15, 36, 56, 0.45);
  border-radius: 3.5px;
}
.app-battery::after {
  content: '';
  position: absolute;
  top: 3px;
  right: -3.5px;
  width: 1.8px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: rgba(15, 36, 56, 0.45);
}
.app-battery i {
  display: block;
  width: 78%;
  height: 100%;
  border-radius: 1.5px;
  background: var(--text);
}
/* the app's top bar */
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 18px;
}
.app-round {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
html[dir="rtl"] .app-round:first-child svg {
  transform: scaleX(-1);
}
.app-bar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
}
.app-bar-title img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.app-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.app-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.app-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--bg-muted);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-nav);
}
.app-chip.is-teal { background: var(--teal-tint); color: var(--teal-text); }
.app-chip.is-live { background: var(--good-tint); color: var(--good-text); }
.app-chip.is-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
}
/* the home bar at the bottom of the screen */
.app-home {
  position: absolute;
  inset-block-end: 1.6%;
  left: 50%;
  width: 36%;
  height: 0.9%;
  min-height: 3px;
  translate: -50% 0;
  border-radius: var(--r-pill);
  background: var(--text);
}
/* light falling across the glass */
.phone-glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 30%),
              linear-gradient(180deg, transparent 88%, rgba(255, 255, 255, 0.9) 100%);
  pointer-events: none;
}
.app-tabs {
  display: flex;
  gap: 4px;
  margin-top: 16px;
  padding: 4px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--bg-muted);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text-3);
}
.app-tabs span {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: var(--r-pill);
}
/* the last tabs fade out, as if the row scrolls on */
.app-tabs {
  -webkit-mask-image: linear-gradient(to left, #000 72%, transparent 98%);
  mask-image: linear-gradient(to left, #000 72%, transparent 98%);
}
html[dir="ltr"] .app-tabs {
  -webkit-mask-image: linear-gradient(to right, #000 72%, transparent 98%);
  mask-image: linear-gradient(to right, #000 72%, transparent 98%);
}
.app-tabs .is-active {
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
/* the blue box with the dial, the same as on the assessment page */
.app-hero {
  flex: 1;   /* takes up any spare height, so nothing is left empty under the bars */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 24px 18px 56px;
  border-radius: var(--r-lg);
  background: var(--gradient-brand);
  color: #fff;
  text-align: center;
}
.app-dial {
  position: relative;
  width: 210px;
}
.app-dial svg {
  display: block;
  width: 100%;
  overflow: visible;
}
.app-number {
  position: absolute;
  inset-inline: 0;
  inset-block-end: -4px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin: 0;
}
.app-number strong {
  font-size: 60px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}
.app-number span {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.7;
}
.app-label {
  margin-top: 16px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--teal-bright);
}
.app-verdict {
  margin-top: 2px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
/* three small boxes that sit over the bottom edge of the blue box */
.app-readings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: -40px;
  padding-inline: 10px;
}
.app-reading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  box-shadow: var(--shadow-card);
}
.app-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  border-radius: 9px;
  background: var(--good-tint);
  color: var(--good-text);
}
.app-reading small {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-3);
}
.app-reading strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--good-text);
}
.app-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.app-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.app-box-title svg {
  color: var(--good);
}
.app-move {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-2);
}
.app-move i {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--bg-muted);
}
.app-move b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--good);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease) 1.3s;
}
html[dir="rtl"] .app-move b {
  transform-origin: right;
}
.app-move + .app-move b {
  transition-delay: 1.5s;
}
.is-visible .app-move b {
  transform: none;
}
.app-move em {
  font-style: normal;
  font-weight: 800;
  text-align: end;
  color: var(--good-text);
}

/* ---------- 14. Call to action ---------- */

.cta {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 72px 24px;
  border-radius: 28px;
  background: var(--gradient-brand);
  color: #fff;
  text-align: center;
}
.cta .headline {
  color: #fff;
}
.cta p {
  max-width: 560px;
  margin: 0;
  font-size: 16.5px;
  opacity: 0.85;
}
.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.cta-primary {
  background: #fff;
  color: var(--navy);
}
.cta-primary:hover {
  transform: translateY(-2px);
}
.cta-secondary {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Arabic reading rhythm, scoped to the landing page. */
html[dir="rtl"] .landing {
  line-height: 1.8;
}
html[dir="rtl"] .landing :is(.headline, .x-title) {
  text-wrap: balance;
}
html[dir="rtl"] .landing .hero-title {
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.5;
}
html[dir="rtl"] .landing .hero-title .line {
  padding-block: 0.06em 0.14em;
}
html[dir="rtl"] .landing .lead {
  line-height: 1.95;
  text-wrap: pretty;
}
html[dir="rtl"] .landing .hero-lead {
  max-width: 510px;
}
html[dir="rtl"] .landing :is(.eyebrow, .chip, .tag, .pill) {
  letter-spacing: 0;
}
html[dir="rtl"] .landing :is(.bubble, .road-card, .about-words) {
  line-height: 1.8;
}
html[dir="rtl"] .landing .composer-text {
  line-height: 1.85;
  min-height: 3.7em;
}
html[dir="rtl"] .landing .marquee-item {
  direction: rtl;
}
html[dir="rtl"] .landing .marquee-item b {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Landing presentation: clear actions, quieter previews and section rhythm. */
.hero {
  min-height: 720px;
  padding-block: 156px 80px;
}
.hero-text {
  gap: 22px;
  max-width: 650px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero-actions .btn {
  min-height: 52px;
  height: auto;
  padding: 14px 24px;
}
.hero-secondary {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--navy);
}
.hero-secondary:hover {
  background: var(--navy-tint);
  border-color: var(--navy);
}
.landing .composer {
  width: min(500px, 100%);
  gap: 10px;
  padding: 18px 22px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}
.composer-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-2);
}
.landing .composer-text,
html[dir="rtl"] .landing .composer-text {
  min-height: 3.4em;
  font-size: 15px;
  line-height: 1.7;
}
.landing .section-head {
  gap: 18px;
}
.section-head > .eyebrow {
  color: var(--teal-text);
}
.section-head > .lead {
  max-width: 650px;
}
.landing .cta {
  background: radial-gradient(ellipse at top right, var(--navy), transparent 70%), var(--navy-deep);
  padding-block: 80px;
  gap: 24px;
}
.landing .cta .headline {
  max-width: 740px;
  text-wrap: balance;
}

/* ---------- Landing strength ----------
   Bigger headings and darker text so the page reads with confidence,
   and real names in the preview cards. */

/* Calmer heading sizes: clear, but not shouting */
.landing .headline-lg { font-size: clamp(26px, 3vw, 38px); }
.landing .headline-md { font-size: clamp(22px, 2.3vw, 28px); }
.landing .lead {
  font-size: 16px;
  color: var(--text-nav);
}
/* wide enough for each headline line to stay on one line */
.landing .hero-text {
  max-width: 680px;
}
.landing .hero-title {
  font-size: clamp(34px, 4.2vw, 56px);
}
/* In Arabic the headline is short ("لكل فكرة دَرب."), so it sits on ONE line
   (the space between the two words comes from the space in index.html) */
html[dir="rtl"] .landing .hero-title .line {
  display: inline-block;
}
html[dir="rtl"] .landing .hero-title {
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1.3;
}
.landing .hero-lead {
  max-width: 520px;
  font-size: 17px;
}
.landing .x-title {
  font-size: clamp(18px, 1.9vw, 22px);
}
.landing .cta .headline {
  font-size: clamp(24px, 2.8vw, 34px);
}

/* a real name and one line about it, where the grey bars used to be */
.mock-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.mock-name strong {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
}
.mock-name span {
  font-size: 12.5px;
  color: var(--text-3);
}
.mock-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
}
.mock-caption {
  align-self: center;
  font-size: 11.5px;
  color: var(--text-3);
}

@media (max-width: 1000px) {
  .landing .hero-lead {
    font-size: 16px;
  }
}

/* ---------- 15. Tablet and phone ---------- */

@media (max-width: 1000px) {
  .landing {
    gap: 80px;
  }

  /* narrow screens: text sits in the sky, the city and the two figures stay below it */
  .hero {
    align-items: flex-start;
    min-height: 0;
    padding-bottom: 46vw;
  }
  .hero-photo {
    background-position: 84% 100%;
    background-size: auto 62%;
  }
  .hero-photo::after {
    background:
      linear-gradient(180deg, var(--bg) 40%, transparent 62%),
      linear-gradient(0deg, var(--bg) 1%, transparent 12%);
  }

  /* explorers: the words, then the preview under them, with no lean */
  .x-explore {
    gap: 56px;
    margin-top: -32px;
  }
  .x-item,
  .x-item:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .x-item:nth-child(even) .x-panel {
    order: 0;
  }
  .x-panel > :first-child {
    transform: none;
  }
  .x-panel .mock,
  .x-panel .req-list {
    box-shadow: var(--shadow-card);
  }

  /* everything that was side by side becomes one column */
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  /* the feature grid goes down to two columns; the last box (the report) fills its row */
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .features .feat:last-of-type {
    grid-column: 1 / -1;
  }
  /* text always comes before its picture */
  .split-reverse .split-text {
    order: 0;
  }


  /* About: the words first, then the phone under them */
  .about {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  /* roadmap: the path runs down the side instead of across */
  .road {
    max-width: 520px;
    margin-inline: auto;
  }
  .road-line {
    inset-block: 19px;
    inset-inline: 18px auto;
    width: 3px;
    height: auto;
  }
  .road-fill,
  html[dir="rtl"] .road-fill {
    width: 100%;
    height: calc(var(--progress, 0) * 100%);
    background: linear-gradient(180deg, var(--teal), var(--navy));
  }
  .road-fill::after {
    inset-block: auto -6px;
    inset-inline: 50% auto;
    margin: 0;
    margin-inline-start: -6px;
  }
  .road-steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .road-step {
    flex-direction: row;
    text-align: start;
  }
  .road-card {
    align-items: flex-start;
    padding: 12px 14px;
  }
  .road-dot {
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  .about-stage {
    min-height: 490px;
  }
  .device {
    width: 208px;
  }
  /* no room beside the phone on a small screen */
  .about-float {
    display: none;
  }
  .hero-text {
    gap: 20px;
  }
  .hero-actions {
    width: 100%;
    gap: 10px;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
    padding-inline: 16px;
  }
  .landing .composer {
    padding: 16px 18px;
  }
  .landing {
    gap: 64px;
    padding-bottom: 56px;
  }
  .hero {
    padding-top: 124px;
  }
  .composer-text {
    min-height: 78px;
    font-size: 16px;
  }
  .strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .strip-label {
    max-width: none;
    text-align: center;
  }

  /* the feature grid becomes one column */
  .features {
    grid-template-columns: minmax(0, 1fr);
    margin-top: -24px;
  }
  .feat-wide {
    grid-column: auto;
  }
  /* on a phone the small pieces sit under the chat instead of over it */
  .feat-chat .float {
    position: static;
    width: 100%;
    rotate: none;
    animation: none;
  }
  /* the market dashboard: its two parts go one under the other */
  .feat-market {
    padding: 16px;
  }
  .market-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .market-figure.is-small {
    margin-inline-start: 0;
  }

  .cta {
    padding: 48px 18px;
  }
  .cta-actions .btn {
    width: 100%;
  }

}

@media (max-width: 400px) {
  #startup-demo .mock-tiles {
    min-height: 0;
  }
}

/* People who turn off animations see everything in its final state */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .bubble,
  .similar-list li,
  .col b {
    opacity: 1;
    transform: none;
  }
  .float,
  .live-dot {
    animation: none;
  }
  .hero-haze {
    display: none;
  }
  .mock-tile.is-back {
    animation: none;
  }
  .net-card {
    opacity: 1;
  }
  .is-visible .net-card {
    animation: none;
  }
  .x-panel .mock-tile,
  .x-panel .req-row {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .x-panel > :first-child {
    transform: none;
  }
  .about-float,
  .report-inside > span {
    opacity: 1;
    scale: 1;
    transition: none;
    animation: none;
  }
  .device {
    translate: 0 0;
    transition: none;
  }
  .app-move b {
    transform: none;
    transition: none;
  }

}

@media (max-width: 640px) {
  .marquee-logo {
    height: 32px;
  }
}

/* Dots under the swipeable program cards. They only show on a phone. */
.net-dots {
  display: none;
}

/* Phone layout of the program cards. It stays last, so it wins over the tablet rules above. */
@media (max-width: 640px) {
  /* A row of cards you swipe through. The next card peeks in at the edge,
     and the dots below show how many there are and where you are. */
  .net-cards {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    gap: 12px;
    margin-inline: -24px;
    padding: 8px 24px 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 24px;
    scrollbar-width: none;
  }
  .net-cards::-webkit-scrollbar {
    display: none;
  }
  .net-card {
    scroll-snap-align: start;
  }
  .net-card:nth-child(even) {
    top: 0;
  }
  .net-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
  }
  .net-dots i {
    width: 7px;
    height: 7px;
    border-radius: var(--r-pill);
    background: var(--border-strong);
    transition: width 0.25s var(--ease), background 0.25s;
  }
  .net-dots i.is-active {
    width: 22px;
    background: var(--teal);
  }
  /* the startup tiles stay two by two */
  .x-panel a.mock-tile {
    padding: 10px;
  }
  .mock-brand .similar-logo[class]:has(img) {
    height: 48px;
  }
  .mock-brand .similar-logo img {
    inset: 8px 14px;
    width: calc(100% - 28px);
    height: calc(100% - 16px);
  }
}
