/* ==========================================================================
   Profit Sports Betting - Design System
   Modern foundation layer. Loaded AFTER main.min.css so it wins on cascade.
   New components use the .psb- prefix so legacy CSS never targets them.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
	/* Brand - deepened from the existing purple, kept recognisable */
	--psb-purple-900: #1F1230;
	--psb-purple-800: #2E1A47;
	--psb-purple-700: #3D2260;
	--psb-purple-600: #5B2E8C;
	--psb-purple-500: #7B45B0;
	--psb-purple-100: #EFE8F7;

	/* Accent - "profit" green, used sparingly for wins and CTAs */
	--psb-green-600: #0E9F6E;
	--psb-green-500: #10B981;
	--psb-green-100: #E6F6F0;

	/* Heritage gold, retained from the existing identity */
	--psb-gold-600: #B8863B;
	--psb-gold-500: #D4A24C;
	--psb-gold-100: #FBF4E7;

	/* Neutrals */
	--psb-ink:        #14101A;
	--psb-ink-soft:   #3F3A49;
	--psb-muted:      #6B6577;
	--psb-line:       #E4E1E9;
	--psb-surface:    #FFFFFF;
	--psb-surface-2:  #F7F6F9;
	--psb-surface-3:  #EFEDF3;

	/* Semantic */
	--psb-bg:        var(--psb-surface);
	--psb-fg:        var(--psb-ink);
	--psb-brand:     var(--psb-purple-600);
	--psb-brand-ink: #FFFFFF;
	--psb-accent:    var(--psb-green-500);

	/* Typography */
	--psb-font-display: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--psb-font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

	/* Type scale - fluid, 1.25 ratio */
	--psb-text-xs:   0.78rem;
	--psb-text-sm:   0.875rem;
	--psb-text-base: 1rem;
	--psb-text-lg:   clamp(1.06rem, 0.4vw + 0.98rem, 1.19rem);
	--psb-text-xl:   clamp(1.28rem, 0.7vw + 1.14rem, 1.5rem);
	--psb-text-2xl:  clamp(1.55rem, 1.2vw + 1.3rem, 2rem);
	--psb-text-3xl:  clamp(1.9rem, 2vw + 1.45rem, 2.65rem);
	--psb-text-4xl:  clamp(2.3rem, 3.2vw + 1.6rem, 3.6rem);

	/* Spacing - 4px base */
	--psb-1:  0.25rem;
	--psb-2:  0.5rem;
	--psb-3:  0.75rem;
	--psb-4:  1rem;
	--psb-5:  1.5rem;
	--psb-6:  2rem;
	--psb-7:  2.5rem;
	--psb-8:  3rem;
	--psb-9:  4rem;
	--psb-10: 5rem;
	--psb-11: 6.5rem;

	/* Layout */
	--psb-container: 1200px;
	--psb-container-narrow: 760px;
	--psb-gutter: clamp(1rem, 4vw, 2rem);

	/* Radius */
	--psb-r-sm: 6px;
	--psb-r-md: 10px;
	--psb-r-lg: 16px;
	--psb-r-pill: 999px;

	/* Elevation - purple-tinted so shadows feel part of the palette */
	--psb-shadow-sm: 0 1px 2px rgba(31, 18, 48, .06), 0 1px 3px rgba(31, 18, 48, .08);
	--psb-shadow-md: 0 4px 12px rgba(31, 18, 48, .08), 0 2px 4px rgba(31, 18, 48, .05);
	--psb-shadow-lg: 0 12px 32px rgba(31, 18, 48, .12), 0 4px 8px rgba(31, 18, 48, .06);

	/* Motion */
	--psb-ease: cubic-bezier(.2, .7, .3, 1);
	--psb-fast: 140ms;
	--psb-med:  240ms;

	--psb-header-h: 64px;
}

/* --------------------------------------------------------------------------
   2. Base / reset corrections over the legacy sheet
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* The legacy sheet sets `html{font-size:62.5%}` (the old 10px trick), which
   silently shrank every rem-based token here to 62.5% of its intended size.
   Legacy CSS contains no real rem units (all 2272 sizes are px), so restoring
   the browser default is safe and fixes the whole scale at once. */
html {
	font-size: 100%;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}
}

body {
	font-family: var(--psb-font-body);
	font-size: var(--psb-text-base);
	line-height: 1.65;
	color: var(--psb-fg);
	background: var(--psb-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img, picture, video, canvas, svg {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Keep the legacy Bootstrap grid from forcing horizontal scroll */
.row { margin-left: 0; margin-right: 0; }

/* The Customizer's custom-background setting paints <body> cream via an
   inline `body.custom-background` rule, which outranks any body rule here.
   The redesigned layout owns its own canvas instead, so that setting is
   left untouched but never shows through. */
.psb-main {
	background: var(--psb-bg);
	display: block;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
/* Note: deliberately no `color` here. Headings inherit from their section,
   so a dark section turns its headings light without a specificity fight. */
.psb h1, .psb h2, .psb h3, .psb h4, .psb h5, .psb h6,
.psb-title, .psb-section__title {
	font-family: var(--psb-font-display);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 0 0 var(--psb-4);
	text-transform: none;
}

.psb-title--xl { font-size: var(--psb-text-4xl); letter-spacing: -0.03em; }
.psb-title--lg { font-size: var(--psb-text-3xl); }
.psb-title--md { font-size: var(--psb-text-2xl); }
.psb-title--sm { font-size: var(--psb-text-xl); }

.psb-lede {
	font-size: var(--psb-text-lg);
	color: var(--psb-ink-soft);
	line-height: 1.7;
	max-width: 62ch;
}

.psb-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--psb-2);
	font-family: var(--psb-font-display);
	font-size: var(--psb-text-xs);
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--psb-purple-600);
	margin-bottom: var(--psb-3);
}

.psb-eyebrow::before {
	content: "";
	width: 22px;
	height: 2px;
	background: var(--psb-gold-500);
	border-radius: 2px;
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.psb-container {
	width: 100%;
	max-width: var(--psb-container);
	margin-inline: auto;
	padding-inline: var(--psb-gutter);
}

.psb-container--narrow { max-width: var(--psb-container-narrow); }

/* Two adjacent sections each contribute padding, so the gap between them is
   double this value. Kept deliberately modest for that reason. */
.psb-section { padding-block: clamp(var(--psb-6), 3.6vw, var(--psb-8)); }
.psb-section--tight { padding-block: var(--psb-5); }
.psb-section--flush-top { padding-top: 0; }
.psb-section--alt { background: var(--psb-surface-2); }
.psb-section--dark {
	background: var(--psb-purple-800);
	color: #F3F0F8;
}
.psb-section--dark h1,
.psb-section--dark h2,
.psb-section--dark h3,
.psb-section--dark h4 { color: #FFFFFF; }
.psb-section--dark .psb-lede { color: #C9C0DA; }

/* Light sections keep the ink colour explicitly, so nothing depends on
   the browser default. */
.psb-section:not(.psb-section--dark) h1,
.psb-section:not(.psb-section--dark) h2,
.psb-section:not(.psb-section--dark) h3,
.psb-section:not(.psb-section--dark) h4 { color: var(--psb-ink); }

.psb-section__head {
	max-width: 68ch;
	margin-bottom: var(--psb-6);
}

.psb-section__head--center {
	margin-inline: auto;
	text-align: center;
}

.psb-section__head--center .psb-lede { margin-inline: auto; }
.psb-section__head--center .psb-eyebrow { justify-content: center; }

.psb-grid { display: grid; gap: var(--psb-5); }
.psb-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.psb-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.psb-grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }

.psb-stack > * + * { margin-top: var(--psb-4); }
.psb-cluster {
	display: flex;
	flex-wrap: wrap;
	gap: var(--psb-3);
	align-items: center;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.psb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--psb-2);
	font-family: var(--psb-font-display);
	font-size: var(--psb-text-sm);
	font-weight: 600;
	letter-spacing: .01em;
	line-height: 1;
	padding: 0.85rem 1.5rem;
	border-radius: var(--psb-r-md);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background var(--psb-fast) var(--psb-ease),
	            color var(--psb-fast) var(--psb-ease),
	            border-color var(--psb-fast) var(--psb-ease),
	            transform var(--psb-fast) var(--psb-ease),
	            box-shadow var(--psb-fast) var(--psb-ease);
}

.psb-btn:hover { transform: translateY(-1px); text-decoration: none; }
.psb-btn:active { transform: translateY(0); }

.psb-btn--primary {
	background: var(--psb-purple-600);
	color: #fff;
	box-shadow: var(--psb-shadow-sm);
}
.psb-btn--primary:hover {
	background: var(--psb-purple-700);
	color: #fff;
	box-shadow: var(--psb-shadow-md);
}

.psb-btn--accent {
	background: var(--psb-green-500);
	color: #fff;
	box-shadow: var(--psb-shadow-sm);
}
.psb-btn--accent:hover { background: var(--psb-green-600); color: #fff; }

.psb-btn--ghost {
	background: transparent;
	color: var(--psb-purple-600);
	border-color: var(--psb-line);
}
.psb-btn--ghost:hover {
	border-color: var(--psb-purple-600);
	background: var(--psb-purple-100);
	color: var(--psb-purple-700);
}

.psb-btn--on-dark {
	background: rgba(255,255,255,.1);
	color: #fff;
	border-color: rgba(255,255,255,.22);
	backdrop-filter: blur(6px);
}
.psb-btn--on-dark:hover { background: rgba(255,255,255,.18); color: #fff; }

.psb-btn--lg { font-size: var(--psb-text-base); padding: 1.05rem 1.9rem; }
.psb-btn--block { width: 100%; }

/* --------------------------------------------------------------------------
   6. Cards
   -------------------------------------------------------------------------- */
.psb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--psb-surface);
	border: 1px solid var(--psb-line);
	border-radius: var(--psb-r-lg);
	overflow: hidden;
	transition: transform var(--psb-med) var(--psb-ease),
	            box-shadow var(--psb-med) var(--psb-ease),
	            border-color var(--psb-med) var(--psb-ease);
}

.psb-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--psb-shadow-lg);
	border-color: transparent;
}

.psb-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--psb-surface-3);
	overflow: hidden;
}

.psb-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms var(--psb-ease);
}

.psb-card:hover .psb-card__media img { transform: scale(1.04); }

.psb-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--psb-2);
	padding: var(--psb-5);
	flex: 1;
}

.psb-card__title {
	font-family: var(--psb-font-display);
	font-size: var(--psb-text-lg);
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.01em;
	margin: 0;
	color: var(--psb-ink);
}

.psb-card__title a { color: inherit; text-decoration: none; }

/* Whole-card click target without nesting interactive elements */
.psb-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.psb-card__meta {
	font-size: var(--psb-text-xs);
	color: var(--psb-muted);
	letter-spacing: .02em;
}

.psb-card__excerpt {
	font-size: var(--psb-text-sm);
	color: var(--psb-ink-soft);
	line-height: 1.6;
	margin: 0;
}

.psb-card__foot {
	margin-top: auto;
	padding-top: var(--psb-3);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--psb-3);
}

.psb-tag {
	display: inline-block;
	align-self: flex-start; /* flex children stretch by default */
	max-width: 100%;
	font-size: var(--psb-text-xs);
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: .3rem .6rem;
	border-radius: var(--psb-r-sm);
	background: var(--psb-purple-100);
	color: var(--psb-purple-700);
}

.psb-tag--accent { background: var(--psb-green-100); color: var(--psb-green-600); }
.psb-tag--gold   { background: var(--psb-gold-100);  color: var(--psb-gold-600); }

/* --------------------------------------------------------------------------
   7. Forms
   -------------------------------------------------------------------------- */
.psb-field {
	width: 100%;
	font-family: inherit;
	font-size: var(--psb-text-base);
	color: var(--psb-ink);
	background: var(--psb-surface);
	padding: .8rem 1rem;
	border: 1px solid var(--psb-line);
	border-radius: var(--psb-r-md);
	transition: border-color var(--psb-fast) var(--psb-ease),
	            box-shadow var(--psb-fast) var(--psb-ease);
}

.psb-field::placeholder { color: var(--psb-muted); }

.psb-field:focus {
	outline: none;
	border-color: var(--psb-purple-500);
	box-shadow: 0 0 0 3px rgba(123, 69, 176, .16);
}

.psb-label {
	display: block;
	font-size: var(--psb-text-sm);
	font-weight: 600;
	margin-bottom: var(--psb-2);
	color: var(--psb-ink-soft);
}

/* --------------------------------------------------------------------------
   8. Accessibility
   -------------------------------------------------------------------------- */
.psb-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: var(--psb-3) var(--psb-5);
	background: var(--psb-purple-800);
	color: #fff;
	font-weight: 600;
	border-radius: 0 0 var(--psb-r-md) 0;
	text-decoration: none;
}

.psb-skip-link:focus {
	left: 0;
	color: #fff;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--psb-purple-500);
	outline-offset: 2px;
	border-radius: 3px;
}

.psb-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   9. Utilities
   -------------------------------------------------------------------------- */
.psb-center    { text-align: center; }
.psb-mt-0      { margin-top: 0; }
.psb-mb-0      { margin-bottom: 0; }
.psb-flow > * + * { margin-top: var(--psb-4); }
.psb-muted     { color: var(--psb-muted); }
