:root {
  color-scheme: dark;
  --canvas: #030303;
  --orange: #ff7900;
  --orange-deep: #c44b13;
  --gold: #ffd200;
  --gold-soft: #e8c547;
  --fg: #f5f1ea;
  --muted: rgba(245, 241, 234, 0.55);
  --muted-strong: rgba(245, 241, 234, 0.72);
  --font-display: "Black Ops One", cursive;
  --font-body: "Cairo", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal: 1.4s var(--ease-out) both;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  background: var(--canvas);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* —— Atmosphere —— */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.stage__bg {
  position: absolute;
  inset: -8%;
  background:
    center 42% / cover no-repeat url("dice-bg.png"),
    #0a0704;
  filter: saturate(1.08) contrast(1.06) brightness(0.78);
  transform: scale(1.06);
  animation: ken-burns 48s linear infinite alternate;
  will-change: transform;
}

.stage__grade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 90% 70% at 50% 38%,
      rgba(255, 121, 0, 0.14) 0%,
      transparent 55%
    ),
    linear-gradient(
      185deg,
      rgba(0, 0, 0, 0.35) 0%,
      transparent 40%,
      rgba(20, 8, 0, 0.45) 100%
    );
}

.stage__beam {
  position: absolute;
  left: 50%;
  top: -10%;
  width: min(90vw, 42rem);
  height: 70%;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(255, 210, 0, 0.07) 0%,
    rgba(255, 121, 0, 0.04) 35%,
    transparent 78%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 28%,
    #000 72%,
    transparent 100%
  );
  opacity: 0.85;
}

.stage__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 58% 48% at 50% 40%,
      transparent 0%,
      rgba(0, 0, 0, 0.35) 52%,
      rgba(0, 0, 0, 0.92) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.72) 0%,
      transparent 22%,
      transparent 58%,
      rgba(0, 0, 0, 0.88) 100%
    );
}

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

.stage__letterbox {
  position: absolute;
  left: 0;
  right: 0;
  height: clamp(1.25rem, 3.5vh, 2.75rem);
  background: #000;
  z-index: 2;
}

.stage__letterbox--top {
  top: 0;
}

.stage__letterbox--bottom {
  bottom: 0;
}

/* —— Hero —— */

.hero {
  position: relative;
  z-index: 1;
  width: min(100%, 40rem);
  margin: 0 auto;
  padding: clamp(2rem, 8vh, 5rem) clamp(1.5rem, 5vw, 2.5rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  justify-self: center;
}

.hero__mark {
  position: relative;
  margin-bottom: clamp(1.25rem, 3.5vh, 2rem);
  animation: reveal-rise var(--reveal);
  animation-delay: 0.15s;
}

.hero__mark::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8%;
  width: 70%;
  height: 18%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.55) 0%,
    transparent 70%
  );
  filter: blur(6px);
  z-index: -1;
}

.hero__logo {
  display: block;
  width: clamp(9.5rem, 32vw, 16rem);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.65))
    drop-shadow(0 0 48px rgba(255, 121, 0, 0.18));
}

.hero__brand {
  margin: 0 0 clamp(1.1rem, 2.8vh, 1.6rem);
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 5.2vw, 2.35rem);
  letter-spacing: 0.14em;
  text-transform: none;
  color: var(--gold-soft);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12),
    0 2px 24px rgba(0, 0, 0, 0.85);
  animation: reveal-rise var(--reveal);
  animation-delay: 0.35s;
}

.hero__rule {
  width: min(8.5rem, 42vw);
  height: 1px;
  margin: 0 0 clamp(1.15rem, 3vh, 1.65rem);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 121, 0, 0.15) 18%,
    var(--gold) 50%,
    rgba(255, 121, 0, 0.15) 82%,
    transparent 100%
  );
  opacity: 0.9;
  animation: reveal-line 1.6s var(--ease-out) both;
  animation-delay: 0.55s;
}

.hero__headline {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  animation: reveal-rise var(--reveal);
  animation-delay: 0.7s;
}

.hero__line {
  display: block;
  margin: 0;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.9);
}

.hero__line--ar {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.55rem, 5.4vw, 2.35rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--orange);
  background: linear-gradient(
    180deg,
    #ffb347 0%,
    var(--orange) 42%,
    var(--orange-deep) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* fallback when clip unsupported */
  -webkit-text-fill-color: transparent;
}

@supports not (background-clip: text) {
  .hero__line--ar {
    color: var(--orange);
    -webkit-text-fill-color: var(--orange);
    background: none;
  }
}

.hero__line--fr {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--muted-strong);
}

/* —— Footer —— */

.footer {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  padding: 0 1.5rem calc(clamp(1.25rem, 3.5vh, 2.75rem) + 0.85rem);
  animation: reveal-rise 1.5s var(--ease-out) both;
  animation-delay: 1.05s;
}

.footer__lede {
  margin: 0;
  max-width: 34rem;
  text-align: center;
  font-weight: 400;
  font-size: clamp(0.82rem, 2.3vw, 0.95rem);
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.footer__lede [lang="ar"] {
  font-weight: 600;
  color: var(--muted-strong);
}

.footer__sep {
  margin: 0 0.45em;
  opacity: 0.4;
  color: var(--gold);
}

.partners {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
}

.partners__logo {
  display: block;
  height: auto;
  object-fit: contain;
  opacity: 0.78;
  filter: grayscale(0.15) brightness(0.95);
}

.partners__logo--orange {
  width: clamp(1.85rem, 6.5vw, 2.35rem);
  height: clamp(1.85rem, 6.5vw, 2.35rem);
}

.partners__logo--hadruvo {
  width: clamp(5.75rem, 18vw, 7.25rem);
}

.partners__rule {
  width: 1px;
  height: 1.1rem;
  background: rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

/* —— Motion (cinematic, not toy) —— */

@keyframes ken-burns {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(0, -1.4%, 0);
  }
}

@keyframes reveal-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 1.1rem, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes reveal-line {
  from {
    opacity: 0;
    transform: scaleX(0.35);
  }
  to {
    opacity: 0.9;
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage__bg,
  .hero__mark,
  .hero__brand,
  .hero__rule,
  .hero__headline,
  .footer {
    animation: none;
  }

  .hero__mark,
  .hero__brand,
  .hero__rule,
  .hero__headline,
  .footer {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 420px) {
  .footer__sep {
    display: none;
  }

  .footer__lede {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .hero__brand {
    letter-spacing: 0.1em;
  }
}

@media (min-width: 900px) {
  .hero__logo {
    width: clamp(12rem, 18vw, 17.5rem);
  }
}
