/* Website Updating — premium launch screen (light / dark semantic tokens) */

:root,
[data-theme="light"] {
  --bg: #eef5fb;
  --bg-deep: #dceaf7;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --text-primary: #012b64;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: rgba(1, 43, 100, 0.12);
  --accent: #012b64;
  --accent-bright: #00deff;
  --accent-soft: rgba(0, 222, 255, 0.18);
  --accent-glow: rgba(0, 222, 255, 0.45);
  --aurora-a: rgba(0, 222, 255, 0.28);
  --aurora-b: rgba(1, 43, 100, 0.14);
  --aurora-c: rgba(52, 211, 153, 0.12);
  --grid-line: rgba(1, 43, 100, 0.06);
  --shadow: 0 24px 60px rgba(1, 43, 100, 0.1);
  --progress-bg: rgba(1, 43, 100, 0.08);
  --progress-fill: linear-gradient(90deg, #012b64, #0077a8, #00deff);
  --toggle-bg: rgba(255, 255, 255, 0.88);
}

[data-theme="dark"] {
  --bg: #050810;
  --bg-deep: #0a1020;
  --surface: rgba(15, 23, 41, 0.72);
  --surface-strong: rgba(17, 27, 46, 0.92);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: rgba(0, 222, 255, 0.18);
  --accent: #00deff;
  --accent-bright: #5eead4;
  --accent-soft: rgba(0, 222, 255, 0.1);
  --accent-glow: rgba(0, 222, 255, 0.35);
  --aurora-a: rgba(0, 222, 255, 0.16);
  --aurora-b: rgba(1, 43, 100, 0.45);
  --aurora-c: rgba(52, 211, 153, 0.1);
  --grid-line: rgba(0, 222, 255, 0.05);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --progress-bg: rgba(255, 255, 255, 0.06);
  --progress-fill: linear-gradient(90deg, #00deff, #34d399, #7dd3fc);
  --toggle-bg: rgba(15, 23, 41, 0.88);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Vazirmatn", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Scene */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--bg-deep), transparent),
    var(--bg);
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.85;
  animation: auroraDrift 22s ease-in-out infinite;
}

.aurora-a {
  width: 55vw;
  height: 55vw;
  max-width: 520px;
  max-height: 520px;
  top: -15%;
  right: -10%;
  background: var(--aurora-a);
}

.aurora-b {
  width: 45vw;
  height: 45vw;
  max-width: 420px;
  max-height: 420px;
  bottom: -5%;
  left: -12%;
  background: var(--aurora-b);
  animation-delay: -8s;
}

.aurora-c {
  width: 35vw;
  height: 35vw;
  max-width: 320px;
  max-height: 320px;
  top: 35%;
  left: 35%;
  background: var(--aurora-c);
  animation-delay: -14s;
}

@keyframes auroraDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.08); }
  66% { transform: translate(-20px, 16px) scale(0.94); }
}

.grid-floor {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.85; }
}

.star-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--text-primary);
  background: var(--toggle-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform 0.2s, background 0.2s;
}

.theme-toggle:hover {
  transform: scale(1.06);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

[data-theme="light"] .icon-moon,
[data-theme="dark"] .icon-sun {
  display: none;
}

/* Stage */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(5rem, 10vw, 7rem) clamp(1.25rem, 4vw, 2rem) 3rem;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

/* Logo orbit */
.logo-orbit {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: 1.75rem;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.orbit-ring--outer {
  animation: spin 18s linear infinite;
  border-color: transparent;
  border-top-color: var(--accent-bright);
  border-right-color: rgba(0, 222, 255, 0.25);
}

.orbit-ring--inner {
  inset: 12px;
  animation: spinReverse 12s linear infinite;
  border-color: transparent;
  border-bottom-color: var(--accent);
  opacity: 0.7;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes spinReverse {
  to { transform: rotate(-360deg); }
}

.logo-core {
  position: absolute;
  inset: 24px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface-strong);
  border: 2px solid var(--border);
  box-shadow:
    0 0 0 8px var(--accent-soft),
    var(--shadow);
  animation: logoPulse 4s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
}

.logo-core img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 0 8px var(--accent-soft), var(--shadow); }
  50% { box-shadow: 0 0 0 14px transparent, 0 0 40px var(--accent-glow); }
}

.orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 12px var(--accent-glow);
}

.orbit-dot--1 {
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  animation: dotOrbit1 6s linear infinite;
}

.orbit-dot--2 {
  bottom: 20px;
  right: 8px;
  animation: dotBob 3s ease-in-out infinite;
}

.orbit-dot--3 {
  bottom: 20px;
  left: 8px;
  animation: dotBob 3s ease-in-out infinite reverse;
}

@keyframes dotOrbit1 {
  0% { transform: translateX(-50%) rotate(0deg) translateY(72px) rotate(0deg); }
  100% { transform: translateX(-50%) rotate(360deg) translateY(72px) rotate(-360deg); }
}

@keyframes dotBob {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-6px); opacity: 0.6; }
}

/* Typography */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1rem;
  margin: 0 0 1.25rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  color: var(--accent);
}

.status-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: beacon 2s ease-out infinite;
}

@keyframes beacon {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.headline {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.shimmer-text {
  background: linear-gradient(
    110deg,
    var(--accent) 0%,
    var(--accent-bright) 35%,
    var(--text-primary) 50%,
    var(--accent-bright) 65%,
    var(--accent) 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 220% center; }
}

.subtitle {
  margin: 0 auto 2rem;
  max-width: 52ch;
  font-size: clamp(0.95rem, 2.2vw, 1.08rem);
  color: var(--text-secondary);
}

/* Progress */
.progress-wrap {
  width: min(100%, 520px);
  margin-bottom: 2rem;
  padding: 1.25rem 1.35rem;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.progress-meta strong {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 900;
}

.progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--progress-bg);
  overflow: hidden;
}

.progress-fill {
  position: relative;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--progress-fill);
  background-size: 200% 100%;
  animation: progressShine 3s linear infinite;
  transition: width 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes progressShine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.progress-glow {
  position: absolute;
  top: 50%;
  left: 0;
  width: 40px;
  height: 24px;
  transform: translate(-50%, -50%);
  background: var(--accent-bright);
  filter: blur(12px);
  opacity: 0.5;
  pointer-events: none;
  transition: left 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-note {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Timeline */
.timeline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.timeline-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.45;
}

.timeline-item.is-done {
  color: var(--text-secondary);
}

.timeline-item.is-done .timeline-dot {
  background: #34d399;
  opacity: 1;
}

.timeline-item.is-active {
  color: var(--accent);
  border-color: var(--accent-bright);
  background: var(--accent-soft);
  animation: activeStep 2.5s ease-in-out infinite;
}

.timeline-item.is-active .timeline-dot {
  background: var(--accent-bright);
  opacity: 1;
  animation: beacon 2s ease-out infinite;
}

@keyframes activeStep {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Teasers */
.teasers {
  width: 100%;
}

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .teaser-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.teaser-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.1rem 0.75rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s, box-shadow 0.3s;
}

.teaser-card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: var(--accent-bright);
  box-shadow: 0 20px 50px var(--accent-glow);
}

.teaser-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.teaser-icon .social-icon {
  width: 24px;
  height: 24px;
}

.teaser-card strong {
  font-size: 0.88rem;
}

.teaser-card span:last-child {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--accent);
  font-weight: 600;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Entrance animations */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fade-up-delay-1 { animation-delay: 0.1s; }
.fade-up-delay-2 { animation-delay: 0.2s; }
.fade-up-delay-3 { animation-delay: 0.3s; }
.fade-up-delay-4 { animation-delay: 0.45s; }
.fade-up-delay-5 { animation-delay: 0.55s; }
.fade-up-delay-6 { animation-delay: 0.7s; }
.fade-up-delay-7 { animation-delay: 0.85s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-up {
    opacity: 1;
    transform: none;
  }

  .progress-fill {
    width: 74% !important;
  }
}
