/* emara.com.sa: one Arabic page, right to left. The first fold is the product drawn as a tower in
   Riyadh at night. Under it the bands alternate paper and night: the ecosystem, the property's
   steps, the difference, the packages, and the ask. The colours are the app's own tokens
   (apps/web/src/app.css) with the page's night beside them. There is no script: every movement is
   CSS or a drawing's own animation, and it stops for a reader who asked for less motion. */

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-weight: 400;
  font-display: swap;
  src: url(fonts/plex-arabic-400.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-weight: 600;
  font-display: swap;
  src: url(fonts/plex-arabic-600.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-weight: 400;
  font-display: swap;
  src: url(fonts/plex-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-weight: 600;
  font-display: swap;
  src: url(fonts/plex-latin-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}

:root {
  --wine: #682f3b;
  --wine-dark: #56232e;
  --ivory: #f4f0e8;
  --paper: #fffefa;
  --ink: #2c2826;
  --muted: #6c6058;
  --line: #e3dace;
  /* The page's own, beside the app's: the night, the light in it, and the words on it. */
  --night: #1f0e16;
  --night-up: #2b131d;
  --glow: #e3ab85;
  --cream: #f3e9e2;
  --warm: #fff3e6;
  --earth: #170a10;
  --cream-soft: rgb(243 233 226 / 76%);
  --edge: rgb(227 171 133 / 30%);
  --r-card: 12px;
  --fs-h2: clamp(1.8rem, 1.15rem + 2.5vw, 3.1rem);
  --gutter: clamp(20px, 5vw, 56px);
  --band: clamp(4.5rem, 3rem + 7vw, 8.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}
h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  display: block;
}
:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
  border-radius: 4px;
}
.wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
/* Read aloud, not shown: the words a picture carries. */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -80px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--glow);
  color: var(--night);
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}

/* ——— The lockup and the buttons ——— */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1.25rem;
}
.lockup svg {
  width: 1.3em;
  height: 1.3em;
  fill: var(--glow);
}
.ai {
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 5px;
  background: color-mix(in srgb, currentColor 14%, transparent);
  vertical-align: 0.25em;
  margin-inline-start: 2px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding-inline: 1.7rem;
  border-radius: 999px;
  background: var(--glow);
  color: var(--night);
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s;
}
.btn:hover {
  background: var(--warm);
}
.btn--ghost {
  background: transparent;
  color: inherit;
  box-shadow: inset 0 0 0 1.5px rgb(243 233 226 / 40%);
}
.btn--ghost:hover {
  background: rgb(243 233 226 / 10%);
}
/* On a light band: an outline in the page's wine, filled when pointed at. */
.btn--line {
  background: transparent;
  color: var(--wine);
  box-shadow: inset 0 0 0 1.5px var(--wine);
}
.btn--line:hover {
  background: var(--wine);
  color: var(--paper);
}
.btn--sm {
  min-height: 40px;
  padding-inline: 1.15rem;
  font-size: 0.94rem;
}
.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ——— The first fold: the tower in its city ——— */
.hero {
  --layer-h: min(160vw, 760px);
  position: relative;
  overflow: hidden;
  background: linear-gradient(#1b0b13 0, var(--night) 45%, var(--night-up) 100%);
  color: var(--cream);
}
.bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 36px);
  padding-block: 18px;
  padding-inline: var(--gutter);
}
.bar__links {
  display: none;
  gap: clamp(16px, 2vw, 30px);
  color: var(--cream-soft);
  font-size: 0.96rem;
}
.bar__links a:hover {
  color: var(--cream);
}
.bar .btn {
  margin-inline-start: auto;
}
.hero__say {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 18px;
  justify-items: start;
  padding: 28px var(--gutter) 8px;
}
.for {
  font-weight: 600;
  color: var(--glow);
}
h1 {
  font-size: clamp(2.05rem, 8.6vw, 3.4rem);
  line-height: 1.28;
  font-weight: 600;
}
h1 em {
  display: block;
  font-style: normal;
  color: var(--glow);
}
/* The picture: the city behind, the tower over it, both on one 16 by 9 sheet. On a phone the sheet is
   taller than its window and slid so the tower and the names on both its sides fill the screen. */
.scene {
  position: relative;
  height: calc(var(--layer-h) * 0.8);
  overflow: hidden;
}
.scene__layer {
  position: absolute;
  bottom: 0;
  left: calc(var(--layer-h) * -0.1944);
  height: var(--layer-h);
  width: auto;
  max-width: none;
  aspect-ratio: 16 / 9;
  /* The drawing is laid out left to right whatever the page's direction: each label is set from its x. */
  direction: ltr;
}
.scene text {
  font-family: inherit;
}
/* The labels are sized in the drawing's own units: larger where the drawing is shown small. */
.t-name {
  font-size: 25px;
  font-weight: 600;
}
.t-line {
  font-size: 20px;
}
/* The lift stops at one floor at a time: that floor lights, its name comes forward and its line shows. */
.halo {
  transform-box: fill-box;
  transform-origin: center;
  animation: breathe 6s ease-in-out infinite;
}
.lit,
.name,
.line,
.lift {
  animation-duration: 12s;
  animation-iteration-count: infinite;
}
.lit,
.name,
.line {
  animation-timing-function: linear;
  animation-delay: calc(var(--i) * 2s);
}
.lit {
  opacity: 0;
  animation-name: lit;
}
.lit--w {
  animation-name: lit-windows;
}
.name {
  opacity: 0.66;
  animation-name: name;
}
.line {
  opacity: 0;
  animation-name: line;
}
.lift {
  filter: drop-shadow(0 0 4px var(--glow));
  animation-name: lift;
  animation-timing-function: ease-in-out;
}
@keyframes breathe {
  50% {
    transform: scale(1.35);
    opacity: 0.12;
  }
}
@keyframes lit {
  0%,
  14.7% {
    opacity: 0.16;
  }
  17.3%,
  100% {
    opacity: 0;
  }
}
@keyframes lit-windows {
  0%,
  14.7% {
    opacity: 0.95;
  }
  17.3%,
  100% {
    opacity: 0;
  }
}
@keyframes name {
  0%,
  14.7% {
    opacity: 1;
  }
  17.3%,
  100% {
    opacity: 0.66;
  }
}
@keyframes line {
  0% {
    opacity: 0;
  }
  1.6%,
  14.7% {
    opacity: 0.9;
  }
  17.3%,
  100% {
    opacity: 0;
  }
}
@keyframes lift {
  0%,
  15.5% {
    transform: translateY(0);
  }
  18.9%,
  32.1% {
    transform: translateY(-66px);
  }
  35.5%,
  48.8% {
    transform: translateY(-132px);
  }
  52.2%,
  65.5% {
    transform: translateY(-198px);
  }
  68.9%,
  82.1% {
    transform: translateY(-264px);
  }
  85.5%,
  98.8% {
    transform: translateY(-330px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (min-width: 1000px) {
  /* On a screen wider than the drawing can stretch, the fold keeps to the middle and the city fades
     out at its sides. */
  .hero {
    --side: max(0px, calc((100vw - 1780px) / 2));
    --sheet-h: max(100cqh, 56.25cqw);
    container-type: size;
    /* As tall as the screen where that costs the city little: a taller fold crops the drawing's
       right end, where the KAFD towers stand. */
    height: clamp(600px, max(56.25vw, min(100svh, 58.5vw)), 1000px);
    padding-inline: var(--side);
  }
  .bar {
    padding-inline: max(var(--gutter), 4.5cqw);
  }
  .bar__links {
    display: flex;
    margin-inline-start: clamp(8px, 2vw, 28px);
  }
  .scene {
    position: absolute;
    inset-block: 0;
    inset-inline: var(--side);
    height: auto;
  }
  .scene__layer {
    left: 0;
    width: max(100cqw, 177.78cqh);
    height: var(--sheet-h);
    aspect-ratio: auto;
  }
  /* The words sit in the half the tower leaves free, above the city's line. */
  .hero__say {
    position: absolute;
    inset-block: 76px calc(var(--sheet-h) * 0.35);
    inset-inline-start: calc(var(--side) + max(var(--gutter), 4.5cqw));
    width: 45.5cqw;
    align-content: center;
    gap: 1.6cqw;
    padding: 0;
  }
  h1 {
    font-size: clamp(2.1rem, 4.6cqw, 5.25rem);
    line-height: 1.26;
  }
}
@media (min-width: 1280px) {
  .t-name {
    font-size: 23px;
  }
  .t-line {
    font-size: 18px;
  }
}
@media (min-width: 1781px) {
  .scene {
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  }
}

/* ——— The bands under it ——— */
.band {
  padding-block: var(--band);
}
.band--paper {
  background: var(--paper);
}
.band--ivory {
  background: var(--ivory);
}
.band--night {
  background: var(--night);
  color: var(--cream);
}
.head {
  display: grid;
  gap: 10px;
  max-width: 46rem;
  margin-block-end: clamp(28px, 4vw, 52px);
}
.kick {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--wine);
}
.kick svg {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
}
.band--night .kick {
  color: var(--glow);
}
h2 {
  font-size: var(--fs-h2);
  line-height: 1.32;
  font-weight: 600;
  text-wrap: balance;
}

/* ——— The ecosystem: the data in one platform, the agent running it, the places it reaches ——— */
/* On a phone the drawing keeps its middle: it is shown at full size and cut to it. */
#eco {
  background: linear-gradient(var(--earth) 0, var(--night) 220px);
}
.eco__art {
  display: flex;
  justify-content: center;
  height: 280px;
  overflow: hidden;
}
.eco__map {
  flex: none;
  width: 1000px;
  height: 505px;
  margin-block-start: -110px;
  direction: ltr;
}
.eco__map text {
  font-family: inherit;
}
.eco__map .far,
.eco__still {
  display: none;
}
.eco__ring {
  transform-origin: 500px 250px;
  animation: turn 160s linear infinite;
}
@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}
.eco__groups {
  display: grid;
  gap: 14px;
  margin-block-start: 18px;
}
.eco__groups li {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px dashed var(--edge);
  border-radius: var(--r-card);
}
.eco__groups h3 {
  font-size: 1.1rem;
  color: var(--glow);
}
.eco__groups p {
  color: var(--cream-soft);
  font-size: 0.95rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: rgb(255 255 255 / 6%);
  font-size: 0.94rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip svg {
  width: 1.2em;
  height: 1.2em;
  flex: none;
}
.wa {
  color: #25d366;
}
.ig {
  color: #ff5c93;
}
.tt,
.xx {
  color: var(--cream);
}
.ph,
.gen {
  color: var(--glow);
}
@media (min-width: 860px) {
  #eco .head {
    margin-block-end: clamp(8px, 1.5vw, 20px);
  }
  .eco__art {
    height: auto;
    overflow: visible;
  }
  .eco__map {
    flex: 0 1 1120px;
    width: auto;
    height: auto;
    margin: 0;
  }
  .eco__map .far {
    display: inline;
  }
  /* The places are written on the drawing here, so the list is only read aloud. */
  .eco__groups {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* ——— The steps: what the agent takes on for an office's properties, in three parts ——— */
/* On a phone it is a line down the side with the three parts on it. */
.path {
  display: grid;
  gap: 34px;
  /* The numbers sit on the line: half of one is kept inside the page's gutter. */
  margin-inline-start: 17px;
  padding-inline-start: 36px;
  border-inline-start: 1.5px solid var(--wine);
}
.part {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
}
/* The part the agent is in is the lit one, as the lift's floor is in the tower. */
.part__n {
  position: absolute;
  inset-inline-start: -54px;
  top: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--wine);
  border-radius: 50%;
  background: var(--paper);
  color: var(--wine);
  font-weight: 600;
  animation: part 12s linear infinite;
  animation-delay: calc(var(--i) * 4s);
}
@keyframes part {
  0%,
  30% {
    background: var(--wine);
    color: var(--paper);
  }
  33.3%,
  100% {
    background: var(--paper);
    color: var(--wine);
  }
}
.part h3,
.plan h3 {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
  line-height: 1.45;
  font-weight: 600;
}
.part ul li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 14px;
  border-block-end: 1px solid var(--line);
  font-size: 1.06rem;
}
.part ul li:last-child {
  border-block-end: 0;
}
.part ul svg {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--wine);
}
/* On a desk the three parts stand side by side under one line. */
@media (min-width: 900px) {
  .path {
    grid-template-columns: 5fr 6fr 6fr;
    gap: 0 clamp(28px, 4vw, 60px);
    margin: 0;
    padding: 46px 0 0;
    border: 0;
    border-block-start: 1.5px solid var(--wine);
  }
  .part__n {
    inset-inline-start: 0;
    top: -64px;
  }
}

/* ——— The difference: each line is today, then the same thing with Emara ——— */
.vs {
  width: 100%;
  max-width: 62rem;
  border-collapse: separate;
  border-spacing: 0;
  text-align: start;
}
.vs thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.vs tr {
  display: grid;
  gap: 4px;
  padding-block: 18px;
  border-block-end: 1px solid var(--line);
}
.vs th {
  font-weight: 600;
  font-size: 0.95rem;
  text-align: start;
  color: var(--wine);
}
.vs td {
  padding: 0;
}
.vs td::before {
  content: attr(data-in);
  display: inline-block;
  min-width: 5.2rem;
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--muted);
}
.vs .old {
  color: var(--muted);
}
.vs .new {
  font-size: 1.12rem;
  font-weight: 600;
}
@media (min-width: 760px) {
  .vs thead {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
  }
  .vs tr {
    grid-template-columns: 8rem minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 0;
    align-items: stretch;
    padding: 0;
  }
  .vs th,
  .vs td {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 22px;
  }
  .vs th:first-child {
    padding-inline-start: 0;
  }
  .vs thead tr {
    border-block-end: 0;
  }
  .vs thead th {
    padding-block: 0 12px;
    font-size: 1rem;
    color: var(--muted);
  }
  .vs thead th:last-child {
    color: var(--wine);
  }
  .vs thead svg {
    width: 1.1em;
    height: 1.1em;
    fill: currentColor;
  }
  .vs td::before {
    content: none;
  }
  .vs .old {
    font-size: 1.05rem;
  }
  /* The column that is Emara is one lit sheet down the table, and each line arrives at it. */
  .vs .new {
    background: var(--paper);
    font-size: 1.2rem;
    border-inline: 1px solid var(--line);
  }
  .vs tbody tr:first-child .new {
    border-block-start: 1px solid var(--line);
    border-start-start-radius: var(--r-card);
    border-start-end-radius: var(--r-card);
  }
  .vs tbody tr:last-child {
    border-block-end: 0;
  }
  .vs tbody tr:last-child .new {
    border-block-end: 1px solid var(--line);
    border-end-start-radius: var(--r-card);
    border-end-end-radius: var(--r-card);
  }
  .vs .new::before {
    content: '←';
    min-width: 0;
    font-size: inherit;
    color: var(--wine);
  }
}

/* ——— The packages: three sizes, by active properties and by what each adds. The price is a
   conversation, so each ends at one ——— */
.plans {
  display: grid;
  gap: 16px;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--ivory);
}
/* A package is first a size: how many properties it runs at once. */
.plan__size {
  color: var(--wine);
  font-weight: 600;
}
.plan ul {
  margin-block: 16px 24px;
}
.plan ul li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 12px;
  border-block-end: 1px solid var(--line);
}
.plan ul li:last-child {
  border-block-end: 0;
}
.plan ul svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--wine);
}
/* The three end level: each card's way to ask sits on its floor. */
.plan .btn {
  margin-block-start: auto;
}
@media (min-width: 900px) {
  .plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
  }
}

/* ——— The ask, and the foot ——— */
.last {
  --city-w: max(152vw, 900px);
  position: relative;
  overflow: hidden;
  padding-block: var(--band) calc(var(--band) * 0.5 + var(--city-w) * 0.16875);
  background: linear-gradient(var(--wine-dark) 0, var(--wine) 55%, #7d3a48 100%);
  color: var(--cream);
  text-align: center;
}
/* The city again, on the same sheet as the first fold, slid so its street is the band's lower edge
   and its right end is the page's. */
.last__city {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: calc(var(--city-w) * 0.16875);
}
.last__city img {
  position: absolute;
  right: 0;
  bottom: calc(var(--city-w) * -0.08125);
  width: var(--city-w);
  max-width: none;
  height: auto;
}
.last__in {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 14px;
}
.last__in > svg {
  width: 40px;
  height: 40px;
  fill: var(--glow);
}
.foot {
  background: var(--earth);
  color: var(--cream-soft);
  font-size: 0.94rem;
}
.foot__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-block: 26px;
}
.foot .lockup {
  color: var(--cream);
  font-size: 1.05rem;
}
.foot a:hover {
  color: var(--cream);
}
.foot__in > :last-child {
  margin-inline-start: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .halo,
  .lit,
  .name,
  .line,
  .lift,
  .part__n,
  .eco__ring {
    animation: none;
  }
  /* The drawing's own moving parts give way to a still mark. */
  .eco__map .eco__pulses,
  .eco__agent {
    display: none;
  }
  .eco__still {
    display: inline;
  }
  .name {
    opacity: 0.92;
  }
  .line--rest {
    opacity: 0.9;
  }
}
