/* ==========================================================================
   SOMOS MILLÓN — Minimalist & Modern Landing Page
   Estética Premium, 100% Viewport, Alta Jerarquía Visual en "DONAR 1 €"
   ========================================================================== */

/* --- Variables de Diseño --- */
:root {
  --bg-color: #08080a;
  --bg-surface: #121216;
  --bg-surface-glass: rgba(18, 18, 22, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.25);
  
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  /* Tono Amarillo Dorado estilo McDonald's */
  --mcd-yellow: #FFC72C;
  --mcd-yellow-bright: #FFE57F;
  --mcd-yellow-glow: rgba(255, 199, 44, 0.22);
  
  /* Botón Hero: Máximo Contraste con aura dorada sutil */
  --btn-bg: #ffffff;
  --btn-text: #09090b;
  --btn-hover-bg: #fffdf5;
  --btn-glow: rgba(255, 199, 44, 0.2);
  --btn-glow-hover: rgba(255, 199, 44, 0.45);

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-quick: all 0.15s ease-out;
}

/* --- Reset y Normalización --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden; /* Garantiza una sola pantalla en la vista inicial */
  user-select: none;
}

/* Permitir scroll sutil únicamente si la altura de la pantalla es extremadamente pequeña */
@media (max-height: 620px) {
  html, body {
    overflow-y: auto;
  }
}

/* --- Fondo Ambiental Sutil con Calidez Dorada --- */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 50% 45%, rgba(255, 199, 44, 0.07) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(255, 180, 0, 0.035) 0%, transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
  z-index: 0;
}

/* Textura suave opcional */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: radial-gradient(#ffffff 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: 0;
}

/* --- Contenedor Principal (100dvh) --- */
.viewport-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 3rem) clamp(1.5rem, 5vw, 3.5rem);
}

/* --- Cabecera Minimalista --- */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  animation: fadeIn 0.8s ease-out forwards;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.brand:hover {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.05);
}

.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--mcd-yellow);
  box-shadow: 0 0 8px var(--mcd-yellow);
}

.brand-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mcd-yellow);
}

/* --- Sección Hero Central --- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 0;
  animation: scaleFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 780px;
  width: 100%;
}

.tagline-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--mcd-yellow);
  opacity: 0.9;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-main);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--mcd-yellow);
  text-shadow: 0 4px 35px rgba(255, 199, 44, 0.25);
  margin-bottom: clamp(2.5rem, 5.5vh, 4rem);
}

.hero-highlight {
  background: linear-gradient(180deg, #FFFFFF 15%, var(--mcd-yellow-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  filter: drop-shadow(0 2px 16px rgba(255, 199, 44, 0.35));
}

/* --- Botón Hero: El Protagonista --- */
.cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  width: 100%;
}

.btn-donate {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(240px, 30vw, 300px);
  padding: clamp(1.1rem, 2.4vh, 1.35rem) clamp(2.2rem, 4vw, 3.2rem);
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: 9999px;
  font-family: var(--font-main);
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 10px 30px -5px rgba(0, 0, 0, 0.6),
    0 0 45px var(--btn-glow);
  transition: var(--transition-smooth);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Efecto hover: Expansión sutil, elevación y halo de luz */
.btn-donate:hover {
  background-color: var(--btn-hover-bg);
  transform: translateY(-2px) scale(1.025);
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.7),
    0 16px 40px -5px rgba(0, 0, 0, 0.7),
    0 0 60px var(--btn-glow-hover);
}

/* Efecto al presionar (click táctil o de ratón) */
.btn-donate:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 4px 15px rgba(0, 0, 0, 0.5),
    0 0 25px var(--btn-glow);
  transition: var(--transition-quick);
}

.btn-text {
  position: relative;
  z-index: 2;
}

/* Brillo sutil reflejado al pasar el cursor */
.btn-shine {
  position: absolute;
  top: 0;
  left: -120%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.7),
    transparent
  );
  transform: skewX(-20deg);
  transition: 0.75s ease;
  pointer-events: none;
  z-index: 1;
}

.btn-donate:hover .btn-shine {
  left: 120%;
}

/* Frase destacada, grande y amarilla estilo McDonald's debajo del botón */
.cta-highlight-text {
  font-family: var(--font-main);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 700;
  color: var(--mcd-yellow);
  text-shadow: 0 3px 25px rgba(255, 199, 44, 0.35);
  letter-spacing: -0.02em;
  line-height: 1.45;
  max-width: 560px;
  text-align: center;
  margin-top: 0.6rem;
}

/* --- Footer Minimalista --- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding-top: 1rem;
  animation: fadeIn 1.2s ease-out forwards;
}

.footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.footer-link {
  background: none;
  border: none;
  padding: 0.2rem 0.4rem;
  font-family: var(--font-main);
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-separator {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.15);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.04em;
}

/* --- Modal Minimalista (Bottom-sheet en móvil / Centrado en PC) --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 100;
  padding: 1.5rem;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-sheet {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-focus);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transform: translateY(20px) scale(0.96);
  transition: var(--transition-smooth);
  color: var(--text-primary);
}

.modal-backdrop.active .modal-sheet {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition-quick);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.modal-body {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.modal-body p {
  margin-bottom: 0.85rem;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

/* --- Toast / Notificación Dinámica --- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(20, 20, 25, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-focus);
  padding: 0.85rem 1.4rem;
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.toast-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--mcd-yellow);
  box-shadow: 0 0 8px var(--mcd-yellow);
}

.toast-message {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* --- Animaciones Keyframes --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* --- Responsive Adjustments para móvil (< 640px) --- */
@media (max-width: 640px) {
  .viewport-wrapper {
    padding: 1.25rem 1.25rem;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }

  .btn-donate {
    width: 100%;
    max-width: 320px;
    padding: 1.15rem 2rem;
    font-size: 1.15rem;
  }

  .toast {
    width: calc(100% - 2.5rem);
    white-space: normal;
    text-align: center;
    border-radius: 16px;
    bottom: 1.25rem;
  }

  .modal-sheet {
    border-radius: 20px 20px 0 0;
    position: fixed;
    bottom: 0;
    transform: translateY(100%);
    max-width: 100%;
  }

  .modal-backdrop.active .modal-sheet {
    transform: translateY(0);
  }
}
