:root {
  --ys-bg-deep: #070b18;
  --ys-bg-mid: #0c1630;
  --ys-bg-soft: #101e3d;
  --ys-glow: rgba(37, 99, 235, 0.2);
  --ys-glow-soft: rgba(59, 130, 246, 0.1);
}

body {
  background: var(--ys-bg-deep);
}

body[dir="rtl"] {
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

.mesh-bg {
  background-color: var(--ys-bg-deep);
  background-image:
    radial-gradient(ellipse 75% 55% at 72% 18%, rgba(37, 99, 235, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 55% 45% at 18% 78%, rgba(59, 130, 246, 0.1) 0%, transparent 52%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(15, 30, 61, 0.85) 0%, transparent 55%),
    linear-gradient(165deg, #070b18 0%, #0a1228 38%, #0d1835 62%, #091228 100%);
}

.glass {
  background: rgba(12, 22, 48, 0.52);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.glass-strong {
  background: rgba(12, 22, 48, 0.68);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.crystal {
  position: relative;
  background: linear-gradient(135deg, rgba(12, 22, 48, 0.82) 0%, rgba(16, 30, 61, 0.62) 50%, rgba(10, 18, 40, 0.78) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.crystal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(255, 255, 255, 0.1), rgba(59, 130, 246, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.logo-circle-wrap {
  display: inline-flex;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  line-height: 0;
}

.logo-circle-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logo-glow {
  filter: drop-shadow(0 0 28px rgba(37, 99, 235, 0.5)) drop-shadow(0 0 60px rgba(37, 99, 235, 0.18));
}

.btn-electric {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #2563eb 100%);
  box-shadow: 0 0 24px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: box-shadow 0.2s, transform 0.2s;
}

.btn-electric:hover {
  box-shadow: 0 0 32px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(12, 22, 48, 0.45);
  transition: border-color 0.2s, color 0.2s;
}

.btn-outline:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: #fff;
}

html { scroll-behavior: smooth; }

/* —— Mock embed + auto-pan viewport —— */
.mock-embed {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.6);
  box-shadow: 0 0 40px rgba(37, 99, 235, 0.14);
  background: #070b18;
  flex: 1;
  min-width: 0;
}

.mock-embed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: rgba(10, 18, 40, 0.95);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  font-size: 0.7rem;
  color: #94a3b8;
}

.mock-embed-bar strong {
  color: #e2e8f0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.embed-viewport {
  --embed-scale: 0.5;
  --pan-max: 0px;
  --pan-duration: 28s;
  overflow: hidden;
  position: relative;
  background: #070b18;
}

.embed-viewport iframe {
  display: block;
  border: 0;
  transform-origin: top left;
  pointer-events: none;
  animation: embed-pan-y var(--pan-duration) ease-in-out infinite alternate;
  will-change: transform;
}

.embed-viewport.is-paused iframe {
  animation-play-state: paused;
}

@keyframes embed-pan-y {
  from { transform: scale(var(--embed-scale)) translateY(0); }
  to { transform: scale(var(--embed-scale)) translateY(calc(-1 * var(--pan-max))); }
}

.embed-viewport--hero {
  height: min(70vh, 680px);
}

.embed-viewport--half {
  height: min(52vh, 480px);
}

.embed-viewport--mobile {
  height: min(58vh, 520px);
  --pan-duration: 22s;
}

/* —— Showcase layouts —— */
.showcase-section + .showcase-section {
  padding-top: 0;
}

.showcase-section--hero .showcase-copy--hero {
  max-width: 42rem;
}

.showcase-visual {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem;
  align-items: stretch;
}

.showcase-visual--hero {
  width: 100%;
}

.showcase-visual--half {
  width: 100%;
  max-width: 100%;
}

.showcase-visual--apps {
  grid-template-columns: 1fr auto;
}

.showcase-visual--apps .showcase-visual-side {
  min-width: 7.5rem;
}

.showcase-visual-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: stretch;
}

@media (max-width: 639px) {
  .showcase-visual,
  .showcase-visual--apps {
    grid-template-columns: 1fr;
  }
}

.auto-play-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.auto-play-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
  animation: auto-pulse 1.4s ease-in-out infinite;
}

@keyframes auto-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.btn-preview-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-width: 7.5rem;
  padding: 1.35rem 1.1rem;
  border-radius: 1.25rem;
  text-decoration: none;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(160deg, #2563eb 0%, #1d4ed8 45%, #2563eb 100%);
  border: 1px solid rgba(147, 197, 253, 0.35);
  box-shadow: 0 0 32px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-preview-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 44px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

@media (max-width: 639px) {
  .btn-preview-hero {
    flex-direction: row;
    min-width: 0;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
  }
}

/* App store badges */
.store-badges {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.85rem;
  text-decoration: none;
  border: 1px solid rgba(51, 65, 85, 0.65);
  background: rgba(10, 18, 40, 0.85);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.store-badge:hover {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.12);
}

.store-badge svg {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
}

.store-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-badge-text small {
  font-size: 0.58rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.store-badge-text strong {
  font-size: 0.78rem;
  color: #f1f5f9;
  font-weight: 700;
}

.store-badges-note {
  font-size: 0.68rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.15rem;
}

.showcase-section:nth-child(even) .showcase-grid {
  direction: ltr;
}

body[dir="rtl"] .showcase-section:nth-child(even) .showcase-copy {
  direction: rtl;
}

.showcase-points {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.showcase-points li {
  position: relative;
  padding-inline-start: 1.1rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #94a3b8;
}

.showcase-points li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.55rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

.showcase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.mock-home-link {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(10, 18, 40, 0.92);
  border: 1px solid rgba(51, 65, 85, 0.8);
  color: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s, color 0.2s;
}

.mock-home-link:hover {
  border-color: rgba(37, 99, 235, 0.55);
  color: #93c5fd;
}

.mock-home-link--light {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border-color: rgba(203, 213, 225, 0.9);
}

.mock-home-link--light:hover {
  border-color: #2563eb;
  color: #2563eb;
}

@media (prefers-reduced-motion: reduce) {
  .embed-viewport iframe {
    animation: none;
  }
}
