/* ═══════════════════════════════════════════
   BLUGEVITY × Farmacia Maymone
   Design System & Styles
   ═══════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────── */
:root {
  /* Colors */
  --color-deep-blue: #0a1628;
  --color-navy: #0d1f3c;
  --color-blue: #1a365d;
  --color-blue-medium: #1e4a7a;
  --color-azure: #2196F3;
  --color-cyan: #00bcd4;
  --color-cyan-light: #00e5ff;
  --color-white: #ffffff;
  --color-white-90: rgba(255, 255, 255, 0.9);
  --color-white-70: rgba(255, 255, 255, 0.7);
  --color-white-50: rgba(255, 255, 255, 0.5);
  --color-white-20: rgba(255, 255, 255, 0.2);
  --color-white-10: rgba(255, 255, 255, 0.1);
  --color-white-05: rgba(255, 255, 255, 0.05);
  --color-fuchsia: #c2185b;
  --color-fuchsia-soft: rgba(194, 24, 91, 0.3);
  --color-fuchsia-glow: rgba(194, 24, 91, 0.15);
  
  /* Glass */
  --glass-bg: rgba(13, 31, 60, 0.6);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 100px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
  height: 100%;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-regular);
  color: var(--color-white);
  background: var(--color-deep-blue);
  line-height: 1.6;
  overflow: hidden;
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Sections ──────────────────────────── */
.section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0s linear 0.6s;
  z-index: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.section.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s, visibility 0s linear 0s;
  z-index: 10;
}

.section.exiting {
  opacity: 0;
  transform: translateY(-30px);
  visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
  z-index: 5;
}

.section-content {
  width: 100%;
  max-width: 480px;
  padding: var(--space-lg) var(--space-lg) var(--space-2xl);
  text-align: center;
  position: relative;
  z-index: 2;
}

.section-title {
  font-size: 1.6rem;
  font-weight: var(--font-bold);
  line-height: 1.3;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.highlight {
  background: linear-gradient(135deg, var(--color-cyan-light), var(--color-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero Section ──────────────────────── */
.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 50% 0%, rgba(0, 188, 212, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, var(--color-fuchsia-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 100%, rgba(33, 150, 243, 0.1) 0%, transparent 40%),
    linear-gradient(180deg, var(--color-deep-blue) 0%, #06101f 100%);
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/img/hero-bg.png') center center / cover no-repeat;
  opacity: 0.18;
  mix-blend-mode: screen;
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.4);
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.4; }
  25% { transform: translateY(-20px) translateX(10px) scale(1.1); opacity: 0.7; }
  50% { transform: translateY(-10px) translateX(-5px) scale(0.9); opacity: 0.5; }
  75% { transform: translateY(-25px) translateX(15px) scale(1.05); opacity: 0.6; }
}

.hero-content {
  padding-top: var(--space-3xl);
}

.logos-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  animation: fadeInDown 0.8s ease 0.2s both;
}

.logo {
  max-height: 44px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.logo-blugevity {
  max-height: 48px;
}

.logo-maymone {
  max-height: 42px;
  border-radius: var(--radius-sm);
}

.logo-divider {
  display: none;
  font-size: 1.2rem;
  font-weight: var(--font-light);
  color: var(--color-white-50);
}

.hero-title {
  font-size: 1.75rem;
  font-weight: var(--font-bold);
  line-height: 1.25;
  margin-bottom: var(--space-md);
  letter-spacing: -0.03em;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: var(--font-light);
  color: var(--color-white-70);
  margin-bottom: var(--space-2xl);
  animation: fadeInUp 0.8s ease 0.6s both;
}

/* ── Buttons ───────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-azure));
  color: var(--color-white);
  box-shadow: 0 4px 20px rgba(0, 188, 212, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 188, 212, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(0, 188, 212, 0.3);
}

.btn-glow {
  animation: fadeInUp 0.8s ease 0.8s both;
}

.btn-glow::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--color-cyan-light), var(--color-azure), var(--color-fuchsia));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-fast);
  filter: blur(8px);
}

.btn-glow:hover::before {
  opacity: 0.6;
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--color-white-90);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(13, 31, 60, 0.8);
  border-color: var(--color-white-20);
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
}

.btn-arrow {
  transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Scroll Hint ───────────────────────── */
.scroll-hint {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 2px solid var(--color-white-20);
  border-radius: 12px;
  animation: fadeIn 1s ease 1.2s both;
}

.scroll-dot {
  width: 4px;
  height: 8px;
  background: var(--color-cyan);
  border-radius: 2px;
  margin: 6px auto 0;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(16px); opacity: 0.3; }
}

/* ── Wheel Section ─────────────────────── */
.wheel-content {
  padding-top: var(--space-2xl);
}

.wheel-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto var(--space-xl);
}

.wheel-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 188, 212, 0.2) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

canvas#wheelCanvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  filter: drop-shadow(0 0 20px rgba(0, 188, 212, 0.3));
}

.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 80px;
  height: 80px;
}

.wheel-center-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-azure));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 20px rgba(0, 188, 212, 0.4);
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.wheel-center-inner span {
  font-size: 0.7rem;
  font-weight: var(--font-bold);
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.wheel-center-inner:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0, 188, 212, 0.6);
}

.wheel-center-inner:active {
  transform: scale(0.95);
}

.wheel-center-inner.disabled {
  cursor: default;
  opacity: 0.7;
}

.wheel-pointer {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

/* Wheel Result */
.wheel-result {
  text-align: center;
  animation: fadeInUp 0.6s ease both;
}

.result-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  animation: bounceIn 0.6s ease;
}

.result-title {
  font-size: 1.3rem;
  font-weight: var(--font-bold);
  margin-bottom: var(--space-sm);
}

.result-benefit {
  font-size: 1.1rem;
  color: var(--color-cyan-light);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ── Form Section ──────────────────────── */
.form-content {
  padding-top: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-md);
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: var(--font-medium);
  color: var(--color-white-70);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-family: var(--font-family);
  font-size: 1rem;
  transition: all var(--transition-fast);
  outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.form-input::placeholder {
  color: var(--color-white-30, rgba(255,255,255,0.3));
}

.form-input:focus {
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
}

.form-input.error {
  border-color: #ef5350;
  box-shadow: 0 0 0 3px rgba(239, 83, 80, 0.15);
}

.form-input.valid {
  border-color: #66bb6a;
}

.form-error {
  display: block;
  font-size: 0.78rem;
  color: #ef5350;
  margin-top: var(--space-xs);
  min-height: 18px;
}

/* Checkboxes */
.form-checkboxes {
  margin: var(--space-lg) 0 var(--space-md);
  text-align: left;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-white-20);
  border-radius: 6px;
  transition: all var(--transition-fast);
  position: relative;
  margin-top: 1px;
}

.checkbox-label input:checked + .checkbox-custom {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-azure));
  border-color: transparent;
}

.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  color: var(--color-white-70);
}

.checkbox-text .link {
  color: var(--color-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-terms {
  font-size: 0.78rem;
  color: var(--color-white-50);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.form-terms .link {
  color: var(--color-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Spinner */
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ── Code Section ──────────────────────── */
.code-content {
  padding-top: var(--space-2xl);
}

.success-icon {
  margin-bottom: var(--space-lg);
  animation: scaleIn 0.5s ease both;
}

.success-icon svg {
  width: 64px;
  height: 64px;
}

.check-path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: drawCheck 0.6s ease 0.3s forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.code-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.code-card-glow {
  position: absolute;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(ellipse, rgba(0, 188, 212, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.code-benefit {
  font-size: 0.9rem;
  color: var(--color-white-70);
  margin-bottom: var(--space-md);
  font-weight: var(--font-medium);
}

.code-display {
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.15), rgba(33, 150, 243, 0.1));
  border: 2px dashed var(--color-cyan);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.code-value {
  font-size: 2rem;
  font-weight: var(--font-bold);
  letter-spacing: 0.15em;
  color: var(--color-cyan-light);
  font-variant-numeric: tabular-nums;
}

.code-instruction {
  font-size: 0.9rem;
  color: var(--color-white-70);
  line-height: 1.5;
}

.code-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.6s ease 0.4s both;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-white-70);
}

.detail-item svg {
  flex-shrink: 0;
  stroke: var(--color-cyan);
}

.detail-item strong {
  color: var(--color-white);
}

/* ── Modal ─────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: var(--space-lg);
  animation: fadeIn 0.3s ease;
}

.modal-card {
  background: var(--color-navy);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 360px;
  width: 100%;
  text-align: center;
  animation: scaleIn 0.4s ease;
}

.modal-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.modal-title {
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.modal-text {
  font-size: 0.9rem;
  color: var(--color-white-70);
  margin-bottom: var(--space-md);
}

.modal-code {
  margin-bottom: var(--space-md);
}

.modal-benefit {
  font-size: 0.9rem;
  color: var(--color-cyan);
  margin-bottom: var(--space-lg);
}

/* ── Confetti Canvas ───────────────────── */
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* ── Utility Classes ───────────────────── */
.hidden {
  display: none !important;
}

/* ── Animations ────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 1; transform: scale(1.05); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* ── Responsive ────────────────────────── */
@media (min-width: 480px) {
  .logos-row {
    flex-direction: row;
    gap: var(--space-md);
  }
  .logo-divider {
    display: inline;
  }
  
  .hero-title {
    font-size: 2.1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .wheel-container {
    width: 340px;
    height: 340px;
  }
  
  .section-content {
    padding: var(--space-xl) var(--space-xl) var(--space-3xl);
  }
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .wheel-container {
    width: 380px;
    height: 380px;
  }
  
  .code-value {
    font-size: 2.5rem;
  }
  
  .logos-row {
    gap: var(--space-lg);
  }
  
  .logo-blugevity {
    max-height: 56px;
  }
  
  .logo-maymone {
    max-height: 50px;
  }
}

@media (min-width: 1024px) {
  .section-content {
    max-width: 520px;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
}

/* ── Loading state ─────────────────────── */
.btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Link styles ───────────────────────── */
a {
  color: var(--color-cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Fuchsia accent touches ────────────── */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, var(--color-fuchsia-soft));
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover::after {
  opacity: 0.4;
}

/* Selection color */
::selection {
  background: rgba(0, 188, 212, 0.3);
  color: white;
}

/* Scrollbar (for form section if needed) */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-white-20);
  border-radius: 2px;
}
