/*
 * Ubunto Builder — frontend.
 *
 * Mobile-first. Colours follow the ubunto theme (style.css :root variables
 * --ink, --muted, --surface, --line, --green, --gold), with the theme's values as
 * fallbacks when another theme is active. Fonts and heading styles (Barlow
 * Condensed, uppercase) are inherited from the theme.
 *
 * Override from the theme, e.g.  .ub-page { --ub-accent: #b8431f; }
 */

.ub-page {
	--ub-accent: #b8431f;          /* ubunto clay, as used by the theme's buttons */
	--ub-accent-contrast: #fff;
	--ub-green: var(--green, #0f5b3a);
	--ub-gold: var(--gold, #f2b632);
	--ub-ink: var(--ink, #1b1a17);
	--ub-muted: var(--muted, #6b665c);
	--ub-surface: var(--surface, #fff);
	--ub-line: var(--line, #e6dfd0);
	--ub-radius: 18px;
	--ub-radius-media: 24px;
	--ub-max: 1100px;
	--ub-narrow: 720px;
	--ub-pad: 20px;
	--ub-space: clamp(48px, 7vw, 80px);
	--ub-heading-font: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;

	display: block;
	color: var(--ub-ink);
	overflow-x: clip;
}

.ub-page:focus {
	outline: none;
}

.ub-page *,
.ub-page *::before,
.ub-page *::after {
	box-sizing: border-box;
}

.ub-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.ub-container {
	width: 100%;
	max-width: var(--ub-max);
	margin-inline: auto;
	padding-inline: var(--ub-pad);
}

.ub-container--narrow > * {
	max-width: var(--ub-narrow);
}

.ub-section {
	padding-block: calc(var(--ub-space) / 2);
	scroll-margin-top: 80px;
}

.ub-section:first-child:not(.ub-hero),
.ub-sr-only + .ub-section:not(.ub-hero) {
	padding-top: var(--ub-space);
}

.ub-section:last-child {
	padding-bottom: var(--ub-space);
}

.ub-hero + .ub-section {
	padding-top: var(--ub-space);
}

.ub-section__title {
	margin: 0 0 28px;
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 800;
	line-height: 1;
}

/* Buttons --------------------------------------------------------------- */

.ub-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 14px 26px;
	border: 2px solid transparent;
	border-radius: 999px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ub-button--primary {
	background: var(--ub-accent);
	color: var(--ub-accent-contrast);
}

.ub-page .ub-button--primary:hover {
	background: var(--ub-accent);
	color: var(--ub-accent-contrast);
	opacity: 0.9;
}

.ub-page .ub-button--light {
	background: #fff;
	color: var(--ub-ink);
}

.ub-page .ub-button--light:hover {
	background: transparent;
	border-color: #fff;
	color: #fff;
}

.ub-page .ub-button--dark {
	background: var(--ub-ink);
	color: #fff;
}

.ub-page .ub-button--dark:hover {
	background: #fff;
	color: var(--ub-ink);
}

.ub-page .ub-button--primary {
	background: var(--ub-accent);
	color: var(--ub-accent-contrast);
}

.ub-button:focus-visible,
.ub-product__link:focus-visible {
	outline: 3px solid var(--ub-ink);
	outline-offset: 3px;
}

.ub-hero .ub-button:focus-visible,
.ub-cta .ub-button:focus-visible {
	outline-color: var(--ub-gold);
}

/* Hero ------------------------------------------------------------------ */

/* Without an image the hero uses the theme's green with its chevron pattern. */
.ub-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: min(70vh, 640px);
	background: var(--ub-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Cpath d='M0 24 L12 0 L24 24 L36 0 L48 24' fill='none' stroke='%23fff' stroke-opacity='.08' stroke-width='3'/%3E%3C/svg%3E");
	color: #fff;
	isolation: isolate;
}

.ub-hero--image {
	background: var(--ub-ink);
}

.ub-hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ub-hero--image::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 20%, rgba(0, 0, 0, 0.72) 100%);
}

.ub-hero__inner {
	padding-block: var(--ub-space);
}

.ub-hero__title {
	max-width: 18ch;
	margin: 0 0 16px;
	color: inherit;
	font-size: clamp(3rem, 10vw, 6.5rem);
	font-weight: 800;
	line-height: 0.95;
}

.ub-hero__text {
	max-width: 30em;
	margin-bottom: 1.4em;
	font-size: 1.1rem;
	line-height: 1.5;
	opacity: 0.92;
}

.ub-hero__text p {
	margin: 0 0 0.5em;
}

/* Rich text ------------------------------------------------------------- */

.ub-prose {
	font-size: 1.0625rem;
	line-height: 1.7;
}

.ub-prose > :first-child {
	margin-top: 0;
}

.ub-prose > :last-child {
	margin-bottom: 0;
}

.ub-prose a {
	color: var(--ub-accent);
	text-underline-offset: 0.2em;
}

.ub-prose ol,
.ub-prose ul {
	padding-left: 1.3em;
}

.ub-prose li + li {
	margin-top: 0.4em;
}

.ub-prose blockquote {
	margin: 1.5em 0;
	padding-left: 1em;
	border-left: 4px solid var(--ub-accent);
	font-size: 1.15em;
}

/* Image ----------------------------------------------------------------- */

.ub-image__figure {
	margin-block: 0;
}

.ub-image__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--ub-radius-media);
}

/* Team profile ---------------------------------------------------------- */

.ub-team__inner {
	display: grid;
	gap: 24px;
	align-items: center;
}

.ub-team__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 120px;
	aspect-ratio: 1;
	padding: 16px;
	border: 1px solid var(--ub-line);
	border-radius: var(--ub-radius);
	background: var(--ub-surface);
}

.ub-team__logo img {
	max-width: 100%;
	height: auto;
	max-height: 100%;
	object-fit: contain;
}

.ub-team__body {
	max-width: 64ch;
	font-size: 1.0625rem;
	line-height: 1.65;
}

.ub-team__body p {
	margin: 0 0 0.8em;
}

@media (min-width: 700px) {
	.ub-team__inner {
		grid-template-columns: 180px 1fr;
		gap: 48px;
	}

	.ub-team__inner--no-logo {
		grid-template-columns: 1fr;
	}

	.ub-team__logo {
		width: 180px;
	}
}

/* CTA banner ------------------------------------------------------------ */

.ub-cta__box {
	padding: clamp(36px, 6vw, 64px) clamp(24px, 6vw, 64px);
	border-radius: var(--ub-radius-media);
	background: var(--ub-accent);
	color: var(--ub-accent-contrast);
	text-align: center;
}

.ub-cta__title {
	margin: 0 0 8px;
	color: inherit;
	font-size: clamp(2.2rem, 5vw, 3rem);
	font-weight: 800;
	line-height: 1;
}

.ub-cta__text {
	max-width: 52ch;
	margin: 0 auto 1.6em;
	font-size: 1.1rem;
	line-height: 1.5;
	opacity: 0.92;
}

.ub-cta__text p {
	margin: 0;
}

/* Products -------------------------------------------------------------- */

.ub-products__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.ub-products__grid.ub-cols-3,
	.ub-products__grid.ub-cols-4,
	.ub-products__grid.ub-cols-5 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 36px 24px;
	}
}

@media (min-width: 1024px) {
	.ub-products__grid.ub-cols-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.ub-products__grid.ub-cols-5 {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

.ub-product {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 16px;
	border: 1px solid var(--ub-line);
	border-radius: var(--ub-radius);
	background: var(--ub-surface);
}

.ub-product__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.ub-product__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 12px;
	background: var(--bg, #faf6ef);
	aspect-ratio: 1;
}

.ub-product__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.ub-product__link:hover .ub-product__media img {
	transform: scale(1.04);
}

.ub-product__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--ub-gold);
	color: var(--ub-ink);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.ub-product__title {
	margin: 12px 0 4px;
	color: var(--ub-ink);
	font-family: var(--ub-heading-font);
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.05;
	text-transform: uppercase;
}

.ub-product__price {
	margin-bottom: 14px;
	color: var(--ub-ink);
	font-family: var(--ub-heading-font);
	font-size: 1.5rem;
	line-height: 1.1;
}

.ub-product__price del {
	color: var(--ub-muted);
	font-size: 0.8em;
}

.ub-product__price ins {
	color: var(--ub-ink);
	text-decoration: none;
}

.ub-product__cart {
	margin-top: auto;
}

/* Same pill as the theme's .woocommerce a.button, full width in the card. */
.ub-page .ub-product__cart .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 12px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--ub-accent);
	color: var(--ub-accent-contrast);
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
}

.ub-page .ub-product__cart .button:hover {
	background: var(--ub-accent);
	color: var(--ub-accent-contrast);
	opacity: 0.9;
}

.ub-page .ub-product__cart .button.added {
	background: var(--ub-green);
}

.ub-page .ub-product__cart .button:focus-visible {
	outline: 3px solid var(--ub-ink);
	outline-offset: 2px;
}

.ub-product__cart .added_to_cart {
	display: block;
	margin-top: 8px;
	color: var(--ub-green);
	font-size: 0.9rem;
	text-align: center;
}

/* Outline button -------------------------------------------------------- */

.ub-page .ub-button--outline {
	background: transparent;
	border-color: var(--ub-ink);
	color: var(--ub-ink);
}

.ub-page .ub-button--outline:hover {
	background: var(--ub-ink);
	color: #fff;
}

/* Club colour scope (set by the Team Hero) ------------------------------- */

.ub-accent-scope {
	display: block;
}

.ub-accent-scope .ub-cta .ub-button--dark {
	background: #fff;
	color: var(--ub-ink);
}

.ub-accent-scope .ub-cta .ub-button--dark:hover {
	background: transparent;
	border-color: #fff;
	color: #fff;
}

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

.ub-th {
	padding-block: calc(var(--ub-space) * 0.7);
}

.ub-th__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px 40px;
}

.ub-th__crest {
	flex: none;
	width: 150px;
}

.ub-th__crest img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 220px;
	object-fit: contain;
}

.ub-th__body {
	flex: 1 1 280px;
	min-width: 0;
}

.ub-th__kicker {
	margin: 0 0 8px;
	color: var(--ub-muted);
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.ub-th__title {
	margin: 0;
	color: var(--ub-ink);
	font-size: clamp(3rem, 9vw, 5.2rem);
	font-weight: 800;
	line-height: 0.95;
}

.ub-th__motto {
	margin: 12px 0 0;
	color: #444;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.15rem;
	font-style: italic;
}

.ub-th__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

@media (min-width: 700px) {
	.ub-th__crest {
		width: 220px;
	}
}

/* Quick facts ----------------------------------------------------------- */

.ub-facts {
	padding-block: 0;
	border-block: 1px solid var(--ub-line);
	background: var(--ub-surface);
}

.ub-facts:last-child {
	padding-bottom: 0;
}

.ub-facts__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	margin: 0;
}

.ub-facts__item {
	margin: 0;
	padding: 16px 20px;
	border-left: 3px solid var(--ub-accent);
}

.ub-facts__label {
	margin: 0;
	color: var(--ub-muted);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.ub-facts__value {
	margin: 2px 0 0;
	color: var(--ub-ink);
	font-family: var(--ub-heading-font);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
}

/* Club values ----------------------------------------------------------- */

.ub-values__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ub-values__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	padding: 20px 12px;
	border-radius: var(--ub-radius);
	background: var(--ub-surface);
	text-align: center;
}

.ub-values__mark {
	color: var(--ub-accent);
	font-family: var(--ub-heading-font);
	font-size: 3rem;
	font-weight: 700;
	line-height: 1;
}

.ub-values__label {
	margin-top: 6px;
	color: var(--ub-ink);
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ub-values__text {
	margin-top: 6px;
	color: var(--ub-muted);
	font-size: 0.85rem;
	line-height: 1.4;
}

@media (min-width: 800px) {
	.ub-values__list {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	}
}

/* Image caption --------------------------------------------------------- */

.ub-image__caption {
	margin-top: 10px;
	color: var(--ub-muted);
	font-size: 0.9rem;
}

/* Editor hints (only visible to users who can edit the page) ------------ */

.ub-editor-note {
	margin: 24px 0;
	padding: 12px 16px;
	border-left: 4px solid #dba617;
	background: #fcf9e8;
	color: #3c3c3c;
	font-size: 0.95rem;
}

.ub-password {
	padding-block: var(--ub-space);
}

@media (prefers-reduced-motion: reduce) {
	.ub-page *,
	.ub-page *::before,
	.ub-page *::after {
		transition: none !important;
	}
}
