/* ===== /yt — the channel page =====
   Builds on /styles.css (palette, panels, buttons, seals, the rare chonk).
   Only what is specific to this page lives here, so a change to the
   shared look on the main page carries over automatically. */

/* ---------- top bar: the brand is a link home, with the face beside it ---------- */

a.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
}

a.brand img {
  display: block;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  transition: transform 0.3s var(--ease-out);
}

a.brand:hover img { transform: rotate(-8deg) scale(1.1); }

@media (max-width: 420px) {
  a.brand { gap: 0.4rem; }
  a.brand img { width: 18px; height: 18px; border-radius: 5px; }
}

/* ---------- back to the main page ---------- */

.back-btn {
  margin: 0 0 1.4rem;
}

.back-arrow {
  display: inline-block;
  transition: transform 0.28s var(--ease-out);
}

.back-btn:hover .back-arrow { transform: translateX(-4px); }

/* ---------- channel header ---------- */

.yt-hero {
  --av: clamp(112px, 17vw, 168px);   /* avatar size; everything below keys off it */
}

.yt-banner {
  position: relative;
  height: clamp(150px, 26vw, 260px);
  overflow: hidden;
  border: 1px solid var(--card-line);
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(380px 220px at 14% 20%,  rgba(255,46,166,0.55), transparent 70%),
    radial-gradient(460px 260px at 86% 8%,   rgba(54,232,255,0.40), transparent 70%),
    radial-gradient(520px 300px at 55% 115%, rgba(255,159,46,0.55), transparent 70%),
    linear-gradient(135deg, #12162a, #0b0e1b);
  box-shadow: var(--shadow);
}

/* the same faint grid as the page background, so the banner belongs to it */
.yt-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,159,46,0.07) 1px, transparent 1px) 0 0 / 100% 38px,
    linear-gradient(90deg, rgba(255,159,46,0.07) 1px, transparent 1px) 0 0 / 38px 100%;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%);
  mask-image: linear-gradient(180deg, #000, transparent 90%);
  pointer-events: none;
}

/* two cropped, drifting copies of the face; faint on purpose */
.banner-face {
  position: absolute;
  z-index: 1;
  display: block;
  border-radius: 22%;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.8);
}

.banner-face-a {
  width: clamp(150px, 26vw, 300px);
  right: 4%;
  bottom: -24%;
  opacity: 0.22;
  transform: rotate(11deg);
  animation: face-float 9s ease-in-out infinite;
}

.banner-face-b {
  width: clamp(64px, 10vw, 112px);
  left: 6%;
  top: 14%;
  opacity: 0.16;
  transform: rotate(-14deg);
  animation: face-float 11s ease-in-out -4s infinite reverse;
}

/* `translate` is separate from `transform`, so the drift never fights the tilt */
@keyframes face-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -12px; }
}

.yt-id {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: clamp(1.1rem, 3vw, 2rem);
  margin: calc(var(--av) * -0.45) clamp(0.8rem, 3vw, 2rem) 0;
}

.yt-avatar {
  flex: none;
  width: var(--av);
  aspect-ratio: 1;
  overflow: hidden;
  border: 5px solid var(--bg);
  border-radius: 30px;
  background: #ffc700;
  box-shadow:
    0 0 0 1px var(--card-line),
    0 22px 50px -18px rgba(255,199,0,0.6),
    0 0 70px -12px rgba(255,159,46,0.5);
  transform: rotate(-3deg);
  transition: transform 0.45s var(--ease-out);
}

.yt-avatar:hover { transform: rotate(2.5deg) scale(1.05); }

.yt-avatar img {
  display: block;
  width: 100%;
  height: 100%;
}

/* text starts below the banner edge: only the avatar overlaps it */
.yt-meta {
  min-width: 0;
  padding-top: calc(var(--av) * 0.45 + 0.9rem);
}

.yt-meta .eyebrow { margin-bottom: 0.45rem; }

.yt-name {
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 4.1rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  background: linear-gradient(100deg, var(--accent), var(--cyan) 45%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(255,159,46,0.24));
}

.yt-handle {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.yt-handle b {
  color: var(--text);
  font-weight: 600;
}

.yt-tag {
  margin: 0.9rem 0 0;
  max-width: 40ch;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  text-wrap: balance;
}

.yt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.yt-actions .ghost-btn {
  margin-top: 0;
  padding: 0.95rem 1.4rem;
  font-size: 1rem;
}

/* the big red subscribe pill, with a sheen that sweeps across on hover */
.btn-sub {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  overflow: hidden;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  background: var(--yt);
  color: #fff;
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 16px 40px -14px rgba(255,45,45,0.85);
  transition: transform 0.28s var(--ease-out), filter 0.22s var(--ease),
              box-shadow 0.3s var(--ease);
}

.btn-sub svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.btn-sub::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-18deg);
  transition: left 0.7s var(--ease-out);
  pointer-events: none;
}

.btn-sub:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow: 0 22px 52px -14px rgba(255,45,45,1);
}

.btn-sub:hover::after { left: 130%; }
.btn-sub:active { transform: translateY(-1px); }

/* ---------- live stat tiles ---------- */

.yt-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.4rem 0 0;
}

.yt-stats li {
  padding: 1.15rem 1rem 1.05rem;
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0)),
    var(--card);
  transition: transform 0.28s var(--ease-out), border-color 0.25s var(--ease);
}

.yt-stats li:hover {
  transform: translateY(-3px);
  border-color: rgba(255,159,46,0.5);
}

/* ---------- on the channel: three feature cards ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.4rem;
}

/* the three cards are links now -- keep them looking like cards, not blue underlined text */
a.feature {
  display: block;
  color: inherit;
  text-decoration: none;
}

.feature {
  padding: 1.3rem 1.3rem 1.4rem;
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  transition: transform 0.28s var(--ease-out), border-color 0.25s var(--ease),
              background 0.25s var(--ease);
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: rgba(255,159,46,0.06);
}

.feature svg {
  display: block;
  width: 30px;
  height: 30px;
  margin-bottom: 0.85rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.games-row { margin-top: 1.4rem; }

/* ---------- footer ---------- */

.foot-home {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.foot-home:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .yt-id {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .yt-meta { padding-top: 0.4rem; }
  .yt-tag { margin-inline: auto; }
  .yt-actions { justify-content: center; }
}

@media (max-width: 560px) {
  /* seven-digit view counts don't fit three across a phone */
  .yt-stats { grid-template-columns: repeat(2, 1fr); }
  .yt-stats li:last-child { grid-column: 1 / -1; }
}
