/* ==========================================================================
   Foundation: reset, typography, links, focus, layout, and the design
   system's primitives (lx-eyebrow, lx-h1..h3, lx-lead, lx-mark, lx-link,
   lx-more, lx-btn, lx-field, lx-input, lx-search), named as in the
   LUMIX PROCUT Design System bundle. Depends on tokens.css.
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-height) + var(--space-4)); /* focused targets never hide under the sticky header (WCAG 2.4.11) */
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	margin: 0;
	background: var(--surface);
	color: var(--text);
	font-family: var(--font-text);
	font-size: var(--body-size);
	line-height: var(--body-line);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- Headings: Montserrat, sentence case, never 300 ---------- */
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--space-4);
	color: var(--ink);
	font-family: var(--font-display);
	font-weight: 600;
	text-wrap: balance;
}
h1, .lx-h1 { font-size: var(--display-lg-size); line-height: var(--display-lg-line); letter-spacing: -0.01em; }
h2, .lx-h2 { font-size: var(--heading-1-size); line-height: var(--heading-1-line); letter-spacing: -0.01em; }
h3, .lx-h3 { font-size: var(--heading-2-size); line-height: var(--heading-2-line); }
h4 { font-size: 18px; line-height: 26px; }
h5, h6 { font-size: var(--body-size); line-height: var(--body-line); }
.lx-display { font-size: var(--display-xl-size); line-height: var(--display-xl-line); font-weight: 700; letter-spacing: -0.02em; }
.lx-h1, .lx-h2, .lx-h3, .lx-display { margin: 0; font-family: var(--font-display); color: var(--ink); }

/* Phones: display-xl drops to display-lg (system rule); page and section titles step down one notch (theme) */
@media (max-width: 47.99em) {
	.lx-display { font-size: var(--display-lg-size); line-height: var(--display-lg-line); font-weight: 700; }
	h1, .lx-h1 { font-size: 32px; line-height: 38px; }
	h2, .lx-h2 { font-size: 26px; line-height: 32px; }
}

p, ul, ol, dl, table, figure, blockquote { margin: 0 0 var(--space-4); }
p { text-wrap: pretty; }
strong, b { font-weight: 700; }
small { font-size: var(--body-sm-size); line-height: var(--body-sm-line); }

/* Eyebrow: UPPERCASE kicker with the 26 x 3px green bar (write it in sentence case in markup) */
.lx-eyebrow {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	margin: 0 0 var(--space-2);
	color: var(--ink);
	font-family: var(--font-display);
	font-size: var(--eyebrow-size);
	line-height: var(--eyebrow-line);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.lx-eyebrow::before {
	content: "";
	flex: none;
	width: 26px;
	height: 3px;
	border-radius: var(--radius-full);
	background: var(--lumix-green);
}

.lx-lead {
	max-width: var(--measure);
	margin: var(--space-4) 0 0;
	color: var(--text);
	font-size: var(--body-lg-size);
	line-height: var(--body-lg-line);
}

/* One highlighted word in a heading */
.lx-mark { box-shadow: inset 0 -0.3em 0 var(--lumix-green); }

.text-muted { color: var(--text-muted); }
.text-sm { font-size: var(--body-sm-size); line-height: var(--body-sm-line); }

/* Running copy */
.prose { max-width: var(--measure); }
.prose > * + h2 { margin-top: var(--space-12); }
.prose > * + h3 { margin-top: var(--space-8); }
.prose ul, .content-list { padding-left: 0; list-style: none; }
.prose ul > li, .content-list > li { position: relative; margin-bottom: var(--space-2); padding-left: 1.25em; }
.prose ul > li::before, .content-list > li::before {
	content: "";
	position: absolute;
	left: 0.15em;
	top: 0.6em;
	width: 8px;
	height: 8px;
	border-radius: var(--radius-full);
	background: var(--lumix-green);
}
.prose ol { padding-left: 1.4em; }
.prose ol > li { margin-bottom: var(--space-2); padding-left: 0.25em; }
.prose ol > li::marker { color: var(--ink); font-weight: 700; }

hr { height: 1px; margin: var(--space-8) 0; border: 0; background: var(--line); }

/* ---------- Links: charcoal text, 2px green underline ---------- */
a, .lx-link {
	color: var(--link);
	text-decoration-line: underline;
	text-decoration-color: var(--lumix-green);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
	transition: text-decoration-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
a:hover, .lx-link:hover { text-decoration-color: currentColor; }
.lx-link { font-weight: 700; }

/* "Learn more" link: UPPERCASE with a green rule that grows on hover (replaces "MORE>") */
.lx-more {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--link);
	font-family: var(--font-display);
	font-size: 14px;
	line-height: 20px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;
}
.lx-more::after {
	content: "";
	width: 18px;
	height: 2px;
	background: var(--lumix-green);
	transition: width var(--dur) var(--ease);
}
.lx-more:hover { text-decoration: none; }
.lx-more:hover::after, a:hover .lx-more::after, .lx-card:hover .lx-more::after { width: 30px; }

/* ---------- Focus: white gap + charcoal ring, following the shape ---------- */
:focus { outline: none; }
:focus-visible {
	outline: 2px solid transparent; /* stays visible in Windows high contrast mode */
	box-shadow: var(--focus-ring);
	border-radius: var(--radius-sm);
}

/* ---------- Accessibility helpers ---------- */
/* .screen-reader-text is the WordPress core class */
.visually-hidden,
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip-link {
	position: absolute;
	left: var(--space-4);
	top: var(--space-4);
	z-index: calc(var(--z-drawer) + 1);
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-md);
	background: var(--ink);
	color: var(--surface);
	font-weight: 700;
	transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; color: var(--surface); }

/* ---------- Layout ---------- */
.container {
	width: 100%;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }

.section { padding-block: var(--section-space); }
.section--alt { background: var(--surface-alt); }
.section--tight { padding-block: var(--space-12); }

/* Section opener (SectionHeading): eyebrow, heading, optional lead */
.lx-section-heading { max-width: 760px; margin-bottom: var(--space-12); }
.lx-section-heading > :last-child { margin-bottom: 0; }
.lx-section-heading--split { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4) var(--space-8); max-width: none; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--grid-gap); }
@media (min-width: 64em) {
	.layout { grid-template-columns: repeat(12, minmax(0, 1fr)); }
	.span-4 { grid-column: span 4; }
	.span-5 { grid-column: span 5; }
	.span-6 { grid-column: span 6; }
	.span-7 { grid-column: span 7; }
	.span-8 { grid-column: span 8; }
	.span-12 { grid-column: 1 / -1; }
}
.stack > * + * { margin-top: var(--space, var(--space-4)); }
.lx-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* ---------- Buttons ---------- */
.lx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: 48px;
	padding: 0 var(--space-6);
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	font-family: var(--font-display);
	font-size: var(--button-size);
	line-height: var(--button-line);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.lx-btn:hover { text-decoration: none; }
.lx-btn svg { width: 18px; height: 18px; flex: none; }
.lx-btn--primary { background: var(--lumix-green); color: var(--on-brand); }
.lx-btn--primary:hover { background: var(--lumix-green-deep); color: var(--on-brand); }
.lx-btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.lx-btn--secondary:hover { border-color: var(--ink); color: var(--ink); }
.lx-btn--sm { min-height: 40px; padding: 0 var(--space-4); font-size: 13px; }
.lx-btn--block { width: 100%; } /* theme extension */
.lx-btn[disabled], .lx-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

/* Square icon button, 44px target (theme extension) */
.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-md);
	background: var(--surface);
	color: var(--ink);
	transition: border-color var(--dur-fast) var(--ease);
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn--plain { border-color: transparent; }

/* ---------- Inputs (also Contact Form 7 and WordPress search fields) ---------- */
.lx-field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-6); }
.lx-label, label {
	display: block;
	color: var(--ink);
	font-size: var(--body-sm-size);
	line-height: var(--body-sm-line);
	font-weight: 700;
}
.lx-help { margin: 0; color: var(--text-muted); font-size: var(--body-sm-size); line-height: var(--body-sm-line); }

.lx-input,
input:is([type="text"], [type="email"], [type="tel"], [type="search"], [type="url"], [type="number"], [type="password"]),
select,
textarea {
	display: block;
	width: 100%;
	height: 48px;
	padding: 0 var(--space-3);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink);
	font-size: var(--body-size); /* 16px: no zoom on focus on iPhone */
	line-height: var(--body-line);
}
textarea { height: auto; min-height: 144px; padding: var(--space-3); resize: vertical; }
select {
	appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23231f20' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 18px;
}
::placeholder { color: var(--text-muted); opacity: 1; }
:is(.lx-input, input, select, textarea):focus-visible { border-color: var(--focus); border-radius: var(--radius-sm); }
:is(.lx-input, input, select, textarea)[aria-invalid="true"], .wpcf7-not-valid { border-color: var(--error); border-width: 2px; }
.field-error, .wpcf7-not-valid-tip {
	display: flex;
	gap: var(--space-2);
	align-items: flex-start;
	margin-top: var(--space-1);
	color: var(--error);
	font-size: var(--body-sm-size);
	line-height: var(--body-sm-line);
	font-weight: 700;
}
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--ink); }
.check { display: flex; gap: var(--space-3); align-items: flex-start; font-weight: 400; font-size: var(--body-size); line-height: var(--body-line); color: var(--text); }
.check input { flex: none; margin: 2px 0 0; }
fieldset { margin: 0 0 var(--space-6); padding: 0; border: 0; }
legend { margin-bottom: var(--space-3); padding: 0; color: var(--ink); font-family: var(--font-display); font-weight: 600; }

/* Search: input with an icon-only primary button */
.lx-search { display: flex; max-width: 480px; }
.lx-search .lx-input, .lx-search input[type="search"] { flex: 1; min-width: 0; border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.lx-search .lx-btn { min-height: 48px; padding: 0 var(--space-4); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { color: var(--ink); font-family: var(--font-display); font-size: var(--body-sm-size); font-weight: 600; border-bottom: 2px solid var(--ink); }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.table-scroll > table { min-width: 34rem; margin-bottom: 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
