/* =========================================================
   Love Eat — site styles

   Elementor handles page layout. This file provides the
   document baseline (a trimmed equivalent of the reset
   Hello Elementor used to supply) plus site components.

   Deliberately NOT carried over from Hello: its own palette
   (pink #c36 links, bordered buttons, #333 on #fff body) and
   its .site-header/.site-footer container widths, which are
   Hello's design decisions rather than normalisation.
   ========================================================= */

:root {
	/* Bare links only — content areas, comments and the non-Elementor
	   templates. Anything styled in Elementor overrides this.
	   LE - dark green / LE - mid green from the Global Colors palette. */
	--loveeat-link-color: #48705D;
	--loveeat-link-color-hover: #4FA171;
}

/* ---------- Baseline ---------- */

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

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

body {
	margin: 0;

	/* Hello Elementor set these on body. Without them macOS uses subpixel
	   antialiasing, which renders text noticeably heavier and less crisp. */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;

	/* Stops a full-bleed section or an overflowing animation from
	   creating a horizontal scrollbar. */
	overflow-x: clip;
}

img,
video,
svg {
	max-width: 100%;
	height: auto;
}

img {
	border-style: none;
}

[hidden],
template {
	display: none;
}

details {
	display: block;
}

summary {
	display: list-item;
}

hr {
	box-sizing: content-box;
	height: 0;
	overflow: visible;
}

/* ---------- Typography ---------- */

/*
 * Heading weight.
 *
 * The browser default for h1-h6 is bold (700). The custom "Search" family is
 * supplied as a single 400 face, so a heading inheriting 700 gets a browser
 * synthesised faux bold, which fills in its thin brush strokes. Matching Hello
 * Elementor's reset value of 500 keeps the real face in use.
 */
h1,
h2,
h3,
h4,
h5,
h6 {
	color: inherit;
	font-family: inherit;
	font-weight: 500;
	line-height: 1.2;
	margin-block-start: 0.5rem;
	margin-block-end: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
	margin-block-start: 0;
	margin-block-end: 0.9rem;
}

b,
strong {
	font-weight: bolder;
}

small {
	font-size: 80%;
}

sub,
sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sub { bottom: -0.25em; }
sup { top: -0.5em; }

code,
kbd,
samp {
	font-family: monospace;
	font-size: 1em;
}

pre {
	font-family: monospace;
	font-size: 1em;
	white-space: pre-wrap;
}

abbr[title] {
	border-block-end: none;
	text-decoration: underline dotted;
}

figcaption {
	font-size: 1rem;
	font-style: italic;
	line-height: 1.4;
}

dl,
dt,
dd,
ol,
ul,
li {
	margin-block-start: 0;
	margin-block-end: 0;
}

a {
	background-color: transparent;
	color: var(--loveeat-link-color);
	text-decoration: none;
}

a:hover,
a:active {
	color: var(--loveeat-link-color-hover);
}

a:not([href]):not([tabindex]) {
	color: inherit;
	text-decoration: none;
}

/* ---------- Content lists ----------
   Lists written in body copy: the Elementor Text Editor widget, the
   Post Content widget (policy pages, news posts) and the fallback
   templates. Navigation menus, icon lists and galleries live in other
   widgets and are untouched.

   Bulleted lists swap the disc for the brand's hand-drawn yellow dash.
   Everything is in em so the dash, indent and gaps follow whatever
   text size the widget is set to in Elementor. */

.elementor-widget-text-editor :is(ul, ol),
.elementor-widget-theme-post-content :is(ul, ol),
.entry-content :is(ul, ol) {
	--le-bullet-width: 1.15em;
	--le-list-indent: 2.3em;
	--le-list-item-gap: 0.55em;

	/* Space below the list, so a following paragraph does not sit
	   tight against the last item. */
	margin-block-end: 1.6em;
	padding-inline-start: var(--le-list-indent);
}

/* No trailing gap when the list is the last thing in its container,
   and a tighter one for a list nested inside a list item. */
.elementor-widget-text-editor :is(ul, ol):last-child,
.elementor-widget-theme-post-content :is(ul, ol):last-child,
.entry-content :is(ul, ol):last-child {
	margin-block-end: 0;
}

.elementor-widget-text-editor li :is(ul, ol),
.elementor-widget-theme-post-content li :is(ul, ol),
.entry-content li :is(ul, ol) {
	margin-block: var(--le-list-item-gap) 0;
}

.elementor-widget-text-editor li + li,
.elementor-widget-theme-post-content li + li,
.entry-content li + li {
	margin-block-start: var(--le-list-item-gap);
}

.elementor-widget-text-editor ul,
.elementor-widget-theme-post-content ul,
.entry-content ul {
	list-style: none;
}

.elementor-widget-text-editor ul > li,
.elementor-widget-theme-post-content ul > li,
.entry-content ul > li {
	position: relative;
}

/* The dash sits at the left edge of the list, centred on the first
   line of the item. 0.6em is the fallback for browsers without the
   lh unit. */
.elementor-widget-text-editor ul > li::before,
.elementor-widget-theme-post-content ul > li::before,
.entry-content ul > li::before {
	content: "";
	position: absolute;
	inset-inline-start: calc(-1 * var(--le-list-indent));
	top: 0.6em;
	top: calc(0.5lh - var(--le-bullet-width) * 4 / 28);
	width: var(--le-bullet-width);
	aspect-ratio: 28 / 8;
	background: url("../images/bullet-dash.svg") no-repeat center / contain;
}

/* ---------- Forms ---------- */

/*
 * Form elements do not inherit typography, and text inputs size themselves
 * from their `size` attribute (roughly 20 characters) rather than filling
 * their container. Hello Elementor normalised both; without it an input in a
 * flex row collapses to its intrinsic width.
 *
 * Borders, padding and colours are deliberately left to Elementor's own form
 * widget styling rather than reimposed here.
 */

label {
	display: inline-block;
	line-height: 1;
	vertical-align: middle;
}

button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	margin: 0;
}

button,
input {
	overflow: visible;
}

button,
select {
	text-transform: none;
}

input[type="date"],
input[type="email"],
input[type="month"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="time"],
input[type="url"],
input[type="week"],
select,
textarea {
	width: 100%;
}

[type="button"],
[type="reset"],
[type="submit"],
button {
	-webkit-appearance: button;
	width: auto;
}

[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled),
button:not(:disabled) {
	cursor: pointer;
}

select {
	display: block;
}

textarea {
	overflow: auto;
	resize: vertical;
}

[type="checkbox"],
[type="radio"] {
	box-sizing: border-box;
	padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
	height: auto;
}

[type="search"] {
	-webkit-appearance: textfield;
	outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
	-webkit-appearance: none;
}

::-webkit-file-upload-button {
	-webkit-appearance: button;
	font: inherit;
}

fieldset {
	padding: 0.35em 0.75em 0.625em;
}

legend {
	box-sizing: border-box;
	color: inherit;
	display: table;
	max-width: 100%;
	padding: 0;
	white-space: normal;
}

progress {
	vertical-align: baseline;
}

/* ---------- Tables ---------- */

table {
	background-color: transparent;
	border-collapse: collapse;
	border-spacing: 0;
	font-size: 0.9em;
	margin-block-end: 15px;
	width: 100%;
}

table th,
table td {
	border: 1px solid hsla(0, 0%, 50%, 0.5);
	line-height: 1.5;
	padding: 15px;
	vertical-align: top;
}

table th {
	font-weight: 700;
}

table tbody > tr:nth-child(odd) > th,
table tbody > tr:nth-child(odd) > td {
	background-color: hsla(0, 0%, 50%, 0.07);
}

/* ---------- Accessibility ---------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 1rem;
	left: 1rem;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.75rem 1.25rem;
	margin: 0;
	overflow: visible;
	clip-path: none;
	background: #fff;
	color: #000;
	text-decoration: none;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
	box-shadow: 0 0 0 4px #fff;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}

/* ---------- WordPress content classes ---------- */

.alignleft {
	float: left;
	margin-right: 1rem;
}

.alignright {
	float: right;
	margin-left: 1rem;
}

.aligncenter {
	clear: both;
	display: block;
	margin-inline: auto;
}

.alignfull {
	margin-inline: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

.alignfull img {
	width: 100%;
}

.wp-caption {
	margin-block-end: 1.25rem;
	max-width: 100%;
}

.wp-caption img {
	display: block;
	margin-inline: auto;
}

.wp-caption-text {
	margin: 0;
}

.sticky {
	display: block;
	position: relative;
}

/* Fallback container, used only by the non-Elementor templates. */
.site-container {
	max-width: 1400px;
	margin-inline: auto;
	padding-inline: 1.25rem;
	padding-block: 2rem;
}

/* ---------- Scrolling text marquee ---------- */
/* Add the class "le-marquee" to an Elementor widget via
   Advanced > CSS Classes. Speed is set by assets/js/site.js. */

.le-marquee {
	overflow: hidden;
}

.le-marquee__track {
	display: flex;
	width: max-content;
	max-width: none;
	animation: le-marquee-scroll var(--le-marquee-duration, 20s) linear infinite;
	will-change: transform;
}

.le-marquee__item {
	flex: 0 0 auto;
	margin-block: 0;
	padding-inline-end: var(--le-marquee-gap, 3rem);
	white-space: nowrap;
}

@keyframes le-marquee-scroll {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-50%, 0, 0); }
}

/* ---------- Logo marquee ----------
   Add "le-marquee le-marquee--logos" to a Basic Gallery widget.

   Every logo is scaled to fit the same box (max height x max width)
   while keeping its proportions, and each logo is only as wide as
   itself, so the gap between logos is identical whatever their shape.
   An image carousel cannot do this: it gives every slide the same
   width, so a narrow logo ends up surrounded by extra empty space.

   Tune per widget by overriding these custom properties, e.g. in the
   widget's Advanced > Custom CSS:  selector { --le-logo-max-height: 60px; } */

.le-marquee--logos {
	--le-logo-max-height: 70px;
	--le-logo-max-width: 200px;
	--le-logo-gap: 60px;
	--le-marquee-gap: var(--le-logo-gap);
}

@media (max-width: 767px) {
	.le-marquee--logos {
		--le-logo-max-height: 48px;
		--le-logo-max-width: 140px;
		--le-logo-gap: 40px;
	}
}

.le-marquee--logos .gallery {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: var(--le-logo-gap);
	margin: 0;
}

.le-marquee--logos .gallery-item {
	flex: 0 0 auto;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.le-marquee--logos .gallery-icon {
	line-height: 0;
}

/* Height is definite rather than auto: SVG logos that only declare a
   viewBox have no intrinsic size, so with auto on both axes they
   collapse to 0x0 in a content-sized flex row. Width follows from the
   proportions; when a long wordmark hits the width cap, object-fit
   shrinks the drawing inside its box instead of squashing it, and the
   box stays exactly as wide as the drawn logo, so gaps remain exact. */
.le-marquee--logos .gallery-item img {
	display: block;
	height: var(--le-logo-max-height);
	width: auto;
	max-width: var(--le-logo-max-width);
	object-fit: contain;
	border: 0 !important;
}

/* Pause on hover and on keyboard focus. */
.le-marquee:hover .le-marquee__track,
.le-marquee:focus-within .le-marquee__track {
	animation-play-state: paused;
}

/* Reduced motion: static, single copy, wraps normally.
   Handled in CSS rather than JS so toggling the OS setting
   takes effect without a page reload. */
@media (prefers-reduced-motion: reduce) {

	.le-marquee {
		overflow: visible;
	}

	.le-marquee__track {
		animation: none;
		width: auto;
		flex-wrap: wrap;
	}

	.le-marquee__item {
		white-space: normal;
		padding-inline-end: 0;
	}

	.le-marquee__item ~ .le-marquee__item {
		display: none;
	}

	/* Static logos wrap into a centred row instead of overflowing. */
	.le-marquee--logos .gallery {
		flex-wrap: wrap;
		justify-content: center;
		row-gap: calc(var(--le-logo-gap) / 2);
	}
}

/* ---------- Print ---------- */

@media print {

	*,
	*::before,
	*::after {
		background: transparent !important;
		box-shadow: none !important;
		color: #000 !important;
		text-shadow: none !important;
	}

	a,
	a:visited {
		text-decoration: underline;
	}

	thead {
		display: table-header-group;
	}

	/* The dash bullet is a background image, which the rule above
	   strips, so fall back to ordinary discs on paper. */
	.elementor-widget-text-editor ul,
	.elementor-widget-theme-post-content ul,
	.entry-content ul {
		list-style: disc;
	}

	.elementor-widget-text-editor ul > li::before,
	.elementor-widget-theme-post-content ul > li::before,
	.entry-content ul > li::before {
		content: none;
	}

	img,
	tr {
		break-inside: avoid;
	}

	h2,
	h3,
	p {
		orphans: 3;
		widows: 3;
	}
}
