:root {
  --ink: #f6efe2;
  --gold: #e4c27a;
  --navy: #07111f;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #000;
  color: var(--ink);
  font-family: Tajawal, "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

.top {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 0.4rem) 1rem 0.2rem;
  background: linear-gradient(#07111f, rgba(7, 17, 31, 0));
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

body:not(.is-home) .top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.brand {
  display: grid;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand__ring {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1.5px solid #e4c27a;
  box-shadow: 0 0 16px rgba(228, 194, 122, 0.28);
}

.brand__disc {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #101a2c;
  border: 1px solid rgba(228, 194, 122, 0.55);
}

.brand__disc img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.viewport {
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

.track { will-change: transform; }

.slide {
  height: 100dvh;
  height: var(--slide-h, 100dvh);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.45)),
    url("./assets/oils/bg.webp") center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: calc(env(safe-area-inset-top) + 1.5rem) 1.15rem calc(env(safe-area-inset-bottom) + 4.4rem);
  gap: 0.35rem;
}

.kicker {
  margin: 0;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.kicker--ink { color: #8a6420; }

h1, h2 {
  margin: 0;
  font-family: Amiri, Tajawal, serif;
  font-weight: 700;
  line-height: 1.25;
  font-size: clamp(1.8rem, 7vw, 3rem);
}

.lead, .hint {
  margin: 0;
  max-width: 28rem;
  line-height: 1.65;
  color: #efe4d2;
}

.hint {
  color: var(--gold);
  font-weight: 700;
  animation: bob 1.6s ease-in-out infinite;
}

.art {
  margin: 0.2rem 0;
  width: min(100%, 440px);
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
}

.art img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
}

.art--cut img {
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.28));
}

.art--short { flex: 0 1 42dvh; }

.art--hero {
  position: relative;
  width: min(100%, 640px);
}

.say {
  position: absolute;
  top: 0;
  right: 2%;
  z-index: 2;
  margin: 0;
  max-width: 9.2rem;
  padding: 0.6rem 0.8rem;
  border-radius: 16px 16px 4px 16px;
  background: #fffaf2;
  color: #1c140c;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.45;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.say::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -9px;
  border-width: 9px 8px 0;
  border-style: solid;
  border-color: #fffaf2 transparent transparent;
}

.slide--poster {
  background: #f3ead7;
  color: #1a140c;
  justify-content: center;
}

.slide--poster .art--poster {
  width: min(100%, 520px);
  height: 100%;
}

.slide--poster .art--poster img {
  mix-blend-mode: normal;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.btn--gold { background: linear-gradient(#f3e2b3, #d4b06a); color: #1a140c; }
.btn--ivory { background: #f6efe2; color: #10203c; }
.btn--ghost { color: var(--gold); border: 1px solid rgba(228, 194, 122, 0.7); }

.dots {
  position: fixed;
  z-index: 6;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 0.45rem;
}

/* زر جانبي → الصفحة القديمة (systems) */
.side-services {
  position: fixed;
  z-index: 6;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
  padding: 0.85rem 0.45rem;
  border-radius: 0 14px 14px 0;
  text-decoration: none;
  color: #1a140c;
  background: linear-gradient(180deg, #f3e2b3, #d4b06a);
  border: 1px solid rgba(228, 194, 122, 0.85);
  border-left: 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.side-services__label {
  font-family: Tajawal, "Noto Naskh Arabic", sans-serif;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
}

.side-services:hover,
.side-services:focus-visible {
  transform: translateY(-50%) translateX(3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.42);
}

@media (max-width: 420px) {
  .side-services {
    min-height: 6.4rem;
    padding: 0.7rem 0.38rem;
  }

  .side-services__label {
    font-size: 0.82rem;
  }
}

.dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(246, 239, 226, 0.35);
}

.dots button[aria-current="true"] {
  height: 22px;
  background: var(--gold);
}

.slide .kicker,
.slide h1,
.slide h2,
.slide .lead,
.slide .art,
.slide .actions,
.slide .welcome__top,
.slide .welcome__art {
  opacity: 0;
  transform: translateY(18px);
}

.slide.is-on .kicker,
.slide.is-on h1,
.slide.is-on h2,
.slide.is-on .lead,
.slide.is-on .art,
.slide.is-on .actions,
.slide.is-on .welcome__top,
.slide.is-on .welcome__art {
  animation: enter 0.8s var(--ease) both;
}

.slide.is-on h1,
.slide.is-on h2 { animation-delay: 0.08s; }
.slide.is-on .art,
.slide.is-on .welcome__art { animation-delay: 0.16s; }
.slide.is-on .lead,
.slide.is-on .actions { animation-delay: 0.28s; }

@keyframes enter {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

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

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hint { animation: none; }
  .slide .kicker,
  .slide h1,
  .slide h2,
  .slide .lead,
  .slide .art,
  .slide .actions,
  .slide .welcome__top,
  .slide .welcome__art,
  .slide.is-on .kicker,
  .slide.is-on h1,
  .slide.is-on h2,
  .slide.is-on .lead,
  .slide.is-on .art,
  .slide.is-on .actions,
  .slide.is-on .welcome__top,
  .slide.is-on .welcome__art {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .welcome__cue span { animation: none; }
}

@media (min-width: 900px) {
  .slide {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(280px, 1fr);
    grid-template-rows: auto auto 1fr auto;
    align-items: center;
    text-align: start;
    padding-inline: 8vw;
    column-gap: 2rem;
  }

  .kicker { grid-column: 1; }
  h1, h2 { grid-column: 1; }
  .lead, .hint, .actions { grid-column: 1; }
  .art {
    grid-column: 2;
    grid-row: 1 / span 4;
    width: 100%;
    height: min(78dvh, 760px);
  }

  .slide--poster,
  .slide--welcome,
  .slide--card,
  .slide--story,
  .slide--start {
    display: flex;
    text-align: center;
    padding: 0;
  }
}

.slide--story {
  justify-content: center;
  gap: 0.85rem;
  padding: calc(env(safe-area-inset-top) + 1.5rem) 1.35rem calc(env(safe-area-inset-bottom) + 1.6rem);
}

.story-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.slide--story h2 {
  max-width: 16rem;
  font-family: "Noto Serif Arabic", Amiri, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 6.4vw, 2.15rem);
  line-height: 1.35;
  color: #ffde9c;
  text-shadow: 0 2px 14px rgba(228, 194, 122, 0.28);
}

.slide--story .kicker {
  font-family: "Noto Serif Arabic", Amiri, serif;
  letter-spacing: 0.14em;
}

.slide--story .art {
  flex: 0 1 auto;
  width: min(100%, 24rem);
  height: auto;
  max-height: 52dvh;
  min-height: 0;
  overflow: hidden;
}

.slide--story .art img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 52dvh;
  object-fit: contain;
  object-position: center center;
}

.slide--story .lead {
  max-width: 18.5rem;
  font-family: Cairo, Tajawal, sans-serif;
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.75;
  color: #d9e3f7;
}

.slide--start {
  justify-content: flex-start;
  gap: 0.2rem;
  padding: calc(env(safe-area-inset-top) + 1.15rem) 0.35rem 0;
}

.slide--start h2 {
  max-width: 16rem;
  font-family: "Noto Serif Arabic", Amiri, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 6.4vw, 2.15rem);
  line-height: 1.35;
  color: #ffde9c;
  text-shadow: 0 2px 14px rgba(228, 194, 122, 0.28);
}

.slide--start .kicker {
  font-family: "Noto Serif Arabic", Amiri, serif;
  letter-spacing: 0.14em;
}

.slide--start .art--host {
  position: relative;
  flex: 1 1 auto;
  align-self: center;
  width: auto;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  aspect-ratio: 457 / 947;
  overflow: visible;
}

.slide--start .art--host img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.32));
}

.host-actions {
  position: absolute;
  left: 50%;
  top: 58%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  width: min(22rem, calc(100vw - 3.2rem));
  transform: translateX(-50%);
}

.host-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: Cairo, Tajawal, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
}

.host-btn--wa {
  background: #123528;
  color: #e7fff1;
  border: 1px solid rgba(37, 211, 102, 0.75);
}

.host-btn--get {
  background: linear-gradient(#f3e2b3, #d4b06a);
  color: #1a140c;
}

.host-btn--play {
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 0;
  border-radius: 12px;
}

.host-btn--play img {
  width: min(180px, 100%);
  height: auto;
  display: block;
}

.slide--card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  justify-items: center;
  align-content: stretch;
  padding: calc(env(safe-area-inset-top) + 1.35rem) 1.15rem 0;
  gap: 0.55rem;
}

.card-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.slide--card h2 {
  max-width: 18.5rem;
  font-family: "Noto Serif Arabic", Amiri, serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1.35;
  color: #ffde9c;
  text-shadow: 0 2px 14px rgba(228, 194, 122, 0.28);
}

.slide--card .kicker {
  font-family: "Noto Serif Arabic", Amiri, serif;
  letter-spacing: 0.14em;
}

.slide--card .lead {
  font-family: Cairo, Tajawal, sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #d9e3f7;
}

.art--floor {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.art--floor img {
  width: auto;
  max-width: min(100%, 26rem);
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.slide--devices .art--floor {
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
  width: calc(100% + 2.3rem);
  margin-inline: -1.15rem;
  padding-top: 0.35rem;
}

.slide--devices .art--floor img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 62dvh;
  object-fit: contain;
  object-position: center center;
}

.slide--welcome {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 0;
  background-color: #0a1422;
  background-image:
    linear-gradient(180deg, rgba(10, 20, 34, 0.72), rgba(10, 20, 34, 0.38) 42%, rgba(10, 20, 34, 0.88)),
    url("./assets/oils/welcome-bg.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.welcome {
  position: relative;
  width: min(100%, 480px);
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: calc(env(safe-area-inset-top) + 5.35rem) 1.15rem calc(env(safe-area-inset-bottom) + 3.2rem);
  overflow: hidden;
}

.welcome__glow {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 18rem;
  height: 18rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(228, 194, 122, 0.14);
  filter: blur(46px);
  pointer-events: none;
}

.welcome__top {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.welcome__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(22, 32, 47, 0.62);
  color: #e4c27a;
  font-family: "Noto Serif Arabic", Amiri, serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.welcome__brand::before,
.welcome__brand::after {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  flex: none;
  background: #e4c27a;
  transform: rotate(45deg);
}

.slide--welcome h1 {
  margin: 0;
  max-width: 16.5rem;
  font-family: "Noto Serif Arabic", Amiri, serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 5.6vw, 1.85rem);
  line-height: 1.35;
  color: #ffde9c;
  text-shadow: 0 2px 14px rgba(228, 194, 122, 0.28);
}

.welcome__sub {
  margin: 0;
  max-width: 20rem;
  font-family: Cairo, Tajawal, sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #d9e3f7;
}

.welcome__art {
  position: relative;
  z-index: 1;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0.35rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome__frame {
  position: relative;
  width: min(100%, 24rem);
  max-width: 100%;
  padding-top: 5rem;
}

.welcome__frame img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(5, 14, 28, 0.85));
}

.welcome__quote {
  position: absolute;
  top: 0;
  right: 1.15rem;
  z-index: 2;
  margin: 0;
  max-width: min(16.5rem, 88%);
  padding: 0.5rem 0.8rem;
  border-radius: 1rem;
  background: rgba(10, 20, 34, 0.94);
  border: 1px solid rgba(228, 194, 122, 0.55);
  color: #ffde9c;
  font-family: Cairo, Tajawal, sans-serif;
  font-weight: 700;
  font-size: clamp(0.72rem, 3.3vw, 0.86rem);
  line-height: 1.35;
  text-align: right;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.welcome__quote::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 1.7rem;
  width: 10px;
  height: 10px;
  background: rgba(10, 20, 34, 0.94);
  border-right: 1px solid rgba(228, 194, 122, 0.55);
  border-bottom: 1px solid rgba(228, 194, 122, 0.55);
  transform: rotate(45deg);
}

.welcome__swipe {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  max-width: none;
  color: #f3e2b3;
  font-family: "Noto Serif Arabic", Amiri, serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.welcome__swipe.hint { animation: none; }

.welcome__cue {
  position: relative;
  display: block;
  width: 1.35rem;
  height: 2.15rem;
  border: 1.5px solid rgba(228, 194, 122, 0.7);
  border-radius: 999px;
  background: rgba(10, 20, 34, 0.35);
}

.welcome__cue span {
  position: absolute;
  left: 50%;
  bottom: 0.35rem;
  width: 0.38rem;
  height: 0.38rem;
  margin-left: -0.19rem;
  border-radius: 50%;
  background: #e4c27a;
  box-shadow: 0 0 8px rgba(228, 194, 122, 0.85);
  animation: cue 1.5s ease-in-out infinite;
}

@keyframes cue {
  0% { transform: translateY(0); opacity: 0.3; }
  35% { opacity: 1; }
  100% { transform: translateY(-0.85rem); opacity: 0; }
}
