/*
 * Invictus base layer. Component styles live in Bricks global classes; this file
 * only holds what sits underneath them: fonts, a reset that matches the original
 * build (Tailwind preflight), and a few site-wide behaviours.
 */

/*
 * Font, body type, colours and focus ring are set natively in Bricks:
 * Bricks > Custom Fonts (Atkinson Hyperlegible) and Bricks > Theme Styles > Invictus.
 */

:root {
	color-scheme: light;
	--ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Reset (matches the original build) ---- */
html {
	-webkit-text-size-adjust: 100%;
}
body {
	margin: 0;
	font-feature-settings: "kern", "liga", "cv11";
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	word-spacing: 0.08em; /* readability setting; Theme Styles has no word-spacing control */
}
*,
::before,
::after {
	border: 0 solid;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
h1, h2, h3, h4, h5, h6 {
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}
a {
	color: inherit;
	text-decoration: inherit;
}
b, strong {
	font-weight: bolder;
}
ol, ul, menu {
	list-style: none;
}
img, svg, video, canvas, iframe, object {
	display: block;
	vertical-align: middle;
}
img, video {
	max-width: 100%;
	height: auto;
}
button, input, select, optgroup, textarea {
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
	background-color: transparent;
	border-radius: 0;
}
button {
	cursor: pointer;
}
blockquote {
	border: 0;
	font: inherit;
	margin: 0;
	padding: 0;
}
figure {
	margin: 0;
	width: auto;
}
/* Bricks' base stylesheet styles these (grey, smaller, centred, spaced); the design doesn't. */
figcaption {
	margin: 0;
	color: inherit;
	font-size: inherit;
	text-align: inherit;
}
label {
	margin-bottom: 0;
	color: inherit;
	font-weight: inherit;
}
address {
	font-style: normal;
}
table {
	border-collapse: collapse;
	text-indent: 0;
	border-color: inherit;
}
[hidden]:where(:not([hidden="until-found"])) {
	display: none !important;
}
svg:not([width]),
svg:not([height]) {
	min-width: 0;
	min-height: 0;
}

::selection {
	background-color: var(--bricks-color-navy);
	color: var(--bricks-color-ivory);
}
:focus-visible,
body.bricks-is-frontend :focus-visible {
	outline-offset: 3px; /* colour + width: Theme Styles > Typography > Focus outline */
	border-radius: 1px;
}
body.bricks-is-frontend :focus:not(:focus-visible) {
	outline: none;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border-width: 0;
}
.skip-link:focus {
	position: absolute;
	left: 1rem;
	top: 1rem;
	z-index: 60;
	width: auto;
	height: auto;
	margin: 0;
	clip-path: none;
	border-radius: 9999px;
	background: var(--bricks-color-navy);
	color: var(--bricks-color-ivory);
	padding: 0.75rem 1.25rem;
	font-size: 0.875rem;
	font-weight: 600;
}

/* Paper grain over the whole page. */
body::before {
	content: "";
	position: fixed;
	inset: -50%;
	z-index: 1;
	pointer-events: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	opacity: 0.045;
	mix-blend-mode: multiply;
}

/* ---- Scroll reveals (site.js adds .is-in; without JS everything is visible) ---- */
.js [data-reveal],
.js [data-reveal-group] > * {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s var(--ease-out-soft), transform 0.7s var(--ease-out-soft);
	transition-delay: var(--reveal-delay, 0s); /* set by site.js from data-reveal="0.6" */
}
.js [data-reveal-group] > * {
	transform: translateY(18px);
	transition-duration: 0.6s;
}
.js [data-reveal].is-in,
.js [data-reveal-group].is-in > * {
	opacity: 1;
	transform: none;
}

/* Hero headline: each line rises out of its own mask on load. */
@keyframes line-up {
	from { transform: translateY(115%); }
	to { transform: none; }
}
.js .hero-line > span {
	display: block;
	animation: line-up 0.95s var(--ease-out-soft) both;
}
.hero-line:nth-child(1) > span { animation-delay: 0.12s; }
.hero-line:nth-child(2) > span { animation-delay: 0.24s; }
.hero-line:nth-child(3) > span { animation-delay: 0.36s; }

/* ---- Marquees ---- */
@keyframes ticker {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
.ticker-track {
	display: inline-flex;
	white-space: nowrap;
	animation: ticker 38s linear infinite;
}
.marquee:hover .ticker-track,
.marquee:focus-within .ticker-track,
.marquee.is-paused .ticker-track {
	animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
	*,
	::before,
	::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
	.ticker-track {
		animation: none;
		transform: none;
	}
}

/* Builder only: Bricks gives empty elements a 90px drop-target box, which blows up the decorative
   dots, rules and table cells (they are empty on purpose and nothing is dropped into them). */
:is(span, td, th).brx-draggable:is(:empty, .brx-empty) {
	min-width: 0;
	min-height: 0;
}
