/* SmartPlus — Coming Soon
   Brand: orange on white, light black accents */

:root {
  --sp-white: #ffffff;
  --sp-paper: #faf8f6;
  --sp-black: #151515;
  --sp-ink: #1c1c1c;
  --sp-muted: rgba(21, 21, 21, 0.58);
  --sp-line: rgba(21, 21, 21, 0.12);
  --sp-orange: #f15a22;
  --sp-orange-hot: #ff6a2b;
  --sp-orange-deep: #d44712;
  --sp-orange-soft: rgba(241, 90, 34, 0.22);
  --sp-orange-glow: rgba(241, 90, 34, 0.38);
  --font-latin: "Outfit", sans-serif;
  --font-arabic: "Cairo", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --space: clamp(1.25rem, 4vw, 2.5rem);
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  color: var(--sp-ink);
  background: var(--sp-white);
  font-family: var(--font-latin);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body[dir="rtl"] {
  font-family: var(--font-arabic);
}

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

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

/* ========== Strong animated background ========== */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--sp-paper);
  pointer-events: none;
}

.bg__wash {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 55% 45% at 18% 22%, rgba(241, 90, 34, 0.28), transparent 58%),
    radial-gradient(ellipse 50% 40% at 82% 78%, rgba(241, 90, 34, 0.2), transparent 55%),
    radial-gradient(ellipse 40% 35% at 70% 12%, rgba(21, 21, 21, 0.05), transparent 50%),
    linear-gradient(160deg, #ffffff 0%, #fff7f2 42%, #ffffff 100%);
  animation: wash-drift 14s ease-in-out infinite alternate;
}

.bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  will-change: transform, opacity;
}

.bg__orb--a {
  width: min(58vw, 520px);
  height: min(58vw, 520px);
  top: -12%;
  left: -8%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 140, 70, 0.85), var(--sp-orange) 42%, rgba(241, 90, 34, 0) 72%);
  opacity: 0.55;
  animation: orb-a 11s var(--ease-out) infinite;
}

.bg__orb--b {
  width: min(70vw, 640px);
  height: min(70vw, 640px);
  right: -18%;
  bottom: -22%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 106, 43, 0.9), var(--sp-orange-deep) 45%, rgba(212, 71, 18, 0) 70%);
  opacity: 0.48;
  animation: orb-b 13s var(--ease-out) infinite;
}

.bg__orb--c {
  width: min(42vw, 380px);
  height: min(42vw, 380px);
  top: 42%;
  left: 48%;
  background: radial-gradient(circle at 50% 50%, rgba(241, 90, 34, 0.55), rgba(241, 90, 34, 0) 68%);
  opacity: 0.65;
  animation: orb-c 9s ease-in-out infinite;
}

.bg__ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(241, 90, 34, 0.35);
  box-shadow:
    inset 0 0 0 1px rgba(21, 21, 21, 0.04),
    0 0 40px rgba(241, 90, 34, 0.12);
  will-change: transform;
}

.bg__ring--a {
  width: min(78vw, 720px);
  height: min(78vw, 720px);
  top: 50%;
  left: 50%;
  margin: calc(min(78vw, 720px) / -2) 0 0 calc(min(78vw, 720px) / -2);
  border-color: rgba(241, 90, 34, 0.28);
  animation: ring-spin 22s linear infinite;
}

.bg__ring--a::before,
.bg__ring--a::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.bg__ring--a::before {
  inset: 12%;
  border-top-color: rgba(241, 90, 34, 0.55);
  border-right-color: rgba(21, 21, 21, 0.08);
  animation: ring-spin 14s linear infinite reverse;
}

.bg__ring--a::after {
  inset: 26%;
  border-bottom-color: rgba(241, 90, 34, 0.45);
  border-left-color: rgba(241, 90, 34, 0.18);
  animation: ring-spin 18s linear infinite;
}

.bg__ring--b {
  width: min(46vw, 420px);
  height: min(46vw, 420px);
  top: 8%;
  right: 4%;
  border-style: dashed;
  border-color: rgba(241, 90, 34, 0.32);
  opacity: 0.85;
  animation: ring-spin 16s linear infinite reverse;
}

.bg__beam {
  position: absolute;
  inset: -40% -20%;
  background: conic-gradient(
    from 180deg at 50% 50%,
    transparent 0deg,
    rgba(241, 90, 34, 0.16) 40deg,
    transparent 90deg,
    rgba(21, 21, 21, 0.04) 160deg,
    transparent 210deg,
    rgba(241, 90, 34, 0.22) 280deg,
    transparent 360deg
  );
  animation: beam-rotate 18s linear infinite;
  mix-blend-mode: multiply;
}

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(21, 21, 21, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 21, 21, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  animation: grid-shift 20s linear infinite;
  opacity: 0.9;
}

.bg__noise {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  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.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: multiply;
}

@keyframes wash-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.06); }
}

@keyframes orb-a {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  40% { transform: translate3d(18vw, 12vh, 0) scale(1.18); }
  70% { transform: translate3d(8vw, 22vh, 0) scale(0.92); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes orb-b {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  35% { transform: translate3d(-16vw, -10vh, 0) scale(1.22) rotate(12deg); }
  65% { transform: translate3d(-6vw, -18vh, 0) scale(0.9) rotate(-8deg); }
  100% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
}

@keyframes orb-c {
  0%,
  100% { transform: translate3d(-50%, -40%, 0) scale(0.85); opacity: 0.45; }
  50% { transform: translate3d(-30%, -55%, 0) scale(1.35); opacity: 0.85; }
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

@keyframes beam-rotate {
  to { transform: rotate(360deg); }
}

@keyframes grid-shift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 56px 56px, 56px 56px; }
}

/* Top controls */
.topbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--space);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--sp-line);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.lang-btn {
  min-width: 2.4rem;
  padding: 0.4rem 0.65rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--sp-muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.lang-btn.is-active {
  color: #fff;
  background: var(--sp-orange);
}

.lang-btn:focus-visible,
.sound-toggle:focus-visible,
.audio-gate__btn:focus-visible {
  outline: 2px solid var(--sp-orange);
  outline-offset: 3px;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--sp-line);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sp-muted);
}

.sound-toggle[hidden] {
  display: none;
}

.sound-toggle__icon {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--sp-orange);
  box-shadow: 0 0 0 3px var(--sp-orange-soft);
}

.sound-toggle[aria-pressed="true"] .sound-toggle__icon {
  background: var(--sp-muted);
  box-shadow: none;
}

body[dir="rtl"] .sound-toggle__label {
  font-family: var(--font-arabic);
}

/* Hero — one composition */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(4.5rem + env(safe-area-inset-top, 0px)) var(--space) calc(3rem + env(safe-area-inset-bottom, 0px));
}

.hero__brand {
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}

.logo-stage {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.5rem;
}

.logo-stage__aura {
  position: absolute;
  inset: 8% 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 90, 34, 0.42) 0%, rgba(241, 90, 34, 0.12) 42%, transparent 70%);
  filter: blur(8px);
  animation: logo-aura 3.6s ease-in-out infinite;
  z-index: 0;
}

.logo-stage__spark {
  position: absolute;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--sp-orange);
  box-shadow: 0 0 12px rgba(241, 90, 34, 0.85);
  z-index: 2;
  opacity: 0;
  animation: logo-spark 4.2s var(--ease-out) infinite;
}

.logo-stage__spark--1 {
  top: 18%;
  left: 12%;
  animation-delay: 0.2s;
}

.logo-stage__spark--2 {
  top: 22%;
  right: 14%;
  width: 0.35rem;
  height: 0.35rem;
  animation-delay: 1.4s;
}

.logo-stage__spark--3 {
  bottom: 20%;
  left: 48%;
  width: 0.3rem;
  height: 0.3rem;
  animation-delay: 2.6s;
}

.hero__logo {
  position: relative;
  z-index: 1;
  display: block;
  width: min(320px, 76vw);
  height: auto;
  margin-inline: auto;
  transform-origin: 50% 55%;
  filter: drop-shadow(0 10px 28px rgba(241, 90, 34, 0.22));
  animation: logo-alive 5.5s var(--ease-out) infinite;
}

.logo-stage::after {
  content: "";
  position: absolute;
  inset: 18% 8%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.55) 48%,
    transparent 62%
  );
  mix-blend-mode: soft-light;
  transform: translateX(-120%);
  animation: logo-sheen 4.8s ease-in-out infinite;
}

@keyframes logo-alive {
  0%,
  100% {
    transform: translateY(0) scale(1) rotate(0deg);
    filter: drop-shadow(0 10px 28px rgba(241, 90, 34, 0.22));
  }
  25% {
    transform: translateY(-7px) scale(1.035) rotate(-1.2deg);
    filter: drop-shadow(0 18px 36px rgba(241, 90, 34, 0.38));
  }
  55% {
    transform: translateY(3px) scale(0.985) rotate(1deg);
    filter: drop-shadow(0 8px 22px rgba(241, 90, 34, 0.2));
  }
  78% {
    transform: translateY(-4px) scale(1.02) rotate(-0.5deg);
    filter: drop-shadow(0 14px 32px rgba(241, 90, 34, 0.32));
  }
}

@keyframes logo-aura {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

@keyframes logo-sheen {
  0%,
  35% {
    transform: translateX(-130%);
    opacity: 0;
  }
  45% {
    opacity: 0.9;
  }
  55% {
    transform: translateX(130%);
    opacity: 0;
  }
  100% {
    transform: translateX(130%);
    opacity: 0;
  }
}

@keyframes logo-spark {
  0%,
  10% {
    opacity: 0;
    transform: scale(0.4) translateY(8px);
  }
  25% {
    opacity: 1;
    transform: scale(1.2) translateY(0);
  }
  45% {
    opacity: 0.2;
    transform: scale(0.6) translateY(-14px);
  }
  100% {
    opacity: 0;
    transform: scale(0.3) translateY(-22px);
  }
}

.hero__wordmark {
  margin: 0;
  font-family: var(--font-latin);
  font-size: clamp(2.75rem, 10vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--sp-orange);
}

.hero__wordmark::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 0.28rem;
  margin: 0.85rem auto 0;
  background: var(--sp-black);
  border-radius: 1px;
  opacity: 0.35;
}

.hero__title {
  margin: 0 0 0.85rem;
  max-width: 18ch;
  font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--sp-black);
}

body[dir="rtl"] .hero__title {
  max-width: 22ch;
}

.hero__lead {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(0.95rem, 2.1vw, 1.1rem);
  font-weight: 400;
  color: var(--sp-muted);
}

body[dir="rtl"] .hero__lead {
  max-width: 36ch;
}

/* Audio unlock gate */
.audio-gate {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 0 var(--space) calc(1.25rem + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.audio-gate[hidden] {
  display: none;
}

.audio-gate__btn {
  pointer-events: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid rgba(241, 90, 34, 0.45);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  color: var(--sp-ink);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(21, 21, 21, 0.12);
}

body[dir="rtl"] .audio-gate__btn {
  font-family: var(--font-arabic);
}

.audio-gate__pulse {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--sp-orange);
  animation: pulse 1.6s var(--ease-out) infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.55;
  }
}

/* Content entrance */
.hero__brand,
.hero__title,
.hero__lead {
  opacity: 0;
  transform: translateY(14px);
}

.hero.is-ready .hero__brand {
  animation: rise 0.9s var(--ease-out) 0.1s forwards;
}

.hero.is-ready .hero__title {
  animation: rise 0.85s var(--ease-out) 0.28s forwards;
}

.hero.is-ready .hero__lead {
  animation: rise 0.85s var(--ease-out) 0.42s forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg__wash,
  .bg__orb,
  .bg__ring,
  .bg__ring--a::before,
  .bg__ring--a::after,
  .bg__beam,
  .bg__grid,
  .audio-gate__pulse,
  .hero__logo,
  .logo-stage__aura,
  .logo-stage__spark,
  .logo-stage::after {
    animation: none !important;
  }

  .logo-stage::after {
    display: none;
  }

  .hero__brand,
  .hero__title,
  .hero__lead {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

@media (max-width: 480px) {
  .bg__orb--a,
  .bg__orb--b {
    opacity: 0.42;
  }

  .bg__ring--b {
    opacity: 0.55;
  }

  .sound-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .sound-toggle {
    position: relative;
    min-width: 2.6rem;
    min-height: 2.6rem;
    justify-content: center;
    padding: 0.55rem;
  }
}
