:root {
  color-scheme: dark;
  --bg-color: #0B0F19;
  --accent-cyan: #00F3FF;
  --accent-purple: #BC13FE;
  --text-primary: #FFFFFF;
  --text-secondary: #BEC4D0;
  --glass-bg: rgba(255, 255, 255, 0.035);
  --glass-border: rgba(255, 255, 255, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-color);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(188, 19, 254, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 243, 255, 0.1) 0%, transparent 40%);
}

.page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px;
  overflow-x: clip;
  position: relative;
}

.page--home::before {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.container {
  width: min(650px, 100%);
  border-radius: 24px;
  padding: clamp(25px, 5vw, 48px);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  text-align: center;
  animation: float 6s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.container:hover { transform: scale(1.015); }

.container::after {
  content: '';
  position: absolute;
  inset: -50%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transform: rotate(45deg);
  animation: shine 10s infinite linear;
  pointer-events: none;
}

h1 {
  margin: 8px 0;
  font-size: clamp(2rem, 7vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.page--home h1 {
  display: inline-block;
  position: relative;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(0, 243, 255, 0.16));
}

p {
  line-height: 1.8;
  color: var(--text-secondary);
}

.intro {
  margin: 0 0 14px;
  font-size: clamp(1.06rem, 3.3vw, 1.25rem);
  font-weight: 300;
}

.launch-message {
  display: block;
  margin-top: 10px;
  color: var(--accent-cyan);
  font-weight: 400;
}

.en-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.loader-container { margin-bottom: 30px; }

.loader {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto;
  background: conic-gradient(from 0deg, var(--accent-purple), var(--accent-cyan), transparent 60%);
  mask: radial-gradient(transparent 55%, black 56%);
  -webkit-mask: radial-gradient(transparent 55%, black 56%);
  animation: spin 1.5s linear infinite;
}

.divider {
  height: 1px;
  margin: 32px 0;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.contact-heading {
  margin: 0 0 6px;
  font-size: 0.96rem;
}

.contact-pill {
  display: inline-flex;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  text-decoration: none;
  font-size: clamp(0.94rem, 3.3vw, 1.1rem);
  direction: ltr;
  overflow-wrap: anywhere;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.contact-pill:hover {
  background: rgba(0, 243, 255, 0.1);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
  transform: translateY(-2px);
}

.contact-pill:focus-visible,
.return-link:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid var(--accent-cyan);
  outline-offset: 4px;
}

.contact-icon { font-family: system-ui, sans-serif; }

.skip-link {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 8px;
  color: #0B0F19;
  background: var(--accent-cyan);
  font-weight: 700;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.page--error .error-card {
  width: min(560px, 100%);
  padding: clamp(24px, 6vw, 42px);
  text-align: center;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: var(--glass-bg);
}

.error-code {
  margin: 0 0 4px;
  color: var(--accent-cyan);
  font-size: clamp(3rem, 15vw, 5rem);
  font-weight: 700;
  line-height: 1.15;
}

.page--error h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
.page--error p:not(.error-code) { margin-bottom: 30px; }

.return-link {
  display: inline-flex;
  padding: 12px 20px;
  border-radius: 12px;
  color: #0B0F19;
  background: var(--accent-cyan);
  text-decoration: none;
  font-weight: 700;
}

.return-link:hover { background: #8AF9FF; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shine { from { transform: translateX(-150%) rotate(45deg); } to { transform: translateX(150%) rotate(45deg); } }

@media (max-width: 480px) {
  .page { padding: 20px 12px; }
  .container { border-radius: 18px; }
  .divider { margin: 25px 0; }
  .contact-info { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
