/* ============================================================
   TASTE COMPASS — persona headline
   One treatment for the persona name + approved headline copy,
   shared by the kit-completion reveal, the members grid, the
   profile pane and the homepage showcase.

   Structure (see Views/Shared/_PersonaHeadline.cshtml):
     .ph-eyebrow   small label with compass mark
     .ph-name      the persona name
     .ph-opener    headline sentence one
     .ph-foods     headline sentence two, one chip per food
     .ph-kicker    the closing line

   Built on the dark surface set in tokens.css (navy ground, sage
   accent); tokens.css must be loaded first.
   ============================================================ */

.ph {
  position: relative;
  isolation: isolate;
  border-radius: var(--r-lg);
  text-align: left;
}

/* Soft sage bloom behind the name. Purely decorative. */
.ph-glow {
  position: absolute;
  inset: -20% -10% 40%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(60% 100% at 18% 0%, rgba(155, 184, 166, .22), transparent 70%);
  opacity: 0;
  transition: opacity .45s var(--ease, ease);
}

/* ---------- Eyebrow ---------- */
.ph-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--sage);
}

.ph-eyebrow-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(155, 184, 166, .38);
  background: rgba(155, 184, 166, .10);
}

.ph-eyebrow-mark svg { width: 13px; height: 13px; }

.ph-eyebrow-text {
  flex: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Two rules: the first is a fixed stub before the mark, the second fills the row. */
.ph-eyebrow-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(155, 184, 166, .45));
  flex: none;
  width: 0;
}

.ph-eyebrow-rule:last-child {
  flex: 1 1 auto;
  background: linear-gradient(90deg, rgba(155, 184, 166, .45), transparent);
}

/* ---------- Name ---------- */
.ph-name {
  margin: 0 0 14px;
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -.035em;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  background: linear-gradient(105deg, #fff 12%, var(--sage-light) 58%, var(--sage) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Keeps the name readable if background-clip:text is unavailable. */
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

/* ---------- Opener ---------- */
.ph-opener {
  margin: 0 0 16px;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.01em;
  color: rgba(255, 255, 255, .93);
  text-wrap: pretty;
}

.ph-opener--full { font-weight: 600; }

/* ---------- Food chips ---------- */
.ph-foods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.ph-food {
  --ph-i: 0;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(155, 184, 166, .30);
  background: linear-gradient(180deg, rgba(155, 184, 166, .16), rgba(155, 184, 166, .06));
  color: var(--sage-light);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.005em;
  white-space: nowrap;
  animation: ph-chip-in .5s var(--ease, cubic-bezier(.22, 1, .36, 1)) both;
  animation-delay: calc(var(--ph-i) * 70ms + 120ms);
}

/* A small dot leads each chip so the list reads as a set, not as buttons. */
.ph-food::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--sage);
  opacity: .8;
}

@keyframes ph-chip-in {
  from { opacity: 0; transform: translateY(6px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Kicker ---------- */
.ph-kicker {
  position: relative;
  margin: 0;
  padding-left: 14px;
  font-size: 14.5px;
  font-style: italic;
  line-height: 1.6;
  color: rgba(255, 255, 255, .72);
  text-wrap: pretty;
}

.ph-kicker::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  bottom: .3em;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--sage), rgba(155, 184, 166, .15));
}

/* ============================================================
   Variants
   ============================================================ */

/* ---------- hero: the reveal right after a kit is completed ---------- */
.ph--hero {
  overflow: hidden;
  padding: 30px 28px 28px;
  border: 1px solid rgba(155, 184, 166, .24);
  border-radius: var(--r-xl);
  background:
    linear-gradient(165deg, rgba(155, 184, 166, .13), rgba(255, 255, 255, .02) 58%),
    rgba(255, 255, 255, .02);
  text-align: center;
}

.ph--hero .ph-glow { opacity: 1; inset: -40% -20% 30%; }
.ph--hero .ph-eyebrow { justify-content: center; }
.ph--hero .ph-eyebrow-rule { width: 28px; flex: none; }
.ph--hero .ph-eyebrow-rule:last-child { width: 28px; }

.ph--hero .ph-name {
  font-size: clamp(2rem, 6vw, 3.1rem);
  margin-bottom: 18px;
}

.ph--hero .ph-opener {
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  max-width: 34ch;
  margin-inline: auto;
  margin-bottom: 20px;
}

.ph--hero .ph-foods { justify-content: center; margin-bottom: 22px; }
.ph--hero .ph-food { font-size: 13.5px; padding: 8px 16px; }

/* Centred, so the left rule used elsewhere would read as a stray mark - a small diamond
   divider sits above the kicker instead. */
.ph--hero .ph-kicker {
  padding: 18px 0 0;
  text-align: center;
  font-size: 15.5px;
  max-width: 40ch;
  margin-inline: auto;
}

.ph--hero .ph-kicker::before {
  left: 50%;
  top: 0;
  bottom: auto;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--sage);
  opacity: .75;
}

/* A slow sheen across the hero card only. */
.ph--hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .06) 48%, transparent 58%);
  transform: translateX(-120%);
  animation: ph-sheen 5.5s ease-in-out 1.1s infinite;
}

@keyframes ph-sheen {
  0%        { transform: translateX(-120%); }
  36%, 100% { transform: translateX(120%); }
}

/* ---------- card: inside a members grid card ---------- */
.ph--card {
  padding: 16px 16px 15px;
  border: 1px solid rgba(155, 184, 166, .20);
  border-radius: var(--r);
  background: linear-gradient(165deg, rgba(155, 184, 166, .10), rgba(255, 255, 255, .015));
}

.ph--card .ph-eyebrow { margin-bottom: 10px; }
.ph--card .ph-eyebrow-text { font-size: 10px; letter-spacing: .14em; }
.ph--card .ph-eyebrow-mark { width: 18px; height: 18px; }
.ph--card .ph-eyebrow-mark svg { width: 11px; height: 11px; }
.ph--card .ph-name { font-size: 1.15rem; margin-bottom: 9px; }
.ph--card .ph-opener { font-size: 14px; margin-bottom: 11px; }
.ph--card .ph-foods { gap: 6px; margin-bottom: 11px; }
.ph--card .ph-food { font-size: 11.5px; padding: 5px 11px; }
.ph--card .ph-food::before { width: 4px; height: 4px; margin-right: 6px; }
.ph--card .ph-kicker { font-size: 12.5px; padding-left: 11px; }

/* ---------- inline: the profile pane ---------- */
.ph--inline {
  padding: 20px 20px 19px;
  margin-bottom: 20px;
  border: 1px solid rgba(155, 184, 166, .22);
  border-radius: var(--r);
  background: linear-gradient(165deg, rgba(155, 184, 166, .11), rgba(255, 255, 255, .015));
}

.ph--inline .ph-name { font-size: 1.45rem; }

/* ---------- showcase: homepage tiles ---------- */
.ph--showcase {
  /* Column + auto-margin on the kicker so every card in a row closes on the same baseline,
     however much the opener and the chips differ in height. */
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  transition: transform .35s var(--ease, ease), border-color .35s, background .35s;
}

.ph--showcase:hover {
  transform: translateY(-5px);
  border-color: rgba(155, 184, 166, .40);
  background: linear-gradient(165deg, rgba(155, 184, 166, .11), rgba(255, 255, 255, .02));
}

.ph--showcase:hover .ph-glow { opacity: 1; }
.ph--showcase .ph-name { font-size: 1.28rem; margin-bottom: 11px; }
.ph--showcase .ph-opener { font-size: 14.5px; margin-bottom: 13px; }
.ph--showcase .ph-food { font-size: 12px; padding: 6px 12px; }
.ph--showcase .ph-foods { margin-bottom: 18px; }
.ph--showcase .ph-kicker { font-size: 13px; margin-top: auto; }

/* ============================================================
   Motion / responsive
   ============================================================ */

@media (max-width: 560px) {
  .ph--hero { padding: 24px 18px 22px; }
  .ph--hero .ph-kicker { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ph-food { animation: none; }
  .ph--hero::after { animation: none; display: none; }
  .ph--showcase { transition: none; }
}
