/* ==========================================================================
   Brand Kit V1.0 - Core Design System & Tokens
   ========================================================================== */

:root {
  /* Brand Hex Tokens */
  --color-midnight: #231F20;     /* Core dark mode canvas background */
  --color-signal-blue: #2E3192;  /* Primary brand field background */
  --color-sky-cyan: #00ADEF;     /* Secondary digital highlights */
  --color-clue-yellow: #FFF200;  /* Accent dot color */
  --color-soft-surface: #F6F7FB; /* Card element backgrounds */

  /* UI Spacing & Border Radii */
  --radius-card: 24px;           /* Specs: 16px to 24px radius */
  --radius-input: 12px;
  --radius-button: 12px;

  /* Font Families */
  --font-en: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;

  /* Focus Indicator Ring */
  --focus-ring: 0 0 0 3px rgba(255, 242, 0, 0.45);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--color-midnight);
  color: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Font Assignments based on Document Language */
html[lang="en"] {
  font-family: var(--font-en);
}

html[lang="ar"] {
  font-family: var(--font-ar);
}

/* App Wrapper Fade Transition for Language Toggle */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 10;
  opacity: 1;
  transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.app-wrapper.switching {
  opacity: 0;
}

/* ==========================================================================
   Dynamic Atmospheric Background Glows
   ========================================================================== */

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 1;
  pointer-events: none;
  opacity: 0.25;
  transition: all 1s ease-in-out;
}

.bg-glow-1 {
  width: 45vw;
  height: 45vw;
  background-color: var(--color-signal-blue);
  inset-block-start: -15vw;
  inset-inline-start: -10vw;
  animation: float-glow-1 25s infinite alternate;
}

.bg-glow-2 {
  width: 40vw;
  height: 40vw;
  background-color: var(--color-sky-cyan);
  inset-block-end: -10vw;
  inset-inline-end: -5vw;
  animation: float-glow-2 20s infinite alternate;
}

.bg-glow-3 {
  width: 30vw;
  height: 30vw;
  background-color: var(--color-signal-blue);
  inset-block-start: 35vh;
  inset-inline-start: 30vw;
  opacity: 0.12;
  animation: float-glow-3 30s infinite alternate;
}

@keyframes float-glow-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5vw, 8vh) scale(1.1); }
}

@keyframes float-glow-2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-6vw, -5vh) scale(1.05); }
}

@keyframes float-glow-3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(3vw, -3vh) scale(0.9); }
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */

.header {
  width: 100%;
  padding-block: 2rem;
  padding-inline: 2rem;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo Styling */
.logo {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.5px;
  transition: transform 300ms ease;
  display: inline-flex;
  align-items: center;
  direction: ltr; /* Force LTR so the dot is always on the right */
}

.logo:hover {
  transform: scale(1.03);
}

.logo .dot {
  color: var(--color-clue-yellow);
}

/* Language Toggle Button */
.lang-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding-block: 0.5rem;
  padding-inline: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 300ms ease;
}

.lang-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

.lang-label {
  transition: color 300ms ease;
}

.lang-label.active {
  color: var(--color-sky-cyan);
  font-weight: 700;
}

.lang-divider {
  color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */

.main-content {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 1.5rem;
  padding-block: 2rem;
}

.hero-container {
  width: 100%;
  max-width: 680px;
  display: flex;
  justify-content: center;
}

/* Staged Premium Card */
.hero-card {
  width: 100%;
  background-color: var(--color-soft-surface);
  color: var(--color-midnight);
  border-radius: var(--radius-card);
  padding-block: 3.5rem;
  padding-inline: 3.5rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Internal Card Accent Glow Layer */
.card-glow-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(0, 173, 239, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.card-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

/* Headline & Text */
.text-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.headline {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--color-midnight);
  text-align: start;
}

html[lang="ar"] .headline {
  font-size: 2.75rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.subheadline {
  font-size: 1.15rem;
  line-height: 1.6;
  color: rgba(35, 31, 32, 0.75);
  font-weight: 500;
  text-align: start;
}

html[lang="ar"] .subheadline {
  font-size: 1.1rem;
  line-height: 1.7;
}

/* ==========================================================================
   Interactive Waitlist Form
   ========================================================================== */

.waitlist-form {
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
}

/* Input Wrapper & Transition Setup */
.input-wrapper {
  position: relative;
  flex-grow: 1;
}

.email-input {
  width: 100%;
  padding-block: 1.125rem;
  padding-inline: 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  background: #ffffff;
  border: 2px solid rgba(35, 31, 32, 0.12);
  border-radius: var(--radius-input);
  color: var(--color-midnight);
  font-family: inherit;
  outline: none;
  /* Specs: smooth 400ms cubic-bezier transition */
  transition: border-color 400ms cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 400ms cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Focus and Hover indicators */
.email-input:hover {
  border-color: rgba(35, 31, 32, 0.3);
}

.email-input:focus {
  border-color: var(--color-midnight);
  background-color: #ffffff;
  /* Specs: yellow accent color for active indicators */
  box-shadow: 0 0 0 3px var(--color-clue-yellow), 0 4px 12px rgba(35, 31, 32, 0.05);
}

/* Submit Button */
.submit-btn {
  background-color: var(--color-signal-blue);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-button);
  padding-inline: 2rem;
  padding-block: 1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(46, 49, 146, 0.25);
  transition: background-color 300ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 300ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.submit-btn:hover {
  background-color: var(--color-sky-cyan);
  box-shadow: 0 6px 16px rgba(0, 173, 239, 0.35);
  transform: translateY(-1px);
}

.submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 173, 239, 0.2);
}

/* Form Error Message Styling */
.form-error {
  font-size: 0.875rem;
  color: #d9383a;
  margin-block-start: 0.5rem;
  text-align: start;
  font-weight: 600;
  min-height: 1.25rem;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 300ms ease;
}

.form-error.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Success Confirmation State
   ========================================================================== */

.success-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: 1.5rem;
  gap: 1rem;
  animation: scale-up 500ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scale-up {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

.success-icon {
  margin-block-end: 0.5rem;
}

.success-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-midnight);
}

.success-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(35, 31, 32, 0.75);
  max-width: 480px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Privacy Component
   ========================================================================== */

.privacy-block {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid rgba(35, 31, 32, 0.08);
}

.privacy-icon {
  color: var(--color-sky-cyan);
  flex-shrink: 0;
  margin-block-start: 2px;
}

.privacy-label {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(35, 31, 32, 0.55);
  text-align: start;
}

/* ==========================================================================
   Footer Legal Area
   ========================================================================== */

.footer {
  width: 100%;
  padding-block: 2.5rem;
  padding-inline: 2rem;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.legal-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Responsive Adjustments (Mobile Devices)
   ========================================================================== */

@media (max-width: 768px) {
  .header {
    padding-block: 1.5rem;
    padding-inline: 1.5rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .hero-card {
    padding-block: 2.5rem;
    padding-inline: 2rem;
  }
  
  .headline {
    font-size: 2.25rem;
  }
  
  html[lang="ar"] .headline {
    font-size: 2.15rem;
  }
  
  .subheadline {
    font-size: 1rem;
  }
  
  .form-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .submit-btn {
    padding-block: 1.125rem;
  }
}
