/*
Theme Name: Lowkeydeen
Theme URI: https://lowkeydeen.com
Author: Lowkeydeen
Description: Bespoke theme for Lowkeydeen corduroy caps. A single-viewport product stage, a manifesto page, and a quiet shop.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lowkeydeen
Tags: e-commerce, custom-menu, translation-ready
*/

/* ---------------------------------------------------------------
   Fonts (self-hosted, latin subset)
   --------------------------------------------------------------- */

@font-face {
	font-family: "Reem Kufi";
	src: url("assets/fonts/reemkufi.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Manrope";
	src: url("assets/fonts/manrope.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Dancing Script";
	src: url("assets/fonts/dancingscript.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Archivo Black";
	src: url("assets/fonts/archivoblack.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Playfair Display";
	src: url("assets/fonts/playfairitalic.woff2") format("woff2");
	font-weight: 400 700;
	font-style: italic;
	font-display: swap;
}

/* ---------------------------------------------------------------
   Tokens
   --------------------------------------------------------------- */

:root {
	--bg: #f7f5f2;
	--surface: #ffffff;
	--ink: #0a0a0a;
	--accent: #2fa6a6;
	--muted: #6e6a64;
	--line: #dedad3;
	--figure: #d9d4cc;

	--cap-navy: #1a1a2e;
	--cap-camel: #b98243;
	--cap-olive: #3c4a2e;
	--cap-black: #0a0a0a;
	--thread-gold: #a67843;

	--font-display: "Reem Kufi", "Trebuchet MS", sans-serif;
	--font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;
	--font-script: "Dancing Script", "Apple Chancery", cursive;

	--space-xs: 6px;
	--space-sm: 12px;
	--space-md: 22px;
	--space-lg: 40px;
	--space-xl: 72px;

	--radius: 0px;
	--radius-pill: 999px;

	--measure: 64ch;
	--bar-h: 64px;
}

/* ---------------------------------------------------------------
   Reset. Wrapped in :where() so every component rule outranks it.
   --------------------------------------------------------------- */

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

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

:where(ul, ol) {
	list-style: none;
}

:where(img, svg) {
	display: block;
	max-width: 100%;
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

:where(h1, h2, h3, h4) {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.08;
	letter-spacing: -0.01em;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.18s ease;
}

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

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

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

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 999;
	width: auto;
	height: auto;
	clip: auto;
	background: var(--ink);
	color: var(--bg);
	padding: 10px 16px;
}

/* ---------------------------------------------------------------
   Shared shell
   --------------------------------------------------------------- */

.shell {
	width: min(100% - 2 * var(--space-md), 1180px);
	margin-inline: auto;
}

/* Top bar ------------------------------------------------------- */

.topbar {
	height: var(--bar-h);
	display: flex;
	align-items: center;
	gap: var(--space-lg);
	border-bottom: 1px solid var(--line);
}

.topbar__brand {
	display: block;
	flex: 0 0 auto;
	line-height: 0;
}

.topbar__brand svg,
.topbar__brand img {
	height: 15px;
	width: auto;
}

.topbar__brand svg path {
	fill: var(--ink);
}

.topbar__nav {
	margin-inline-start: auto;
}

.topbar__nav ul {
	display: flex;
	align-items: center;
	gap: clamp(14px, 2.4vw, 30px);
}

.topbar__nav a {
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--muted);
	white-space: nowrap;
}

.topbar__nav a:hover,
.topbar__nav .current-menu-item > a {
	color: var(--ink);
}

.topbar__nav .current-menu-item > a {
	box-shadow: inset 0 -1px 0 var(--accent);
}

.nav-toggle {
	display: none;
	margin-inline-start: auto;
	background: none;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	padding: 5px 14px;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--muted);
	cursor: pointer;
}

/* Buttons ------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: var(--ink);
	color: var(--bg);
	border: 1px solid var(--ink);
	border-radius: var(--radius-pill);
	padding: 13px 30px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.1s ease;
}

.btn:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: #ffffff;
}

.btn:active {
	transform: translateY(1px);
}

.btn__price {
	font-family: var(--font-body);
	font-weight: 500;
	letter-spacing: 0.04em;
	opacity: 0.72;
	text-transform: none;
}

.btn--ghost {
	background: none;
	color: var(--ink);
	border-color: var(--line);
}

.btn--ghost:hover {
	background: none;
	color: var(--accent);
	border-color: var(--accent);
}

.topbar__basket {
	flex: 0 0 auto;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--muted);
	white-space: nowrap;
	margin-inline-start: clamp(14px, 2.4vw, 30px);
}

.topbar__basket:hover {
	color: var(--ink);
}

/* ---------------------------------------------------------------
   Product page
   --------------------------------------------------------------- */

.product {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: clamp(28px, 5vw, 72px);
	align-items: start;
}

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

.product__shot img {
	width: 100%;
	height: auto;
}

.product__title {
	font-size: clamp(30px, 4.2vw, 46px);
	margin-bottom: 0.35em;
}

.product__spec {
	font-size: 11px;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: var(--space-md);
}

.product__excerpt p {
	font-size: 17px;
	line-height: 1.6;
	max-width: 46ch;
}

.product__form {
	margin-top: var(--space-lg);
	padding-top: var(--space-lg);
	border-top: 1px solid var(--line);
}

.product__colours {
	border: 0;
	padding: 0;
	margin: 0 0 var(--space-md);
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm) var(--space-md);
}

.product__colours legend {
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: var(--space-sm);
	padding: 0;
}

.swatch-option {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 13px;
}

.swatch-option input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.swatch-option__dot {
	width: 22px;
	height: 22px;
	border-radius: var(--radius-pill);
	background: var(--swatch);
	border: 1px solid var(--line);
	box-shadow: 0 0 0 0 var(--accent);
	transition: box-shadow 0.18s ease;
}

.swatch-option input:checked + .swatch-option__dot {
	box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent);
}

.swatch-option input:focus-visible + .swatch-option__dot {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.product__price {
	font-size: 24px;
	font-family: var(--font-display);
	margin-bottom: var(--space-md);
}

.product__price .amount {
	font-weight: 600;
}

.product__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.product__reassure {
	margin-top: var(--space-md);
	font-size: 13px;
	color: var(--muted);
	max-width: 40ch;
}

.product__long {
	margin-top: var(--space-lg);
	padding-top: var(--space-lg);
	border-top: 1px solid var(--line);
	font-size: 15px;
}

@media (max-width: 780px) {
	.product {
		grid-template-columns: 1fr;
	}
}

/* ---------------------------------------------------------------
   Interior pages
   --------------------------------------------------------------- */

.page-main {
	padding-block: clamp(48px, 8vh, 96px) var(--space-xl);
}

.prose {
	max-width: var(--measure);
}

.prose > * + * {
	margin-top: 1.25em;
}

.prose h1 {
	font-size: clamp(34px, 5vw, 56px);
	margin-bottom: 0.6em;
}

.prose h2 {
	font-size: clamp(21px, 2.4vw, 27px);
	margin-top: 2em;
}

.prose p {
	color: #26241f;
}

.prose ul {
	list-style: disc;
	padding-left: 1.15em;
}

.prose li + li {
	margin-top: 0.4em;
}

.prose a {
	color: var(--ink);
	text-decoration: underline;
}

.page-lede {
	font-size: clamp(18px, 2vw, 21px);
	line-height: 1.55;
	color: var(--muted);
}

/* Manifesto ----------------------------------------------------- */

.manifesto {
	padding-block: clamp(56px, 12vh, 128px);
}

.manifesto__mark {
	max-width: min(560px, 82vw);
	margin-bottom: var(--space-lg);
}

.manifesto__mark svg {
	width: 100%;
	height: auto;
}

.manifesto__mark svg path {
	fill: var(--ink);
}

.manifesto__rule {
	width: 116px;
	height: 3px;
	background: var(--accent);
	margin-bottom: var(--space-xl);
}

.manifesto__body {
	max-width: 60ch;
}

.manifesto__body p {
	font-size: clamp(18px, 1.9vw, 22px);
	line-height: 1.72;
}

.manifesto__body p + p {
	margin-top: 1.5em;
}

.manifesto__body strong {
	font-weight: 700;
}

.manifesto__script {
	font-family: var(--font-script);
	font-weight: 700;
	font-size: clamp(30px, 4.6vw, 52px);
	line-height: 1.25;
	color: var(--accent);
	margin-block: var(--space-xl);
}

.manifesto__values {
	display: grid;
	gap: var(--space-lg);
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	margin-top: var(--space-xl);
	padding-top: var(--space-lg);
	border-top: 1px solid var(--line);
}

.manifesto__values h2 {
	font-size: 15px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-bottom: 0.7em;
}

.manifesto__values p {
	font-size: 15px;
	color: var(--muted);
	line-height: 1.6;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */

.site-footer {
	background: var(--ink);
	color: var(--bg);
	padding-block: var(--space-xl) var(--space-lg);
	font-size: 14px;
}

.site-footer a {
	color: var(--bg);
	text-decoration: none;
	opacity: 0.82;
}

.site-footer a:hover {
	color: var(--accent);
	opacity: 1;
}

.footer__grid {
	display: grid;
	grid-template-columns: minmax(230px, 1.4fr) repeat(2, minmax(150px, 1fr));
	gap: var(--space-lg);
	align-items: start;
}

.footer__brand svg {
	width: 168px;
	height: auto;
	margin-bottom: var(--space-md);
}

.footer__brand svg path {
	fill: var(--bg);
}

.footer__blurb {
	max-width: 34ch;
	color: #b9b4ac;
	line-height: 1.6;
}

.footer__col h2 {
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #7d786f;
	margin-bottom: var(--space-sm);
}

.footer__col li + li {
	margin-top: 7px;
}

.footer__social {
	display: flex;
	gap: var(--space-sm);
	margin-top: var(--space-md);
}

.footer__social a {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1px solid #2b2b28;
	border-radius: var(--radius-pill);
}

.footer__social a:hover {
	border-color: var(--accent);
}

.footer__social svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.footer__base {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm) var(--space-md);
	justify-content: space-between;
	margin-top: var(--space-xl);
	padding-top: var(--space-md);
	border-top: 1px solid #23231f;
	font-size: 12px;
	color: #7d786f;
}

/* ---------------------------------------------------------------
   WooCommerce, kept in the same restrained register
   --------------------------------------------------------------- */

.woocommerce .page-main {
	padding-bottom: var(--space-xl);
}

.woocommerce ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: var(--space-lg);
	margin: var(--space-lg) 0 0 !important;
}

.woocommerce ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	text-align: left;
}

.woocommerce ul.products li.product a img {
	margin-bottom: var(--space-sm);
	background: var(--surface);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--font-display);
	font-size: 16px !important;
	font-weight: 600;
	padding: 0 !important;
}

.woocommerce ul.products li.product .price {
	color: var(--muted) !important;
	font-size: 14px;
}

.woocommerce .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit {
	background: var(--ink) !important;
	color: var(--bg) !important;
	border-radius: var(--radius-pill) !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	padding: 13px 26px !important;
}

.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
	background: var(--accent) !important;
	color: #ffffff !important;
}

.woocommerce div.product .product_title {
	font-family: var(--font-display);
	font-size: clamp(28px, 4vw, 42px);
}

.woocommerce div.product p.price {
	color: var(--ink) !important;
	font-size: 20px;
}

.woocommerce-message,
.woocommerce-info {
	border-top-color: var(--accent) !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: var(--accent) !important;
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */

@media (max-width: 860px) {
	.footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.footer__brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 620px) {
	:root {
		--bar-h: 56px;
	}

	.nav-toggle {
		display: block;
	}

	.topbar__nav {
		position: absolute;
		inset: var(--bar-h) 0 auto 0;
		z-index: 40;
		background: var(--bg);
		border-bottom: 1px solid var(--line);
		padding: var(--space-sm) var(--space-md) var(--space-md);
		display: none;
	}

	.topbar__nav.is-open {
		display: block;
	}

	.topbar__nav ul {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--space-sm);
	}

	.topbar__nav a {
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}
