/* base.css — reset, CSS custom properties, typography base. */

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

html {
	-webkit-text-size-adjust: 100%;
	-moz-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	overflow-x: hidden;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
	margin: 0;
	padding: 0;
}

ul, ol {
	list-style: none;
}

img, picture, svg, video {
	max-width: 100%;
	display: block;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	background: none;
	border: none;
	cursor: pointer;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

:root {
	/* Colour palette — Phrontrow rugby-heritage navy/claret/cream. */
	--c-bg:            #0E1726;
	--c-surface:       #18222F;
	--c-surface2:      #22303F;
	--c-border:        #2D3B4B;
	--c-text:          #E5E8EE;
	--c-text-dim:      #8F99A6;
	--c-accent:        #7A1E2E;
	--c-accent-hover:  #8E2939;
	--c-accent-sec:    #E8DEC9;
	--c-special:       #3A0E18;
	--c-white:         #F3F5F8;
	--c-error:         #C8554F;
	--c-success:       #5D9A6E;

	/* Fonts */
	--f-heading: 'Cormorant Garamond', 'Libre Caslon', Georgia, serif;
	--f-body:    'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	/* Spacing (8px grid) */
	--s-4:   0.25rem;
	--s-8:   0.5rem;
	--s-12:  0.75rem;
	--s-16:  1rem;
	--s-24:  1.5rem;
	--s-32:  2rem;
	--s-40:  2.5rem;
	--s-48:  3rem;
	--s-64:  4rem;
	--s-80:  5rem;
	--s-96:  6rem;
	--s-128: 8rem;
	--s-160: 10rem;

	/* Radius — rugby-heritage angular */
	--r-sm: 2px;
	--r-md: 4px;
	--r-lg: 8px;

	/* Transitions */
	--ease:     cubic-bezier(0.22, 1, 0.36, 1);
	--ease-in:  cubic-bezier(0.4, 0, 0.2, 1);
	--dur:      320ms;
	--dur-long: 520ms;

	/* Layout */
	--max-w:             1180px;
	--header-h:          72px;
	--header-h-scrolled: 60px;
}

body {
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--f-body);
	font-size: 1rem;
	line-height: 1.7;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--f-heading);
	font-weight: 600;
	line-height: 1.15;
	color: var(--c-white);
	overflow-wrap: break-word;
}

p, li, td, th, blockquote, figcaption, label, span {
	overflow-wrap: break-word;
	word-wrap: break-word;
}

h1 {
	font-size: clamp(2.375rem, 5.25vw, 4rem);
	line-height: 1.08;
	letter-spacing: -0.005em;
}

h2 {
	font-size: clamp(1.75rem, 3.75vw, 2.625rem);
	line-height: 1.12;
}

h3 {
	font-size: clamp(1.1875rem, 2vw, 1.5rem);
	font-weight: 500;
}

h4 {
	font-size: 1.125rem;
	font-weight: 600;
}

p {
	margin-bottom: var(--s-16);
}

p:last-child {
	margin-bottom: 0;
}

strong, b {
	font-weight: 600;
	color: var(--c-white);
}

em, i {
	font-style: italic;
}

a {
	transition: color var(--dur) var(--ease);
}

a:hover {
	color: var(--c-accent);
}

/* Links inside prose get a subtle claret underline on hover. */
main p a,
.entry-content p a,
.legal-prose p a {
	color: var(--c-accent);
	border-bottom: 1px solid transparent;
	transition: border-color var(--dur) var(--ease);
}

main p a:hover,
.entry-content p a:hover,
.legal-prose p a:hover {
	border-bottom-color: var(--c-accent);
}

::selection {
	background: var(--c-accent);
	color: var(--c-white);
}

:focus-visible {
	outline: 2px solid var(--c-accent);
	outline-offset: 2px;
}

/* Skip link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--c-accent);
	color: var(--c-white);
	padding: var(--s-12) var(--s-16);
	z-index: 9999;
}

.skip-link:focus {
	left: var(--s-16);
	top: var(--s-16);
}
