@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --ink: #0f172a;
  --muted: #475569;
  --paper: #ffffff;
  --indigo: #4f46e5;
  --indigo-dark: #3730a3;
  --violet: #7c3aed;
  --gold: #f59e0b;
  --gold-soft: #fde68a;
  --line: rgba(148, 163, 184, 0.28);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(124, 58, 237, 0.28), transparent 34rem),
    radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.16), transparent 30rem),
    linear-gradient(160deg, #eef2ff 0%, #f8fafc 45%, #fff7ed 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

.page-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.10), transparent 45%),
    repeating-radial-gradient(circle at 50% 115%, rgba(79, 70, 229, 0.06), rgba(79, 70, 229, 0.06) 1px, transparent 1px, transparent 34px);
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a {
  color: inherit;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(79, 70, 229, 0.28));
}

.brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.staff-link {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
  border-bottom: 1px dotted rgba(71, 85, 105, 0.45);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.staff-link:hover,
.staff-link:focus-visible {
  color: var(--indigo-dark);
  border-bottom-color: currentColor;
}

main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 3rem;
  align-items: center;
  padding: 4.5rem 0 3.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--indigo-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 14ch;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
}

h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.lead {
  max-width: 58ch;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.25rem;
  border-radius: 0.9rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: #fff;
  box-shadow: 0 16px 34px rgba(79, 70, 229, 0.32);
}

.button-ghost {
  border: 1px solid rgba(79, 70, 229, 0.24);
  background: rgba(255, 255, 255, 0.7);
  color: var(--indigo-dark);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.hero-points li::before {
  content: '✓';
  margin-right: 0.4rem;
  color: #16a34a;
  font-weight: 900;
}

.hero-faq {
  margin: 0.9rem 0 0;
  font-size: 0.82rem;
}

.hero-faq a {
  color: var(--indigo-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted rgba(55, 48, 163, 0.45);
}

.hero-faq a:hover,
.hero-faq a:focus-visible {
  border-bottom-color: currentColor;
}

.hero-art {
  position: relative;
  min-height: 360px;
  border-radius: 2rem;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.34), transparent 35%),
    linear-gradient(145deg, #4338ca, #7c3aed 55%, #c026d3);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-art::before,
.hero-art::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-art::before {
  width: 26rem;
  height: 26rem;
  top: -8rem;
  right: -8rem;
}

.hero-art::after {
  width: 18rem;
  height: 18rem;
  bottom: -7rem;
  left: -6rem;
}

.prize-card {
  position: absolute;
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

.prize-icon {
  font-size: 2.4rem;
  line-height: 1;
}

/* Demo animada del sorteo en el hero */
.demo-card {
  padding: clamp(0.8rem, 1.6vw, 1.15rem);
  gap: 0.2rem;
  transition: transform 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease;
}

.demo-boleto-card {
  top: 13%;
  left: 9%;
  width: 58%;
  transform: rotate(-3deg);
}

.demo-premio-card {
  right: 8%;
  bottom: 20%;
  width: 54%;
  transform: rotate(3deg);
}

.demo-kicker {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.55rem, 0.9vw, 0.68rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.demo-value {
  color: #fff;
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}

.demo-value.is-long {
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  letter-spacing: -0.01em;
}

.demo-caption {
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.62rem, 1vw, 0.75rem);
  font-weight: 600;
}

.demo-card.is-active {
  border-color: rgba(253, 224, 71, 0.85);
  box-shadow:
    0 0 0 1px rgba(253, 224, 71, 0.35),
    0 18px 40px rgba(15, 23, 42, 0.3);
  transform: translateY(-4px) rotate(0deg);
}

.demo-card.is-winner {
  border-color: rgba(74, 222, 128, 0.85);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.35),
    0 18px 40px rgba(15, 23, 42, 0.3);
}

.demo-link {
  position: absolute;
  top: 48%;
  left: 36%;
  width: 28%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(253, 224, 71, 0.9), transparent);
  opacity: 0;
  transform: scaleX(0.2);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-demo[data-phase="asignado"] .demo-link {
  opacity: 1;
  transform: scaleX(1);
}

.demo-winner {
  position: absolute;
  bottom: 7%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.95);
  color: #fff;
  font-size: clamp(0.65rem, 1.1vw, 0.8rem);
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-demo[data-phase="asignado"] .demo-winner {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.demo-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
}

.demo-congrats {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  gap: 0.3rem;
  width: min(92%, 31rem);
  padding: clamp(1rem, 2.4vw, 1.7rem) clamp(1.1rem, 2.8vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 1.2rem;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.35s ease, transform 0.35s ease;
  backdrop-filter: blur(10px);
}

.demo-congrats-title {
  font-size: clamp(1.15rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.demo-congrats-detail {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.85rem, 1.7vw, 1.15rem);
  line-height: 1.35;
}

.demo-congrats-detail strong {
  color: #fde68a;
}

.hero-demo[data-phase="felicitaciones"] .demo-congrats {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: congrats-pulse 1.6s ease-in-out infinite;
}

.hero-demo[data-phase="felicitaciones"] .demo-winner {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}

.hero-demo[data-phase="felicitaciones"] .demo-link {
  opacity: 1;
  transform: scaleX(1);
}

@keyframes congrats-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(253, 224, 71, 0.25),
      0 10px 30px rgba(15, 23, 42, 0.25);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(253, 224, 71, 0.55),
      0 10px 34px rgba(253, 224, 71, 0.25);
  }
}

.section {
  padding: 2.5rem 0;
}

.section-heading {
  max-width: 68ch;
  margin-bottom: 1.5rem;
}

.section-heading p:last-child {
  margin: 0.9rem 0 0;
  color: var(--muted);
}

.steps,
.prizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.step,
.prize {
  position: relative;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.step p,
.prize p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}

.prize .prize-icon {
  display: inline-block;
  margin-bottom: 0.8rem;
}

.prizes-section {
  padding-top: 1rem;
}

.faq-section {
  padding-top: 1rem;
}

.faq-list {
  display: grid;
  gap: 0.7rem;
  max-width: 52rem;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  color: var(--indigo);
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.35);
  outline-offset: -3px;
}

.faq-item p {
  margin: 0;
  padding: 0 1.2rem 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.faq-item p a {
  color: var(--indigo-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted rgba(55, 48, 163, 0.45);
}

.faq-item p a:hover,
.faq-item p a:focus-visible {
  border-bottom-color: currentColor;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-staff {
  margin-left: auto;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2.5rem;
  }

  .hero-art {
    min-height: 300px;
  }

  .demo-boleto-card {
    top: 9%;
    left: 6%;
    width: 64%;
  }

  .demo-premio-card {
    right: 6%;
    bottom: 23%;
    width: 60%;
  }

  .demo-winner {
    bottom: 5%;
  }

  .steps,
  .prizes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .brand small {
    display: none;
  }

  .footer-staff {
    margin-left: 0;
    width: 100%;
  }

  h1 {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
