/* Rat Barn — styles theme.json can't express. */

:root {
	--rb-line: color-mix(in srgb, var(--wp--preset--color--ink) 10%, transparent);
	--rb-pixel: 6px;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--amber); color: var(--wp--preset--color--night); }

:where(a, button, .wp-element-button):focus-visible {
	outline: 2px solid var(--wp--preset--color--neon);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Header */
.rb-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--wp--preset--color--night) 82%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--rb-line);
}
.admin-bar .rb-header { top: var(--wp-admin--admin-bar--height, 32px); }
.rb-brand .wp-block-site-title { margin: 0; }

.rb-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}
.rb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	font-size: var(--wp--preset--font-size--x-large);
	gap: 1.25rem;
}
.wp-block-navigation .current-menu-item > a,
.wp-block-navigation a[aria-current="page"] { color: var(--wp--preset--color--amber); }

/* Pixel separator: the little sparkle squares from the logo. */
hr.is-style-pixels,
.wp-block-separator.is-style-pixels {
	border: 0 !important;
	height: var(--rb-pixel);
	width: auto;
	opacity: 1;
	background:
		linear-gradient(90deg, var(--wp--preset--color--amber) 0 var(--rb-pixel), transparent 0) 0 0 / calc(var(--rb-pixel) * 3) 100% no-repeat,
		linear-gradient(90deg, var(--wp--preset--color--ember) 0 var(--rb-pixel), transparent 0) calc(var(--rb-pixel) * 2) 0 / calc(var(--rb-pixel) * 3) 100% no-repeat,
		linear-gradient(90deg, var(--wp--preset--color--neon) 0 var(--rb-pixel), transparent 0) calc(var(--rb-pixel) * 4) 0 / calc(var(--rb-pixel) * 3) 100% no-repeat,
		linear-gradient(var(--rb-line), var(--rb-line)) calc(var(--rb-pixel) * 7) 50% / 100% 1px no-repeat;
}
.has-text-align-center + hr.is-style-pixels,
hr.is-style-pixels.aligncenter { background-position: center; }

/* Kicker: small label above headings. */
.is-style-kicker {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--amber);
	margin-bottom: 0.25rem !important;
}
.is-style-kicker::before {
	content: "";
	display: inline-block;
	width: 0.55em;
	height: 0.55em;
	margin-right: 0.6em;
	background: var(--wp--preset--color--ember);
	vertical-align: 0.08em;
}

/* Pill: status badge. */
p.is-style-pill {
	display: inline-block;
	width: fit-content;
	padding: 0.3em 0.9em;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--neon) 55%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--wp--preset--color--night) 70%, transparent);
	color: var(--wp--preset--color--neon);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.has-text-align-center.is-style-pill,
.aligncenter.is-style-pill { margin-inline: auto !important; display: block; }

/* Card */
.is-style-card {
	background: var(--wp--preset--color--night-2);
	border: 1px solid var(--rb-line);
	border-radius: 8px;
	padding: var(--wp--preset--spacing--40);
	height: 100%;
	transition: border-color 0.2s, transform 0.2s;
}
.is-style-card:hover { border-color: color-mix(in srgb, var(--wp--preset--color--amber) 45%, transparent); }
.is-style-card > * { margin-block: 0; }
.is-style-card h3 { margin-top: 0.25rem; }
.wp-block-post-template .is-style-card .wp-block-post-featured-image { margin: calc(var(--wp--preset--spacing--40) * -1) calc(var(--wp--preset--spacing--40) * -1) 0.5rem; }
.wp-block-post-template .is-style-card .wp-block-post-featured-image img { border-radius: 8px 8px 0 0 !important; }

/* Hero on the front page */
.rb-hero { position: relative; overflow: hidden; }
.rb-hero::before {
	content: "";
	position: absolute;
	inset: -20% -10% auto auto;
	width: 70vmax;
	height: 70vmax;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--wp--preset--color--ember) 22%, transparent), transparent);
	pointer-events: none;
}
.rb-hero > * { position: relative; }
.rb-hero h1 { line-height: 1.02; }
.rb-sign {
	background: var(--wp--preset--gradient--sign);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Game cards (capsule art) */
.rb-game-card { position: relative; border-radius: 8px; overflow: hidden; background: var(--wp--preset--color--night-2); border: 1px solid var(--rb-line); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.rb-game-card:hover { transform: translateY(-4px); border-color: var(--wp--preset--color--amber); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.rb-game-card .wp-block-post-featured-image { margin: 0; }
.rb-game-card .wp-block-post-featured-image img { transition: transform 0.4s; }
.rb-game-card:hover .wp-block-post-featured-image img { transform: scale(1.03); }
.rb-game-card .rb-game-card-body { padding: 1rem 1.25rem 1.25rem; }
.rb-game-card .rb-game-card-body > * { margin-block: 0; }
.rb-game-card .wp-block-post-title { font-size: var(--wp--preset--font-size--large); text-transform: uppercase; }
.rb-game-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.rb-game-card .wp-block-post-excerpt { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); margin-top: 0.4rem; }
.rb-game-card .wp-block-post-excerpt__more-text { display: none; }

/* Game banner rows on /games/ */
.rb-banner { border-radius: 8px; overflow: hidden; border: 1px solid var(--rb-line); }
.rb-banner .wp-block-cover__inner-container > * { margin-block: 0.5rem; }
.rb-banner .rb-banner-logo img { max-height: 120px; width: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7)); }

/* Game page hero */
.rb-game-hero .rb-game-logo img { width: min(640px, 86vw); height: auto; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.75)); }
.rb-game-hero .wp-block-cover__inner-container { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8); }

/* Fact sheet */
.rb-facts { margin: 0; }
.rb-facts table { border-collapse: collapse; width: 100%; }
.rb-facts td { border: 0; border-bottom: 1px solid var(--rb-line); padding: 0.6rem 0; vertical-align: top; font-size: var(--wp--preset--font-size--small); }
.rb-facts tr:last-child td { border-bottom: 0; }
.rb-facts td:first-child { color: var(--wp--preset--color--muted); padding-right: 1rem; white-space: nowrap; font-family: var(--wp--preset--font-family--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }

/* Feature grid */
.rb-features h3 { display: flex; align-items: center; gap: 0.6rem; }
.rb-features h3::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--wp--preset--color--amber); box-shadow: 14px 0 0 -2px var(--wp--preset--color--ember); margin-right: 14px; }
.rb-features .is-style-card p { color: var(--wp--preset--color--muted); }

.wp-block-image img, .wp-block-cover { border-radius: inherit; }
.rb-rounded img { border-radius: 8px; }

/* Post meta */
.rb-terms a {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
}
.wp-block-post-navigation-link a { text-decoration: none; }

/* Legal pages: dense text, smaller headings */
.rb-legal h2 { font-size: var(--wp--preset--font-size--large); text-transform: none; margin-top: var(--wp--preset--spacing--50); }
.rb-legal h3 { font-size: var(--wp--preset--font-size--medium); }
.rb-legal p, .rb-legal li { font-size: 0.975rem; }

/* Footer */
.rb-footer .wp-block-site-title a { color: var(--wp--preset--color--ink); }
.rb-footer-nav a { color: var(--wp--preset--color--muted); }
.rb-footer-nav a:hover { color: var(--wp--preset--color--amber); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 781px) {
	.rb-header .wp-block-site-title { font-size: 0.95rem; }
	.rb-hero .rb-hero-text { text-align: center; }
	.rb-hero .rb-hero-text .wp-block-buttons { justify-content: center; }
	.rb-hero .rb-hero-text .is-style-kicker { text-align: center; }
	.rb-hero .rb-hero-logo img { max-width: 300px; }
}

/* Fade the game hero into the page. */
.rb-game-hero::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 45%;
	background: linear-gradient(180deg, transparent, var(--wp--preset--color--night));
	pointer-events: none;
	z-index: 1;
}
.rb-game-hero .wp-block-cover__inner-container { z-index: 2; }

h1, h2 { hyphens: auto; -webkit-hyphens: auto; }

/* Pixel art stays crisp when the browser scales it. */
.rb-pixelated img { image-rendering: pixelated; }

/* Fewer announced games: keep the capsules at their usual size instead of stretching two across the full width. */
.rb-games-1 { max-width: 400px !important; }
.rb-games-2 { max-width: 820px !important; }

.rb-video video { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; background: #000; border: 1px solid var(--rb-line); }
