/* ============================================================
   RecibIA — Hero
   ============================================================ */

.hero {
  position: relative;
  background: var(--ri-gradient-hero);
  color: var(--ri-ink-inverse);
  padding-top: calc(96px + var(--ri-space-2xl));
  padding-bottom: var(--ri-space-2xl);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ri-gradient-glow);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--ri-space-2xl);
  align-items: center;
}

.hero__copy { max-width: 620px; }

.hero__eyebrow { margin-bottom: var(--ri-space-md); }

.hero__title {
  font-size: var(--ri-text-3xl);
  margin-bottom: var(--ri-space-md);
}

.hero__title em {
  font-style: normal;
  background: var(--ri-gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  font-size: var(--ri-text-md);
  color: var(--ri-ink-inverse-soft);
  max-width: 46ch;
  margin-bottom: var(--ri-space-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ri-space-sm);
  margin-bottom: var(--ri-space-lg);
}

.hero__note {
  font-family: var(--ri-font-mono);
  font-size: var(--ri-text-xs);
  color: var(--ri-ink-inverse-soft);
  display: flex;
  align-items: center;
  gap: var(--ri-space-2xs);
}

.hero__note svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--ri-teal-light); }

/* --- The ticket visual: signature moment --- */
.hero__visual {
  display: flex;
  justify-content: center;
}

.ticket {
  position: relative;
  width: min(320px, 100%);
  background: #FCFBF8;
  color: var(--ri-ink);
  border-radius: var(--ri-radius-md) var(--ri-radius-md) 0 0;
  padding: var(--ri-space-lg) var(--ri-space-md) var(--ri-space-xl);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.ticket::after {
  /* scalloped tear edge at the bottom of the ticket, matching the icon's tail */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 16px;
  background:
    radial-gradient(circle at 8px 0, transparent 8px, #FCFBF8 8.5px) 0 -8px / 16px 16px repeat-x;
}

.ticket__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--ri-font-mono);
  font-size: var(--ri-text-xs);
  color: var(--ri-ink-faint);
  border-bottom: 1px dashed var(--ri-border);
  padding-bottom: var(--ri-space-sm);
  margin-bottom: var(--ri-space-sm);
}

.ticket__store {
  font-family: var(--ri-font-display);
  font-weight: 700;
  font-size: var(--ri-text-md);
  color: var(--ri-ink);
  margin-bottom: var(--ri-space-xs);
}

.ticket__lines {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--ri-space-sm);
}

.ticket__line {
  height: 8px;
  border-radius: 2px;
  background: var(--ri-border);
}
.ticket__line--w70 { width: 70%; }
.ticket__line--w45 { width: 45%; }
.ticket__line--w85 { width: 85%; }

.ticket__fields {
  display: flex;
  flex-direction: column;
  gap: var(--ri-space-2xs);
  font-family: var(--ri-font-mono);
  font-size: var(--ri-text-xs);
}

.ticket__field {
  display: flex;
  justify-content: space-between;
  gap: var(--ri-space-sm);
  padding: 0.3rem 0.5rem;
  border-radius: var(--ri-radius-sm);
  background: rgba(13, 148, 136, 0.08);
  color: var(--ri-teal-deep);
  opacity: 0;
  transform: translateX(-6px);
  animation: fieldIn 600ms var(--ri-easing) forwards;
}

.ticket__field span:last-child { font-weight: 700; }

.ticket__field:nth-child(1) { animation-delay: 1.1s; }
.ticket__field:nth-child(2) { animation-delay: 1.5s; }
.ticket__field:nth-child(3) { animation-delay: 1.9s; }

@keyframes fieldIn {
  to { opacity: 1; transform: translateX(0); }
}

.ticket__scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 46%;
  top: -46%;
  background: linear-gradient(
    to bottom,
    rgba(45, 212, 191, 0) 0%,
    rgba(45, 212, 191, 0.28) 45%,
    rgba(45, 212, 191, 0.55) 92%,
    rgba(45, 212, 191, 0) 100%
  );
  animation: scanSweep 2.6s cubic-bezier(0.45, 0, 0.15, 1) infinite;
  pointer-events: none;
}

@keyframes scanSweep {
  0% { top: -46%; }
  55% { top: 100%; }
  100% { top: 100%; }
}

.ticket__stamp {
  position: absolute;
  top: var(--ri-space-md);
  right: var(--ri-space-md);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ri-gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #04211d;
  opacity: 0;
  transform: scale(0.4) rotate(-18deg);
  animation: stampIn 500ms var(--ri-easing) forwards;
  animation-delay: 2.3s;
  box-shadow: 0 10px 20px -6px rgba(13, 148, 136, 0.6);
}

.ticket__stamp svg { width: 22px; height: 22px; }

@keyframes stampIn {
  to { opacity: 1; transform: scale(1) rotate(-8deg); }
}

@media (min-width: 960px) {
  .hero__inner { grid-template-columns: 1.05fr 0.95fr; }
  .hero__title { font-size: var(--ri-text-4xl); }
  .hero__visual { justify-content: flex-end; }
}
