/*
Theme Name: Cúpla Score
Theme URI: https://cuplascore.com
Description: Game shell and static pages for Cúpla Score. Colour and type tokens come from game/css/tokens.css.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.2
Author: Cúpla Score
License: GPL-2.0-or-later
Text Domain: cuplascore
*/

/* Readable page styles for About, Privacy, Terms, 404 and share pages.
   Every colour is a token from game/css/tokens.css; literal values are fallbacks only. */

body {
	margin: 0;
	background: var(--sea-mist, #E9EFEC);
	color: var(--slate, #1D2B2F);
	font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 1rem;
	line-height: 1.6;
}

.skip-link {
	position: absolute;
	left: 8px;
	top: -100px;
	z-index: 100;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--surface, #FFFFFF);
	color: var(--slate, #1D2B2F);
}
.skip-link:focus { top: 8px; }

:where(a, button, [tabindex]):focus-visible {
	outline: 3px solid var(--atlantic, #0D5C55);
	outline-offset: 2px;
}

/* Header and footer */
.site-header {
	display: flex;
	align-items: center;
	max-width: 70ch;
	margin: 0 auto;
	padding: 24px 16px 8px;
}
.site-logo { display: inline-flex; line-height: 0; }
.site-logo__img { width: 164px; height: auto; }
.site-logo__img--dark { display: none; }

.site-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	align-items: center;
	justify-content: space-between;
	max-width: 70ch;
	margin: 0 auto;
	padding: 32px 16px 48px;
	font-size: 0.8rem;
}
.site-footer__nav { display: flex; gap: 8px 24px; flex-wrap: wrap; }
.site-footer__nav a,
.site-footer__copy { color: var(--slate, #1D2B2F); }
.site-footer__copy { margin: 0; opacity: 0.8; }
.site-footer__nav a {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
}

/* Game page: the game fills the viewport; the WordPress header steps aside
   (the game draws its own logo) and the footer sits below the fold. */
.cs-game-active .site-header { display: none; }
.cs-game-active .cs-app { display: block; min-height: 100vh; min-height: 100dvh; }
.cs-noscript { padding-top: 48px; }

/* Home: short text about the game, above the footer, at footer-link size. */
.cs-seo-text {
	max-width: 70ch;
	margin: 0 auto;
	padding: 48px 16px 0;
	font-size: 0.8rem;
	line-height: 1.6;
	color: var(--muted, #4F6166);
}
.cs-seo-text h2 {
	margin: 0 0 8px;
	font-size: inherit;
	font-weight: 700;
	color: var(--slate, #1D2B2F);
}
.cs-seo-text p { margin: 0 0 12px; }

/* Text pages */
.page-content {
	max-width: 66ch;
	margin: 0 auto;
	padding: 16px 16px 32px;
}
.page-content--center { text-align: left; padding-top: 48px; }
.page-content:focus { outline: none; }

.page-title,
.page-body h2,
.page-body h3,
.share-card__name,
.share-card__score,
.share-card__title-ga {
	font-family: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;
	line-height: 1.15;
	letter-spacing: -0.01em;
}
.page-title { font-size: 2.44rem; font-weight: 800; margin: 24px 0 16px; }
.page-body h2 { font-size: 1.56rem; font-weight: 700; margin: 32px 0 8px; }
.page-body h3 { font-size: 1.25rem; font-weight: 700; margin: 24px 0 8px; }
.page-body p,
.page-body ul,
.page-body ol { margin: 0 0 16px; }
.page-body ul,
.page-body ol { padding-left: 24px; }
.page-body li { margin-bottom: 4px; }

.page-content a:not(.button) {
	color: var(--atlantic, #0D5C55);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.page-content a:not(.button):hover { text-decoration-thickness: 2px; }

[lang="ga"] { font-style: normal; }
.page-body em[lang="ga"],
.page-body i[lang="ga"] { font-style: italic; }

/* Buttons */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 24px;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}
.button--primary {
	background: var(--atlantic, #0D5C55);
	color: var(--surface, #FFFFFF);
	box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.25);
}
.button--primary:hover { filter: brightness(1.08); }
.button--large { width: 100%; max-width: 24rem; min-height: 56px; font-size: 1.25rem; }
.page-cta { margin: 32px 0 0; }

/* Share page */
.share-page {
	max-width: 32rem;
	margin: 0 auto;
	padding: 16px 16px 32px;
}
.share-page:focus { outline: none; }
.share-card {
	position: relative;
	padding: 24px;
	border-radius: 20px;
	background: var(--surface, #FFFFFF);
	border-bottom: 2px solid rgb(29 43 47 / 0.15);
}
.share-card__name { font-size: 1.25rem; font-weight: 700; margin: 0; }
.share-card__score {
	position: relative;
	display: inline-block;
	margin: 8px 0 0;
	font-size: 6rem;
	font-weight: 800;
	font-stretch: 125%;
	line-height: 1;
}
/* The gorse fada flick above the numeral. */
.share-card__score::after {
	content: "";
	position: absolute;
	right: -28px;
	top: -6px;
	width: 32px;
	height: 10px;
	border-radius: 999px;
	background: var(--gorse, #F3B120);
	transform: rotate(-33deg);
}
.share-card__title { margin: 16px 0 0; }
.share-card__title-ga {
	display: block;
	font-size: 1.95rem;
	font-weight: 700;
	color: var(--heather, #7E4F93);
}
.share-card__title-en { display: block; font-size: 1rem; }
.share-card__grid {
	margin: 24px 0 0;
	font-size: 1.6rem;
	line-height: 1.25;
	letter-spacing: 0.08em;
	font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.share-card__site { margin: 24px 0 0; font-weight: 700; color: var(--atlantic, #0D5C55); }
.share-page__question {
	margin: 32px 0 0;
	font-family: "Bricolage Grotesque", system-ui, sans-serif;
	font-size: 1.56rem;
	font-weight: 700;
	line-height: 1.2;
}
.share-page .page-cta { margin-top: 16px; }

@media (min-width: 48rem) {
	.share-card__score { font-size: 8rem; }
}

/* Dark mode: system preference unless overridden with data-theme on <html>. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .site-logo__img--light { display: none; }
	:root:not([data-theme="light"]) .site-logo__img--dark { display: block; }
	:root:not([data-theme="light"]) .share-card { border-bottom-color: rgb(0 0 0 / 0.4); }
	:root:not([data-theme="light"]) .button--primary { color: var(--sea-mist, #0F1A1C); }
}
:root[data-theme="dark"] .site-logo__img--light { display: none; }
:root[data-theme="dark"] .site-logo__img--dark { display: block; }
:root[data-theme="dark"] .share-card { border-bottom-color: rgb(0 0 0 / 0.4); }
:root[data-theme="dark"] .button--primary { color: var(--sea-mist, #0F1A1C); }

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; }
}
