/**
 * Wareoff Distribution Theme: public website (0.2.0).
 *
 * The homepage sections, photo slideshow, page banners and the page
 * templates (wide, contact, questions and answers, legal, become a
 * retailer). Loaded on public pages only; tokens come from variables.css.
 */

/* Anchors land below the sticky header ----------------------------------- */
[id] {
	scroll-margin-top: calc(var(--wot-header-height) + var(--wot-space-4));
}

/* Slideshow (component "slideshow") --------------------------------------- */
.wot-slideshow {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background: var(--wot-green-950);
}

.wot-slideshow__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1.4s var(--wot-ease), visibility 0s linear 1.4s;
}

.wot-slideshow__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 1.4s var(--wot-ease), visibility 0s;
}

.wot-slideshow__slide .wot-photo {
	width: 100%;
	height: 100%;
}

/* The slow zoom runs only while the script runs the slideshow, so a page
   without JavaScript shows a still photo. */
.wot-slideshow.is-running .wot-slideshow__slide.is-active .wot-photo__img,
.wot-slideshow.is-paused .wot-slideshow__slide.is-active .wot-photo__img {
	animation: wot-slow-zoom calc(var(--wot-slide-time, 7s) + 1.4s) linear both;
}

.wot-slideshow.is-running .wot-slideshow__slide:nth-child(even).is-active .wot-photo__img,
.wot-slideshow.is-paused .wot-slideshow__slide:nth-child(even).is-active .wot-photo__img {
	animation-name: wot-slow-zoom-out;
}

.wot-slideshow.is-paused .wot-photo__img {
	animation-play-state: paused !important;
}

@keyframes wot-slow-zoom {
	from {
		transform: scale(1) translate3d(0, 0, 0);
	}

	to {
		transform: scale(1.12) translate3d(-1.5%, -1%, 0);
	}
}

@keyframes wot-slow-zoom-out {
	from {
		transform: scale(1.12) translate3d(1.5%, 0, 0);
	}

	to {
		transform: scale(1) translate3d(0, 0, 0);
	}
}

.wot-slideshow__toggle {
	position: absolute;
	left: var(--wot-space-3);
	bottom: var(--wot-space-3);
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wot-touch);
	height: var(--wot-touch);
	padding: 0;
	border: 1px solid rgb(255 255 255 / 0.6);
	border-radius: var(--wot-radius-pill);
	background: rgb(6 69 45 / 0.72);
	color: var(--wot-ink-inverse);
	cursor: pointer;
}

.wot-slideshow__toggle:hover {
	background: var(--wot-green-950);
}

.wot-slideshow__toggle[hidden] {
	display: none;
}

.wot-slideshow__play,
.wot-slideshow__toggle[aria-pressed="true"] .wot-slideshow__pause {
	display: none;
}

.wot-slideshow__pause,
.wot-slideshow__toggle[aria-pressed="true"] .wot-slideshow__play {
	display: inline-flex;
}

@media (prefers-reduced-motion: reduce) {
	.wot-slideshow__slide {
		transition: none;
	}

	.wot-slideshow .wot-photo__img {
		animation: none !important;
	}
}

/* Homepage: top banner ---------------------------------------------------- */
.wot-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 30rem;
	overflow: hidden;
	background: var(--wot-green-950);
	color: var(--wot-ink-inverse);
	isolation: isolate;
}

/* Dark green wash so white text stays readable on any photo. */
.wot-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(90deg, rgb(6 69 45 / 0.94) 0%, rgb(6 69 45 / 0.82) 45%, rgb(6 69 45 / 0.35) 100%),
		linear-gradient(0deg, rgb(6 69 45 / 0.55) 0%, rgb(6 69 45 / 0) 40%);
	pointer-events: none;
}

.wot-hero--plain {
	background: linear-gradient(135deg, var(--wot-green-950), var(--wot-green-900));
}

.wot-hero__inner {
	position: relative;
	z-index: 2;
	padding-block: var(--wot-space-8) calc(var(--wot-space-8) + var(--wot-space-5));
}

.wot-hero__content {
	max-width: 46rem;
}

.wot-hero__title {
	margin: 0;
	color: var(--wot-ink-inverse);
	font-size: var(--wot-text-4xl);
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.wot-hero__text {
	margin: var(--wot-space-4) 0 0;
	color: rgb(255 255 255 / 0.9);
	font-size: var(--wot-text-lg);
}

.wot-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wot-space-3);
	margin-top: var(--wot-space-6);
}

/* The slideshow credit sits above the pause button's row. */
.wot-hero .wot-photo__credit {
	bottom: var(--wot-space-3);
}

@media (max-width: 767px) {
	.wot-hero {
		min-height: 0;
	}

	.wot-hero::before {
		background: linear-gradient(0deg, rgb(6 69 45 / 0.95) 0%, rgb(6 69 45 / 0.8) 55%, rgb(6 69 45 / 0.55) 100%);
	}

	.wot-hero__actions .wot-button {
		width: 100%;
	}
}

@media (min-width: 1024px) {
	.wot-hero {
		min-height: 36rem;
	}

	.wot-hero__title {
		font-size: var(--wot-text-5xl);
	}

	.wot-hero__text {
		font-size: var(--wot-text-xl);
	}
}

/* Homepage: promises strip ------------------------------------------------ */
.wot-promises {
	border-bottom: 1px solid var(--wot-line);
	background: var(--wot-surface);
}

.wot-promises__list {
	display: grid;
	gap: var(--wot-space-4);
	margin-block: 0;
	padding-block: var(--wot-space-5);
	list-style: none;
	grid-template-columns: 1fr;
}

.wot-promises__item {
	display: flex;
	gap: var(--wot-space-3);
	align-items: flex-start;
}

.wot-promises__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: var(--wot-radius-pill);
	background: var(--wot-green-50);
	color: var(--wot-green-900);
}

.wot-promises__title {
	display: block;
	font-weight: 600;
}

.wot-promises__text {
	display: block;
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-sm);
}

@media (min-width: 640px) {
	.wot-promises__list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.wot-promises__list {
		grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	}
}

/* Homepage sections and their headings ------------------------------------ */
.wot-home-section {
	padding-block: var(--wot-space-7);
}

.wot-home-section--tinted {
	border-block: 1px solid var(--wot-line);
	background: var(--wot-surface);
}

.wot-section-head {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wot-space-2) var(--wot-space-4);
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: var(--wot-space-5);
}

.wot-section-head--center {
	justify-content: center;
	text-align: center;
}

.wot-section-head__title {
	margin: 0;
	font-size: var(--wot-text-2xl);
}

.wot-section-head__link {
	display: inline-flex;
	gap: var(--wot-space-1);
	align-items: center;
	min-height: var(--wot-touch);
	font-weight: 600;
}

@media (min-width: 1024px) {
	.wot-home-section {
		padding-block: var(--wot-space-8);
	}

	.wot-section-head__title {
		font-size: var(--wot-text-3xl);
	}
}

/* Homepage: categories ---------------------------------------------------- */
.wot-category-row {
	display: grid;
	gap: var(--wot-space-4);
	margin: 0;
	padding: 0;
	list-style: none;
	grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}

.wot-category-row > li,
.wot-category-row .wot-category-tile {
	height: 100%;
}

/* Phones: one row that scrolls sideways. */
@media (max-width: 767px) {
	.wot-category-row {
		grid-auto-columns: minmax(11rem, 62%);
		grid-auto-flow: column;
		grid-template-columns: none;
		margin-inline: calc(-1 * var(--wot-gutter));
		padding: 0 var(--wot-gutter) var(--wot-space-3);
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-padding-inline: var(--wot-gutter);
		scroll-snap-type: x mandatory;
	}

	.wot-category-row > li {
		scroll-snap-align: start;
	}
}

/* Homepage: products ------------------------------------------------------ */
/* Phones: four products, two by two. */
@media (max-width: 767px) {
	.wot-product-grid--home {
		gap: var(--wot-space-3);
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wot-product-grid--home > li:nth-child(n + 5) {
		display: none;
	}
}

/* Homepage: bulk orders band ---------------------------------------------- */
.wot-band {
	background: var(--wot-green-950);
	color: var(--wot-ink-inverse);
}

.wot-band__inner {
	display: grid;
	gap: var(--wot-space-6);
	align-items: center;
	padding-block: var(--wot-space-7);
}

.wot-band__media .wot-photo {
	aspect-ratio: 4 / 3;
	border-radius: var(--wot-radius-card);
}

.wot-band__title {
	margin: 0;
	color: var(--wot-ink-inverse);
	font-size: var(--wot-text-3xl);
	line-height: 1.15;
}

.wot-band__text {
	margin: var(--wot-space-3) 0 var(--wot-space-5);
	color: rgb(255 255 255 / 0.88);
	font-size: var(--wot-text-lg);
}

@media (min-width: 1024px) {
	.wot-band__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: var(--wot-space-8);
		padding-block: var(--wot-space-8);
	}

	.wot-band--plain .wot-band__inner {
		grid-template-columns: minmax(0, 46rem);
	}
}

/* Homepage: reasons ------------------------------------------------------- */
.wot-reasons {
	display: grid;
	gap: var(--wot-space-5);
	margin: 0;
	padding: 0;
	list-style: none;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.wot-reasons__item {
	padding: var(--wot-space-5);
	border: 1px solid var(--wot-line);
	border-radius: var(--wot-radius-card);
	background: var(--wot-surface);
}

.wot-reasons__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	margin-bottom: var(--wot-space-3);
	border-radius: var(--wot-radius-card);
	background: var(--wot-green-900);
	color: var(--wot-ink-inverse);
}

.wot-reasons__title {
	margin: 0 0 var(--wot-space-2);
	font-size: var(--wot-text-lg);
}

.wot-reasons__text {
	margin: 0;
	color: var(--wot-ink-muted);
}

/* Become a retailer (component "retailer-steps") -------------------------- */
/* The numbered list is .wot-howto (0.8.0: it was .wot-steps, the class of
   the order progress component, which it restyled on pages with both). */
.wot-steps-section {
	border-block: 1px solid var(--wot-line);
	background: var(--wot-green-50);
}

.wot-steps-section__inner {
	display: grid;
	gap: var(--wot-space-6);
	align-items: center;
	padding-block: var(--wot-space-7);
}

.wot-steps-section__title {
	margin: 0;
	font-size: var(--wot-text-3xl);
	line-height: 1.15;
}

.wot-steps-section__text {
	margin: var(--wot-space-3) 0 0;
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-lg);
}

.wot-howto {
	display: grid;
	gap: var(--wot-space-4);
	margin: var(--wot-space-5) 0 var(--wot-space-6);
	padding: 0;
	list-style: none;
	counter-reset: wot-step;
}

.wot-howto__item {
	position: relative;
	min-height: 2.5rem;
	padding-left: 3.5rem;
	counter-increment: wot-step;
}

.wot-howto__item::before {
	content: counter(wot-step);
	position: absolute;
	top: 0;
	left: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: var(--wot-radius-pill);
	background: var(--wot-green-900);
	color: var(--wot-ink-inverse);
	font-weight: 700;
}

.wot-howto__title {
	margin: 0;
	font-size: var(--wot-text-lg);
}

.wot-howto__text {
	margin: var(--wot-space-1) 0 0;
	color: var(--wot-ink-muted);
}

.wot-steps-section__media .wot-photo {
	aspect-ratio: 4 / 3;
	border-radius: var(--wot-radius-card);
}

@media (min-width: 1024px) {
	.wot-steps-section__inner {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		gap: var(--wot-space-8);
		padding-block: var(--wot-space-8);
	}

	.wot-steps-section--plain .wot-steps-section__inner {
		grid-template-columns: minmax(0, 46rem);
	}
}

/* Contact sales (component "contact-sales") ------------------------------- */
.wot-contact {
	padding-block: var(--wot-space-7);
}

.wot-contact__inner {
	display: grid;
	gap: var(--wot-space-6);
	align-items: start;
}

.wot-contact__title {
	margin: 0;
	font-size: var(--wot-text-3xl);
}

.wot-contact__text {
	margin: var(--wot-space-3) 0 var(--wot-space-5);
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-lg);
}

.wot-contact__list {
	display: grid;
	gap: var(--wot-space-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.wot-contact__list > li {
	display: flex;
	gap: var(--wot-space-3);
	align-items: flex-start;
}

.wot-contact__list > li > .wot-icon {
	flex: none;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0.6rem;
	border-radius: var(--wot-radius-pill);
	background: var(--wot-green-50);
	color: var(--wot-green-900);
}

.wot-contact__label {
	display: block;
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-sm);
}

.wot-contact__list a {
	display: inline-flex;
	gap: var(--wot-space-1);
	align-items: center;
	min-height: 1.75rem;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.wot-contact__form {
	padding: var(--wot-space-5);
	border: 1px solid var(--wot-line);
	border-radius: var(--wot-radius-card);
	background: var(--wot-surface);
	box-shadow: var(--wot-shadow-raised);
}

@media (min-width: 1024px) {
	.wot-contact {
		padding-block: var(--wot-space-8);
	}

	.wot-contact__inner {
		grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
		gap: var(--wot-space-8);
	}

	.wot-contact--no-form .wot-contact__inner {
		grid-template-columns: minmax(0, 46rem);
	}

	.wot-contact__form {
		padding: var(--wot-space-6);
	}
}

/* The plugin's enquiry form, as the theme draws it ------------------------ */
.wot-enquiry__heading {
	margin: 0 0 var(--wot-space-4);
	font-size: var(--wot-text-2xl);
}

.wot-enquiry .wot-notice {
	margin-bottom: var(--wot-space-4);
}

.wot-enquiry__fields {
	display: grid;
	gap: 0 var(--wot-space-4);
	grid-template-columns: 1fr;
}

.wot-enquiry__field--message {
	grid-column: 1 / -1;
}

.wot-enquiry__note {
	margin: 0 0 var(--wot-space-4);
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-sm);
}

.wot-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (min-width: 640px) {
	.wot-enquiry__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Page banner (component "page-banner") ----------------------------------- */
.wot-banner {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 18rem;
	overflow: hidden;
	background: linear-gradient(135deg, var(--wot-green-950), var(--wot-green-900));
	color: var(--wot-ink-inverse);
	isolation: isolate;
}

/* No z-index here: the credit inside must stack above the green wash. */
.wot-banner__photo {
	position: absolute;
	inset: 0;
}

.wot-banner::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(0deg, rgb(6 69 45 / 0.95) 0%, rgb(6 69 45 / 0.7) 50%, rgb(6 69 45 / 0.4) 100%);
	pointer-events: none;
}

.wot-banner--plain::before {
	display: none;
}

.wot-banner__inner {
	position: relative;
	z-index: 2;
	padding-block: var(--wot-space-8) var(--wot-space-6);
}

.wot-banner__eyebrow {
	margin: 0 0 var(--wot-space-2);
	color: rgb(255 255 255 / 0.85);
	font-size: var(--wot-text-sm);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wot-banner__title {
	max-width: 46rem;
	margin: 0;
	color: var(--wot-ink-inverse);
	font-size: var(--wot-text-4xl);
	line-height: 1.1;
}

.wot-banner__lead {
	max-width: 42rem;
	margin: var(--wot-space-3) 0 0;
	color: rgb(255 255 255 / 0.9);
	font-size: var(--wot-text-lg);
}

/* Credit moves to the top so it does not sit on the title. */
.wot-banner .wot-photo__credit {
	top: var(--wot-space-2);
	bottom: auto;
}

@media (min-width: 1024px) {
	.wot-banner {
		min-height: 24rem;
	}

	.wot-banner__title {
		font-size: var(--wot-text-5xl);
	}
}

/* Page templates ---------------------------------------------------------- */
.wot-section--tight {
	padding-block: var(--wot-space-6) 0;
}

.wot-prose--wide {
	max-width: calc(var(--wot-container-text) + 2 * var(--wot-gutter));
	margin-inline: auto;
	padding-inline: var(--wot-gutter);
}

.wot-prose--wide > .alignwide {
	width: min(calc(100vw - 2 * var(--wot-gutter)), var(--wot-container));
	max-width: none;
	margin-inline: 50%;
	transform: translateX(-50%);
}

.wot-prose--wide > .alignfull {
	width: 100vw;
	max-width: none;
	margin-inline: 50%;
	transform: translateX(-50%);
}

.wot-page-header__meta {
	margin: var(--wot-space-2) 0 0;
	color: var(--wot-ink-muted);
	font-size: var(--wot-text-sm);
}

/* Questions and answers: Details blocks as an accordion. */
.wot-faq details {
	margin: 0;
	border-bottom: 1px solid var(--wot-line);
}

.wot-faq details:first-of-type {
	border-top: 1px solid var(--wot-line);
}

.wot-faq summary {
	position: relative;
	display: block;
	min-height: var(--wot-touch);
	padding: var(--wot-space-4) var(--wot-space-7) var(--wot-space-4) 0;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.wot-faq summary::-webkit-details-marker {
	display: none;
}

.wot-faq summary::after {
	content: "";
	position: absolute;
	top: 50%;
	right: var(--wot-space-2);
	width: 0.6rem;
	height: 0.6rem;
	border-right: 2px solid currentcolor;
	border-bottom: 2px solid currentcolor;
	transform: translateY(-70%) rotate(45deg);
	transition: transform var(--wot-duration) var(--wot-ease);
}

.wot-faq details[open] > summary::after {
	transform: translateY(-30%) rotate(-135deg);
}

.wot-faq details > :not(summary) {
	margin-top: 0;
	padding-bottom: var(--wot-space-3);
	color: var(--wot-ink);
}

.wot-ask {
	margin-top: var(--wot-space-7);
	padding: var(--wot-space-5);
	border-radius: var(--wot-radius-card);
	background: var(--wot-green-50);
}

.wot-ask__title {
	margin: 0 0 var(--wot-space-2);
	font-size: var(--wot-text-xl);
}

.wot-ask__text {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wot-space-2) var(--wot-space-5);
	margin: 0 0 var(--wot-space-4);
}

.wot-ask__text a {
	display: inline-flex;
	gap: var(--wot-space-2);
	align-items: center;
	min-height: var(--wot-touch);
	font-weight: 600;
}

/* Legal pages: contents list. */
.wot-toc {
	margin-bottom: var(--wot-space-6);
	padding: var(--wot-space-4) var(--wot-space-5);
	border: 1px solid var(--wot-line);
	border-radius: var(--wot-radius-card);
	background: var(--wot-surface);
}

.wot-toc__title {
	margin: 0 0 var(--wot-space-2);
	font-size: var(--wot-text-base);
}

.wot-toc__list {
	margin: 0;
	padding-left: var(--wot-space-5);
}

.wot-toc__list a {
	display: inline-block;
	padding-block: var(--wot-space-1);
}

.wot-prose--legal {
	font-size: var(--wot-text-base);
}

/* Component reference page: boxes for the photo components. */
.wot-ref-slideshow {
	position: relative;
	height: 18rem;
	margin-bottom: var(--wot-space-4);
	border-radius: var(--wot-radius-card);
	overflow: hidden;
}

.wot-ref-photo {
	max-width: 30rem;
	height: 14rem;
	margin-bottom: var(--wot-space-4);
}

.wot-ref-photo .wot-photo {
	height: 100%;
	border-radius: var(--wot-radius-card);
}
