/* ==========================================================================
   DANIEL ZAMBRANO (@danielz.effects) - REFERRAL ROW (hero)
   "Crea como yo": affiliate links to the platforms Daniel uses.
   ========================================================================== */

.hero-refs {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  animation: refs-in 0.8s var(--transition-smooth) 0.6s backwards;
}

.hero-refs-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--color-cyan);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.hero-refs-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 44rem;
}

.hero-refs-list .ref-chip {
  flex: 0 1 auto;
  min-width: 9.5rem;
}

.hero-refs-list .ref-code {
  white-space: nowrap;
}

.ref-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  background: rgba(7, 7, 11, 0.6);
  border: 1px solid rgba(237, 237, 242, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-decoration: none;
  color: var(--text-primary);
  text-align: left;
  transition: transform 0.3s var(--transition-smooth), border-color 0.3s ease, box-shadow 0.3s ease;
}

.ref-chip:not(.is-pending) {
  cursor: pointer;
}

.ref-chip:not(.is-pending)::after {
  content: '↗';
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  font-size: 0.85rem;
  color: var(--color-cyan);
}

.ref-chip:not(.is-pending):hover {
  transform: translateY(-3px);
  border-color: var(--border-active);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 229, 255, 0.25);
}

.ref-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.ref-code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  background: var(--gradient-ai-h);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Platforms without a link yet stay hidden until their URL is pasted in */
.ref-chip.is-pending {
  display: none;
}

.ref-chip.is-pending .ref-code {
  -webkit-text-fill-color: var(--text-secondary);
}

.hero-refs-note {
  font-size: 0.68rem;
  color: rgba(237, 237, 242, 0.6);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

/* Required in Spain whenever a link earns a commission */
.hero-refs-ad {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(237, 237, 242, 0.18);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(237, 237, 242, 0.45);
}

@keyframes refs-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-refs {
    animation: none;
  }
}

/* On phones the referral row fills the bottom of the hero, so the scroll cue steps aside */
@media (max-width: 767px) {
  .hero-scroll-indicator {
    display: none;
  }

  .hero-refs {
    margin-top: 1.75rem;
  }
}

/* ==========================================================================
   Contact buttons (email / WhatsApp): same rotating light border as the
   Instagram CTA (.cta-button), with an icon + two-line label inside
   ========================================================================== */
.contact-cta[hidden] {
  display: none;
}

.contact-cta .cta-content {
  gap: 0.7rem;
  padding: 0.55rem 1.6rem 0.55rem 0.6rem;
  text-align: left;
  letter-spacing: normal;
}

/* Offset each border so the three buttons don't spin in lockstep */
.inquiry-actions .cta-button:nth-child(2) .cta-border { animation-delay: -1.3s; }
.inquiry-actions .cta-button:nth-child(3) .cta-border { animation-delay: -2.6s; }

.contact-icon {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--gradient-ai-soft);
  font-size: 1rem;
}

.contact-cta.is-whatsapp .contact-icon {
  background: rgba(37, 211, 102, 0.2);
}

.contact-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.contact-kind {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.contact-value {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ==========================================================================
   Eye-catching referral chips: a comet of light orbits each border, a shine
   sweeps across, and the glow breathes. Distinct from the CTA's full spin.
   ========================================================================== */
@property --comet {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.ref-chip:not(.is-pending) {
  isolation: isolate;
  overflow: hidden;
  border-color: rgba(0, 229, 255, 0.18);
  background:
    linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.16) 50%, transparent 62%) -150% 0 / 250% 100% no-repeat,
    rgba(7, 7, 11, 0.62);
  animation:
    ref-shine 4.5s ease-in-out infinite,
    ref-breathe 3s ease-in-out infinite;
}

/* The comet: a short bright arc of a conic gradient, masked to a 1.5px ring */
.ref-chip:not(.is-pending)::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--comet),
    transparent 0deg 250deg,
    rgba(123, 92, 255, 0.9) 290deg,
    var(--color-cyan) 330deg,
    #FFFFFF 345deg,
    var(--color-magenta) 355deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: ref-comet 2.6s linear infinite;
  pointer-events: none;
  z-index: -1;
}

/* Each chip starts its comet and shine at a different moment */
.hero-refs-list .ref-chip:nth-child(2),
.hero-refs-list .ref-chip:nth-child(2)::before { animation-delay: -0.9s; }
.hero-refs-list .ref-chip:nth-child(3),
.hero-refs-list .ref-chip:nth-child(3)::before { animation-delay: -1.8s; }

@keyframes ref-comet {
  to { --comet: 360deg; }
}

@keyframes ref-shine {
  0%, 55% { background-position: -150% 0, 0 0; }
  85%, 100% { background-position: 250% 0, 0 0; }
}

@keyframes ref-breathe {
  0%, 100% { box-shadow: 0 0 0 rgba(0, 229, 255, 0), 0 8px 24px rgba(0, 0, 0, 0.45); }
  50%      { box-shadow: 0 0 22px rgba(0, 229, 255, 0.28), 0 8px 24px rgba(0, 0, 0, 0.45); }
}

.ref-chip:not(.is-pending):hover {
  animation-play-state: paused;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.4), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ref-chip:not(.is-pending):hover::before {
  animation-duration: 1s;
}

/* Label gets a small pulsing "hot" badge so the row is the first thing seen */
.hero-refs-label::before {
  content: '🔥 DESCUENTO';
  display: inline-block;
  margin-right: 0.6rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  color: #07070B;
  text-shadow: none;
  background: linear-gradient(90deg, #FFB547, var(--color-magenta));
  box-shadow: 0 0 14px rgba(255, 61, 219, 0.55);
  animation: ref-badge 1.6s ease-in-out infinite;
}

@keyframes ref-badge {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .ref-chip:not(.is-pending),
  .ref-chip:not(.is-pending)::before,
  .hero-refs-label::before {
    animation: none;
  }
}

/* Badge + label wrap as two tidy units instead of breaking mid-phrase */
.hero-refs-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  row-gap: 0.45rem;
  text-align: center;
}

/* Leave room for the scroll cue under the (now taller) hero content */
@media (min-width: 768px) {
  .hero-section {
    padding-bottom: 7rem;
  }
}
