/* LIMARI — component layer on top of theme.json tokens.
   Tokens come from theme.json as --wp--preset--* / --wp--custom--* variables. */

/* ---------- Base ---------- */

html { -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--wine);
	outline-offset: 3px;
}

/* English editorial headlines use the serif; Hebrew stays in Assistant. */
:where(h1, h2, h3, .limari-display):lang(en),
.limari-display {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 300;
	letter-spacing: -0.01em;
	line-height: var(--wp--custom--line-height--tight);
}
/* English inside RTL pages: correct punctuation order, keep the page's alignment. */
:where(h1, h2, h3, p, .limari-display):lang(en) { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] :where(h1, h2, h3, p, .limari-display):lang(en) { text-align: right; }
.limari-display { font-size: var(--wp--preset--font-size--display); margin: 0; }
.limari-display em { font-style: italic; }

.limari-lead {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 300;
	line-height: 1.55;
	max-width: 34ch;
}

/* Product names follow the packaging: geometric caps, open tracking. */
.limari-product-name {
	font-family: var(--wp--preset--font-family--geometric);
	font-weight: 400;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1.5;
	direction: ltr;
	unicode-bidi: isolate;
}

/* ---------- Brand device: the logo's three four-point stars ---------- */

.limari-stars {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	color: var(--wp--preset--color--wine);
	width: 100%;
	max-width: 22rem;
	margin-inline: auto;
}
.limari-stars::before,
.limari-stars::after {
	content: "";
	flex: 1;
	border-top: 1px solid currentColor;
	opacity: 0.55;
}
.limari-stars svg { width: 4.5rem; height: 1.5rem; flex: none; }
.limari-stars--bare::before,
.limari-stars--bare::after { content: none; }

/* ---------- Buttons ---------- */

.limari-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.9rem 2.25rem;
	border: 1px solid var(--wp--preset--color--wine);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--wine);
	color: var(--wp--preset--color--white);
	font: 600 var(--wp--preset--font-size--small) / 1.2 var(--wp--preset--font-family--hebrew);
	letter-spacing: 0.02em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease),
		color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease),
		border-color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease);
}
.limari-btn:hover { background: var(--wp--preset--color--cocoa); border-color: var(--wp--preset--color--cocoa); color: var(--wp--preset--color--white); }

.limari-btn--outline { background: transparent; color: var(--wp--preset--color--wine); }
.limari-btn--outline:hover { background: var(--wp--preset--color--wine); border-color: var(--wp--preset--color--wine); }

.limari-btn--light { background: var(--wp--preset--color--white); border-color: var(--wp--preset--color--white); color: var(--wp--preset--color--wine); }
.limari-btn--light:hover { background: var(--wp--preset--color--blush); border-color: var(--wp--preset--color--blush); color: var(--wp--preset--color--wine); }

.limari-link {
	color: inherit;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.45em;
	transition: text-underline-offset var(--wp--custom--motion--fast) var(--wp--custom--motion--ease);
}
.limari-link:hover { text-underline-offset: 0.25em; color: inherit; }

/* ---------- Header ---------- */

.limari-header {
	position: sticky;
	top: 0;
	z-index: 50;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 1rem;
	padding: 1.1rem var(--wp--custom--gutter);
	color: var(--wp--preset--color--wine);
	background: transparent;
	transition: background-color var(--wp--custom--motion--base) var(--wp--custom--motion--ease),
		padding var(--wp--custom--motion--base) var(--wp--custom--motion--ease);
}
.limari-header.is-stuck {
	background: color-mix(in srgb, var(--wp--preset--color--white) 94%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: var(--wp--custom--hairline);
	padding-block: 0.7rem;
}
.limari-header__logo img { height: 2.75rem; width: auto; }
.limari-header.is-stuck .limari-header__logo img { height: 2.1rem; }

.limari-nav { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.limari-nav a {
	display: grid;
	gap: 0.1rem;
	color: inherit;
	text-decoration: none;
	line-height: 1.2;
	padding-block: 0.4rem;
	white-space: nowrap;
}
.limari-nav__en {
	font-family: var(--wp--preset--font-family--geometric);
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.limari-nav__he { font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--cocoa); }
.limari-nav a:hover .limari-nav__en { text-decoration: underline; text-underline-offset: 0.4em; }

.limari-utility { display: flex; gap: 0.5rem; justify-content: flex-end; }
.limari-icon-btn {
	display: inline-grid;
	place-items: center;
	inline-size: 2.75rem;
	block-size: 2.75rem;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
	position: relative;
}
.limari-icon-btn svg { width: 1.3rem; height: 1.3rem; }
.limari-icon-btn__count {
	position: absolute;
	inset-block-start: 0.35rem;
	inset-inline-start: 0.3rem;
	min-width: 1.05rem;
	height: 1.05rem;
	border-radius: 1rem;
	background: var(--wp--preset--color--wine);
	color: var(--wp--preset--color--white);
	font: 600 0.625rem/1.05rem var(--wp--preset--font-family--hebrew);
	text-align: center;
}
.limari-menu-toggle { display: none; }

@media (max-width: 900px) {
	.limari-nav { display: none; }
	.limari-menu-toggle { display: inline-grid; }
	.limari-header__logo img { height: 2.1rem; }
}

/* ---------- Product card ---------- */

.limari-card {
	display: grid;
	gap: 1.25rem;
	color: inherit;
	text-decoration: none;
	text-align: center;
}
.limari-card__media {
	position: relative;
	aspect-ratio: 4 / 5;
	background: var(--wp--preset--color--blush);
	overflow: hidden;
}
/* Every product sits in the same box, so bottles and jars keep their true relative scale. */
.limari-card__media img {
	position: absolute;
	inset: 11% 16%;
	width: 68%;
	height: 78%;
	object-fit: contain;
	transition: transform var(--wp--custom--motion--slow) var(--wp--custom--motion--ease);
}
.limari-card:hover .limari-card__media img { transform: translateY(-2%) scale(1.03); }
.limari-card__body { display: grid; gap: 0.35rem; padding-inline: 0.5rem; }
.limari-card__desc {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--cocoa);
	line-height: 1.6;
	max-width: 32ch;
	margin-inline: auto;
}
.limari-card:hover .limari-product-name { text-decoration: underline; text-underline-offset: 0.45em; }

.limari-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(2.5rem, 4vw, 4.5rem) clamp(1rem, 2.5vw, 2.5rem);
}
@media (max-width: 760px) {
	.limari-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 0.75rem; }
	.limari-card { gap: 0.9rem; }
	.limari-card__desc { font-size: var(--wp--preset--font-size--x-small); }
	.limari-product-name { font-size: 0.75rem; letter-spacing: 0.1em; }
}

/* ---------- Image presentation ---------- */

.limari-frame { overflow: hidden; background: var(--wp--preset--color--nude); }
.limari-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.limari-frame--portrait { aspect-ratio: 4 / 5; }
.limari-frame--tall { aspect-ratio: 2 / 3; }
.limari-frame--square { aspect-ratio: 1 / 1; }

/* ---------- Forms ---------- */

.limari-field { display: grid; gap: 0.4rem; }
.limari-field label { font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.limari-input {
	min-height: 3rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--sand);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--wine);
	font: inherit;
}
.limari-input:focus-visible { border-color: var(--wp--preset--color--wine); outline-offset: 1px; }
.limari-field__hint { font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--cocoa); }

/* ---------- Motion ---------- */

.limari-reveal { animation: limari-reveal var(--wp--custom--motion--slow) var(--wp--custom--motion--ease) both; }
@keyframes limari-reveal {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 1ms !important;
		scroll-behavior: auto !important;
	}
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
