/* ==========================================================================
   YouTube Marketing (/youtube-marketing)
   Page-only layouts. Shared pieces come from components.css; values are tokens.
   ========================================================================== */

/* ── Hero: a video page, and a shelf of Shorts ─────────────────────────── */
.yt-hero { position: relative; padding-bottom: var(--section-pad-tight); overflow-x: clip; isolation: isolate; }
.yt-hero__light { position: absolute; z-index: -1; inset: -15% -10% auto 40%; height: 120%; background: var(--light-spot); pointer-events: none; }
.yt-hero__grid { display: grid; gap: var(--sp-6) var(--grid-gutter); align-items: center; }
@media (min-width: 992px) { .yt-hero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); } }
.yt-hero__copy { display: grid; gap: var(--sp-3); justify-items: start; }
.yt-hero__title { max-width: 13ch; }
.yt-hero__answer { color: var(--c-text); max-width: 52ch; }
.yt-hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-1); }
@media (max-width: 575.98px) { .yt-hero__actions .btn { width: 100%; } }
.js-motion .yt-hero__copy > * { animation: yt-rise var(--dur-slow) var(--ease-signature) backwards; }
.js-motion .yt-hero__copy > :nth-child(2) { animation-delay: var(--stagger-items); }
.js-motion .yt-hero__copy > :nth-child(3) { animation-delay: calc(var(--stagger-items) * 2); }
.js-motion .yt-hero__copy > :nth-child(n + 4) { animation-delay: calc(var(--stagger-items) * 3); }
@keyframes yt-rise { from { opacity: 0.01; transform: translateY(var(--reveal-rise)); } }

.yt-stage { display: grid; gap: var(--sp-3); width: min(100%, 36rem); justify-self: center; }
@media (min-width: 576px) { .yt-stage { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.yt-player { display: grid; gap: var(--sp-1); padding: var(--sp-2); border: var(--border-strong); border-radius: var(--r-lg); background: var(--c-surface-1); box-shadow: var(--shadow), 0 0 100px -30px var(--glow-color); }
.js-motion .yt-player { animation: yt-rise var(--dur-slow) var(--ease-signature) calc(var(--stagger-items) * 2) backwards; }
.yt-player__frame { position: relative; border-radius: var(--r-md); overflow: hidden; }
.yt-player__frame img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.yt-player__time { position: absolute; right: var(--sp-1); bottom: var(--sp-2); padding: 1px 6px; border-radius: var(--r-sm); background: var(--c-overlay); font-family: var(--font-mono); font-size: var(--fs-caption); }
.yt-player__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgb(244 239 233 / 0.25); }
.yt-player__bar i { display: block; height: 100%; width: 38%; background: var(--c-accent); box-shadow: 0 0 12px var(--glow-color); transform-origin: left; }
.js-motion .yt-player__bar i { width: 100%; animation: yt-play 14s linear infinite; }
@keyframes yt-play { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.yt-player__title { margin-top: 4px; font-family: var(--font-display); font-size: var(--fs-body); font-weight: var(--display-weight); line-height: 1.3; }
.yt-player__row { display: flex; align-items: center; gap: var(--sp-1); }
.yt-player__avatar { display: grid; place-items: center; flex: none; width: 2.25rem; aspect-ratio: 1; border-radius: 50%; background: var(--c-bg); border: var(--border-strong); }
.yt-player__avatar img { width: 70%; height: auto; }
.yt-player__ch { display: grid; font-size: var(--fs-caption); color: var(--c-text-muted); line-height: 1.3; }
.yt-player__ch strong { font-size: var(--fs-small); color: var(--c-text); }
.yt-player__sub { margin-left: auto; padding: 6px var(--sp-2); border-radius: var(--r-pill); background: var(--c-text); color: var(--c-bg); font-size: var(--fs-small); font-weight: var(--text-weight-bold); transition: background-color var(--dur-base) var(--ease-signature), color var(--dur-base) var(--ease-signature), scale var(--dur-fast) var(--ease-hover); }
.yt-player__sub.is-on { background: var(--c-surface-3); color: var(--c-text-muted); }
.yt-player__sub.is-pressed { scale: 0.92; }
.yt-shorts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-1); list-style: none; }
@media (min-width: 576px) { .yt-shorts { grid-template-columns: 5.5rem; } }
.yt-shorts li { position: relative; border: var(--border-strong); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); }
.yt-shorts img { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
/* the label sits on its own strip under the frame, never over the artwork */
.yt-shorts li { background: var(--c-surface-1); }
.yt-shorts span { display: block; padding: 4px 6px; border-top: var(--border); font-size: var(--fs-caption); font-weight: var(--text-weight-bold); }
.yt-shorts img { aspect-ratio: 9 / 13; object-position: 50% 30%; }
.js-motion .yt-shorts li { animation: yt-rise var(--dur-slow) var(--ease-signature) backwards; }
.js-motion .yt-shorts li:nth-child(1) { animation-delay: calc(var(--stagger-items) * 4); }
.js-motion .yt-shorts li:nth-child(2) { animation-delay: calc(var(--stagger-items) * 5); }
.js-motion .yt-shorts li:nth-child(3) { animation-delay: calc(var(--stagger-items) * 6); }

/* ── 01 · People search before they buy ────────────────────────────────── */
.yt-search__grid { display: grid; gap: var(--sp-6) var(--grid-gutter); align-items: center; }
@media (min-width: 992px) { .yt-search__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); } }
.yt-search__copy { display: grid; gap: var(--sp-3); }
.yt-search__copy .t-h2 { max-width: 14ch; }
.yt-who { display: flex; flex-wrap: wrap; gap: var(--sp-1); list-style: none; }
.yt-who li { padding: 6px var(--sp-2); border: var(--border-strong); border-radius: var(--r-pill); font-size: var(--fs-small); }
.yt-q { display: grid; gap: var(--sp-2); padding: clamp(1.25rem, 1rem + 1vw, 2rem); border: var(--border); border-radius: var(--r-lg); background: var(--c-surface-1); }
.yt-q__box { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--c-accent); border-radius: var(--r-pill); background: var(--c-bg); box-shadow: 0 0 40px -16px var(--glow-color); font-size: var(--fs-lead); min-width: 0; }
.yt-q__box .icon { --icon-size: 1.25rem; flex: none; color: var(--c-accent-text); }
.yt-q__text { overflow: hidden; white-space: nowrap; text-overflow: clip; }
.yt-q__text.is-typing::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; background: var(--c-accent); vertical-align: -3px; animation: yt-caret 0.8s steps(1) infinite; }
@keyframes yt-caret { 50% { opacity: 0; } }
.yt-q__hints { display: grid; list-style: none; padding-inline: var(--sp-3); }
.yt-q__hints li { display: flex; align-items: center; gap: var(--sp-2); padding: 6px 0; color: var(--c-text-muted); font-size: var(--fs-small); transition: color var(--dur-fast) var(--ease-hover); }
.yt-q__hints li::before { content: ""; width: 0.75rem; height: 0.75rem; border: 1.5px solid currentColor; border-radius: 50%; opacity: 0.6; }
.yt-q__hints li.is-on { color: var(--c-text); }
.yt-q__hints li.is-on::before { border-color: var(--c-accent); opacity: 1; }
.yt-q__result { display: grid; grid-template-columns: 9rem minmax(0, 1fr); align-items: center; gap: var(--sp-2); padding: var(--sp-1); border: var(--border-strong); border-radius: var(--r-md); background: var(--c-bg); font-size: var(--fs-small); color: var(--c-text-muted); transition: border-color var(--dur-base) var(--ease-signature), box-shadow var(--dur-base) var(--ease-signature); }
.yt-q__result img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-sm); }
.yt-q__result strong { display: block; font-family: var(--font-display); font-size: var(--fs-body); color: var(--c-text); }
.yt-q__result.is-found { border-color: var(--c-accent); box-shadow: 0 0 40px -14px var(--glow-color); }

/* ── 02 · What we do: chapters ─────────────────────────────────────────── */
.yt-chapters__grid { display: grid; gap: var(--sp-5) var(--grid-gutter); align-items: start; }
@media (min-width: 992px) { .yt-chapters__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } .yt-chapters__intro { position: sticky; top: calc(var(--header-h) + var(--sp-4)); } }
.yt-chapters__intro { display: grid; gap: var(--sp-3); }
.yt-chapters__intro .t-h2 { max-width: 16ch; text-wrap: balance; }
.chapters { list-style: none; }
.chapters li { position: relative; display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: var(--sp-2); padding: var(--sp-3) 0; }
/* a progress bar under each chapter, like the player's chapter markers */
.chapters li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--c-accent) 0 var(--fill, 0%), var(--c-line-strong) var(--fill, 0%)); transition: --fill var(--dur-slow) var(--ease-signature); }
.chapters li:hover { --fill: 100%; }
@property --fill { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
.chapters__time { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--c-accent-text); padding-top: 0.4em; }
.chapters h3 { font-size: var(--fs-h3); letter-spacing: var(--display-tracking); line-height: 1.05; }
.chapters p { margin-top: 4px; color: var(--c-text-muted); max-width: 46ch; }

/* ── 03 · The growth loop ──────────────────────────────────────────────── */
.yt-loop__grid { display: grid; gap: var(--sp-6) var(--grid-gutter); align-items: center; }
@media (min-width: 992px) { .yt-loop__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.yt-loop__copy { display: grid; gap: var(--sp-3); }
.loop { --size: clamp(16rem, 12rem + 14vw, 26rem); --r: calc(var(--size) / 2); position: relative; width: var(--size); aspect-ratio: 1; margin-block: 1.75rem; justify-self: center; }
.loop__ring { position: absolute; inset: 0; border: 1px dashed var(--c-line-strong); border-radius: 50%; }
.loop__arm { position: absolute; inset: 0; transform: rotate(var(--turn, 0deg)); transition: transform var(--dur-slow) var(--ease-signature); }
.loop__arm::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from -72deg, transparent, rgb(var(--c-accent-rgb) / 0.25) 20%, transparent 20.5%); mask: radial-gradient(circle, transparent 62%, #000 63%); }
.loop__arm i { position: absolute; left: 50%; top: 0; width: 14px; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: var(--c-accent-bright); box-shadow: 0 0 20px 4px var(--glow-color); }
.loop__node { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 3.5rem; aspect-ratio: 1; margin: -1.75rem 0 0 -1.75rem; border: var(--border-strong); border-radius: 50%; background: var(--c-surface-2); color: var(--c-text-muted); transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1)); transition: background-color var(--dur-base) var(--ease-signature), color var(--dur-base) var(--ease-signature), box-shadow var(--dur-base) var(--ease-signature); }
.loop__node .icon { --icon-size: 1.25rem; }
.loop__node.is-on { background: var(--c-accent); color: var(--c-accent-ink); border-color: transparent; box-shadow: 0 0 40px var(--glow-color); }
.loop__core { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 35%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, rgb(var(--c-accent-rgb) / 0.2), transparent 70%); color: var(--c-accent-text); }
.loop__core .icon { --icon-size: 2.5rem; }
.loop-steps { list-style: none; border-top: var(--border-strong); }
.loop-steps li { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: var(--border); color: var(--c-text-muted); transition: color var(--dur-base) var(--ease-signature); }
.loop-steps span { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: var(--display-weight); line-height: 1.2; color: var(--c-text); transition: color var(--dur-base) var(--ease-signature); }
.loop-steps li.is-on { color: var(--c-text); }
.loop-steps li.is-on span { color: var(--c-accent-text); }
@media (max-width: 575.98px) { .loop-steps li { grid-template-columns: 1fr; gap: 2px; } }

/* ── 05 · What a client said ───────────────────────────────────────────── */
.yt-said__grid { display: grid; gap: var(--sp-6) var(--grid-gutter); align-items: center; }
@media (min-width: 992px) { .yt-said__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); } }
.yt-said__copy { display: grid; gap: var(--sp-3); }
.yt-points { display: grid; list-style: none; border-top: var(--border); }
.yt-points li { display: flex; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: var(--border); color: var(--c-text-muted); }
.yt-points strong { display: block; color: var(--c-text); }
.yt-points .icon { --icon-size: 1.25rem; flex: none; margin-top: 3px; color: var(--c-accent-text); }

/* phones: the search mock-up gets a smaller query line and a wider text column on the result */
@media (max-width: 575.98px) {
  .yt-q__box { padding-inline: var(--sp-2); font-size: var(--fs-body); }
  .yt-q__text { text-overflow: ellipsis; }
  .yt-q__hints { padding-inline: var(--sp-2); }
  .yt-q__result { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}
