@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons+Outlined');

/* ===== CSS VARIABLES ===== */
:root {
  /* Color Palette - Semantic naming */
  --color-primary: #0D1117;
  --color-secondary: #161B22;
  --color-tertiary: #21262D;
  --color-surface: #F0F6FF;
  --color-text-muted: #8B949E;
  --color-text-primary: #c9d1d9;

  /* Brand Colors */
  --brand-blue: #58A6FF;
  --brand-green: #3FB950;
  --brand-red: #F85149;
  --brand-purple: #A5A3FF;
  --brand-cyan: #39D353;

  /* Glass Effects */
  --glass-bg: rgba(22, 27, 34, 0.65);
  --glass-border: rgba(240, 246, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);

  /* Enhanced Shadow System */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(88, 166, 255, 0.3);

  /* Motion System */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;

  /* Spacing Scale */
  --space-px: 1px;
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;

  /* Z-index Scale */
  --z-hide: -1;
  --z-auto: auto;
  --z-base: 0;
  --z-docked: 10;
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-banner: 1200;
  --z-overlay: 1300;
  --z-modal: 1400;
  --z-popover: 1500;
  --z-skip-link: 1600;
  --z-toast: 1700;
  --z-tooltip: 1800;

  /* Layout */
  --max-width-sm: 24rem;
  --max-width-md: 28rem;
  --max-width-lg: 32rem;
  --max-width-xl: 36rem;
  --max-width-2xl: 42rem;
  --max-width-3xl: 48rem;
  --max-width-4xl: 56rem;
  --max-width-5xl: 64rem;
  --max-width-6xl: 72rem;
  --max-width-7xl: 80rem;
}

/* ===== MODERN RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-variation-settings: 'wght' 400;
  background-color: var(--color-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.particles {
  position: fixed;
  inset: 0;
  z-index: var(--z-base);
  overflow: hidden;
  pointer-events: none;
  contain: layout style paint;
  will-change: transform;
}

.particle {
  position: absolute;
  border-radius: var(--radius-full);
  opacity: 0.6;
  will-change: transform, opacity;
  contain: layout style paint;
  animation: float linear infinite;
}

.particle--blue { 
  background: var(--brand-blue);
  box-shadow: 0 0 10px var(--brand-blue);
}

.particle--green { 
  background: var(--brand-green);
  box-shadow: 0 0 10px var(--brand-green);
}

.particle--purple { 
  background: var(--brand-purple);
  box-shadow: 0 0 10px var(--brand-purple);
}

/* ===== ENHANCED ANIMATIONS ===== */
@keyframes float {
  from {
    transform: translate3d(0, 100vh, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.4;
  }
  to {
    transform: translate3d(var(--drift, 0), -10vh, 0);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translate3d(0, 2rem, 0);
  }
  to { 
    opacity: 1; 
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideIn {
  from { 
    opacity: 0; 
    transform: translate3d(0, -1.25rem, 0);
  }
  to { 
    opacity: 1; 
    transform: translate3d(0, 0, 0);
  }
}

@keyframes bounceIn {
  0% { 
    opacity: 0; 
    transform: scale3d(0.8, 0.8, 1);
  }
  60% { 
    opacity: 1; 
    transform: scale3d(1.05, 1.05, 1);
  }
  100% { 
    transform: scale3d(1, 1, 1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* ===== GLASS EFFECTS ===== */
.glass-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13, 17, 23, 0.8) 0%,
    rgba(22, 27, 34, 0.6) 35%,
    rgba(33, 38, 45, 0.4) 65%,
    rgba(13, 17, 23, 0.9) 100%
  );
  backdrop-filter: blur(20px) saturate(1.2) brightness(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.2) brightness(1.1);
  z-index: var(--z-docked);
  pointer-events: none;
}

/* ===== LAYOUT COMPONENTS ===== */
.container {
  position: relative;
  z-index: var(--z-dropdown);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height */
  padding: var(--space-8);
  text-align: center;
  justify-content: center;
  container-type: inline-size;
}

.content-card {
  background: rgba(22, 27, 34, 0.85);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-3xl);
  padding: var(--space-12) var(--space-8);
  max-width: var(--max-width-2xl);
  width: 100%;
  box-shadow: var(--glass-shadow), var(--shadow-2xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fadeIn var(--duration-slower) var(--ease-out) forwards;
  position: relative;
  overflow: hidden;
}

.content-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--glass-border), 
    transparent
  );
}

/* ===== BRAND ELEMENTS ===== */
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-8);
}

.logo-symbol {
  font-size: var(--text-5xl);
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-green), var(--brand-purple));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: var(--space-2);
  animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.flux-icon {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(88, 166, 255, 0.3));
  transition: all var(--duration-normal) var(--ease-out);
}

.flux-icon:hover {
  filter: drop-shadow(0 0 30px rgba(88, 166, 255, 0.5));
  transform: scale(1.05);
}

/* Ajuste al logo-symbol existente */
.logo-symbol {
  font-size: unset; /* Elimina el font-size ya que ahora usamos imagen */
  background: unset;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
  color: unset;
  margin-bottom: var(--space-2);
  animation: unset; /* Elimina la animación de gradiente del texto */
}

.brand-name {
  font-size: var(--text-4xl);
  font-weight: 700;
  font-variation-settings: 'wght' 700;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--color-text-primary), var(--color-surface));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ===== CONTENT SECTIONS ===== */
.message-container {
  margin-bottom: var(--space-8);
}

.coming-soon-text {
  font-size: var(--text-2xl);
  font-weight: 600;
  font-variation-settings: 'wght' 600;
  margin-bottom: var(--space-2);
  animation: slideIn var(--duration-slower) var(--ease-out) forwards;
  letter-spacing: -0.025em;
}

.subtitle {
  font-size: var(--text-lg);
  opacity: 0.85;
  color: var(--color-text-muted);
  font-weight: 400;
}

.feature-hints {
  margin-top: var(--space-6);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hint-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  cursor: default;
  animation: bounceIn var(--duration-slower) var(--ease-bounce) forwards;
  transition: all var(--duration-normal) var(--ease-out);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hint-item:hover {
  background: rgba(88, 166, 255, 0.15);
  border-color: rgba(88, 166, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== PROGRESS COMPONENT ===== */
.progress-container {
  margin: var(--space-8) 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(88, 166, 255, 0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-3);
  position: relative;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-green));
  transition: width 2s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.progress-text {
  font-size: var(--text-sm);
  opacity: 0.75;
  font-weight: 500;
}

/* ===== FORM COMPONENTS ===== */
.notify-container {
  margin-top: var(--space-8);
}

.notify-text {
  margin-bottom: var(--space-4);
  font-weight: 500;
}

.email-form {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  align-items: center;
  transition: all var(--duration-slow) var(--ease-out);
  flex-wrap: wrap;
}

.email-input {
  padding: var(--space-3) var(--space-4);
  border: 2px solid rgba(88, 166, 255, 0.2);
  border-radius: var(--radius-xl);
  background: rgba(13, 17, 23, 0.8);
  color: var(--color-text-primary);
  width: min(100%, 280px);
  outline: none;
  transition: all var(--duration-normal) var(--ease-out);
  font-weight: 400;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.email-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

.email-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.15);
  background: rgba(13, 17, 23, 0.95);
}

.notify-btn {
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
  border: none;
  border-radius: var(--radius-xl);
  color: white;
  font-weight: 600;
  font-variation-settings: 'wght' 600;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  min-width: max-content;
}

.notify-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.2), 
    transparent
  );
  transition: left var(--duration-slow) var(--ease-out);
}

.notify-btn:hover::before {
  left: 100%;
}

.notify-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.notify-btn:active {
  transform: translateY(0);
}

.success-message {
  display: none;
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--brand-green);
  font-weight: 500;
  align-items: center;
  gap: var(--space-2);
  animation: fadeIn var(--duration-slow) var(--ease-out) forwards;
}

.success-message.show {
  display: flex;
}

/* ===== FOOTER ===== */
.footer {
  margin-top: var(--space-12);
  font-size: var(--text-xs);
  opacity: 0.6;
  font-weight: 400;
}

.social-links {
  margin-top: var(--space-2);
}

.social-link {
  color: var(--brand-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  transition: all var(--duration-normal) var(--ease-out);
  font-weight: 500;
}

.social-link:hover {
  color: var(--brand-green);
  text-shadow: 0 0 8px currentColor;
}

/* ===== CONTAINER QUERIES ===== */
@container (max-width: 600px) {
  .content-card {
    padding: var(--space-8) var(--space-6);
    margin: var(--space-4);
  }
  
  .brand-name {
    font-size: var(--text-3xl);
  }
  
  .coming-soon-text {
    font-size: var(--text-xl);
  }
  
  .feature-hints {
    gap: var(--space-2);
  }
  
  .hint-item {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-3);
  }
  
  .email-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .email-input {
    width: 100%;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-color-scheme: light) {
  /* Light mode support if needed */
  :root {
    --color-primary: #ffffff;
    --color-secondary: #f8f9fa;
    --color-tertiary: #e9ecef;
    --color-text-primary: #212529;
    --color-text-muted: #6c757d;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --brand-blue: #0066cc;
    --brand-green: #006600;
    --glass-border: rgba(255, 255, 255, 0.3);
  }
}

/* Focus styles for keyboard navigation */
.notify-btn:focus-visible,
.email-input:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .particles,
  .glass-overlay {
    display: none;
  }
  
  .content-card {
    box-shadow: none;
    border: 1px solid #000;
  }
}