/* Tournaments page "Turnirji" (0.7.32, owner request 2026-11-16): the play area as a full-bleed scene
   (tools/art/tournament.mjs: tables, playmats, games in progress) with the title over its wall-tone
   left side, then the two places to follow (Discord with its QR, Instagram) and where we play.
   Content is plain blocks (tools/release/tournaments-page.html), so the page reads without this theme;
   the theme recognises it by its .jc-tourney group. Ground: the wall tone, like the store page. */

body:has(.jc-tourney) .site-content { background: var(--jc-wall, #f2efe9); padding-top: 0; }
body:has(.jc-tourney) .site-main { margin-bottom: 0; padding-bottom: clamp(40px, 6vw, 80px); }
body:has(.jc-tourney) .hentry { margin-bottom: 0; }
body:has(.jc-tourney) .storefront-breadcrumb { display: none; }
/* "Turnirji" stays the h1 for screen readers and the tab; on screen the scene's headline leads. */
body:has(.jc-tourney) .entry-header {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
	clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.jc-tourney .wp-block-group__inner-container { display: contents; }
.jc-tourney > * { margin-top: 0; margin-bottom: 0; }

/* The scene ----------------------------------------------------------------- */
.jc-tourney__hero {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	max-width: none !important;
	box-sizing: border-box;
	background: var(--jc-wall, #f2efe9);
	/* phone: the art is its own band on top, the text below it */
	padding: calc(100vw * 330 / 800 + 24px) var(--jc-gutter) 8px;
	background-image: url("../../art/tournament-banner-mobile.svg?v=2");
	background-repeat: no-repeat;
	background-size: 100% auto;
	background-position: top center;
}
/* (Storefront wraps the group's blocks in an inner container, shown as display:contents above.) */
.jc-tourney__hero > *, .jc-tourney__hero > .wp-block-group__inner-container > * { margin: 0; max-width: 40rem; }
.hentry .entry-content .jc-tourney__hero h2 {
	font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem);
	font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance;
	margin: 0 0 16px;
}
.jc-tourney__lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); color: var(--jc-ink); font-weight: 600; text-wrap: pretty; }
.hentry .entry-content ul.jc-tourney__games {
	list-style: none; margin: 16px 0 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 8px;
}
.jc-tourney__games li {
	margin: 0; padding: 8px 14px; min-height: 40px; box-sizing: border-box;
	display: inline-flex; align-items: center;
	background: var(--jc-paper); border: 1px solid var(--jc-line); border-radius: 8px;
	font-size: 15px; font-weight: 700; color: var(--jc-ink); line-height: 1.2;
}
.jc-tourney__when { margin-top: 18px !important; color: var(--jc-ink-2); text-wrap: pretty; }

@media (min-width: 900px) {
	/* desktop: the art fills the band, anchored right; its own left side fades into the wall tone */
	.jc-tourney__hero {
		min-height: clamp(460px, 33vw, 640px);
		padding: clamp(40px, 5vw, 72px) 0;
		/* line the text up with the content column: undo the bleed (50vw - 50% of the parent) */
		padding-left: calc(50vw - 50% + 0px);
		background-image: url("../../art/tournament-banner.svg?v=2");
		/* as tall as the band, from the left edge: the art's faded left side is always under the text */
		background-size: auto 100%;
		background-position: left center;
		display: flex; flex-direction: column; justify-content: center;
	}
	.jc-tourney__hero > *, .jc-tourney__hero > .wp-block-group__inner-container > * { max-width: min(34rem, 40vw); }
}

/* Follow: Discord (QR) and Instagram ---------------------------------------- */
.jc-tourney__follow {
	display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
	margin-top: clamp(28px, 4vw, 48px) !important;
}
@media (min-width: 768px) {
	.jc-tourney__follow { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; }
}
.jc-tourney__discord, .jc-tourney__instagram {
	margin: 0 !important;
	background: var(--jc-paper); border: 1px solid var(--jc-line); border-radius: var(--jc-radius);
	padding: clamp(20px, 3vw, 32px);
}
.jc-tourney__discord > *, .jc-tourney__instagram > *,
.jc-tourney__discord > .wp-block-group__inner-container > *, .jc-tourney__instagram > .wp-block-group__inner-container > * { margin-top: 0; margin-bottom: 0; }
.hentry .entry-content .jc-tourney__follow h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 8px; clear: none; }
.jc-tourney__follow p { color: var(--jc-ink-2); }
/* QR beside the text from 560px (floated, so the text keeps its own rhythm), above it on small phones */
.jc-tourney__discord { display: flow-root; }
.jc-tourney__qr { width: 132px; margin: 0 0 16px !important; }
.jc-tourney__qr img { display: block; width: 132px; height: 132px; image-rendering: pixelated; border-radius: 6px; }
@media (min-width: 560px) {
	.jc-tourney__qr { float: left; margin: 0 24px 0 0 !important; }
}
.hentry .entry-content .jc-tourney__discord .wp-block-buttons { margin-top: 16px; }
.hentry .entry-content .jc-tourney__btn .wp-block-button__link {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; box-sizing: border-box;
	border-radius: 8px; background: var(--jc-ink); color: var(--jc-paper); border: 1px solid var(--jc-ink);
	font: 700 15px/1 var(--jc-font); text-decoration: none;
	transition: background-color .15s ease-out;
}
.hentry .entry-content .jc-tourney__btn .wp-block-button__link:hover { background: #000; color: var(--jc-paper); }
.jc-tourney__handle { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); font-weight: 800; margin-bottom: 6px !important; }
.jc-tourney__handle a { color: var(--jc-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.jc-tourney__handle a:hover { text-decoration-color: var(--jc-brand); }

.jc-tourney__where { margin-top: 20px !important; color: var(--jc-ink-2); font-size: 15px; }
.jc-tourney__where a { color: var(--jc-ink); font-weight: 700; }
