/*
Theme Name: Team Compare
Theme URI: https://team-compare.uk
Author: Team Compare
Description: Corporate theme for Team Compare, showcasing the group's portfolio of UK comparison sites. Edit all homepage copy, headline numbers and portfolio sites under Appearance → Customize → Team Compare.
Version: 1.9.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: team-compare
*/

/* Fonts: same families as sportscompare.uk, bundled locally */
@font-face { font-family: "Bricolage Grotesque"; src: url(assets/fonts/bricolage-grotesque-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(assets/fonts/bricolage-grotesque-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(assets/fonts/bricolage-grotesque-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(assets/fonts/dm-sans-latin-wght-normal.woff2) format("woff2-variations"), url(assets/fonts/dm-sans-latin-wght-normal.woff2) format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; }

:root {
	--font-head: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
	--font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--bg: #fdf8f1;
	--bg2: #f8ede0;
	--card: #ffffff;
	--card2: #fff9f2;
	--line: #eadcc9;
	--text: #2b1d14;
	--muted: #6e5f52;
	--accent: #d9531e;
	--accent-ink: color-mix(in srgb, var(--accent) 80%, #3a1405);
	--on-accent: #ffffff;
	--accent2: #a8671a;
	--sky: #f2a33a;
	--radius: 18px;
	--shadow: 0 28px 56px -24px rgba(90, 45, 15, .28);
	--shadow-sm: 0 2px 6px rgba(90, 45, 15, .06), 0 10px 24px -12px rgba(90, 45, 15, .14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
	margin: 0;
	font-family: var(--font-body);
	background: var(--bg);
	color: var(--text);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.02em; font-family: var(--font-head); font-weight: 700; }
.stat .num, .site-card .meta strong, .btn, .eyebrow, .kicker { font-family: var(--font-head); }
p { margin: 0 0 1em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }

.screen-reader-text, .skip-link {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 100; top: 10px; left: 10px;
	background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 8px;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 13px 24px; border-radius: 12px; font-weight: 600; font-size: .95rem;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
	border: 1px solid transparent; cursor: pointer;
}
.btn-sm { padding: 9px 16px; font-size: .88rem; border-radius: 10px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -6px color-mix(in srgb, var(--accent) 55%, transparent); }
.btn-ghost { border-color: var(--line); color: var(--text); background: #fff; }
.btn-ghost:hover { border-color: var(--accent); }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(253, 248, 241, .82);
	backdrop-filter: saturate(160%) blur(14px);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s, background .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(253, 248, 241, .95); box-shadow: 0 6px 20px -14px rgba(90,45,15,.35); }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 40px; width: auto; display: block; }
.custom-logo { max-height: 44px; width: auto; display: block; }
@media (max-width: 480px) { .logo img { height: 32px; } }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav .menu { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-nav .menu a { color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .15s; }
.site-nav .menu a:hover, .site-nav .current-menu-item > a { color: var(--text); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--text); }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
	display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s, opacity .2s;
}
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
.nav-open .nav-toggle .bars { background: transparent; }
.nav-open .nav-toggle .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle .bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.site-nav {
		position: absolute; top: 72px; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 0;
		background: var(--bg2); border-bottom: 1px solid var(--line);
		padding: 8px 24px 20px; display: none;
	}
	.nav-open .site-nav { display: flex; }
	.site-nav .menu { flex-direction: column; gap: 0; }
	.site-nav .menu a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
	.site-nav .btn { margin-top: 16px; justify-content: center; }
	.admin-bar .site-header { top: 0; }
}

/* Hero */
.hero { position: relative; padding: 96px 0 110px; overflow: hidden; }
.hero::before, .hero::after {
	content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(10px);
}
.hero::before {
	width: 760px; height: 760px; right: -220px; top: -260px;
	background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%);
}
.hero::after {
	width: 560px; height: 560px; left: -260px; bottom: -300px;
	background: radial-gradient(circle, rgba(242, 163, 58, .20), transparent 62%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }

.eyebrow, .kicker {
	display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow {
	background: color-mix(in srgb, var(--accent) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
	padding: 7px 13px; border-radius: 999px; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.grad {
	background: linear-gradient(90deg, var(--accent), var(--sky));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin: 24px 0 34px; }
.ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .88rem; }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust li::before {
	content: ""; width: 16px; height: 16px; border-radius: 50%;
	background: color-mix(in srgb, var(--accent) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23d9531e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Stacked screenshots in hero */
.hero-visual { position: relative; height: 480px; }
.stack-card {
	position: absolute; width: 78%; border-radius: 14px; overflow: hidden;
	background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
	transition: transform .5s cubic-bezier(.2, .8, .2, 1), filter .5s;
}
.stack-3 { right: 0; top: 0; z-index: 1; transform: scale(.94); transform-origin: top right; }
.stack-2 { right: 11%; top: 70px; z-index: 2; transform: scale(.97); transform-origin: top right; }
.stack-1 { right: 22%; top: 140px; z-index: 3; }
.hero-visual:hover .stack-1 { transform: translateY(-6px); }
.hero-visual:hover .stack-2 { transform: scale(.97) translate(8px, -4px); }
.hero-visual:hover .stack-3 { transform: scale(.94) translate(14px, -8px); }

@media (max-width: 960px) {
	.hero { padding: 64px 0 80px; }
	.hero-grid { grid-template-columns: 1fr; gap: 48px; }
	.hero-visual { height: 360px; max-width: 560px; }
	.stack-2 { top: 50px; }
	.stack-1 { top: 100px; }
}
@media (max-width: 560px) { .hero-visual { height: 250px; } .stack-card { width: 84%; } .stack-2 { top: 34px; right: 8%; } .stack-1 { top: 68px; right: 16%; } }

/* Browser chrome (shared) */
.bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #f6ede2; border-bottom: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #d9cbb8; flex: none; }
.dot:nth-child(1) { background: #ff5f57; } .dot:nth-child(2) { background: #febc2e; } .dot:nth-child(3) { background: #28c840; }
.url {
	margin-left: 10px; flex: 1; min-width: 0; background: #fff; border-radius: 6px;
	font-size: .76rem; color: var(--muted); padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shot {
	aspect-ratio: 16 / 10; position: relative; overflow: hidden;
	/* Skeleton page shown while the live screenshot loads */
	background:
		linear-gradient(#efe2d1, #efe2d1) 6% 9% / 22% 5% no-repeat,
		linear-gradient(#f3e9dc, #f3e9dc) 94% 9% / 30% 5% no-repeat,
		linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, #fff3e6), #fff3e6) 6% 26% / 88% 30% no-repeat,
		linear-gradient(#f5ebdf, #f5ebdf) 6% 88% / 27% 22% no-repeat,
		linear-gradient(#f5ebdf, #f5ebdf) 50% 88% / 27% 22% no-repeat,
		linear-gradient(#f5ebdf, #f5ebdf) 94% 88% / 27% 22% no-repeat,
		#fffbf6;
}
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.shot .fallback { position: absolute; left: 0; right: 0; top: 26%; height: 30%; display: grid; place-items: center; font-weight: 800; font-size: clamp(1rem, 2.2vw, 1.4rem); letter-spacing: -.01em; color: var(--text); padding: 0 20px; text-align: center; }

/* Stats band */
.stats { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 60px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: -12px; top: 12%; bottom: 12%; width: 1px; background: var(--line); }
.stat .num { font-size: clamp(2.1rem, 4vw, 3.1rem); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .num b { color: var(--accent); font-weight: 800; }
.stat .label { color: var(--muted); font-size: .95rem; margin-top: 2px; }
@media (max-width: 760px) {
	.stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
	.stat:nth-child(odd)::before { display: none; }
}

/* Sections */
.block { padding: 110px 0; }
.block-alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%); }
.section-head { max-width: 660px; margin-bottom: 52px; }
.section-head .kicker { margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }
#portfolio .section-head { max-width: none; }
@media (max-width: 760px) { .block { padding: 80px 0; } }

/* Portfolio */
.portfolio { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
@media (max-width: 860px) { .portfolio { grid-template-columns: 1fr; } }
.site-card {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
	display: flex; flex-direction: column;
	transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: var(--shadow); }
.site-card .browser { display: block; }
.site-card .shot img { transition: transform 6s ease; }
.site-card:hover .shot img { transform: translateY(-4%) scale(1.03); }
.site-card .body { padding: 26px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.site-card .tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent2); margin-bottom: 8px; }
.site-card h3 { font-size: 1.4rem; margin-bottom: 10px; }
.site-card p { color: var(--muted); font-size: .98rem; margin-bottom: 20px; }
.site-card .meta {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
	border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 20px; margin-top: auto;
}
.site-card .meta div { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.site-card .meta strong { display: block; color: var(--text); font-size: 1.2rem; margin-bottom: 3px; letter-spacing: -.01em; }
.visit { color: var(--accent-ink); font-weight: 600; font-size: .95rem; display: inline-flex; gap: 6px; align-items: center; }
.visit span { transition: transform .15s; }
.visit:hover span { transform: translateX(3px); }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.pillar .ic {
	width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 20px;
	background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.pillar h3 { font-size: 1.18rem; margin-bottom: 10px; }
.pillar p { color: var(--muted); font-size: .97rem; margin: 0; }
.block-story { background: var(--bg2); padding-top: 24px; }
.story { max-width: 780px; margin: 0 auto; font-size: 1.07rem; color: #463629; }
.story > * + * { margin-top: 0; }
.story h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin: 1.9em 0 .55em; color: var(--text); }
.story > h2:first-child { margin-top: 0; font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.story p { margin: 0 0 1.1em; }
.story figure { margin: 2em 0; }
.story img { border-radius: var(--radius); box-shadow: var(--shadow-sm); display: block; width: 100%; height: auto; }
.story ul { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 10px; }
.story li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px 14px 44px; position: relative; box-shadow: var(--shadow-sm); }
.story li::before { content: ""; position: absolute; left: 18px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.story a { color: var(--accent-ink); font-weight: 600; }
.legal .sep { margin: 0 8px; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--text); }

/* CTA */
.cta {
	position: relative; overflow: hidden; text-align: center;
	background: linear-gradient(135deg, var(--accent), var(--sky));
	color: #fff; box-shadow: var(--shadow);
	border: 0; border-radius: 28px; padding: 72px 40px;
}
.cta::before {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
	background-image: radial-gradient(rgba(255,255,255,.28) 1px, transparent 1px); background-size: 22px 22px;
	mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
	-webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}
.cta > * { position: relative; }
.cta .btn-primary { background: #fff; color: var(--accent-ink); }
.cta .btn-primary:hover { box-shadow: 0 10px 28px -8px rgba(60,20,0,.35); }
.cta h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 14px; }
.cta p { color: rgba(255,255,255,.92); max-width: 580px; margin: 0 auto 30px; font-size: 1.05rem; }
@media (max-width: 560px) { .cta { padding: 52px 22px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 72px 0 40px; color: var(--muted); font-size: .92rem; background: var(--bg2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.footer-brand .logo { margin-bottom: 18px; }
.footer-brand .logo img { height: 36px; }
.footer-brand p { max-width: 340px; }
.footer-col h4 { color: var(--text); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; padding-top: 28px; }
.rg { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.rg a { text-decoration: underline; text-underline-offset: 3px; }
.rg a:hover { color: var(--text); }
.badge18 {
	border: 2px solid var(--text); border-radius: 50%; width: 36px; height: 36px;
	display: grid; place-items: center; font-weight: 800; font-size: .78rem; color: var(--text);
}
.disclaimer { margin: 22px 0 0; font-size: .8rem; line-height: 1.7; max-width: 900px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Back to top */
.to-top {
	position: fixed; right: 24px; bottom: 24px; z-index: 40;
	width: 48px; height: 48px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--accent); color: var(--on-accent);
	box-shadow: 0 10px 24px -8px rgba(90, 45, 15, .45);
	opacity: 0; visibility: hidden; transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s, background .15s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-ink); transform: translateY(-2px); }
@media (max-width: 560px) { .to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; } }

/* Scroll reveal (only when JS is running) */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }
.js-reveal .portfolio .reveal:nth-child(2n).in, .js-reveal .pillars .reveal:nth-child(2).in { transition-delay: .08s; }
.js-reveal .pillars .reveal:nth-child(3).in { transition-delay: .16s; }

/* Inner pages and posts */
.page-main { padding: 80px 0 110px; min-height: 55vh; }
.page-head { margin-bottom: 36px; }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.entry-meta { color: var(--muted); font-size: .9rem; margin: 10px 0 0; }
.entry-thumb img { border-radius: var(--radius); margin-bottom: 32px; }
.entry-content { font-size: 1.06rem; color: #463629; }
.entry-content h2, .entry-content h3 { color: var(--text); margin: 1.8em 0 .6em; }
.entry-content a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1em; }
.entry-content blockquote { margin: 1.5em 0; padding: 4px 22px; border-left: 3px solid var(--accent); color: var(--muted); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-content .wp-block-button__link { background: var(--accent); color: var(--on-accent); border-radius: 12px; text-decoration: none; font-weight: 600; }
.alignwide { margin-left: -60px; margin-right: -60px; }
.aligncenter { margin-left: auto; margin-right: auto; display: block; }
.post-list { display: grid; gap: 22px; }
.post-card { box-shadow: var(--shadow-sm); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.post-card h2 { font-size: 1.4rem; margin: 6px 0 10px; }
.post-card p { color: var(--muted); }
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; }
.pagination .current { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

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