* { box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  color: #fff;
}

.page {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 70% at 62% 42%, rgba(98, 48, 176, 0.55), transparent 68%),
    radial-gradient(ellipse 40% 45% at 18% 78%, rgba(74, 28, 130, 0.45), transparent 70%),
    radial-gradient(ellipse 30% 28% at 86% 12%, rgba(255, 186, 72, 0.16), transparent 70%),
    linear-gradient(180deg, #1b1030 0%, #14091f 48%, #241238 100%);
}

.sky { position: absolute; inset: 0; pointer-events: none; }

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
}

.glow-phone {
  width: 46vw;
  height: 46vw;
  right: 14vw;
  top: 16vh;
  background: radial-gradient(circle, rgba(168, 92, 255, 0.45), rgba(255, 214, 102, 0.08) 42%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}

.glow-gold {
  width: 22vw;
  height: 22vw;
  right: 8vw;
  top: -4vh;
  background: radial-gradient(circle, rgba(255, 196, 90, 0.28), transparent 68%);
}

.stars {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    12vw 18vh 0 0 #fff,
    28vw 10vh 0 1px rgba(255, 214, 102, 0.9),
    40vw 24vh 0 0 rgba(255, 255, 255, 0.8),
    52vw 8vh 0 0 #fff,
    63vw 30vh 0 1px rgba(212, 187, 255, 0.9),
    8vw 42vh 0 0 rgba(255, 255, 255, 0.7),
    22vw 62vh 0 0 rgba(255, 214, 102, 0.8),
    74vw 16vh 0 0 #fff,
    88vw 28vh 0 0 rgba(255, 214, 102, 0.85),
    46vw 48vh 0 0 rgba(255, 255, 255, 0.55);
  opacity: 0.85;
}

.spark { position: absolute; }
.spark.a { width: 28px; top: 14vh; left: 38vw; animation: drift 9s ease-in-out infinite; }
.spark.b { width: 18px; top: 58vh; left: 46vw; animation: drift 11s ease-in-out infinite reverse; }
.spark.c { width: 14px; top: 22vh; right: 18vw; animation: drift 8s ease-in-out infinite; }
.spark.d { width: 12px; bottom: 28vh; left: 18vw; }

.cloud-band {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: -8px;
  aspect-ratio: 3965 / 407;
  pointer-events: none;
}

.cloud-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.ribbons {
  position: absolute;
  z-index: 3;
  inset-inline-end: 1vw;
  bottom: 8px;
  width: min(340px, 30vw);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.ribbons img {
  display: block;
  width: 100%;
  height: auto;
}

.ribbons img:nth-child(1) { width: 42%; margin-bottom: -18px; }
.ribbons img:nth-child(2) { width: 72%; margin-bottom: -28px; }

main {
  position: relative;
  z-index: 5;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding-top: 0;
  padding-bottom: 11vh;
  padding-inline: 7vw 5vw;
}

.brand {
  width: min(440px, 42%);
  flex: 0 0 auto;
}

.logo {
  width: min(420px, 34vw);
  height: auto;
  display: block;
  margin-bottom: 1.2vh;
}

h1 {
  margin: 0 0 0.4vh;
  font-size: clamp(32px, 4.2vw, 64px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

html[dir="rtl"] h1 { letter-spacing: 0; }

h1 em {
  font-style: normal;
  color: #d4bbff;
  text-shadow: 0 0 22px rgba(179, 136, 255, 0.55);
}

.brand p {
  margin: 1.6vh 0 0;
  color: rgba(246, 241, 255, 0.86);
  font-size: clamp(15px, 1.5vw, 24px);
  line-height: 1.35;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2.6vh;
}

.stores button {
  display: block;
  line-height: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.stores button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.stores img { height: 56px; width: auto; display: block; }

.stage {
  position: relative;
  flex: 1 1 auto;
  align-self: stretch;
  min-width: 0;
  margin-inline-end: -5vw;
}

.devices {
  position: absolute;
  z-index: 4;
  left: 50%;
  right: auto;
  top: 42%;
  width: min(430px, 36vw);
  height: min(460px, calc(100dvh - 250px));
  transform: translate(-50%, -50%);
}

.phone {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  width: auto;
  max-width: 100%;
  margin: auto;
  aspect-ratio: 253 / 421;
  filter: drop-shadow(0 22px 28px rgba(12, 4, 28, 0.55));
}

.phone .bezel {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.screen {
  position: absolute;
  left: 47%;
  top: 49%;
  width: 60%;
  height: 74%;
  transform: translate(-50%, -50%) rotate(8.4deg);
  overflow: hidden;
  border-radius: 14%;
  font-family: Outfit, Tajawal, sans-serif;
  container-type: inline-size;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 48%, rgba(150, 70, 230, 0.45), transparent 58%);
}

.hud {
  position: absolute;
  top: 5cqw;
  right: 16cqw;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5cqw;
  z-index: 2;
}

.hud img {
  width: 12cqw;
  height: 12cqw;
  flex: 0 0 auto;
  object-fit: contain;
  display: block;
}

.room {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 46%;
  margin: 0;
  padding: 0.5cqw 2.2cqw 0.7cqw;
  border-radius: 1.6cqw;
  background: rgba(28, 14, 52, 0.72);
  text-align: center;
  line-height: 1.05;
}

.room b,
.room span {
  display: block;
  margin: 0;
  line-height: 1.05;
}

.room b {
  color: #fff;
  font-size: 5cqw;
  font-weight: 600;
}

.room span {
  color: #d4bbff;
  font-size: 4.2cqw;
}

.seat {
  position: absolute;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: 2;
  animation: talk 3.2s ease-in-out infinite;
}

.s1 { left: 4%; top: 21%; }
.s2 { left: 80%; top: 21%; animation-delay: -0.8s; }
.s3 { left: 0%; top: 53%; animation-delay: -1.6s; }
.s4 { left: 84%; top: 53%; animation-delay: -2.4s; }

.hero {
  position: absolute;
  z-index: 2;
  left: 34%;
  top: 34%;
  width: 32%;
}

.hero img {
  position: relative;
  z-index: 1;
  width: 100%;
  display: block;
  border-radius: 50%;
}

.hero i {
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  border: 2px solid rgba(210, 160, 255, 0.95);
  box-shadow: 0 0 18px rgba(170, 80, 255, 0.95), inset 0 0 12px rgba(170, 80, 255, 0.45);
  animation: glow 1.3s ease-in-out infinite;
}

.eq {
  position: absolute;
  z-index: 2;
  top: 39%;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.eq.left { left: 9%; }
.eq.right { right: 12%; }

.eq i {
  display: block;
  width: 2px;
  border-radius: 99px;
  transform-origin: center;
  animation: bar 0.7s ease-in-out infinite;
}

.eq.left i {
  background: linear-gradient(#f4dcff, #8a45ff);
  box-shadow: 0 0 6px rgba(170, 110, 255, 0.85);
}

.eq.right i {
  width: 2px;
  background: linear-gradient(#ffe0f4, #d454ff);
  box-shadow: 0 0 6px rgba(220, 90, 255, 0.8);
}

.eq.left i:nth-child(1) { height: 28%; animation-duration: 0.42s; }
.eq.left i:nth-child(2) { height: 62%; animation-duration: 0.68s; animation-delay: -0.2s; }
.eq.left i:nth-child(3) { height: 100%; animation-duration: 0.51s; animation-delay: -0.34s; }
.eq.left i:nth-child(4) { height: 48%; animation-duration: 0.76s; animation-delay: -0.12s; }
.eq.left i:nth-child(5) { height: 84%; animation-duration: 0.47s; animation-delay: -0.48s; }
.eq.left i:nth-child(6) { height: 36%; animation-duration: 0.63s; animation-delay: -0.22s; }
.eq.left i:nth-child(7) { height: 18%; animation-duration: 0.55s; animation-delay: -0.4s; }

.eq.right i:nth-child(1) { height: 46%; animation-duration: 0.58s; animation-delay: -0.08s; }
.eq.right i:nth-child(2) { height: 100%; animation-duration: 0.44s; animation-delay: -0.3s; }
.eq.right i:nth-child(3) { height: 34%; animation-duration: 0.81s; animation-delay: -0.16s; }
.eq.right i:nth-child(4) { height: 72%; animation-duration: 0.53s; animation-delay: -0.42s; }
.eq.right i:nth-child(5) { height: 22%; animation-duration: 0.66s; animation-delay: -0.24s; }

.dock {
  position: absolute;
  z-index: 3;
  left: 7%;
  right: 7%;
  bottom: 3%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dock > img { width: 18%; height: auto; display: block; }

.mic {
  position: relative;
  width: 30%;
}

.mic img {
  position: relative;
  z-index: 1;
  width: 100%;
  display: block;
}

.mic i {
  position: absolute;
  left: 8%;
  top: 8%;
  width: 84%;
  height: 84%;
  border-radius: 50%;
  border: 2px solid rgba(220, 180, 255, 0.95);
  animation: ping 1.5s ease-out infinite;
}

.mic i:nth-child(2) { animation-delay: 0.75s; }

.more {
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #24143f;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.more i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
}

@keyframes talk {
  0%, 62%, 100% { transform: scale(1); filter: none; }
  18%, 40% { transform: scale(1.16); filter: drop-shadow(0 0 8px rgba(220, 190, 255, 1)); }
}

@keyframes glow {
  0%, 100% { transform: scale(0.9); opacity: 0.65; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes bar {
  0%, 100% { transform: scaleY(0.28); }
  50% { transform: scaleY(1); }
}

@keyframes ping {
  0% { transform: scale(0.78); opacity: 0.9; }
  100% { transform: scale(1.65); opacity: 0; }
}

html[dir="rtl"] .phone { transform: scaleX(-1); }

html[dir="rtl"] .room { transform: translateX(-50%) scaleX(-1); }

.cast {
  position: absolute;
  z-index: 4;
  inset-inline-end: 2vw;
  top: 13vh;
  width: min(170px, 14vw);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.cast .ava { width: 72%; height: auto; }
.cast .grid { width: 100%; height: auto; }
.cast .mic { width: 48%; height: auto; margin-inline-end: 8%; }
.cast .row { display: flex; align-items: center; gap: 6px; }
.cast .row img { width: 34px; height: auto; }

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@media (min-width: 1400px) {
  .brand { width: min(500px, 34%); }
  .logo { width: min(460px, 24vw); }
  .devices {
    width: min(560px, 32vw);
    height: min(600px, calc(100dvh - 280px));
  }
  .phone { height: 72%; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .logo { width: min(300px, 28vw); margin-bottom: 1vh; }
  .devices { width: min(340px, 34vw); height: min(380px, calc(100dvh - 210px)); }
  .phone { height: 70%; }
  .cast { width: 120px; top: 12vh; }
  .cast .row img { width: 26px; }
  h1 { font-size: clamp(28px, 3.8vw, 48px); }
  .brand p { font-size: 15px; margin-top: 1vh; }
  .stores { margin-top: 1.4vh; }
  .stores img { height: 44px; }
  .ribbons { width: min(240px, 26vw); }
  main { padding-bottom: 8vh; }
}

@media (max-width: 900px) {
  main {
    justify-content: flex-start;
    padding: 0 4vw 10vh 5vw;
  }

  .stage { position: static; margin-inline-end: 0; }

  .brand {
    width: min(260px, 46%);
    text-align: start;
  }

  .devices {
    left: auto;
    right: auto;
    inset-inline-start: 48%;
    inset-inline-end: auto;
    width: min(220px, 42%);
    height: min(320px, calc(100dvh - 180px));
    transform: translateY(-50%);
  }
  .phone { height: 100%; }
  .cast, .ribbons { display: none; }

  .logo { width: min(200px, 48vw); margin: 0 0 1vh; }
  h1 { font-size: clamp(20px, 4.2vw, 32px); }
  .brand p { font-size: 12px; margin-top: 0.8vh; }
  .stores { margin-top: 1.2vh; gap: 8px; }
  .stores img { height: 34px; }

}

@media (max-width: 900px) and (max-height: 700px) {
  .logo { width: 150px; }
  h1 { font-size: 20px; }
  .stores img { height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .devices, .spark, .glow-phone { animation: none; }
}
