/* Faces of Vilasapara: weekly character profiles shown as slim rows on the
   ACTUAL axis. They sit visually behind official announcement cards: muted
   colors, no elevation, and content that starts after the connector like
   every other item. The orb-linked name sweep shares the ROAD label orange.
   --faces-axis-offset = distance from the vertical axis to the row's left edge. */
:root {
  --faces-ink: rgba(176, 200, 218, .62);
  --faces-ink-strong: rgba(214, 228, 238, .82);
  --faces-line: rgba(130, 205, 252, .22);
  --faces-axis-offset: 54px;
}

.official-faces-lane {
  display: grid;
  gap: 8px;
}

.official-faces-lane[hidden] { display: none; }

/* Recessed layer: slightly smaller, dimmer and flat, so official cards read
   as nearer to the viewer. */
.official-faces {
  position: relative;
  border: 1px solid var(--faces-line);
  background: rgba(6, 14, 22, .55);
  opacity: .82;
  transform: scale(.97);
  /* Scale around the axis node so the node stays on the axis line. */
  transform-origin: calc(-1 * var(--faces-axis-offset)) 19.5px;
  transition: opacity .2s ease, transform .2s ease;
}

.official-faces:hover,
.official-faces:focus-within,
.official-faces.is-open {
  opacity: 1;
  transform: none;
}

/* Connector from the axis, like other items. Only a small hollow node sits
   on the axis line itself. */
.official-faces::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 19px;
  width: var(--faces-axis-offset);
  height: 1px;
  background: var(--faces-line);
}

.official-faces::after {
  content: "";
  position: absolute;
  left: calc(-1 * var(--faces-axis-offset) - 4px);
  top: 15.5px;
  box-sizing: border-box;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(176, 200, 218, .7);
  border-radius: 50%;
  background: #08121b;
}

/* The actual descending orb activates is-light-hit at the axis junction.
   Ripple first, then a short travelling light, then a soft portrait response. */
.official-faces-profile.is-light-hit::after {
  animation: facesOrbRipple 1s ease-out both;
}
.official-faces-profile.is-light-hit::before {
  background: linear-gradient(90deg, transparent 35%, rgba(193,234,255,.9) 50%, transparent 65%) 100% 0 / 300% 100% no-repeat,
    var(--faces-line);
  animation: facesOrbConduction .52s .1s ease-in-out both;
}
.official-faces-profile.is-light-hit .official-faces-date {
  animation: facesOrbDate 1.25s ease-out both;
}
.official-faces-profile.is-light-hit .official-faces-face {
  animation: facesOrbPortrait 1.3s .48s ease-out both;
}
/* Preserve a single readable name; the visual glyph layer is aria-hidden. */
.official-faces-name-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.official-faces-letter {
  position: relative;
  display: inline-block;
  white-space: pre;
}
.official-faces-letter::after {
  content: attr(data-glyph);
  position: absolute;
  inset: 0;
  color: rgba(255,190,119,.96);
  opacity: 0;
  pointer-events: none;
  transform-origin: center bottom;
}
.official-faces-profile.is-light-hit .official-faces-letter {
  animation: facesOrbLetter .72s var(--faces-letter-delay) ease-out both;
}
.official-faces-profile.is-light-hit .official-faces-letter::after {
  animation: facesOrbLetterLift .72s var(--faces-letter-delay) cubic-bezier(.22,.7,.3,1) both;
}
@keyframes facesOrbRipple {
  0% { border-color: rgba(215,245,255,.95); box-shadow: 0 0 0 0 rgba(165,223,255,.45), 0 0 9px rgba(159,222,255,.5); }
  65% { border-color: rgba(196,230,247,.8); box-shadow: 0 0 0 11px rgba(165,223,255,0), 0 0 12px rgba(159,222,255,.1); }
  100% { border-color: rgba(176,200,218,.7); box-shadow: 0 0 0 13px rgba(165,223,255,0), 0 0 0 transparent; }
}
@keyframes facesOrbConduction {
  from { background-position: 100% 0; }
  to { background-position: 0% 0; }
}
@keyframes facesOrbDate {
  0%, 100% { color: var(--faces-ink); text-shadow: none; }
  18% { color: rgba(206,235,251,.9); text-shadow: 0 0 8px rgba(138,208,250,.28); }
}
@keyframes facesOrbPortrait {
  0%, 100% { border-color: rgba(176,200,218,.45); box-shadow: 0 0 0 transparent; }
  20% { border-color: rgba(209,241,255,.95); box-shadow: 0 0 10px rgba(147,218,255,.32); }
}
@keyframes facesOrbLetter {
  0%, 100% { color: inherit; }
  15%, 35% { color: rgb(242,138,53); }
  65% { color: inherit; }
}
@keyframes facesOrbLetterLift {
  0%, 18% { opacity: 0; transform: translateY(0) scaleY(1); filter: blur(0); }
  30% { opacity: .65; transform: translateY(-1px) scaleY(1.04); filter: blur(.1px); }
  65% { opacity: .2; transform: translateY(-6px) scaleY(1.24); filter: blur(.8px); }
  100% { opacity: 0; transform: translateY(-10px) scaleY(1.32); filter: blur(1.5px); }
}
html[data-crossroad-motion-profile]:not([data-crossroad-motion-profile="full"]) .official-faces-profile.is-light-hit::before,
html[data-crossroad-motion-profile]:not([data-crossroad-motion-profile="full"]) .official-faces-profile.is-light-hit::after,
html[data-crossroad-motion-profile]:not([data-crossroad-motion-profile="full"]) .official-faces-profile.is-light-hit .official-faces-date,
html[data-crossroad-motion-profile]:not([data-crossroad-motion-profile="full"]) .official-faces-profile.is-light-hit .official-faces-face,
html[data-crossroad-motion-profile]:not([data-crossroad-motion-profile="full"]) .official-faces-profile.is-light-hit .official-faces-letter,
html[data-crossroad-motion-profile]:not([data-crossroad-motion-profile="full"]) .official-faces-profile.is-light-hit .official-faces-letter::after {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .official-faces-profile.is-light-hit::before, .official-faces-profile.is-light-hit::after,
  .official-faces-profile.is-light-hit .official-faces-date,
  .official-faces-profile.is-light-hit .official-faces-face,
  .official-faces-profile.is-light-hit .official-faces-letter,
  .official-faces-profile.is-light-hit .official-faces-letter::after { animation: none; }
}

.official-faces-date {
  position: absolute;
  right: calc(100% + var(--faces-axis-offset) + 18px);
  top: 13px;
  color: var(--faces-ink);
  font: 500 13px/1 "Bahnschrift Condensed", "Arial Narrow", var(--mono, monospace);
  letter-spacing: .1em;
  white-space: nowrap;
}

.official-faces-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 12px 0 8px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.official-faces-head:hover .official-faces-name,
.official-faces-head:focus-visible .official-faces-name { color: #fff; }

.official-faces-head:focus-visible { outline: 1px solid var(--faces-ink); outline-offset: -1px; }

.official-faces-face {
  flex: none;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(176, 200, 218, .45);
  border-radius: 50%;
  overflow: hidden;
  background: #0b141d;
}

.official-faces-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.75);
}

.official-faces-tag {
  flex: none;
  color: var(--faces-ink);
  font: 500 10px/1 var(--mono, monospace);
  letter-spacing: .14em;
}

.official-faces-name {
  flex: none;
  color: var(--faces-ink-strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
}

.official-faces-sub {
  min-width: 0;
  overflow: hidden;
  color: rgba(176, 200, 218, .45);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.official-faces-chevron {
  flex: none;
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1px solid var(--faces-ink);
  border-bottom: 1px solid var(--faces-ink);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}

.official-faces.is-open .official-faces-chevron { transform: translateY(2px) rotate(225deg); }

.official-faces-detail {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 4px 12px 14px 8px;
}

.official-faces-detail[hidden] { display: none; }

/* Rows without a portrait (e.g. text-only producer leaks) use the full width. */
.official-faces-detail.no-portrait { grid-template-columns: minmax(0, 1fr); }

.official-faces-portrait {
  display: block;
  width: 96px;
  aspect-ratio: 459 / 609;
  object-fit: cover;
  border: 1px solid rgba(176, 200, 218, .3);
  filter: saturate(.85);
}

.official-faces-copy { display: grid; align-content: start; gap: 9px; }

.official-faces-series {
  color: var(--faces-ink);
  font: 500 10px/1.4 var(--mono, monospace);
  letter-spacing: .14em;
}

.official-faces-copy p {
  margin: 0;
  color: rgba(214, 228, 238, .72);
  font-size: 12px;
  line-height: 1.75;
}

/* Guides readers to the official post: the row only carries a summary. */
.official-faces-source {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(130, 205, 252, .45);
  color: var(--actual, #82cdfc);
  font: 600 11px/1 var(--mono, monospace);
  letter-spacing: .1em;
  text-decoration: none;
}

.official-faces-source:hover,
.official-faces-source:focus-visible { background: rgba(130, 205, 252, .1); }

.official-faces-source-pending {
  color: rgba(176, 200, 218, .45);
  font: 500 11px/1.4 var(--mono, monospace);
  letter-spacing: .08em;
}

@media (max-width: 760px) {
  :root { --faces-axis-offset: 32px; }
  .official-faces {
    opacity: 1;
    transform: none;
    background: rgba(6, 14, 22, .78);
  }
  .official-faces-date { font-size: 12px; right: calc(100% + var(--faces-axis-offset) + 12px); }
  /* Phone rows show the tag and name beside the face. */
  .official-faces-head {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 8px;
    column-gap: 10px;
    row-gap: 3px;
    padding-block: 8px;
  }
  .official-faces-face { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  .official-faces-tag { grid-column: 2; grid-row: 1; font-size: 12px; color: rgba(190, 213, 228, .8); }
  .official-faces-name { grid-column: 2; grid-row: 2; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; letter-spacing: .02em; color: rgba(232, 243, 249, .95); }
  .official-faces-sub { display: none; }
  .official-faces-chevron { grid-column: 3; grid-row: 1 / span 2; align-self: center; margin-left: 0; }
  .official-faces-detail { grid-template-columns: 56px minmax(0, 1fr); gap: 10px; }
  .official-faces-portrait { width: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .official-faces,
  .official-faces-chevron { transition: none; }
}

/* Crossroads placement. Rows newer than the latest official card sit in a
   lane inside the hero; the inline layout code moves the card below it.
   Older rows sit in the history between official cards. */
.official-faces-lane {
  position: absolute;
  z-index: 7;
  left: calc(var(--axis-x) + var(--faces-axis-offset));
  top: var(--official-faces-top, 68%);
  width: min(560px, calc(100% - var(--axis-x) - 88px));
}

.actual-history > .official-faces {
  width: min(560px, calc(100% - var(--axis-x) - 90px));
  margin: 0 0 20px calc(var(--axis-x) + var(--faces-axis-offset) - var(--history-pad, 0px));
}

@media (max-width: 760px) {
  .official-faces-lane { width: calc(100% - var(--axis-x) - 46px); }
  .actual-history > .official-faces {
    width: calc(100% - var(--axis-x) - 46px);
    margin-left: calc(var(--axis-x) + var(--faces-axis-offset) - var(--history-pad, 0px) + 7.56px);
    margin-bottom: 16px;
  }

  /* The phone layout pins the latest card below the axis; keep that slot for
     the lane and move the card under it. */
  html[data-crossroad-phase="prelaunch"] .crossroad-hero .official-faces-lane {
    top: calc(var(--cross-y) + max(206px, calc(55svh - 194px)));
  }
  html[data-crossroad-phase="prelaunch"] .crossroad-hero .latest-official {
    top: calc(var(--cross-y) + max(206px, calc(55svh - 194px)) + var(--official-faces-shift, 0px)) !important;
  }
}

/* Phone rows without a face icon do not reserve the icon column. */
@media (max-width: 760px) {
  .official-faces-head.no-face { grid-template-columns: minmax(0, 1fr) 8px; }
  .official-faces-head.no-face > .official-faces-tag,
  .official-faces-head.no-face > .official-faces-name { grid-column: 1; }
  .official-faces-head.no-face > .official-faces-chevron { grid-column: 2; }
}
