/**
 * Proximo 3 Sports — dark "Giants-style" skin.
 * The palette lives in theme.json (editable in the Site Editor → Styles). This file
 * re-points the plugin's --chl-* variables to the dark palette and adds header / hero /
 * footer chrome. Restyling the club is mostly changing theme.json colours.
 */

/* Re-skin the plugin output (dark). */
:root {
	--chl-accent: var(--wp--preset--color--accent, #ff2d55);  /* site colour 3 — emphasis, scores, badges, links */
	--chl-accent-contrast: #ffffff;                           /* readable text on colour 3 */
	/* Deeper red used ONLY behind small white text so contrast reaches WCAG AA 4.5:1
	   (white on #ff2d55 is 3.65:1 — fine for large scores, short of AA for small labels).
	   The bright accent token is left untouched so accent text on dark backgrounds keeps its punch. */
	--chl-accent-strong: #e01046;
	--chl-border: #223040;
	--chl-muted: #94a3b4;
	--chl-row-alt: #131c26;
	--chl-radius: 4px;
	--chl-header-h: 66px;  /* header height = the square action-button size = the logo size */
}

body { background: var(--chl-bg, #0a0f16); color: #fff; }

/* ---- Header (Giants-style: full-width, logo far left, nav, teal action block flush right) ---- */
.site-header { background: #0c1622; background: var(--chl-header-bg, color-mix(in srgb, var(--wp--preset--color--primary, #00c2cb) 24%, #05080c));
	border-bottom: 1px solid rgba(255,255,255,0.08); padding: 0;
	position: sticky; top: 0; z-index: 50; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.site-header a { color: #fff; text-decoration: none; }
.site-header-inner { width: 100%; max-width: 100%; min-height: var(--chl-header-h); align-items: stretch; gap: 0; padding-left: clamp(16px, 3vw, 40px); }
.site-header-left { gap: 28px; flex-wrap: wrap; align-items: center; }
.site-header .wp-block-navigation { gap: 6px 22px; font-family: var(--wp--preset--font-family--heading, "Oswald", sans-serif);
	font-weight: 600; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.03em; }
.site-header .wp-block-navigation a:hover { color: var(--wp--preset--color--primary, #00c2cb); }

/* Right actions: global sponsor + teal button block, full header height */
.chl-header-actions { display: flex; align-items: stretch; align-self: stretch; gap: 0; flex: none; }
.chl-hsponsor-link { display: flex; align-items: center; padding: 0 24px; }
.chl-hsponsor { max-height: 32px; width: auto; display: block; }
.chl-hbuttons { display: flex; align-self: stretch; gap: 4px; padding-left: 4px; }
.chl-hbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
	padding: 0 4px; width: var(--chl-header-h); min-width: var(--chl-header-h); box-sizing: border-box;
	color: var(--chl-hbtn-icon, #04141a); text-decoration: none;
	background: var(--chl-hbtn-bg, var(--wp--preset--color--primary, #00c2cb));
	font-family: var(--wp--preset--font-family--heading, "Oswald", sans-serif); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; }
.chl-hbtn:hover { background: var(--chl-hbtn-hover, #00a2ab); }  /* teal fallback stays light enough for dark-ink label (AA) */
/* Beat `.site-header a { color:#fff }` (0-1-1) so the chosen icon/text colour (and the dark-ink
   default) actually applies to the label and the currentColor-filled SVG. */
.site-header .chl-hbtn, .site-header .chl-hbtn:hover { color: var(--chl-hbtn-icon, #04141a); }
.chl-hbtn svg { width: 28px; height: 28px; fill: currentColor; }
@media (max-width: 900px) { .chl-hbtn span { display: none; } .chl-hsponsor-link { padding: 0 14px; } }

/* ---- Hero ---- */
.chl-hero { background: linear-gradient(120deg, #0a0f16 0%, #12202f 60%, #1d3a52 150%);
	background: linear-gradient(120deg, #0a0f16 0%, color-mix(in srgb, var(--wp--preset--color--primary, #00c2cb) 42%, #0a0f16) 60%, var(--wp--preset--color--primary, #00c2cb) 150%);
	padding: clamp(48px, 9vw, 120px) 24px; border-bottom: 4px solid var(--wp--preset--color--primary, #00c2cb); }
.chl-hero h1, .chl-hero h2 { margin: 0; }
.chl-hero p { color: #cdd8e2; font-size: 1.1rem; margin: 10px 0 22px; }
.chl-eyebrow { color: var(--wp--preset--color--accent, #ff2d55); text-transform: uppercase; letter-spacing: 0.18em;
	font-weight: 700; font-size: 0.8rem; margin: 0; }
.chl-hero-content { max-width: 1200px; margin-inline: auto; position: relative; z-index: 1; }
.chl-hero-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin: 6px 0 0; color: #fff; }
.chl-hero-sub { color: #cdd8e2; font-size: 1.15rem; margin: 14px 0 0; max-width: 620px; }
.chl-hero-buttons { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.chl-btn { display: inline-block; padding: 12px 24px; border-radius: 4px; text-decoration: none; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.9rem; font-family: var(--wp--preset--font-family--heading, "Oswald", sans-serif); }
.chl-btn--primary { background: var(--chl-accent-strong, #e01046); color: #fff; }
.chl-btn--primary:hover { filter: brightness(1.08); color: #fff; }
.chl-btn--outline { border: 2px solid #fff; color: #fff; }
.chl-btn--outline:hover { background: #fff; color: #0a0f16; }

/* Home layout rows */
.chl-strip-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.chl-strip-row--4 { grid-template-columns: repeat(4, 1fr); }
.chl-standings-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; margin-bottom: 40px; align-items: start; }
@media (max-width: 1100px) { .chl-strip-row--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .chl-strip-row, .chl-standings-row { grid-template-columns: 1fr; } }
@media (max-width: 900px) and (min-width: 561px) { .chl-strip-row--4 { grid-template-columns: repeat(2, 1fr); } }

/* ---- Section headings ---- */
.chl-section-title { display: inline-block; border-bottom: 3px solid var(--chl-line, var(--wp--preset--color--primary, #00c2cb));
	padding-bottom: 6px; margin: 8px 0 20px; }

/* ---- Main ---- */
main { padding-block: 0 56px; }
.chl-panel { background: var(--wp--preset--color--surface, #121a24); border: 1px solid #1b2733; border-radius: 8px;
	padding: 18px 20px; }

/* ---- Footer ---- */
.site-footer { background: #070b11; border-top: 1px solid #1b2733; color: #9aa7b4; padding-block: 40px 28px; margin-top: 56px; }
.site-footer a { color: #cdd8e2; text-decoration: none; }
.site-footer a:hover { color: var(--wp--preset--color--primary, #00c2cb); }
.site-footer .chl-legal { color: #8695a4; font-size: 0.8rem; border-top: 1px solid #1b2733; margin-top: 24px; padding-top: 16px; }

/* ---- Plugin content tweaks for dark ---- */
.chl-table thead th { background: var(--chl-accent-strong, #e01046); color: #fff; text-transform: uppercase;
	font-family: var(--wp--preset--font-family--heading, "Oswald", sans-serif); letter-spacing: 0.02em; }
.chl-comp-head { border-bottom: 3px solid var(--chl-line, var(--wp--preset--color--primary, #00c2cb)); padding-bottom: 8px; }
.chl-league-table tbody tr:first-child { box-shadow: inset 3px 0 0 var(--chl-line, var(--wp--preset--color--primary, #00c2cb)); }
.chl-match, .chl-player-card a, .chl-widget, .chl-panel, .chl-table td, .chl-table th { border-color: #223040; }
.chl-match, .chl-widget { background: var(--wp--preset--color--surface, #121a24); }
.chl-player-card a { background: var(--wp--preset--color--surface, #121a24); }
.chl-player-card a:hover { border-color: var(--wp--preset--color--primary, #00c2cb); }
.chl-score, .chl-scoreline { background: var(--wp--preset--color--accent, #ff2d55); color: #fff; }
.chl-tickets { background: var(--chl-accent-strong, #e01046); color: #fff; }
.chl-cap { background: var(--wp--preset--color--primary, #00c2cb); color: #04141a; }
.chl-widget h4, .chl-match-comp, .chl-match-date, .chl-ga, .chl-player-meta, .chl-empty { color: #94a3b4; }
.chl-sponsors { gap: 26px; }
.chl-sponsors img { background: #fff; padding: 8px 12px; border-radius: 6px; }

/* Brand text (when replacing the site title) */
.chl-brand-text { font-family: var(--wp--preset--font-family--heading, "Oswald", sans-serif); font-weight: 800;
	text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.5rem; color: #fff; }

/* Section header row (title + View All / Subscribe) */
.chl-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.chl-view-all { color: var(--wp--preset--color--accent, #ff2d55); text-transform: uppercase; font-weight: 700;
	font-size: 0.8rem; letter-spacing: 0.04em; text-decoration: none; }
.chl-view-all:hover { text-decoration: underline; }

/* News grid (GIANTS NEWS style) */
.chl-news { margin: 8px 0 40px; }
.chl-news-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.chl-news-card { display: block; background: var(--wp--preset--color--surface, #121a24); border: 1px solid #1b2733;
	border-radius: 8px; overflow: hidden; text-decoration: none; color: #fff; transition: transform .15s, border-color .15s; }
.chl-news-card:hover { transform: translateY(-3px); border-color: var(--wp--preset--color--primary, #00c2cb); }
.chl-news-img { width: 100%; height: 180px; object-fit: cover; display: block; }
.chl-news-date { display: block; padding: 12px 14px 0; color: var(--wp--preset--color--accent, #ff2d55);
	font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.chl-news-title { display: block; padding: 4px 14px 16px; font-weight: 700; font-size: 1.02rem; }

/* 3 image links */
.chl-promos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0 0 40px; }
.chl-promo { display: block; border-radius: 8px; overflow: hidden; }
.chl-promo img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; transition: transform .3s; }
.chl-promo:hover img { transform: scale(1.04); }

/* Shop band */
.chl-shop-band { display: block; position: relative; min-height: 220px; border-radius: 10px; overflow: hidden;
	margin: 0 0 40px; background: var(--wp--preset--color--primary, #00c2cb); background-size: cover; background-position: center; text-decoration: none; }
.chl-shop-band::before { content: ""; position: absolute; inset: 0; background: rgba(6,10,16,0.55); }
.chl-shop-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
	gap: 12px; height: 100%; min-height: 220px; padding: 32px; }
.chl-shop-heading { color: #fff; font-family: var(--wp--preset--font-family--heading, "Oswald", sans-serif);
	font-weight: 800; text-transform: uppercase; font-size: clamp(1.8rem, 4vw, 3rem); }
.chl-shop-cta { background: var(--chl-accent-strong, #e01046); color: #fff; padding: 10px 20px; border-radius: 4px;
	text-transform: uppercase; font-weight: 700; letter-spacing: 0.03em; font-size: 0.85rem; }

/* YouTube videos */
.chl-yt { margin: 0 0 40px; }
.chl-yt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.chl-yt-item iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 8px; display: block; }
.chl-subscribe { background: #cc0000; color: #fff; padding: 8px 18px; border-radius: 4px; text-transform: uppercase;
	font-weight: 700; font-size: 0.8rem; letter-spacing: 0.03em; text-decoration: none; }  /* #cc0000 = AA white contrast */
.chl-subscribe:hover { background: #a30000; color: #fff; }

/* News is 5-up on desktop; step down so cards don't get too narrow on smaller screens. */
@media (max-width: 1200px) { .chl-news-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 782px) {
	.chl-news-grid { grid-template-columns: repeat(2, 1fr); }
	.chl-promos, .chl-yt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
	.chl-news-grid { grid-template-columns: 1fr; }
}

/* ---- Nav dropdown menus (Seasons / Teams): match the header nav links exactly ---- */
.chl-navmenu { display: inline-block; position: relative; }
.chl-navmenu details > summary {
	list-style: none; cursor: pointer; padding: 0;
	font-family: var(--wp--preset--font-family--heading, "Oswald", sans-serif);
	font-weight: 600; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.03em;
	color: #fff;
}
.chl-navmenu details > summary:hover { color: var(--wp--preset--color--primary, #00c2cb); }
.chl-navmenu details > summary::-webkit-details-marker { display: none; }
.chl-navmenu details > summary::after { content: " ▾"; opacity: .6; font-size: 0.8em; }
.chl-navmenu details[open] > ul {
	position: absolute; z-index: 40; top: 100%; left: 0; min-width: 180px;
	margin: 0; padding: 6px 0; list-style: none;
	background: color-mix(in srgb, var(--wp--preset--color--primary) 24%, #05080c);
	border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.chl-navmenu details[open] > ul li a {
	display: block; padding: 8px 16px; color: #fff; text-decoration: none; white-space: nowrap;
}
.chl-navmenu details[open] > ul li a:hover { background: rgba(255,255,255,.12); }
.chl-results-team { margin: 14px 0 6px; font-size: 1rem; }

/* ---- Sponsors "family" block (home) ---- */
.chl-family { margin: 48px 0 8px; text-align: center; }
.chl-family .chl-section-title { margin: 0 0 24px; }
.chl-family .chl-sponsors { justify-content: center; }

/* ---- Footer social links + powered-by ---- */
.chl-social-links { display: flex; gap: 12px; margin: 14px 0 0; flex-wrap: wrap; }
.chl-social { display: inline-flex; }
.chl-social img { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; transition: transform .15s, opacity .15s; opacity: .85; }
.chl-social:hover img { transform: translateY(-2px); opacity: 1; }
.chl-powered { color: #9aa7b4; margin: 6px 0 0; }

/* Content links use colour 3 (theme.json accent); underline on hover for affordance. */
.chl-match-page a:hover, .chl-lineups a:hover, .chl-scorers a:hover, .chl-table a:hover,
.chl-season a:hover, .chl-team-page a:hover, .chl-potm-link:hover .chl-potm-name { text-decoration: underline; }

/* Body-content links: underline at rest so they are not distinguished by colour alone (WCAG 1.4.1). */
.wp-block-post-content a, .entry-content a, .chl-content a { text-decoration: underline; text-underline-offset: 2px; }

/* ---- Visible keyboard focus for all custom interactive controls (WCAG 2.4.7 AA) ---- */
.chl-btn:focus-visible, .chl-hbtn:focus-visible, .chl-social:focus-visible, .chl-news-card:focus-visible,
.chl-navmenu summary:focus-visible, .chl-view-all:focus-visible, .chl-subscribe:focus-visible,
.chl-promo:focus-visible, .chl-shop-band:focus-visible, .chl-shop-cta:focus-visible,
.site-header a:focus-visible, .site-footer a:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 2px;
	border-radius: 3px;
}
/* On light surfaces, use a dark ring so it stays visible. */
.chl-promo:focus-visible, .chl-news-card:focus-visible { outline-color: var(--wp--preset--color--primary, #00c2cb); }

/* ---- Hero logo that shrinks up into the sticky header on scroll (home page) ---- */
.chl-hero-logo { display: block; height: clamp(84px, 13vw, 150px); width: auto; margin: 0 0 18px;
	transform-origin: left center; will-change: transform, opacity; }
/* On the home page the header's own logo is hidden at the top (the big hero logo is showing)
   and fades in once scrolled — so the mark reads as travelling up into the header. Other
   pages have no hero, so the header logo is always visible (no rule hides it there). */
.home .site-header .wp-block-site-logo,
.home .site-header .custom-logo-link { opacity: 0; transform: translateY(-8px);
	transition: opacity .25s ease, transform .25s ease; }
.home .site-header.is-scrolled .wp-block-site-logo,
.home .site-header.is-scrolled .custom-logo-link { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.chl-hero-logo { transition: none; }
	.home .site-header .wp-block-site-logo,
	.home .site-header .custom-logo-link { opacity: 1; transform: none; transition: none; }
}

/* ---- Home: transparent overlay header so the hero image runs to the very top, behind the nav.
   The header is fixed (over the hero) and only takes its solid background once scrolled. ---- */
.home .site-header { position: fixed; top: 0; left: 0; right: 0;
	background: transparent; border-bottom-color: transparent;
	-webkit-backdrop-filter: none; backdrop-filter: none; }
.admin-bar.home .site-header { top: 32px; }
/* On mobile the WP admin bar is absolute (scrolls away), so pin the fixed header to the very
   top rather than offsetting it — otherwise a ~46px gap is left once the admin bar scrolls off. */
@media (max-width: 782px) { .admin-bar.home .site-header { top: 0; } }
/* Readability scrim behind the nav while the header is transparent (gone once scrolled). */
.home .site-header:not(.is-scrolled)::after { content: ""; position: absolute; inset: 0; z-index: -1;
	pointer-events: none; background: linear-gradient(to bottom, rgba(6,10,16,0.6), rgba(6,10,16,0)); }
.home .site-header.is-scrolled { background: var(--chl-header-bg, color-mix(in srgb, var(--wp--preset--color--primary, #00c2cb) 24%, #05080c));
	border-bottom-color: rgba(255,255,255,0.08); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* Hero sits under the fixed header; pad its content clear of the overlaid nav. */
.home .chl-hero { padding-top: calc(var(--chl-header-h) + clamp(36px, 6vw, 90px)); }

/* Close the block-gap above <main> on the home page so the near-black page background
   can't show as a thin line above the full-bleed hero. */
.home main { margin-top: 0; }

/* Team badge used as the header logo — same size as the square action buttons. */
.site-header .wp-block-site-logo .custom-logo,
.site-header .chl-team-logo .custom-logo { height: var(--chl-header-h); width: auto; max-width: var(--chl-header-h); object-fit: contain; display: block; }

/* ==========================================================================
   Responsive layer — mobile + tablet
   ========================================================================== */
@media (max-width: 900px) {
	.chl-hero { padding-left: 18px; padding-right: 18px; }
	.chl-panel { padding: 16px; }
}
@media (max-width: 600px) {
	:root { --chl-header-h: 58px; }  /* shrink the square (buttons + logo + header) on phones */
	.site-header-inner { padding-left: 14px; }
	.chl-hsponsor { max-height: 26px; }
	.chl-hbtn { font-size: 0.66rem; }
	.chl-hbtn svg { width: 24px; height: 24px; }
	.chl-hero-logo { height: clamp(64px, 18vw, 100px); margin-bottom: 12px; }
	.chl-eyebrow { font-size: 0.72rem; letter-spacing: 0.12em; }
	.chl-section-title { font-size: 1.15rem; }
	.chl-shop-heading { font-size: clamp(1.5rem, 7vw, 2.2rem); }
}
@media (max-width: 520px) {
	/* Small phones: drop the header sponsor logo so the top bar stays tidy
	   (sponsors still appear in the body + footer). */
	.chl-hsponsor-link { display: none; }
	.chl-hbuttons { gap: 3px; padding-left: 3px; }
	.site-footer { padding-block: 32px 22px; }
}

/* Grid/flex children must be able to shrink below their content width, or wide content
   (tables, match rows) forces the column past the viewport on mobile. */
.chl-strip-row > *, .chl-standings-row > *, .chl-standings-col, .chl-results-col,
.chl-strip > .wp-block-column, .wp-block-columns > .wp-block-column { min-width: 0; }

/* ---- Shopify products rendered in the store section (official Shopify plugin) ---- */
.chl-shop-products { margin: 18px 0 0; }
.chl-shop-products a { color: var(--wp--preset--color--accent, #ff2d55); }
/* Nudge the Shopify Buy Button / product buttons towards the club accent (best-effort;
   Shopify's own component styles otherwise apply). */
.chl-shop-products .shopify-buy__btn,
.chl-shop-products .shopify_buy__btn,
.chl-shop-products button[type="submit"] {
	background-color: var(--wp--preset--color--accent, #ff2d55) !important;
	border-radius: 4px !important; text-transform: uppercase; font-weight: 700; }
.chl-shop-products .shopify-buy__btn:hover { filter: brightness(1.08); }

/* ---- Theme-level button colour + text colour (Customize → Club Theme) ---- */
.chl-btn--primary, .chl-tickets, .chl-shop-cta, .chl-stream-btn {
	background: var(--chl-btn-bg, var(--chl-accent-strong, #e01046)); color: var(--chl-btn-text, #fff); }
.chl-btn--primary:hover, .chl-shop-cta:hover, .chl-stream-btn:hover { color: var(--chl-btn-text, #fff); }

/* ---- Theme-level box / card colour + transparency (Customize → Club Theme) ---- */
.chl-widget, .chl-match, .chl-panel, .chl-player-card a, .chl-team-lineup {
	background: var(--chl-box-bg, var(--wp--preset--color--surface, #121a24)); }

/* ---- Mobile nav overlay: match the dark theme instead of the default white full-screen ---- */
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--chl-bg, #0a0f16) !important;
	color: #fff;
	padding: 24px clamp(20px, 6vw, 48px) 40px;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	margin-top: 12px;
}
.wp-block-navigation__responsive-container.is-menu-open a,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	color: #fff;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
	display: block;
	padding: 12px 0;
	font-size: 1.15rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a:hover {
	color: var(--wp--preset--color--primary, #00c2cb);
}
/* Hamburger + close buttons keep the theme ink colour */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	color: #fff;
}
