/*
Theme Name: WoodenKriti
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: woodenkriti
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap between the
   template's top-level sections. Zero it so sections butt edge-to-edge. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Main carries its own vertical padding so plugin templates still clear the
   header and footer; full-bleed templates opt out with is-flush. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

:root {
	/* Map section variables onto the theme palette — reference preset slugs,
	   never hardcode hex here. */
	--site-bg: var( --wp--preset--color--background );
	--site-text: var( --wp--preset--color--text );
	--site-surface: var( --wp--preset--color--surface );
	--site-stone: var( --wp--preset--color--stone );
	--site-accent: var( --wp--preset--color--primary );
	--gutter-left: var( --wp--style--root--padding-left );
	--gutter-right: var( --wp--style--root--padding-right );
}

/* === site header === */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--site-bg) 82%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid color-mix(in srgb, var(--site-stone) 45%, transparent);
}
.site-header .primary-nav {
	font-size: 0.95rem;
}
.site-header .wp-block-navigation__container > li > a {
	font-weight: 500;
	color: var(--site-text);
}
.site-header .wp-block-navigation__container > li > a:hover {
	color: var(--site-accent);
}
.header-search .wp-block-search__inside-wrapper {
	border: 1px solid var(--site-stone);
	border-radius: 999px;
	background: #fff;
	width: 2.3rem;
	transition: width 0.25s ease-out;
}
.header-search .wp-block-search__inside-wrapper:focus-within {
	width: 12rem;
}
.header-search .wp-block-search__input {
	background: transparent;
	border: none;
	padding: 0.4rem 0.6rem;
}
.header-search .wp-block-search__button {
	background: transparent;
	border: none;
	padding: 0.3rem 0.5rem;
	color: var(--site-text);
}
.header-icons .wc-block-mini-cart__button {
	color: var(--site-text);
}

/* === poster hero === */
.wk-hero {
	min-height: 88vh;
	display: flex;
	align-items: flex-end;
}
.wk-hero .hero-inner {
	max-width: 560px;
	margin-bottom: clamp(2rem, 6vw, 4rem);
}
.wk-hero.is-style-eyebrow-hero {
	align-items: flex-end;
}

/* === sections / posters === */
.wk-poster {
	min-height: 78vh;
	display: flex;
	align-items: flex-end;
}
.wk-poster .poster-inner {
	max-width: 640px;
}

/* === soft card style (registered variation) === */
.is-style-soft-card {
	background: #fff;
	border: 1px solid var(--site-stone);
	border-radius: var(--wp--custom--rounded--md);
	padding: 1.5rem;
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
	transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}
.is-style-soft-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgb(43 42 39 / 0.08);
}

/* === eyebrow (registered heading style) === */
.is-style-eyebrow {
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: var(--site-accent);
}

/* === generic section paddings === */
.wk-band {
	padding-block: clamp(3.5rem, 8vw, 6rem);
}

/* === feature grid / product helpers === */
.wk-feature-item {
	border-radius: var(--wp--custom--rounded--md);
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--site-stone);
	transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}
.wk-feature-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 26px rgb(43 42 39 / 0.08);
}
.wk-feature-item img {
	display: block;
	width: 100%;
	height: 260px;
	object-fit: cover;
}

.wk-products .wp-block-post {
	background: #fff;
	border: 1px solid var(--site-stone);
	border-radius: var(--wp--custom--rounded--md);
	overflow: hidden;
	padding: 0.9rem 0.9rem 1.1rem;
	transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}
.wk-products .wp-block-post:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 26px rgb(43 42 39 / 0.08);
}
.wk-products .wp-block-post .wc-block-product-image {
	border-radius: calc(var(--wp--custom--rounded--md) - 4px);
	overflow: hidden;
}
.wk-products .wp-block-post-title {
	font-size: 1rem;
	margin-top: 0.75rem;
}
.wk-products .wp-block-post a {
	color: var(--site-text);
}

/* === newsletter / dark band === */
.wk-newsletter .wp-block-button__link {
	background: var(--site-accent);
}

/* === page hero (collection pages) === */
.wk-cat-hero {
	padding-top: clamp(3rem, 8vw, 5rem);
	padding-bottom: clamp(3rem, 8vw, 5rem);
}
.wk-page-main.is-flush .entry-content {
	padding-block: 0;
}

/* === WooCommerce main spacing on plugin pages === */
.woocommerce-archive .entry-content,
.woocommerce-single-product .entry-content {
	width: 100%;
}

/* === testimonials / quote === */
.wk-quote {
	font-size: clamp(1.1rem, 2vw, 1.45rem);
}

/* === footer === */
.site-footer {
	color: #d9d3ca;
}
.site-footer .wp-block-site-title a {
	color: #faf8f5;
}
.site-footer .wp-block-navigation a {
	color: #d9d3ca;
}
.site-footer .footer-nav .wp-block-navigation__container,
.site-footer .footer-nav {
	gap: 0.4rem;
}
.site-footer .footer-nav a {
	color: #d9d3ca;
	font-size: 0.95rem;
}
.site-footer .footer-nav a:hover {
	color: #fff;
	text-decoration: underline;
}
.site-footer .contact-list {
	list-style: none;
	margin: 0;
	padding: 0;
	color: #d9d3ca;
	font-size: 0.95rem;
}
.site-footer .wc-block-components-payment-method-icons {
	justify-content: flex-end;
}

/* === WooCommerce page scaffolding === */
.woocommerce-breadcrumb {
	font-size: 0.85rem;
	color: var(--site-stone);
}
.woocommerce-products-header__title,
.woocommerce-loop-product__title {
	font-weight: 600;
}
.products .product a {
	color: var(--site-text);
}
.woocommerce-loop-product__title {
	font-size: 1.05rem;
}

/* === newsletter form === */
.wk-newsletter .wp-block-jetpack-subscriptions__container {
	max-width: 480px;
}

/* === animations: scroll reveal (progressive enhancement) === */
.wk-reveal {
	opacity: 1;
	transform: none;
}
.js .wk-reveal {
	opacity: 0;
	transform: translateY(16px);
}
.js .wk-reveal.is-visible {
	opacity: 1;
	transform: none;
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* === responsive === */
@media (max-width: 782px) {
	.site-header .header-icons .wp-block-search__inside-wrapper {
		width: 2.3rem;
	}
	.wk-hero {
		min-height: 70vh;
	}
	.woocommerce .products {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
	.js .wk-reveal {
		opacity: 1;
		transform: none;
	}
}
