/* ==========================================================================
   AUAR Foundation "Coming Soon" Stylesheet
   Developed by Just Codes Developers
   ========================================================================== */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&family=Outfit:wght@300;400;500;600;700;800&family=Lora:ital,wght@0,400;0,500;1,400;1,500&display=swap');

/* --- Custom Properties (Design System) --- */
:root {
  /* Color Palette */
  --color-navy-dark: #030d1a;
  --color-navy-mid: #07213d;
  --color-navy-light: #0d325c;
  --color-navy-rgb: 7, 33, 61;
  
  --color-gold: #c59b27;
  --color-gold-light: #ebd082;
  --color-gold-rgb: 197, 155, 39;
  
  --color-white: #ffffff;
  --color-white-rgb: 255, 255, 255;
  
  --color-text-primary: #ffffff;
  --color-text-secondary: #a3b8cc;
  --color-text-muted: #738da6;

  /* Typography */
  --font-primary: 'Outfit', sans-serif;
  --font-arabic: 'Cairo', sans-serif;
  --font-serif: 'Lora', serif;

  /* Layout & Spacing */
  --container-max-width: 850px;
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* --- Reset & Base Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-primary);
  background: linear-gradient(135deg, #020912, #071e36, #0e3054, #121924, #020912);
  background-size: 400% 400%;
  animation: fluidBg 20s ease infinite;
  color: var(--color-text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  padding: 2.5rem 1.5rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-navy-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--color-navy-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

/* --- Animated Ambient Background Glows --- */
.ambient-glow-1 {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 155, 39, 0.12) 0%, transparent 70%);
  top: -15%;
  left: -15%;
  pointer-events: none;
  z-index: 0;
  animation: floatGlow1 28s ease-in-out infinite alternate;
  filter: blur(100px);
}

.ambient-glow-2 {
  position: absolute;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 50, 92, 0.3) 0%, transparent 70%);
  bottom: -20%;
  right: -15%;
  pointer-events: none;
  z-index: 0;
  animation: floatGlow2 32s ease-in-out infinite alternate;
  filter: blur(120px);
}

@keyframes fluidBg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatGlow1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10vw, 8vh) scale(1.15); }
  100% { transform: translate(3vw, -4vh) scale(0.95); }
}

@keyframes floatGlow2 {
  0% { transform: translate(0, 0) scale(1.1); }
  50% { transform: translate(-8vw, -12vh) scale(0.85); }
  100% { transform: translate(4vw, 4vh) scale(1); }
}

/* --- Layout Structure --- */
header {
  width: 100%;
  max-width: 480px;
  margin-bottom: 2rem;
  z-index: 10;
  display: flex;
  justify-content: center;
}

main {
  width: 100%;
  max-width: var(--container-max-width);
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto 0;
}

footer {
  width: 100%;
  text-align: center;
  padding-top: 2.5rem;
  z-index: 10;
}

/* --- Logo Image Styling --- */
.logo-container {
  width: 100%;
  max-width: 380px;
  padding: 0.5rem;
  transition: var(--transition-smooth);
  margin: 0 auto;
}

.logo-img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition-smooth);
}

/* Logo Hover Effect */
.logo-container:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 15px rgba(var(--color-gold-rgb), 0.25));
}

/* --- Main Glassmorphism Card --- */
.glass-card {
  position: relative;
  width: 100%;
  background: rgba(var(--color-navy-rgb), 0.45);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 3.5rem 3rem;
  box-shadow: 0 24px 64px 0 rgba(0, 0, 0, 0.45),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  text-align: center;
  overflow: hidden;
}

/* Interactive Cursor Glow inside the Card */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: radial-gradient(
    600px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(255, 255, 255, 0.05),
    transparent 45%
  );
  z-index: 1;
  pointer-events: none;
}

.card-content {
  position: relative;
  z-index: 2;
}

/* --- Typography & Copy --- */
.main-title {
  margin-bottom: 1.5rem;
}

.main-title .en {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.25;
  background: linear-gradient(135deg, var(--color-white) 30%, var(--color-text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.4rem;
  letter-spacing: -0.5px;
}

.main-title .ar {
  display: block;
  font-family: var(--font-arabic);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1.35;
  letter-spacing: 0;
}

.subtitle-container {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.subtitle.ar {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

/* --- Countdown Timer --- */
.countdown-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.countdown-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 1.5rem 1rem;
  position: relative;
  transition: var(--transition-smooth);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.03);
}

.countdown-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(var(--color-gold-rgb), 0.3);
  box-shadow: 0 12px 24px -10px rgba(var(--color-gold-rgb), 0.2),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.countdown-val {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--color-white);
  line-height: 1;
  margin-bottom: 0.6rem;
  letter-spacing: -1px;
  display: inline-block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Numerical transitions active classes */
.digit-changing {
  transform: scale(0.9) translateY(4px);
  opacity: 0;
}

.countdown-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--color-gold);
}

.countdown-label span.ar {
  font-family: var(--font-arabic);
  font-size: 0.68rem;
  color: var(--color-text-muted);
  font-weight: 600;
  letter-spacing: 0;
}

/* --- Subscription Form --- */
.subscribe-section {
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

.subscribe-form {
  display: flex;
  gap: 0.75rem;
  position: relative;
}

.input-wrapper {
  position: relative;
  flex-grow: 1;
}

.subscribe-input {
  width: 100%;
  padding: 1.1rem 1.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  outline: none;
}

.subscribe-input::placeholder {
  color: var(--color-text-muted);
  transition: var(--transition-fast);
}

.subscribe-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-gold);
  box-shadow: 0 0 20px 0 rgba(var(--color-gold-rgb), 0.15);
}

.subscribe-input:focus::placeholder {
  opacity: 0.6;
}

.subscribe-btn {
  background: linear-gradient(135deg, var(--color-gold), #d6ad3c);
  color: var(--color-navy-dark);
  border: none;
  border-radius: 14px;
  padding: 0 1.8rem;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(var(--color-gold-rgb), 0.2);
}

.subscribe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--color-gold-rgb), 0.35);
  background: linear-gradient(135deg, #d6ad3c, var(--color-gold-light));
}

.subscribe-btn:active {
  transform: translateY(0);
}

.subscribe-btn .btn-icon-svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.subscribe-btn:hover .btn-icon-svg {
  transform: translateX(4px);
}

/* Success Message Container */
.form-feedback {
  margin-top: 0.8rem;
  font-size: 0.88rem;
  line-height: 1.4;
  min-height: 20px;
  opacity: 0;
  transform: translateY(-5px);
  transition: var(--transition-smooth);
}

.form-feedback.success {
  color: #5af0a2;
  opacity: 1;
  transform: translateY(0);
}

.form-feedback.error {
  color: #ff6b6b;
  opacity: 1;
  transform: translateY(0);
}

/* --- Social Icons --- */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-icon {
  width: 46px;
  height: 46px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: var(--transition-smooth);
}

.social-icon:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-navy-dark);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(var(--color-gold-rgb), 0.3);
}

/* --- Footer --- */
.footer-link {
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth);
  display: inline-block;
}

.footer-link:hover {
  color: var(--color-gold);
  text-shadow: 0 0 10px rgba(var(--color-gold-rgb), 0.2);
  transform: translateY(-1px);
}

/* Spinner and SVGs */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(7, 33, 61, 0.2);
  border-top-color: var(--color-navy-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* --- Entrance Animations (Staggered) --- */
.animate-item {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }
.delay-5 { animation-delay: 0.75s; }
.delay-6 { animation-delay: 0.9s; }

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

/* --- Responsive Layout & Media Queries --- */

/* Tablet Viewports */
@media (max-width: 768px) {
  body {
    padding: 2rem 1.25rem;
  }

  header {
    margin-bottom: 1.5rem;
    max-width: 380px;
  }

  .glass-card {
    padding: 2.5rem 2rem;
    border-radius: 24px;
  }

  .main-title .en {
    font-size: 2.1rem;
  }
  
  .main-title .ar {
    font-size: 1.8rem;
  }

  .countdown-container {
    gap: 0.85rem;
  }

  .countdown-card {
    padding: 1.2rem 0.8rem;
    border-radius: 14px;
  }

  .countdown-val {
    font-size: 2.5rem;
  }

  .countdown-label {
    font-size: 0.65rem;
  }
  
  .countdown-label span.ar {
    font-size: 0.62rem;
  }
}

/* Mobile Viewports */
@media (max-width: 480px) {
  body {
    padding: 1.5rem 1rem;
  }

  header {
    max-width: 280px;
  }

  .glass-card {
    padding: 2.2rem 1.25rem;
    border-radius: 20px;
  }

  .main-title .en {
    font-size: 1.6rem;
  }
  
  .main-title .ar {
    font-size: 1.4rem;
  }

  .subtitle {
    font-size: 0.92rem;
  }
  
  .subtitle.ar {
    font-size: 0.95rem;
  }

  .countdown-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 2.2rem;
  }

  .countdown-card {
    padding: 1rem 0.6rem;
  }

  .countdown-val {
    font-size: 2.2rem;
    margin-bottom: 0.4rem;
  }

  .subscribe-form {
    flex-direction: column;
    gap: 0.6rem;
  }

  .subscribe-btn {
    padding: 1.1rem;
    justify-content: center;
  }
  
  .subscribe-btn .btn-icon-svg {
    width: 16px;
    height: 16px;
  }

  .social-icon {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}

/* Extra Small Devices */
@media (max-width: 360px) {
  body {
    padding: 1rem 0.75rem;
  }
  .glass-card {
    padding: 1.8rem 1rem;
  }
  .main-title .en {
    font-size: 1.4rem;
  }
  .main-title .ar {
    font-size: 1.25rem;
  }
  .countdown-val {
    font-size: 1.8rem;
  }
  .countdown-card {
    padding: 0.8rem 0.4rem;
  }
}
