/* Market Jo — Landing */
:root {
  --red: #e60023;
  --red-deep: #b8001c;
  --ink: #1a1214;
  --ink-soft: #4a3a3e;
  --cream: #faf6f4;
  --blush: #f7ecec;
  --line: #ead9db;
  --white: #fffdfc;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-ar: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Syne", "Tajawal", sans-serif;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ar);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--white);
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0.4rem;
}

.skip:focus {
  top: 1rem;
}

/* ——— Nav ——— */
.nav {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem var(--pad);
  max-width: 1400px;
  margin-inline: auto;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
}

.nav__brand img {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.nav__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--white);
  color: var(--red);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.nav__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100svh;
  height: 100svh;
  background:
    radial-gradient(120% 80% at 80% 20%, rgba(255, 255, 255, 0.14), transparent 50%),
    radial-gradient(90% 70% at 10% 90%, rgba(0, 0, 0, 0.12), transparent 45%),
    linear-gradient(165deg, #ff1f3d 0%, var(--red) 42%, var(--red-deep) 100%);
  color: var(--white);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero__grain {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.hero__inner {
  width: min(100%, 1400px);
  margin-inline: auto;
  padding: clamp(5.5rem, 10vh, 7rem) var(--pad) clamp(1.5rem, 4vh, 2.5rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  position: relative;
  z-index: 1;
  height: 100%;
}

.hero__copy {
  padding-bottom: 0;
}

.hero__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 9vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin-bottom: 1.1rem;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  position: relative;
  z-index: 2;
}

.hero__brand span {
  display: block;
  font-family: var(--font-ar);
  font-weight: 800;
  font-size: 0.42em;
  letter-spacing: 0;
  opacity: 0.92;
  margin-top: 0.35rem;
}

.hero__lead {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 500;
  max-width: 28ch;
  opacity: 0.95;
  margin-bottom: 1.75rem;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  transition: transform 0.35s var(--ease-out), filter 0.35s var(--ease-out);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.22));
}

.store-badge:hover {
  transform: translateY(-3px) scale(1.03);
}

.store-badge img {
  height: 52px;
  width: auto;
  display: block;
}

/* Official Play badge includes large transparent padding */
.store-badge--play img {
  height: 78px;
  margin-block: -12px;
  margin-inline: -10px;
}

/* Phone stage */
.hero__stage {
  position: relative;
  height: min(68vh, 560px);
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.phone {
  position: relative;
  width: min(250px, 58vw);
  aspect-ratio: 9 / 19.2;
  border-radius: 36px;
  background: #111;
  padding: 10px;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transform-origin: 50% 100%;
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: #1a1a1a;
}

.phone__screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: translateY(12px) scale(1.02);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.9s var(--ease-out);
}

.phone__screen img.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.phone__notch {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 18px;
  background: #111;
  border-radius: 999px;
  z-index: 3;
}

.phone--hero {
  z-index: 3;
  animation: phone-float 6.5s var(--ease-out) infinite alternate;
}

.phone--side {
  position: absolute;
  width: min(190px, 42vw);
  opacity: 0.9;
  filter: saturate(0.95);
}

.phone--left {
  inset-inline-end: 54%;
  top: 12%;
  transform: rotate(8deg);
  z-index: 1;
  animation: phone-drift-l 7s var(--ease-out) infinite alternate;
}

.phone--right {
  inset-inline-start: 54%;
  top: 18%;
  transform: rotate(-10deg);
  z-index: 2;
  animation: phone-drift-r 7.5s var(--ease-out) infinite alternate;
}

@keyframes phone-float {
  from { transform: translateY(0); }
  to { transform: translateY(-14px); }
}

@keyframes phone-drift-l {
  from { transform: rotate(8deg) translateY(0); }
  to { transform: rotate(10deg) translateY(-10px); }
}

@keyframes phone-drift-r {
  from { transform: rotate(-10deg) translateY(0); }
  to { transform: rotate(-7deg) translateY(-12px); }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

.hero .reveal {
  opacity: 0;
  transform: translateY(24px);
}

.hero.is-ready .reveal {
  opacity: 1;
  transform: none;
}

.hero.is-ready .reveal-d1 { transition-delay: 0.1s; }
.hero.is-ready .reveal-d2 { transition-delay: 0.22s; }
.hero.is-ready .reveal-d3 { transition-delay: 0.34s; }
.hero.is-ready .reveal-d4 { transition-delay: 0.46s; }

/* ——— Sections ——— */
.section {
  padding: clamp(4rem, 10vw, 7.5rem) var(--pad);
}

.section__inner {
  width: min(100%, var(--max));
  margin-inline: auto;
}

.section__eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--red);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
  max-width: 16ch;
}

.section__title[lang="ar"],
[dir="rtl"] .section__title {
  font-family: var(--font-ar);
  letter-spacing: 0;
  max-width: 14ch;
}

.section__text {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 38ch;
}

/* Showcase ribbon */
.showcase {
  background: var(--ink);
  color: var(--white);
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  overflow: hidden;
}

.showcase__head {
  width: min(100%, var(--max));
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  padding-inline: var(--pad);
}

.showcase__head .section__eyebrow {
  color: #ff8a9a;
}

.showcase__head .section__title {
  color: var(--white);
  max-width: 18ch;
}

.showcase__head .section__text {
  color: rgba(255, 253, 252, 0.72);
}

.rail {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  padding-inline: var(--pad);
  animation: rail-move 42s linear infinite;
}

.rail:hover {
  animation-play-state: paused;
}

@keyframes rail-move {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

[dir="rtl"] .rail {
  animation-name: rail-move-rtl;
}

@keyframes rail-move-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.rail__card {
  width: min(220px, 58vw);
  flex-shrink: 0;
  border-radius: 28px;
  overflow: hidden;
  background: #2a2224;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transform: rotate(var(--tilt, 0deg));
}

.rail__card img {
  width: 100%;
  aspect-ratio: 9 / 19;
  object-fit: cover;
}

/* Features */
.features {
  background: var(--cream);
}

.feature-grid {
  display: grid;
  gap: clamp(3rem, 8vw, 5rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.feature:nth-child(even) .feature__visual {
  order: -1;
}

.feature__title {
  font-family: var(--font-ar);
  font-weight: 800;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.feature__text {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 34ch;
}

.feature__visual {
  position: relative;
}

.feature__frame {
  width: min(280px, 70%);
  margin-inline: auto;
  border-radius: 32px;
  overflow: hidden;
  background: #111;
  padding: 9px;
  box-shadow:
    0 30px 60px rgba(26, 18, 20, 0.18),
    0 0 0 1px rgba(26, 18, 20, 0.06);
  transform: rotate(-3deg);
  transition: transform 0.6s var(--ease-out);
}

.feature:nth-child(even) .feature__frame {
  transform: rotate(3deg);
}

.feature.is-in .feature__frame {
  transform: rotate(0deg);
}

.feature__frame img {
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 9 / 19;
  object-fit: cover;
}

.feature__blob {
  position: absolute;
  inset: 12% 8% auto auto;
  width: 55%;
  aspect-ratio: 1;
  background: var(--blush);
  border-radius: 40% 60% 55% 45%;
  z-index: -1;
  filter: blur(2px);
}

.feature:nth-child(even) .feature__blob {
  inset: auto auto 10% 6%;
  background: color-mix(in srgb, var(--red) 12%, var(--cream));
}

/* Steps */
.steps {
  background: var(--blush);
}

.steps__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  list-style: none;
  counter-reset: step;
}

.steps__item {
  background: var(--white);
  border-radius: 22px;
  padding: 1.6rem 1.4rem 1.5rem;
  border: 1px solid color-mix(in srgb, var(--red) 8%, transparent);
  box-shadow: 0 12px 40px rgba(230, 0, 35, 0.05);
}

.steps__item::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--red);
  margin-bottom: 0.85rem;
  letter-spacing: -0.04em;
}

.steps__item h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.steps__item p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* Final CTA */
.cta {
  position: relative;
  background:
    linear-gradient(145deg, #ff1f3d, var(--red) 55%, var(--red-deep));
  color: var(--white);
  overflow: hidden;
}

.cta__inner {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding: clamp(4rem, 10vw, 6.5rem) var(--pad);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.cta__title {
  font-family: var(--font-ar);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.cta__text {
  opacity: 0.92;
  font-size: 1.08rem;
  margin-bottom: 1.5rem;
  max-width: 32ch;
}

.cta__phones {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.cta__phones .phone {
  width: min(160px, 36vw);
  animation: none;
}

.cta__phones .phone:first-child {
  transform: rotate(6deg) translateY(18px);
}

.cta__phones .phone:last-child {
  transform: rotate(-7deg);
}

/* Footer */
.footer {
  background: var(--ink);
  color: rgba(255, 253, 252, 0.72);
  padding: 2rem var(--pad);
}

.footer__inner {
  width: min(100%, var(--max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  font-size: 0.92rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-weight: 700;
}

.footer__brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer a:hover {
  color: var(--white);
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    height: auto;
    min-height: 100svh;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    align-items: center;
    padding-bottom: 1.5rem;
    height: auto;
  }

  .hero__copy {
    padding-bottom: 0.5rem;
    text-align: center;
    order: -1;
  }

  .hero__lead {
    margin-inline: auto;
  }

  .store-row {
    justify-content: center;
  }

  .hero__stage {
    height: min(52vh, 460px);
    margin-top: 0.25rem;
  }

  .phone--side {
    display: none;
  }

  .feature {
    grid-template-columns: 1fr;
  }

  .feature:nth-child(even) .feature__visual {
    order: 0;
  }

  .feature__frame,
  .feature:nth-child(even) .feature__frame {
    transform: none;
    width: min(260px, 72%);
  }

  .steps__list {
    grid-template-columns: 1fr;
  }

  .cta__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cta__text {
    margin-inline: auto;
  }

  .store-row {
    justify-content: center;
  }

  .cta__phones {
    order: -1;
  }
}

@media (max-width: 520px) {
  .nav__word {
    display: none;
  }

  .hero__brand {
    font-size: clamp(2.8rem, 14vw, 3.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .phone--hero,
  .phone--left,
  .phone--right,
  .rail {
    animation: none !important;
  }

  .reveal,
  .hero .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
