/* YesWas v2 home, navigation and footer (wave 2, agent 02). Loaded only when yeswas_v2() (inc/home.php).
   Uses tokens.css / components.css. Contrast pairs introduced here are all existing token pairs
   (docs/DESIGN_SYSTEM.md): white / on-dark-muted on black, ink / ink-muted on white and surface-alt, navy on white. */

/* ---------------------------------------------------------------- shared resets inside the v2 home */

.yw-home { font-family: var(--yw-font); font-size: var(--yw-text-base); line-height: var(--yw-leading-body); color: var(--yw-ink); }
.yw-home:focus { outline: none; }
/* Same side padding as the parent's header wrapper, so logo, hero text and cards share one left edge. */
.yw-home .yw-container { max-width: none; padding-inline: 25px; }
@media (min-width: 769px) { .yw-home .yw-container { padding-inline: 50px; } }
.yw-home h1, .yw-home h2, .yw-home h3 { font-family: inherit; text-align: start; text-transform: none; letter-spacing: 0; margin: 0; }
.yw-home p { margin-block: 0; }
.yw-home ul { list-style: none; margin: 0; padding: 0; }
.yw-home .yw-section__header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--yw-space-2) var(--yw-space-5); margin-bottom: var(--yw-space-5); }
.yw-home a.yw-link { display: inline-flex; align-items: center; min-height: var(--yw-target); font-weight: var(--yw-weight-strong); }
.yw-home .yw-section { padding-block: var(--yw-space-7); }
@media (min-width: 48rem) { .yw-home .yw-section { padding-block: var(--yw-space-8); } }
.yw-home .yw-section__title { font-size: var(--yw-text-xl); font-weight: var(--yw-weight-bold); line-height: var(--yw-leading-tight); }
.yw-home .yw-section--alt .yw-link, .yw-home .yw-link { color: var(--yw-link); }
.yw-home .yw-section--dark .yw-link { color: var(--yw-on-dark-link); }
.yw-home [id] { scroll-margin-top: 1rem; }

/* ---------------------------------------------------------------- hero */

.yw-home .yw-hero { padding-block: var(--yw-space-7); }
@media (min-width: 48rem) { .yw-home .yw-hero { padding-block: var(--yw-space-8); } }
.yw-hero__grid { display: grid; gap: var(--yw-space-5); align-items: center; }
.yw-hero__art { order: -1; }
.yw-hero__img { display: block; width: 9rem; max-width: 100%; height: auto; }
.yw-hero__title { font-size: var(--yw-text-2xl); font-weight: var(--yw-weight-bold); line-height: var(--yw-leading-tight); color: var(--yw-on-dark); max-width: 22ch; }
.yw-hero__lead { font-size: var(--yw-text-md); line-height: var(--yw-leading-body); color: var(--yw-on-dark-muted); }
.yw-hero__cta { margin-top: var(--yw-space-2); gap: var(--yw-space-3); }
@media (min-width: 48rem) {
	.yw-hero__grid { grid-template-columns: minmax(0, 1fr) 17rem; gap: var(--yw-space-8); }
	.yw-hero__art { order: 0; justify-self: end; }
	.yw-hero__img { width: 17rem; }
	.yw-hero__lead { font-size: var(--yw-text-lg); }
}

/* ---------------------------------------------------------------- latest episode + subscribe */

/* The episode column is one fixed-width block (summary, player and button share both edges); the subscribe box stays on the right edge, in line with the cards below. */
.yw-latest__grid { display: grid; gap: var(--yw-space-6); align-items: start; }
@media (min-width: 64rem) { .yw-latest__grid { grid-template-columns: minmax(0, 46rem) 22rem; justify-content: space-between; gap: var(--yw-space-7); } }
.yw-latest__ep { display: flex; flex-direction: column; gap: var(--yw-space-4); min-width: 0; max-width: 46rem; }
.yw-latest__head.yw-latest__head--plain { display: block; }
.yw-latest__head { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--yw-space-4); align-items: center; }
@media (min-width: 40rem) { .yw-latest__head { grid-template-columns: 8rem minmax(0, 1fr); gap: var(--yw-space-5); } }
.yw-latest__art { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--yw-radius); background: var(--yw-surface-alt); }
.yw-latest__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.yw-latest__meta { display: flex; flex-direction: column; gap: var(--yw-space-2); min-width: 0; }
.yw-latest__title { font-size: var(--yw-text-xl); font-weight: var(--yw-weight-bold); line-height: var(--yw-leading-tight); }
.yw-home .yw-latest__title a, .yw-home .yw-latest__title a:visited { color: var(--yw-ink); text-decoration: none; }
.yw-home .yw-latest__title a:hover { color: var(--yw-navy); text-decoration: underline; text-underline-offset: .18em; }
.yw-home .yw-latest__title a:focus-visible { outline: var(--yw-ring-width) solid var(--yw-ring-color); outline-offset: var(--yw-ring-offset); border-radius: var(--yw-radius-sm); }
.yw-latest__summary { color: var(--yw-ink); }
.yw-latest .yeswas-ep-player { margin: 0; max-width: none; }
.yw-latest .yeswas-ep-player iframe { border-radius: var(--yw-radius); }
.yw-latest__more { margin: 0; }
.yw-latest .yeswas-ep-audiolink { margin: calc(var(--yw-space-2) * -1) 0 0; font-size: var(--yw-text-sm); }
.yw-home .yw-latest .yeswas-ep-audiolink a { color: var(--yw-link); text-decoration: underline; text-underline-offset: .18em; }
.yw-home .yw-card__meta { color: var(--yw-ink-muted); }

.yw-home-subscribe { padding: var(--yw-space-5); background: var(--yw-surface-alt); border-radius: var(--yw-radius-lg); }
.yw-home-subscribe__title { margin-bottom: var(--yw-space-4) !important; font-size: var(--yw-text-lg); font-weight: var(--yw-weight-bold); line-height: var(--yw-leading-tight); }
/* The copy button is white-on-transparent by default (for the black hero); here it sits on a light surface. */
#container .yw-home-subscribe .yeswas-sub-btn--copy { background: #fff; color: var(--yw-navy); border-color: var(--yw-navy); }
#container .yw-home-subscribe .yeswas-sub-btn--copy:hover,
#container .yw-home-subscribe .yeswas-sub-btn--copy:focus { background: var(--yw-navy); color: #fff; }
#container .yw-home-subscribe .yeswas-sub-btn--copy.is-copied { background: var(--yw-success-bg); color: var(--yw-success); border-color: var(--yw-success); }

/* ---------------------------------------------------------------- recent episodes */

.yw-recent__grid { display: grid; gap: var(--yw-space-4); }
@media (min-width: 56rem) { .yw-recent__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--yw-space-5); } }
.yw-recent__grid > li { margin: 0; padding: 0; display: flex; }
.yw-recent__grid .yw-card { width: 100%; align-content: start; }
.yw-home .yw-card__title { font-size: var(--yw-text-lg); }
.yw-card .yeswas-player { margin: 0; max-width: none; }
.yw-card .yeswas-player.is-loaded { width: 100%; }
/* Compact "Słuchaj" button: the list facade's markup, restyled to a 44px control. */
#container .yw-card .yeswas-player__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--yw-space-2); width: auto; min-height: var(--yw-target); padding: var(--yw-space-2) var(--yw-space-5);
	background: var(--yw-surface); color: var(--yw-navy); border: 2px solid var(--yw-navy); border-radius: var(--yw-radius);
	font: inherit; font-weight: var(--yw-weight-strong); line-height: var(--yw-leading-snug); box-shadow: none; overflow: visible;
}
#container .yw-card .yeswas-player__btn:hover, #container .yw-card .yeswas-player__btn:focus { background: var(--yw-surface-tint); color: var(--yw-navy-deep); border-color: var(--yw-navy-deep); box-shadow: none; }
#container .yw-card .yeswas-player__btn:active { background: var(--yw-navy); color: var(--yw-on-dark); }
#container .yw-card .yeswas-player__btn:focus-visible { outline: var(--yw-ring-width) solid var(--yw-ring-color); outline-offset: var(--yw-ring-offset); }
.yw-card .yeswas-player__btn svg { flex: none; }

/* ---------------------------------------------------------------- search CTA */

.yw-find { padding-block: var(--yw-space-7); }
.yw-find__inner { max-width: 36rem; }
.yw-find .yw-search { max-width: none; }
.yw-find .yw-field__hint { color: var(--yw-ink-muted); }

/* ---------------------------------------------------------------- about + community */

.yw-more__grid { display: grid; gap: var(--yw-space-7); }
@media (min-width: 56rem) { .yw-more__grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--yw-space-8); } }
.yw-more__text p + p { margin-top: var(--yw-space-3); }
.yw-more__community { align-items: flex-start; }
@media (min-width: 56rem) { .yw-more__community { padding-left: var(--yw-space-7); border-left: 1px solid var(--yw-border); } }

/* ---------------------------------------------------------------- navigation (v2) */

/* Sentence case, like the rest of v2 (the parent uppercases menu items). */
.yw-v2 #site-primary-menu a { text-transform: none; font-size: var(--yw-text-base); letter-spacing: 0; }
@media (min-width: 769px) and (max-width: 1100px) {
	.yw-v2 #site-primary-menu > li { margin-left: 20px; }
	.yw-v2 #site-primary-menu > li:first-child { margin-left: 0; }
}
.yw-v2 #site-mobile-menu .mobile-menu a { text-transform: none; }

/* ---------------------------------------------------------------- footer (v2) */

.yw-footer { padding-block: var(--yw-space-7) var(--yw-space-6); border-top: 1px solid var(--yw-border); }
.yw-footer__inner { display: grid; gap: var(--yw-space-6); }
.yw-footer__title { margin: 0 0 var(--yw-space-3); font-size: var(--yw-text-md); font-weight: var(--yw-weight-bold); line-height: var(--yw-leading-tight); color: var(--yw-ink); text-align: start; }
.yw-footer__links { display: flex; flex-wrap: wrap; gap: 0 var(--yw-space-5); margin: 0; padding: 0; list-style: none; }
.yw-footer__links li { margin: 0; }
#site-footer .yw-footer__links a { display: inline-flex; align-items: center; min-height: var(--yw-target); min-width: var(--yw-target); color: var(--yw-link); font-size: var(--yw-text-base); text-decoration: underline; text-underline-offset: .18em; }
#site-footer .yw-footer__links a:hover { color: var(--yw-link-hover); }
#site-footer .yw-footer__links a:focus-visible { outline: var(--yw-ring-width) solid var(--yw-ring-color); outline-offset: var(--yw-ring-offset); border-radius: var(--yw-radius-sm); }
/* chrome.css gives every button width:100% through #container; the band row wants natural widths. */
#container .yw-footer .yeswas-subscribe--band .yeswas-sub-btn { width: auto; }
#container .yw-footer .yeswas-subscribe--band .yeswas-subscribe__rss { flex-wrap: wrap; }
/* Compact subscribe row in the footer: two columns on phones instead of the band's single stacked column. */
@media (max-width: 460px) {
	.yw-footer .yeswas-subscribe--band .yeswas-subscribe__list { grid-template-columns: 1fr 1fr; }
	.yw-footer .yeswas-subscribe--band .yeswas-subscribe__rss { grid-column: 1 / -1; }
	.yw-footer .yeswas-subscribe--band .yeswas-sub-btn { padding-inline: 8px; }
	#container .yw-footer .yeswas-subscribe--band .yeswas-sub-btn { width: 100%; }
	#container .yw-footer .yeswas-subscribe--band .yeswas-subscribe__rss .yeswas-sub-btn { width: auto; flex: 1 1 0; }
}
