/* Real invitation photography gives the hero a tangible product preview.
   The fan stays inside a measured stage so rotated cards never cause
   horizontal scrolling or cover the copy and its calls to action. */
.hero .hero-grid {
  gap: 30px;
  padding-block: 36px 88px;
}

.hero-fan {
  --preview-width: clamp(154px, 42vw, 218px);
  position: relative;
  isolation: isolate;
  width: min(100%, 440px);
  height: clamp(286px, 74vw, 388px);
  flex: none;
}

.hero-fan::before {
  content: '';
  position: absolute;
  inset: 10% 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--gold-soft), transparent 70%);
  transform: scale(1.3);
  z-index: -1;
}

.hero-fan-orbit {
  position: absolute;
  inset: 6% -1% 7%;
  border: 1px solid color-mix(in srgb, var(--gold) 34%, transparent);
  border-radius: 50%;
  transform: rotate(-22deg);
  pointer-events: none;
}

.hero-fan-spark {
  position: absolute;
  color: var(--gold-strong);
  font-size: 30px;
  line-height: 1;
  pointer-events: none;
}

.hero-fan-spark--one {
  top: 0;
  right: 9%;
  rotate: 12deg;
}

.hero-fan-spark--two {
  bottom: 8%;
  left: 5%;
  font-size: 21px;
  color: var(--brand-accent);
}

.hero-preview {
  --card-x: -50%;
  --card-y: 0px;
  --card-turn: -3deg;
  position: absolute;
  top: 20px;
  left: 50%;
  width: var(--preview-width);
  padding: 7px 7px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-card);
  color: var(--ink);
  box-shadow: 0 22px 46px -18px var(--shadow-strong);
  text-align: left;
  transform: translate(var(--card-x), var(--card-y)) rotate(var(--card-turn));
  transition:
    transform 350ms ease,
    box-shadow 350ms ease;
}

.hero-preview--left {
  --card-x: -87%;
  --card-y: 24px;
  --card-turn: -14deg;
  z-index: 1;
}

.hero-preview--right {
  --card-x: -12%;
  --card-y: 30px;
  --card-turn: 13deg;
  z-index: 2;
}

.hero-preview--front {
  z-index: 3;
}

.hero-preview-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  background: var(--bg-soft);
}

.hero-preview-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-preview-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  padding: 3px 6px;
  border-radius: 6px;
  color: #fff;
  background: rgb(12 10 6 / 65%);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.3;
}

.hero-preview-name,
.hero-preview-type {
  display: block;
  padding-inline: 5px;
}

.hero-preview-name {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.hero-preview-type {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--ink-muted);
}

.hero-preview-open {
  float: right;
  color: var(--brand-accent);
  font-size: 17px;
  line-height: 1;
}

/* Elevating a focused card exposes the whole link even behind the fan. */
.hero-preview:focus-visible {
  z-index: 4;
  outline: 3px solid var(--brand-accent);
  outline-offset: 5px;
  transform: translate(var(--card-x), calc(var(--card-y) - 10px)) rotate(0deg);
}

@media (hover: hover) {
  .hero-preview:hover {
    z-index: 4;
    transform: translate(var(--card-x), calc(var(--card-y) - 12px)) rotate(0deg);
    box-shadow: 0 32px 58px -20px var(--shadow-strong);
  }
}

@media (min-width: 960px) {
  .hero .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
    padding-block: 64px 100px;
  }

  .hero .hero-text {
    text-align: left;
    margin-inline: 0;
  }

  .hero .hero-sub {
    margin-inline: 0;
  }

  .hero .cta {
    justify-content: flex-start;
  }

  .hero-fan {
    --preview-width: clamp(184px, 20vw, 224px);
    width: 100%;
    height: 420px;
    justify-self: center;
  }

  .hero-preview {
    top: 35px;
  }
}

/* A brief settling motion adds life without perpetual movement. Hover and
   keyboard focus always take precedence over the decorative animation. */
@media (prefers-reduced-motion: no-preference) {
  .hero-fan {
    animation: hero-fan-settle 4.8s ease-in-out 1;
  }

  @keyframes hero-fan-settle {
    0%,
    100% {
      translate: 0 0;
    }
    35% {
      translate: 0 -10px;
    }
    70% {
      translate: 0 3px;
    }
  }
}

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

/* Keep the first scene composed on phones; very narrow or zoomed screens
   can still read the complete content through the scene's native overflow. */
@media (max-width: 620px) {
  .hero .hero-grid {
    gap: 18px;
    padding-block: 24px 88px;
  }
  .hero h1 {
    font-size: clamp(1.65rem, 7vw, 2rem);
    margin-bottom: 14px;
  }
  .hero .hero-sub {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
  }
  .hero .cta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 420px);
    margin-inline: auto;
    gap: 8px;
  }
  .hero .cta .btn {
    font-size: 14px;
    padding: 12px 10px;
    min-height: 52px;
    white-space: normal;
    text-align: center;
  }
  .hero-fan {
    --preview-width: 140px;
    height: 248px;
    max-width: 320px;
  }
  .hero-preview {
    top: 8px;
    padding-bottom: 10px;
  }
  .hero-preview-name {
    font-size: 11px;
    margin-top: 7px;
  }
  .hero-preview-type {
    font-size: 9px;
  }
}

@media (max-width: 340px) {
  .hero .cta {
    grid-template-columns: minmax(0, 1fr);
  }
}
