/*
Theme Name: WorldHealthBio Research
Theme URI: https://example.com/baseline
Author: Built for you
Author URI: https://example.com
Description: A bold, minimal WooCommerce block theme for a research-peptide catalog. Near-black surfaces, a lime accent and a technical spec-sheet layout system. Fully editable in the Site Editor — colours, fonts, spacing and every page section.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: baseline
Tags: e-commerce, full-site-editing, block-patterns, dark, one-column, wide-blocks, custom-colors, custom-logo, custom-menu, editor-style, featured-images, block-styles, style-variations
*/

/* =========================================================
   1. Base
   ========================================================= */

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

::selection {
	background: var(--wp--preset--color--lime);
	color: var(--wp--preset--color--ink);
}

:where(a):focus-visible,
:where(button):focus-visible,
:where(input):focus-visible,
:where(select):focus-visible,
:where(textarea):focus-visible,
:where(summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--lime);
	outline-offset: 3px;
	border-radius: 1px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--lime);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* =========================================================
   2. Utility / component classes used by the patterns
   These are safe to reuse in the editor via "Additional CSS class(es)"
   ========================================================= */

/* -- Eyebrow label: mono, uppercase, lime -------------------------------- */
.bl-eyebrow,
.bl-eyebrow p {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--lime);
	margin: 0;
}

.bl-eyebrow--muted,
.bl-eyebrow--muted p { color: var(--wp--preset--color--muted); }

/* -- Mono meta text ------------------------------------------------------ */
.bl-mono,
.bl-mono p,
.bl-mono li {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--muted);
}

/* -- Display headline: extra-wide, tight -------------------------------- */
.bl-display {
	font-stretch: 112%;
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 0.94;
	text-wrap: balance;
}

.bl-display em {
	font-style: normal;
	color: var(--wp--preset--color--lime);
}

/* -- Hairline rule above a section -------------------------------------- */
.bl-rule { border-top: 1px solid var(--wp--preset--color--line); }
.bl-rule-b { border-bottom: 1px solid var(--wp--preset--color--line); }

/* -- Faint technical grid backdrop -------------------------------------- */
.bl-grid {
	position: relative;
	background-image:
		linear-gradient(to right, rgba(255,255,255,0.028) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255,255,255,0.028) 1px, transparent 1px);
	background-size: 84px 84px;
	background-position: center top;
}

/* -- The signature: element tile ---------------------------------------- */
.bl-tile {
	position: relative;
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--surface);
	padding: 1rem 1rem 0.875rem;
	aspect-ratio: 1 / 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: border-color 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
	text-decoration: none;
}
.bl-tile:hover,
.bl-tile:focus-within {
	border-color: var(--wp--preset--color--lime);
	background: #17170F;
	transform: translateY(-3px);
}
.bl-tile .bl-tile__num,
.bl-tile .bl-tile__dose {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--muted);
	margin: 0;
}
.bl-tile .bl-tile__sym {
	font-family: var(--wp--preset--font-family--grotesk);
	font-size: clamp(2rem, 5vw, 2.75rem);
	font-weight: 800;
	font-stretch: 118%;
	letter-spacing: -0.04em;
	line-height: 1;
	color: var(--wp--preset--color--chalk);
	margin: 0;
}
.bl-tile:hover .bl-tile__sym { color: var(--wp--preset--color--lime); }
.bl-tile .bl-tile__name {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.6875rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--chalk);
	margin: 0;
}

/* -- Card ---------------------------------------------------------------- */
.bl-card {
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--surface);
	padding: clamp(1.5rem, 3vw, 2.25rem);
}
.bl-card--flush { padding: 0; }

/* -- Numbered / lettered spec list -------------------------------------- */
.bl-spec {
	display: grid;
	gap: 0;
}
.bl-spec > * {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-block: 1.25rem;
}

/* -- Marquee ticker (signature motion) ---------------------------------- */
.bl-ticker {
	overflow: hidden;
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-block: 0.9rem;
	white-space: nowrap;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.bl-ticker p {
	display: inline-block;
	margin: 0;
	padding-right: 2rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	animation: bl-scroll 32s linear infinite;
	will-change: transform;
}
@keyframes bl-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.bl-ticker p { animation: none; }
}

/* -- Reveal on scroll (progressive enhancement) -------------------------- */
.bl-reveal { opacity: 0; transform: translateY(18px); }
.bl-reveal.is-in {
	opacity: 1;
	transform: none;
	transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
@media (prefers-reduced-motion: reduce) {
	.bl-reveal { opacity: 1; transform: none; }
}

/* =========================================================
   3. Header
   ========================================================= */

.bl-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(11, 11, 12, 0.82);
	backdrop-filter: saturate(140%) blur(14px);
	-webkit-backdrop-filter: saturate(140%) blur(14px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .bl-header { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .bl-header { top: 46px; }
}

.bl-header .wp-block-site-title a { text-decoration: none; }
.bl-header .wp-block-site-title a::after {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-left: 5px;
	vertical-align: 2px;
	background: var(--wp--preset--color--lime);
	border-radius: 50%;
}

.bl-header .wp-block-navigation a {
	position: relative;
	padding-block: 0.35rem;
}
.bl-header .wp-block-navigation a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 1px;
	background: var(--wp--preset--color--lime);
	transition: width 0.28s ease;
}
.bl-header .wp-block-navigation a:hover::after,
.bl-header .wp-block-navigation .current-menu-item > a::after { width: 100%; }
.bl-header .wp-block-navigation a:hover { text-decoration: none; color: var(--wp--preset--color--lime); }

/* Cart link in header */
.bl-cart {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--chalk);
	text-decoration: none;
	border: 1px solid var(--wp--preset--color--line);
	padding: 0.55rem 0.85rem;
	border-radius: 2px;
	transition: border-color 0.2s ease, color 0.2s ease;
	white-space: nowrap;
}
.bl-cart:hover { border-color: var(--wp--preset--color--lime); color: var(--wp--preset--color--lime); }
.bl-cart__count {
	background: var(--wp--preset--color--lime);
	color: var(--wp--preset--color--ink);
	border-radius: 999px;
	min-width: 1.35em;
	padding: 0 0.35em;
	text-align: center;
	font-weight: 700;
}
.bl-cart--empty .bl-cart__count {
	background: transparent;
	color: var(--wp--preset--color--muted);
	border: 1px solid var(--wp--preset--color--line);
}

/* Mobile navigation overlay */
.bl-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--ink) !important;
	padding-top: 4.5rem;
}
.bl-header .wp-block-navigation__responsive-container.is-menu-open a { color: var(--wp--preset--color--chalk); }

/* =========================================================
   4. Hero
   ========================================================= */

.bl-hero { position: relative; overflow: hidden; }
.bl-hero::before {
	content: "";
	position: absolute;
	inset: -30% -10% auto -10%;
	height: 70vh;
	background: radial-gradient(60% 60% at 50% 40%, rgba(198,242,78,0.10), transparent 70%);
	pointer-events: none;
}
.bl-hero > * { position: relative; }

/* Big lettered wordmark used in the footer */
.bl-wordmark {
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: -0.05em;
	line-height: 0.82;
	font-size: clamp(3.5rem, 17vw, 15rem);
	color: transparent;
	-webkit-text-stroke: 1px var(--wp--preset--color--line);
	margin: 0;
	user-select: none;
}

/* =========================================================
   5. Content defaults
   ========================================================= */

.wp-block-details {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-block: 1.25rem;
}
.wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
	font-size: 1.0625rem;
	letter-spacing: -0.02em;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	font-family: var(--wp--preset--font-family--mono);
	color: var(--wp--preset--color--lime);
	font-size: 1.25rem;
	line-height: 1;
	transition: transform 0.25s ease;
}
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > *:not(summary) { color: var(--wp--preset--color--muted); }

.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table td, .wp-block-table th {
	border-color: var(--wp--preset--color--line);
	padding: 0.85rem 1rem;
}
.wp-block-table th { color: var(--wp--preset--color--chalk); text-align: left; }

.wp-block-image img { display: block; }

.wp-block-post-title { text-wrap: balance; }

/* Contact / comment form fields */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="date"],
select,
textarea,
.wp-block-search__input {
	width: 100%;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
	color: var(--wp--preset--color--chalk);
	font-family: inherit;
	font-size: 1rem;
	padding: 0.9rem 1rem;
	transition: border-color 0.2s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--wp--preset--color--lime); }
::placeholder { color: #5E5E66; }

label {
	display: block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-bottom: 0.5rem;
}

/* =========================================================
   6. Footer
   ========================================================= */

.bl-footer { border-top: 1px solid var(--wp--preset--color--line); }
.bl-footer a { color: var(--wp--preset--color--muted); text-decoration: none; }
.bl-footer a:hover { color: var(--wp--preset--color--lime); text-decoration: none; }
.bl-footer .wp-block-navigation { display: block; }
.bl-footer .wp-block-navigation ul {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	align-items: flex-start;
}
.bl-footer .wp-block-navigation,
.bl-footer .wp-block-navigation a {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	text-transform: none;
}

/* =========================================================
   7. Small screens
   ========================================================= */

@media (max-width: 781px) {
	.bl-hero::before { height: 50vh; }
}

/* =========================================================
   8. Contact form ([baseline_contact_form])
   ========================================================= */

.bl-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
}
@media (max-width: 600px) {
	.bl-form__row { grid-template-columns: 1fr; }
}
.bl-form p { margin: 0 0 1.25rem; }
.bl-form__hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.bl-form button {
	background: var(--wp--preset--color--lime);
	color: var(--wp--preset--color--ink);
	border: 0;
	border-radius: 2px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 1rem 1.75rem;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.bl-form button:hover { background: var(--wp--preset--color--chalk); }

.bl-formnotice {
	border: 1px solid var(--wp--preset--color--line);
	border-top: 2px solid var(--wp--preset--color--lime);
	background: var(--wp--preset--color--surface);
	padding: 1rem 1.25rem;
	margin-bottom: 1.75rem;
	font-size: 0.9375rem;
}
.bl-formnotice--err { border-top-color: #FF6B5A; }
