/*
 * Black Week landing page (page-blackweek.php).
 * Loaded on that page only. Everything is scoped to .bw / .bw-*.
 * Colours and fonts follow the theme: black, white, Sunread gold #fdb514,
 * the SF UI Display family.
 */

html {
	--bw-header: 36px;
	--bw-gold: #fdb514;
}

html:has(body.bw-page) {
	scroll-behavior: smooth;
}

.bw {
	background: #000;
	color: #212529;
	font-family: "SF UI Display Light", "SF-Light", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

.bw-container {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 15px;
}

/* ---------- Hero ---------- */

.bw-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 82vh;
	padding: calc(var(--bw-header) + 60px) 20px 70px;
	background: #000;
	color: #fff;
	text-align: center;
	overflow: hidden;
}

.bw-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: .55;
}

.bw-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at center, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .78) 78%),
		linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 62%, #000 100%);
	pointer-events: none;
}

.bw-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1100px;
}

.bw-hero__eyebrow,
.bw-hero__tag {
	margin: 0;
	font-family: "SF Pro Display Regular", "SF UI Display Regular", sans-serif;
	font-size: 15px;
	letter-spacing: .32em;
	text-transform: uppercase;
	color: #fff;
}

.bw-hero__eyebrow {
	color: var(--bw-gold);
	font-size: 12px;
}

.bw-hero__title {
	margin: 18px 0 22px;
	font-family: "SF UI Display Bold", "SF-Bold", sans-serif;
	font-weight: normal;
	font-size: clamp(64px, 15.5vw, 190px);
	line-height: .86;
	letter-spacing: -.035em;
	text-transform: uppercase;
	color: #fff;
}

/* The theme colours a span inside a heading gold; "Week" uses that. */
.bw-hero__title span {
	display: inline-block;
	color: var(--bw-gold);
}

.bw-countdown {
	margin: 46px auto 0;
}

.bw-countdown[hidden] {
	display: none;
}

.bw-countdown__label {
	margin: 0 0 14px;
	font-family: "SF Pro Display Regular", "SF UI Display Regular", sans-serif;
	font-size: 12px;
	letter-spacing: .32em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .7);
}

.bw-countdown__clock {
	display: inline-flex;
	border: 1px solid rgba(255, 255, 255, .28);
	background: rgba(0, 0, 0, .45);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.bw-countdown__clock[hidden] {
	display: none;
}

.bw-countdown__unit {
	min-width: 104px;
	padding: 18px 10px 14px;
	border-left: 1px solid rgba(255, 255, 255, .28);
}

.bw-countdown__unit:first-child {
	border-left: 0;
}

.bw-countdown__unit span {
	display: block;
	font-family: "SF UI Display Thin", "SF UI Display Light", sans-serif;
	font-size: 56px;
	line-height: 1;
	color: var(--bw-gold);
	font-variant-numeric: tabular-nums;
}

.bw-countdown__unit small {
	display: block;
	margin-top: 8px;
	font-family: "SF Pro Display Regular", "SF UI Display Regular", sans-serif;
	font-size: 10px;
	letter-spacing: .28em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .7);
}

/* ---------- Newsletter sign-up (under the countdown) ---------- */

.bw-news {
	max-width: 520px;
	margin: 44px auto 0;
}

.bw-news__title {
	margin: 0 0 16px;
	font-family: "SF UI Display Light", "SF-Light", sans-serif;
	font-weight: normal;
	font-size: 24px;
	line-height: 1.25;
	color: #fff;
}

.bw-news__form {
	display: flex;
	margin: 0;
	border: 1px solid rgba(255, 255, 255, .55);
	background: rgba(0, 0, 0, .45);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.bw-news__label,
.bw-news__trap {
	position: absolute;
	left: -5000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.bw-news__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 54px;
	padding: 0 18px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #fff;
	font-family: "SF UI Display Light", "SF-Light", sans-serif;
	font-size: 17px;
	line-height: 54px;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.bw-news__input::placeholder {
	color: rgba(255, 255, 255, .6);
}

.bw-news__form:focus-within {
	border-color: var(--bw-gold);
}

.bw-news__btn {
	flex: 0 0 auto;
	height: 54px;
	padding: 0 26px;
	border: 0;
	border-radius: 0;
	background: var(--bw-gold);
	color: #000;
	font-family: "SF UI Display Light", "SF-Light", sans-serif;
	font-size: 17px;
	cursor: pointer;
	transition: background .3s ease-in-out;
}

.bw-news__btn:hover,
.bw-news__btn:focus {
	background: #fff;
}

.bw-news__btn[disabled] {
	opacity: .6;
	cursor: default;
}

.bw-news__msg {
	margin: 14px 0 0;
	font-size: 16px;
	line-height: 1.4;
	color: var(--bw-gold);
}

.bw-news__msg[hidden] {
	display: none;
}

.bw-news__msg.is-error {
	color: #ff9c8a;
}

.bw-news__terms {
	margin: 12px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: rgba(255, 255, 255, .6);
}

.bw-news__terms a {
	color: rgba(255, 255, 255, .8);
	text-decoration: underline;
}

.bw-btn {
	display: inline-block;
	margin-top: 44px;
	padding: 0 46px;
	height: 54px;
	line-height: 52px;
	border: 1px solid #fff;
	background: #fff;
	color: #000;
	font-family: "SF UI Display Light", "SF-Light", sans-serif;
	font-size: 20px;
	text-decoration: none;
	transition: background .3s ease-in-out, color .3s ease-in-out, border-color .3s ease-in-out;
}

.bw-btn:hover,
.bw-btn:focus {
	background: var(--bw-gold);
	border-color: var(--bw-gold);
	color: #000;
	text-decoration: none;
}

/* ---------- Category bar ---------- */

.bw-nav {
	position: sticky;
	top: var(--bw-header);
	z-index: 20;
	background: #000;
	border-top: 1px solid rgba(255, 255, 255, .14);
	border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.bw-nav__inner {
	display: flex;
	justify-content: center;
	gap: 6px;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 10px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.bw-nav__inner::-webkit-scrollbar {
	display: none;
}

.bw-nav a {
	flex: 0 0 auto;
	padding: 17px 14px 15px;
	font-family: "SF Pro Display Regular", "SF UI Display Regular", sans-serif;
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
	white-space: nowrap;
	color: #bbb;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: color .2s ease, border-color .2s ease;
}

.bw-nav a:hover,
.bw-nav a:focus {
	color: #fff;
	border-bottom-color: var(--bw-gold);
	text-decoration: none;
}

/* ---------- Sections ---------- */

.bw-section {
	padding: 90px 0 100px;
	background: #fff;
	scroll-margin-top: calc(var(--bw-header) + 50px);
}

.bw-section--dark {
	background: #000;
}

.bw-section__head {
	max-width: 720px;
	margin: 0 auto 56px;
	text-align: center;
}

.bw-section__eyebrow {
	margin: 0 0 14px;
	font-family: "SF Pro Display Regular", "SF UI Display Regular", sans-serif;
	font-size: 11px;
	letter-spacing: .32em;
	text-transform: uppercase;
	color: #9a6d00;
}

.bw-section--dark .bw-section__eyebrow {
	color: var(--bw-gold);
}

.bw-section__title {
	margin: 0 0 14px;
	font-family: "SF UI Display Light", "SF-Light", sans-serif;
	font-weight: normal;
	font-size: clamp(34px, 5vw, 56px);
	line-height: 1.05;
	color: #000;
}

.bw-section--dark .bw-section__title {
	color: #fff;
}

.bw-section__lead {
	margin: 0;
	font-size: 18px;
	line-height: 1.5;
	color: #6b6c6c;
}

.bw-section--dark .bw-section__lead {
	color: rgba(255, 255, 255, .7);
}

/* ---------- Product grid ---------- */

.bw-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
}

.bw-card {
	position: relative;
	flex: 0 0 calc((100% - 48px) / 3);
	min-width: 0;
	background: #fff;
	border: 1px solid #ececec;
	transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}

.bw-section--dark .bw-card {
	border-color: #fff;
}

.bw-card:hover {
	border-color: #000;
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
}

.bw-section--dark .bw-card:hover {
	border-color: var(--bw-gold);
	box-shadow: 0 18px 40px rgba(253, 181, 20, .18);
}

.bw-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 26px 22px 28px;
	text-align: center;
	color: inherit;
	text-decoration: none;
}

.bw-card__link:hover,
.bw-card__link:focus {
	color: inherit;
	text-decoration: none;
}

.bw-card__img {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	margin-bottom: 18px;
	overflow: hidden;
}

.bw-card__img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform .5s ease;
}

.bw-card:hover .bw-card__img img {
	transform: scale(1.06);
}

.bw-card__title {
	margin: 0 0 10px;
	font-family: "SF UI Display Light", "SF-Light", sans-serif;
	font-weight: normal;
	font-size: 21px;
	line-height: 1.2;
	color: #000;
}

.bw-card__price {
	display: block;
	margin-top: auto;
	font-family: "SF UI Display Bold", "SF-Bold", sans-serif;
	font-size: 18px;
	line-height: 1.6;
	color: #6b6c6c;
}

.bw-card__price del {
	margin-right: 6px;
	font-family: "SF UI Display Light", "SF-Light", sans-serif;
	color: #9a9a9a;
}

.bw-card__price ins {
	text-decoration: none;
	color: #000;
}

.bw-card__price .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.bw-card__cta {
	display: inline-block;
	margin-top: 14px;
	font-size: 17px;
	color: #6b6c6c;
	transition: color .2s ease;
}

.bw-card__cta::after {
	content: "";
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-left: 12px;
	border-top: 2px solid var(--bw-gold);
	border-right: 2px solid var(--bw-gold);
	transform: translateY(-1px) rotate(45deg);
	transition: margin-left .2s ease;
}

.bw-card:hover .bw-card__cta {
	color: #000;
}

.bw-card:hover .bw-card__cta::after {
	margin-left: 18px;
}

.bw-card__rank {
	position: absolute;
	top: 14px;
	left: 18px;
	z-index: 1;
	font-family: "SF UI Display Thin", "SF UI Display Light", sans-serif;
	font-size: 40px;
	line-height: 1;
	color: #9a6d00;
}

.bw-card__badge {
	position: absolute;
	top: 16px;
	right: 0;
	z-index: 1;
	padding: 6px 12px 5px;
	background: #000;
	color: var(--bw-gold);
	font-family: "SF Pro Display Regular", "SF UI Display Regular", sans-serif;
	font-size: 11px;
	letter-spacing: .16em;
	text-transform: uppercase;
}

/* Fade-in, only when the script has switched it on. */
.bw-reveal .bw-card {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity .6s ease, transform .6s ease, border-color .3s ease, box-shadow .3s ease;
}

.bw-reveal .bw-card.is-in {
	opacity: 1;
	transform: none;
}

.bw-reveal .bw-card.is-in:hover {
	transform: translateY(-4px);
}

/* ---------- Outro ---------- */

.bw-outro {
	padding: 100px 0 110px;
	background: #000;
	color: #fff;
	text-align: center;
	border-top: 1px solid rgba(255, 255, 255, .14);
}

.bw-outro__title {
	margin: 0 0 12px;
	font-family: "SF UI Display Light", "SF-Light", sans-serif;
	font-weight: normal;
	font-size: clamp(30px, 4.4vw, 48px);
	color: #fff;
}

.bw-outro__lead {
	margin: 0;
	font-size: 18px;
	color: rgba(255, 255, 255, .7);
}

.bw-outro .bw-btn {
	margin-top: 34px;
}

/* ---------- Smaller screens ---------- */

@media (max-width: 991px) {
	.bw-grid {
		gap: 16px;
	}

	.bw-card {
		flex-basis: calc((100% - 16px) / 2);
	}

	.bw-section {
		padding: 64px 0 72px;
	}

	.bw-section__head {
		margin-bottom: 38px;
	}

	.bw-nav__inner {
		justify-content: flex-start;
	}
}

@media (max-width: 575px) {
	.bw-hero {
		min-height: 78vh;
		padding-left: 15px;
		padding-right: 15px;
	}

	.bw-hero__title {
		font-size: 25vw;
	}

	.bw-hero__title span {
		display: block;
	}

	.bw-hero__tag {
		font-size: 11px;
		letter-spacing: .24em;
		line-height: 1.7;
	}

	.bw-countdown {
		margin-top: 34px;
	}

	.bw-countdown__unit {
		min-width: 0;
		width: 21vw;
		max-width: 86px;
		padding: 14px 4px 11px;
	}

	.bw-countdown__unit span {
		font-size: 34px;
	}

	.bw-countdown__unit small {
		font-size: 8px;
		letter-spacing: .16em;
	}

	.bw-btn {
		margin-top: 34px;
		padding: 0 34px;
		font-size: 18px;
	}

	.bw-news {
		margin-top: 34px;
	}

	.bw-news__title {
		font-size: 20px;
	}

	.bw-news__input {
		padding: 0 14px;
		font-size: 16px;
	}

	.bw-news__btn {
		padding: 0 16px;
		font-size: 16px;
	}

	.bw-grid {
		gap: 10px;
	}

	.bw-card {
		flex-basis: calc((100% - 10px) / 2);
	}

	.bw-card__link {
		padding: 16px 10px 18px;
	}

	.bw-card__img {
		margin-bottom: 10px;
	}

	.bw-card__title {
		font-size: 16px;
	}

	.bw-card__price {
		font-size: 15px;
	}

	.bw-card__cta {
		font-size: 14px;
	}

	.bw-card__cta::after {
		width: 7px;
		height: 7px;
		margin-left: 8px;
	}

	.bw-card__rank {
		top: 8px;
		left: 10px;
		font-size: 26px;
	}

	.bw-card__badge {
		top: 10px;
		padding: 4px 7px 3px;
		font-size: 9px;
		letter-spacing: .1em;
	}

	.bw-section__lead {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html:has(body.bw-page) {
		scroll-behavior: auto;
	}

	.bw-card,
	.bw-card__img img {
		transition: none;
	}
}
