/*
Theme Name: Method
Description: A WordPress theme for the Method site and its product pages, with light and dark colours.
Version: 0.5.3
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: metapraxis
Domain Path: /languages
License: GPL-2.0-or-later
*/

:root {
	color-scheme: light;
	--ink: #171b2b;
	--muted: #4e5670;
	--accent: #3636c8;
	--link: #3636c8;
	--line: #dedfeb;
	--page: #f8f8fc;
	--surface: #fff;
	--on-accent: #fff;
	--white: var(--surface);
	--example: #e9e8fe;
	--example-ink: #373684;
	--example-line: #cccaed;
	--example-field: #b7b6ee;
	--danger: #9e1b29;
}

/* Dark colours follow the system setting unless the visitor picked light; the switch in the header sets data-theme. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--ink: #e8e9f3;
		--muted: #a3a8c3;
		--accent: #5656e8;
		--link: #a9a9ff;
		--line: #2c2f48;
		--page: #0f1020;
		--surface: #181a2e;
		--example: #1d1d3a;
		--example-ink: #c9c8ff;
		--example-line: #34346a;
		--example-field: #44448a;
		--danger: #ff8a96;
	}
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--ink: #e8e9f3;
	--muted: #a3a8c3;
	--accent: #5656e8;
	--link: #a9a9ff;
	--line: #2c2f48;
	--page: #0f1020;
	--surface: #181a2e;
	--example: #1d1d3a;
	--example-ink: #c9c8ff;
	--example-line: #34346a;
	--example-field: #44448a;
	--danger: #ff8a96;
}

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

/* In-page links (menus, «See the products») glide to their section. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	color: var(--ink);
	background: var(--page);
	font: 1rem/1.6 system-ui, sans-serif;
}

main { flex: 1 0 auto; }
a { color: var(--link); }
a:focus-visible { outline: 3px solid #4663ef; outline-offset: 4px; }
img { max-width: 100%; height: auto; }

.shell { width: min(calc(100% - 2.5rem), 71rem); margin-inline: auto; }

.skip-link {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 10;
	background: var(--surface);
	padding: 0.75rem;
	transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }

.site-header__inner, .site-footer__inner {
	min-height: 5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	padding-block: 0.75rem;
}

.site-header nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-header nav a:hover, .site-header nav a[aria-current] { text-decoration: underline; text-underline-offset: 0.25em; }

.brand {
	color: var(--ink);
	font-weight: 800;
	font-size: 1.25rem;
	letter-spacing: -0.04em;
	text-decoration: none;
}

.hero { padding-block: clamp(3.5rem, 8vw, 7.5rem) clamp(2.5rem, 5vw, 5rem); }

h1, h2, h3 { line-height: 1.12; text-wrap: balance; }

h1 {
	max-width: 16ch;
	margin: 0 0 1.5rem;
	font-size: clamp(2.25rem, 6.1vw, 5.5rem);
	letter-spacing: -0.055em;
}

h2 { margin: 0 0 1rem; font-size: clamp(1.7rem, 3.5vw, 2.75rem); letter-spacing: -0.035em; }
h3 { margin: 0 0 0.75rem; font-size: 1.2rem; }

.lead { max-width: 47ch; margin: 0 0 1rem; color: var(--muted); font-size: clamp(1.1rem, 2.2vw, 1.4rem); }

/* Home: a full-screen slider of the products. */
.home-slider {
	position: relative;
	display: grid;
	min-height: min(88vh, 760px);
	color: #fff;
	background: #0d0e1f;
	overflow: hidden;
	isolation: isolate;
}

.home-slider__head {
	position: relative;
	z-index: 3;
	grid-area: 1 / 1;
	align-self: start;
	padding-top: clamp(2rem, 6vw, 4.5rem);
	pointer-events: none;
}

.home-slider__head h1 {
	max-width: 18ch;
	margin: 0;
	color: rgb(255 255 255 / 72%);
	font-size: clamp(1.2rem, 2.6vw, 2rem);
	letter-spacing: -0.02em;
}

.home-slide {
	grid-area: 1 / 1;
	display: grid;
	align-items: center;
	padding-block: clamp(7rem, 16vw, 9rem) clamp(4rem, 8vw, 5rem);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}

.home-slide.is-on { opacity: 1; visibility: visible; transition: opacity 0.9s ease; }

.home-slide::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	transform: scale(1.06);
	transition: transform 7s ease-out;
}

.home-slide.is-on::before { transform: scale(1); }

.home-slide--quicksift::before {
	background:
		radial-gradient(55% 70% at 80% 30%, rgb(108 92 255 / 55%), transparent 70%),
		radial-gradient(40% 60% at 15% 90%, rgb(40 180 255 / 30%), transparent 70%),
		#0d0e1f;
}

.home-slide--jext::before {
	background:
		radial-gradient(55% 70% at 80% 30%, rgb(20 121 74 / 55%), transparent 70%),
		radial-gradient(40% 60% at 10% 90%, rgb(95 107 101 / 35%), transparent 70%),
		#0a0f0c;
}

.home-slide__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
	align-items: center;
	gap: clamp(2rem, 5vw, 4rem);
}

@media (max-width: 820px) {
	.home-slide__grid { grid-template-columns: 1fr; }
	.home-slide__art { display: none; }
}

.home-slide__kicker {
	margin: 0 0 0.75rem;
	color: rgb(255 255 255 / 64%);
	font: 600 0.85rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.home-slide__name {
	display: flex;
	align-items: center;
	gap: 0.3em;
	margin: 0 0 1rem;
	font-size: clamp(3rem, 9vw, 6.5rem);
	letter-spacing: -0.05em;
}

.home-slide__mark { width: 0.8em; height: auto; }
.home-slide__text { max-width: 42ch; margin: 0 0 1.75rem; color: rgb(255 255 255 / 80%); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.home-slide--jext .button { color: #0a3d25; }

.home-slide__art { transform: translateY(14px); opacity: 0; transition: transform 1s ease 0.25s, opacity 1s ease 0.25s; }
.home-slide.is-on .home-slide__art { transform: none; opacity: 1; }

.qs-art {
	display: grid;
	gap: 0.6rem;
	padding: 1.25rem;
	border: 1px solid rgb(255 255 255 / 14%);
	border-radius: 1.25rem;
	background: rgb(16 18 44 / 72%);
	box-shadow: 0 40px 120px -30px rgb(0 0 0 / 80%);
}

.qs-art__field {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.8rem 1rem;
	border: 2px solid #6c5cff;
	border-radius: 0.75rem;
	font-size: 1.05rem;
}

.qs-art__field b { color: #7ee0a6; font: 600 0.9rem ui-monospace, monospace; }
.qs-art__row { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.4rem; color: rgb(255 255 255 / 85%); }
.qs-art__row i { width: 2.25rem; height: 2.25rem; border-radius: 0.5rem; background: linear-gradient(135deg, rgb(108 92 255 / 60%), rgb(40 180 255 / 40%)); }

.jx-art {
	margin: 0;
	padding: 1.5rem;
	border: 1px solid #3a423e;
	border-radius: 1.25rem;
	color: #cfe0d6;
	background: #070b09;
	box-shadow: 0 40px 120px -30px rgb(0 0 0 / 80%), 0 0 0 1px rgb(43 224 127 / 8%);
	font: 0.95rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
	white-space: pre-wrap;
}

.jx-art .k { color: #7fe0ad; }
.jx-art .s { color: #e6c07b; }
.jx-art .f { color: #8fb8ff; }
.jx-art .c { color: #61706a; }

.jx-mark path { stroke-linejoin: round; stroke-width: 12px; }
.jx-mark__p1, .jx-mark__p4 { fill: #1fbf74; stroke: #1fbf74; }
.jx-mark__p2, .jx-mark__p5 { fill: #5f6b65; stroke: #5f6b65; }
.jx-mark__p3, .jx-mark__p6 { fill: #0f6b3f; stroke: #0f6b3f; }

.home-slider__dots {
	position: relative;
	z-index: 3;
	grid-area: 1 / 1;
	align-self: end;
	display: flex;
	gap: 0.5rem;
	padding-bottom: 2rem;
}

.home-slider__dots button {
	padding: 0.6rem 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.home-slider__dots span {
	display: block;
	width: 2.5rem;
	height: 3px;
	border-radius: 2px;
	background: rgb(255 255 255 / 28%);
	overflow: hidden;
}

.home-slider__dots span::after {
	content: "";
	display: block;
	width: 0;
	height: 100%;
	background: #fff;
}

.home-slider__dots [aria-pressed="true"] span::after { animation: home-dot var(--home-slide-time, 7s) linear forwards; }
.home-slider.is-paused .home-slider__dots [aria-pressed="true"] span::after { animation-play-state: paused; }
.home-slider__dots button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@keyframes home-dot { to { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
	.home-slide, .home-slide::before, .home-slide__art { transition: none; }
	.home-slider__dots [aria-pressed="true"] span::after { width: 100%; animation: none; }
}

.home-products { margin-top: clamp(3rem, 7vw, 5rem); }

.home-products__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
	gap: 1.25rem;
}

.home-products .product-card { flex-direction: column; align-items: flex-start; justify-content: space-between; }
.home-products .product-card > div:first-child > h3 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.home-products .product-card .platforms h3 { margin: 1.5rem 0 0.75rem; font-size: 1rem; letter-spacing: 0; }
.site-nav { display: flex; gap: 1.25rem; }
.product-card__links { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.feature { margin-top: clamp(3rem, 8vw, 6rem); }

.product-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1.5rem;
	padding: clamp(1.5rem, 5vw, 3.5rem);
	border-radius: 1rem;
	background: var(--surface);
	border: 1px solid var(--line);
}

.product-card h3 { font-size: clamp(1.8rem, 4vw, 3.25rem); letter-spacing: -0.045em; }
.product-card p { max-width: 52ch; margin: 0; color: var(--muted); }

.button {
	display: inline-block;
	padding: 0.75rem 1.15rem;
	border-radius: 0.5rem;
	color: #3636c8;
	background: #fff;
	font-weight: 650;
	text-decoration: none;
}

.button:hover { text-decoration: none; filter: brightness(1.08); }
.button--accent { background: var(--accent); color: var(--on-accent); }
.home-slider .button:focus-visible { outline-color: #fff; }
.text-link { display: inline-block; text-underline-offset: 0.2em; }

.product-hero {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	align-items: center;
	gap: clamp(2rem, 5vw, 5rem);
	padding-block: clamp(2.75rem, 7vw, 6.5rem);
}

.product-name { margin: 0 0 0.85rem; color: var(--accent); font-weight: 700; }
.product-hero h1 { font-size: clamp(2.05rem, 5.3vw, 4.6rem); }
.hero-actions { display: flex; align-items: center; gap: 0.75rem 1.25rem; flex-wrap: wrap; margin-top: 1.5rem; }

.search-example {
	margin: 0;
	padding: clamp(1rem, 4vw, 2.5rem);
	border-radius: 1.25rem;
	background: var(--example);
}

.search-example figcaption { margin-bottom: 1rem; color: var(--example-ink); font-weight: 650; }
.search-example__query { padding: 0.85rem 1rem; border: 1px solid var(--example-field); border-radius: 0.6rem; background: var(--surface); font-weight: 700; }
.search-example p { color: var(--example-ink); margin-block: 0.9rem 0.55rem; }
.search-example ul { list-style: none; padding: 0; margin: 0; }
.search-example li { border-top: 1px solid var(--example-line); padding-block: 0.65rem; }

.edition-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: 1rem;
}

.edition-grid article {
	padding: 1.4rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 0.8rem;
}

.edition-grid p, .availability { color: var(--muted); }
.edition-grid p { margin: 0; }
.availability { margin: 1.2rem 0 0; }
.offers { margin-top: clamp(2.5rem, 7vw, 5rem); }
.offers > p { color: var(--muted); }
.offer-list { list-style: none; padding: 0; margin: 0; }
.offer-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding-block: 0.65rem; border-top: 1px solid var(--line); }
.standard-content { max-width: 68ch; margin-block: 3rem; }
.standard-content h1 { font-size: clamp(2rem, 5vw, 3.75rem); }
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(2.75rem, 7vw, 6rem); }

.qs-report-upload {
	display: grid;
	gap: 1rem;
	padding: clamp(1rem, 4vw, 2rem);
	border: 1px solid var(--line);
	border-radius: 0.8rem;
	background: var(--surface);
}

.qs-report-upload p { margin: 0; }
.qs-report-upload input[type="email"], .qs-report-upload input[type="file"] { width: 100%; margin-top: 0.4rem; font: inherit; }
.qs-report-upload input[type="email"] { padding: 0.55rem; border: 1px solid var(--line); border-radius: 0.35rem; color: var(--ink); background: var(--page); }
.qs-report-upload button { padding: 0.7rem 1rem; border: 0; border-radius: 0.5rem; background: var(--accent); color: var(--on-accent); font: inherit; cursor: pointer; }
.qs-report-error { color: var(--danger); }

.site-header__tools { display: flex; align-items: center; gap: 0.75rem 1.5rem; flex-wrap: wrap; }

.theme-switch {
	display: inline-grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 50%;
	color: var(--ink);
	background: transparent;
	cursor: pointer;
}

.lang-switch {
	display: inline-grid;
	place-items: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.6rem;
	border: 1px solid var(--line);
	border-radius: 1.25rem;
	color: var(--ink);
	font-weight: 650;
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	text-decoration: none;
}

.lang-switch:hover { border-color: var(--muted); }
.lang-switch:focus-visible { outline: 3px solid #4663ef; outline-offset: 3px; }

.theme-switch:hover { border-color: var(--muted); }
.theme-switch:focus-visible { outline: 3px solid #4663ef; outline-offset: 3px; }
.theme-switch svg { width: 1.2rem; height: 1.2rem; }
.theme-switch .theme-switch__sun { display: none; }
:root[data-theme="dark"] .theme-switch .theme-switch__sun { display: block; }
:root[data-theme="dark"] .theme-switch .theme-switch__moon { display: none; }

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-switch .theme-switch__sun { display: block; }
	:root:not([data-theme="light"]) .theme-switch .theme-switch__moon { display: none; }
}

.platforms { margin-top: 2rem; }
.platforms h3 { margin-bottom: 1rem; font-size: 1rem; color: var(--muted); font-weight: 650; }
.platform-list { -webkit-user-select: none; user-select: none; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; list-style: none; padding: 0; margin: 0; }
.platform { display: flex; align-items: center; gap: 0.5rem; font-weight: 650; }

.platform::before {
	content: "";
	width: 1.75rem;
	height: 1.75rem;
	background: currentcolor;
	-webkit-mask: var(--platform-icon) center / contain no-repeat;
	mask: var(--platform-icon) center / contain no-repeat;
}

.platform--active { color: var(--ink); }
.platform--active.platform--wordpress::before { background: #21759b; }
:root[data-theme="dark"] .platform--active.platform--wordpress::before { background: #6cb4e0; }

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .platform--active.platform--wordpress::before { background: #6cb4e0; }
}

.platform--soon { color: var(--muted); opacity: 0.55; filter: blur(1.5px) grayscale(1); }
.platform small { font-weight: 400; }
.platform--wordpress { --platform-icon: url("assets/platforms/wordpress.svg"); }
.platform--joomla { --platform-icon: url("assets/platforms/joomla.svg"); }
.platform--bitrix { --platform-icon: url("assets/platforms/bitrix.svg"); }
.platform--magento { --platform-icon: url("assets/platforms/magento.svg"); }
.platform--drupal { --platform-icon: url("assets/platforms/drupal.svg"); }
.platform--modx { --platform-icon: url("assets/platforms/modx.svg"); }
.platform--prestashop { --platform-icon: url("assets/platforms/prestashop.svg"); }
.platform--opencart { --platform-icon: url("assets/platforms/opencart.svg"); }
.platform--laravel { --platform-icon: url("assets/platforms/laravel.svg"); }
.platform--symfony { --platform-icon: url("assets/platforms/symfony.svg"); }
.platform--shopware { --platform-icon: url("assets/platforms/shopware.svg"); }
.platform--cs-cart { --platform-icon: url("assets/platforms/cs-cart.svg"); }
.platform--typo3 { --platform-icon: url("assets/platforms/typo3.svg"); }
.platforms .platforms__note { margin: 1rem 0 0; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 48rem) {
	.product-hero { grid-template-columns: 1fr; }
}
