/*
Theme Name: Wipenesium
Theme URI: https://wipenesium.com
Author: Wipenesium
Description: Calm, spa-inspired block theme for Wipenesium magnesium wipes. Soft sage, olive and bubble-blue from the packaging, serif display type, WooCommerce-ready, with ready-made Home, About, Contact and Journal pages.
Version: 1.1.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wipenesium
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--sky); color: var(--wp--preset--color--ink); }
img { max-width: 100%; height: auto; }
[id] { scroll-margin-top: 110px; }

:where(h1, h2, h3, .wp-block-post-title) em { font-style: italic; color: var(--wp--preset--color--blue); }
.wn-footer :where(h1, h2, h3) em { color: var(--wp--preset--color--sky); }

.wn-eyebrow,
.wn-eyebrow a {
	font-size: var(--wp--preset--font-size--xs) !important;
	font-weight: 400;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--muted);
}
.wn-lede { font-size: var(--wp--preset--font-size--large); line-height: 1.7; max-width: 32rem; color: #3E443A; }
.wn-price { font-family: var(--wp--preset--font-family--serif); font-size: 1.9rem; line-height: 1; margin: 0; color: var(--wp--preset--color--ink); }

hr.wn-rule,
.wp-block-separator.wn-rule {
	width: 56px;
	max-width: 56px;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--sage);
	margin: 0.75rem 0 1.25rem;
	opacity: 1;
}
.wp-block-separator.wn-rule.is-centered { margin-left: auto !important; margin-right: auto !important; }

.wn-section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }

/* Buttons */
.wp-block-button .wp-block-button__link { transition: background-color .2s ease, color .2s ease; }
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--olive);
	border: 1px solid var(--wp--preset--color--olive);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--olive); color: #fff; }

/* ---------- Header ---------- */
.wn-topbar {
	background: var(--wp--preset--color--stone);
	padding-top: 0.55rem;
	padding-bottom: 0.55rem;
}
.wn-topbar p {
	margin: 0;
	font-size: 0.7rem;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: var(--wp--preset--color--olive);
}
.wn-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--wp--preset--color--pearl);
	border-bottom: 1px solid #DADDD6;
}
.admin-bar .wn-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .wn-header { top: 46px; } }
.wn-header-inner { min-height: 92px; gap: 1.5rem; }
.wn-logo { display: block; line-height: 0; flex-shrink: 0; }
.wn-logo img { height: 64px; width: auto; }
.wn-header .wn-nav a:hover { color: var(--wp--preset--color--blue); }
.wn-header-actions { gap: 1.4rem; align-items: center; }
.wn-cart { color: var(--wp--preset--color--ink); display: flex; line-height: 0; }
.wn-cart:hover { color: var(--wp--preset--color--blue); }
.wn-header-cta { margin: 0; }

/* Mobile menu overlay */
.wn-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--pearl);
	padding: 2rem;
}
.wn-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 2rem;
}

/* ---------- Page canvas ---------- */
.wn-canvas > * { margin-block-start: 0 !important; }

/* ---------- Hero ---------- */
.wn-hero {
	background: var(--wp--preset--color--mist);
	padding: 0 !important;
}
.wn-hero-cols { gap: 0 !important; margin: 0 !important; min-height: min(720px, 85vh); }
.wn-hero-copy {
	padding: clamp(3rem, 6vw, 6rem) clamp(1.25rem, 4vw, 4rem) clamp(3rem, 6vw, 6rem) clamp(1.25rem, 5vw, 5rem);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1.6rem;
}
.wn-hero-copy > * { margin: 0 !important; }
.wn-hero h1 { line-height: 0.98; letter-spacing: -0.01em; }
.wn-hero-buy { gap: 1.75rem; }
.wn-hero-art {
	position: relative;
	overflow: hidden;
	background: #D6DDD9;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 1.5rem;
	isolation: isolate;
}
/* bubble + soft waves, drawn in CSS so they stay behind the pouch */
.wn-hero-art::before {
	content: "";
	position: absolute;
	z-index: -1;
	width: 58%;
	aspect-ratio: 1;
	border-radius: 50%;
	right: -6%;
	top: -8%;
	background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.55) 0 12%, transparent 13%), var(--wp--preset--color--sky);
	opacity: .8;
}
.wn-hero-art::after {
	content: "";
	position: absolute;
	z-index: -1;
	left: -10%;
	right: -10%;
	bottom: -30%;
	height: 60%;
	border-radius: 50% 50% 0 0 / 30% 30% 0 0;
	background: #C9D0C5;
}
.wn-hero-pouch { margin: 0; }
.wn-hero-pouch img {
	max-height: 560px;
	width: auto;
	filter: drop-shadow(0 30px 40px rgba(46,50,41,.28));
}
.wn-badge {
	position: absolute;
	left: 8%;
	bottom: 10%;
	width: 118px;
	height: 118px;
	border-radius: 50%;
	background: var(--wp--preset--color--pearl);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: 0.65rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	line-height: 1.6;
	color: var(--wp--preset--color--olive);
	transform: rotate(-10deg);
	margin: 0;
}

/* ---------- Trust strip ---------- */
.wn-trust {
	border-bottom: 1px solid #DADDD6;
	padding-top: 1.75rem;
	padding-bottom: 1.75rem;
	margin-top: 0 !important;
}
.wn-trust-list {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: var(--wp--style--global--wide-size);
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1.5rem;
}
.wn-trust-list li { display: flex; align-items: center; gap: 0.9rem; }
.wn-trust-list svg { width: 30px; height: 30px; flex-shrink: 0; fill: none; stroke: var(--wp--preset--color--olive); stroke-width: 1.2; }
.wn-trust-list span { display: flex; flex-direction: column; font-size: 0.82rem; color: var(--wp--preset--color--muted); line-height: 1.5; }
.wn-trust-list strong { font-weight: 400; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--wp--preset--color--ink); }

/* ---------- Two-column splits ---------- */
.wn-split { gap: clamp(2rem, 6vw, 5rem) !important; align-items: center !important; }
.wn-split > .wp-block-column > * + * { margin-top: 1.25rem; }
.wn-sachet-art {
	background: var(--wp--preset--color--stone);
	min-height: 460px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding: 2.5rem;
}
.wn-sachet-art::before {
	content: "";
	position: absolute;
	z-index: -1;
	width: 240px;
	height: 240px;
	border-radius: 50%;
	left: 6%;
	top: 6%;
	background: var(--wp--preset--color--sky);
	opacity: .6;
}
.wn-sachet-art figure { margin: 0; }
.wn-sachet-art img {
	max-height: 380px;
	width: auto;
	transform: rotate(6deg);
	filter: drop-shadow(0 24px 30px rgba(46,50,41,.22));
}

/* ---------- Benefits ---------- */
.wn-benefits { background: var(--wp--preset--color--stone); }
.wn-benefits > h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0; }
.wn-benefit-cols { gap: 2.5rem !important; margin-top: 2.5rem !important; }
.wn-benefit { display: flex; flex-direction: column; align-items: center; }
.wn-benefit > * { margin: 0 !important; }
.wn-benefit > * + * { margin-top: 0.8rem !important; }
.wn-icon { width: 44px; height: 44px; fill: none; stroke: var(--wp--preset--color--olive); stroke-width: 1; }
.wn-benefit h3 { font-size: 1.6rem; }
.wn-benefit p { font-size: 0.95rem; max-width: 260px; color: #3E443A; }

/* ---------- Made for real life ---------- */
.wn-reallife { padding: 0 !important; margin-top: 0 !important; }
.wn-reallife-cols { gap: 0 !important; margin: 0 !important; }
.wn-photo-stack {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 0 !important;
}
.wn-reallife .wn-photo { position: relative; margin: 0 !important; overflow: hidden; }
.wn-reallife .wn-photo img {
	display: block;
	width: 100% !important;
	height: clamp(260px, 22vw, 320px) !important;
	object-fit: cover;
}
.wn-reallife .wn-photo-run img { object-position: 50% 22%; }
.wn-reallife .wn-photo-workout img { object-position: 50% 28%; }
.wn-photo figcaption {
	position: absolute;
	left: 24px;
	bottom: 22px;
	margin: 0;
	background: rgba(242,243,239,.92);
	color: var(--wp--preset--color--olive);
	font-size: 0.68rem;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	padding: 0.6rem 1rem;
}
.wn-reallife-copy {
	padding: clamp(3rem, 6vw, 5rem);
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.wn-reallife-copy > * { margin: 0 !important; }
.wn-reallife-copy > * + * { margin-top: 1.25rem !important; }
.wn-checks { list-style: none; padding: 0; }
.wn-checks li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.9rem;
}
.wn-checks li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.35em;
	width: 11px;
	height: 6px;
	border-left: 1.5px solid var(--wp--preset--color--olive);
	border-bottom: 1.5px solid var(--wp--preset--color--olive);
	transform: rotate(-45deg);
}

/* ---------- Steps ---------- */
.wn-steps { background: var(--wp--preset--color--mist); }
.wn-steps > h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0; }
.wn-step-cols { gap: 3rem !important; margin-top: 2.5rem !important; }
.wn-step { border-top: 1px solid var(--wp--preset--color--sage); padding-top: 1.5rem; }
.wn-step > * { margin: 0 !important; }
.wn-step > * + * { margin-top: 0.75rem !important; }
.wn-step-num {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-size: 2.4rem;
	line-height: 1;
	color: var(--wp--preset--color--blue);
}
.wn-step h3 { font-size: 1.75rem; }
.wn-step p:not(.wn-step-num) { font-size: 0.95rem; color: #3E443A; }

/* ---------- Product card ---------- */
.wn-product-card {
	background: var(--wp--preset--color--stone);
	padding: clamp(1.5rem, 4vw, 3rem);
	gap: 2rem !important;
}
.wn-product-card > .wp-block-group { gap: 0.75rem; }
.wn-product-card > .wp-block-group > * { margin: 0 !important; }
.wn-product-img { margin: 0; flex-shrink: 0; }
.wn-product-img img { height: 230px; width: auto; filter: drop-shadow(0 16px 20px rgba(46,50,41,.22)); }
.wn-product-card h3 { font-size: 2rem; }

/* ---------- Inner pages ---------- */
.wn-page-head {
	background: var(--wp--preset--color--mist);
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--50);
}
.wn-page-head > * { max-width: var(--wp--style--global--wide-size) !important; margin-left: auto !important; margin-right: auto !important; }
.wn-page-head h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.wn-page { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--60); }
.wn-page-title { font-size: clamp(2.4rem, 5vw, 4rem); }
.wn-post-grid { gap: 2.5rem !important; }
.wn-post-grid .wp-block-post-title { font-size: 1.6rem; margin-top: 0.3rem; }
.wn-post-grid .wp-block-post-title a { color: var(--wp--preset--color--ink); }

/* ---------- Contact form ---------- */
.wn-form { display: flex; flex-direction: column; gap: 1.25rem; }
.wn-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.wn-field { display: flex; flex-direction: column; gap: 0.45rem; }
.wn-field label { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.wn-field input,
.wn-field textarea {
	font: inherit;
	font-weight: 300;
	color: var(--wp--preset--color--ink);
	background: #fff;
	border: 1px solid #CDD2C8;
	border-radius: 0;
	padding: 0.9rem 1rem;
}
.wn-field input:focus,
.wn-field textarea:focus { outline: 2px solid var(--wp--preset--color--blue); outline-offset: 1px; border-color: transparent; }
.wn-form .wp-block-button__link { border: 0; cursor: pointer; font-family: inherit; }
.wn-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.wn-form-note { padding: 1rem 1.25rem; margin-bottom: 1.25rem; background: var(--wp--preset--color--stone); border-left: 3px solid var(--wp--preset--color--olive); }
.wn-form-note.is-error { border-left-color: #9A4B3C; }

/* ---------- Footer ---------- */
.wn-footer {
	background: var(--wp--preset--color--olive);
	color: var(--wp--preset--color--pearl);
	padding-top: 4.5rem;
	padding-bottom: 2.5rem;
	margin-top: 0 !important;
	font-size: 0.9rem;
}
.wn-footer a { color: var(--wp--preset--color--pearl); text-decoration: none; }
.wn-footer a:hover { color: var(--wp--preset--color--sky); }
.wn-footer p { line-height: 1.9; }
.wn-footer-cols { gap: 2.5rem !important; }
.wn-footer-logo { display: inline-block; background: var(--wp--preset--color--pearl); padding: 0.85rem 1.1rem; line-height: 0; border-radius: 4px; }
.wn-footer-logo img { height: 48px; width: auto; }
.wn-footer-label { font-size: 0.68rem !important; letter-spacing: 0.28em; text-transform: uppercase; color: var(--wp--preset--color--sky) !important; margin-bottom: 0.25rem; }
.wn-footer-legal { border-top: 1px solid rgba(242,243,239,.2); margin-top: 3rem !important; padding-top: 1.5rem; }
.wn-footer-legal p { font-size: 0.75rem; color: #DADDD6; margin: 0; }

/* ---------- WooCommerce touches ---------- */
.woocommerce .wc-block-components-product-price,
.wc-block-components-product-price,
.woocommerce div.product p.price { font-family: var(--wp--preset--font-family--serif); color: var(--wp--preset--color--ink) !important; font-size: 1.6rem; }
.wc-block-components-button:not(.is-link),
.wp-block-button.wc-block-components-product-button .wp-block-button__link,
.woocommerce button.button,
.woocommerce a.button {
	background: var(--wp--preset--color--olive) !important;
	color: #fff !important;
	border-radius: 0 !important;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-size: 0.75rem !important;
	font-weight: 400 !important;
}
.wc-block-components-button:not(.is-link):hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover { background: var(--wp--preset--color--ink) !important; }
.wc-block-components-product-sale-badge,
.woocommerce span.onsale { background: var(--wp--preset--color--blue); color: #fff; border-radius: 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
	.wn-trust-list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1.25rem; }
	.wn-header .wn-nav { --wp--style--block-gap: 1.4rem; }
	.wn-header .wn-header-cta { display: none !important; }
}

/* ---------- Phone ---------- */
@media (max-width: 781px) {
	.wn-header-inner { min-height: 72px; }
	.wn-logo img { height: 46px; }
	.wn-hero-cols { min-height: 0; }
	.wn-hero-art { min-height: 420px; }
	.wn-hero-pouch img { max-height: 340px; }
	.wn-badge { width: 88px; height: 88px; font-size: 0.55rem; left: 5%; }
	.wn-trust-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wn-sachet-art { min-height: 340px; }
	.wn-sachet-art img { max-height: 260px; }
	.wn-benefit-cols, .wn-step-cols { gap: 2.25rem !important; }
	.wn-product-card { flex-wrap: wrap !important; }
	.wn-product-img img { height: 180px; }
	.wn-field-row { grid-template-columns: 1fr; }
	.wn-footer-cols { gap: 1.5rem !important; }
}
