/* ============================================================
   Heart component — styles
   The living heart of creator portraits + the hero shell it sits in
   (copy, prompt, frosted veil, "matching" beat). Pairs with heart.js.
   Depends on styles.css for tokens (--white, --primary, --grad, fonts).
   ============================================================ */

.hh {
  position: relative;
  background: var(--white);
  overflow: hidden;
  min-height: clamp(880px, 98vh, 1060px);
  padding: clamp(40px, 6vw, 72px) 24px clamp(56px, 7vw, 96px);
}

/* one faint warm wash behind the heart (editorial restraint) */
.hh::before {
  content: "";
  position: absolute;
  left: 50%;
  top: clamp(220px, 32vw, 360px);
  width: min(820px, 96vw);
  aspect-ratio: 1.25 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    closest-side,
    rgba(11, 11, 11, 0.10),
    rgba(130, 130, 130, 0.06) 55%,
    transparent 72%
  );
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

.hh__inner {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------------- Copy ---------------- */
.hh__copy {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 660px;
  margin-bottom: clamp(8px, 2vw, 18px);
  will-change: transform, opacity;
}
.hh__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 18px 0 16px;
  text-wrap: balance;
}
.hh__title em {
  font-style: normal;
  background: #0b0b0b;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hh__sub {
  font-size: clamp(16px, 1.5vw, 18.5px);
  line-height: 1.6;
  color: var(--text);
  max-width: 52ch;
  margin: 0;
  text-wrap: pretty;
}

/* ---------------- Stage (the heart) ---------------- */
.hh__stage {
  position: relative;
  width: min(94vw, 620px);
  height: clamp(360px, 58vw, 560px);
  margin: clamp(4px, 1.5vw, 14px) auto clamp(18px, 3vw, 30px);
  z-index: 1;
}
.hh__layer { position: absolute; inset: 0; }

.hh__tile {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--s, 46px);
  height: var(--s, 46px);
  border-radius: 50%;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.10);
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.hh__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

/* a few larger gradient-ring "feature" portraits */
.hh__tile--feat {
  border: 0;
  padding: 2.5px;
  background: #0b0b0b;
  border-radius: 50%;
  box-shadow: 0 16px 34px rgba(17, 17, 17, 0.18);
}
.hh__tile--feat .hh__tileInner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #eee;
}
.hh__tile--feat img { border-radius: 50%; border: 2px solid var(--white); }

/* frosted veil — softens the dispersed field into ethereal bokeh */
.hh__veil {
  position: absolute;
  inset: -8% -8% -8% -8%;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    62% 62% at 50% 46%,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.46) 82%
  );
  -webkit-backdrop-filter: blur(13px) saturate(1.05);
  backdrop-filter: blur(13px) saturate(1.05);
}

/* "matching" beat shown between burst and results */
.hh__think {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(17, 17, 17, 0.12);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.hh__think i { width: 7px; height: 7px; border-radius: 50%; background: #0b0b0b; }

/* ---------------- Prompt ---------------- */
.hh__prompt {
  position: relative;
  z-index: 6;
  width: min(620px, 94vw);
  margin: 0 auto;
  text-align: left;
  min-height: 200px;
  will-change: transform, opacity;
}
.hh__hint { margin: 14px auto 0; font-size: 13px; color: #8b8b8b; }
.hh__hint kbd {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  background: #f3f3f3;
  border: 1px solid #e4e4e4;
  border-radius: 6px;
  padding: 2px 6px;
}

@media (max-width: 720px) {
  .hh__stage { height: clamp(320px, 76vw, 440px); }
}
@media (prefers-reduced-motion: reduce) {
  .hh::before { filter: none; }
  .hh__veil { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}
