/* ==========================================================================
   Base: reset, typography, forms, global rules
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }

body {
	margin: 0;
	background: var(--wk-bg);
	color: var(--wk-ink);
	font-family: var(--wk-font);
	font-size: var(--wk-fs-m);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

html.wk-no-scroll, html.wk-no-scroll body { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; }
svg.wk-icon { flex: none; }

a { color: var(--wk-orange-text); text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color var(--wk-d-fast) ease; }
a:hover { color: var(--wk-orange-text-hover); }

h1, h2, h3, h4 { margin: 0 0 .5em; font-family: var(--wk-font-display); font-weight: 700; line-height: 1.05; letter-spacing: -.005em; color: var(--wk-ink); }
h1 { font-size: var(--wk-h1); line-height: .98; }
h2 { font-size: var(--wk-h2); }
h3 { font-size: var(--wk-h3); }
h4 { font-size: 22px; }
p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--wk-orange); outline-offset: 2px; }

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
	padding: 12px 16px; background: var(--wk-surface); color: var(--wk-ink); border-radius: var(--wk-r); box-shadow: var(--wk-shadow-1);
}

/* Layout helpers ---------------------------------------------------------- */
.wk-wrap { width: 100%; max-width: var(--wk-max); margin: 0 auto; padding: 0 var(--wk-gutter); }
.wk-main { min-height: 50vh; }
.wk-section { padding: var(--wk-s20) 0; }
.wk-section--white { background: var(--wk-surface); border-top: 1px solid var(--wk-line); border-bottom: 1px solid var(--wk-line); }
.wk-kicker { margin: 0; font-size: var(--wk-fs-s); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--wk-orange-text); }

/* Forms ------------------------------------------------------------------- */
input, select, textarea, button { font: inherit; color: inherit; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="search"], input[type="number"], input[type="url"], input[type="date"], textarea, select {
	width: 100%;
	min-height: var(--wk-control-h);
	padding: 0 14px;
	border: 1px solid var(--wk-field-line);
	border-radius: var(--wk-r);
	background-color: var(--wk-surface);
	color: var(--wk-ink);
	font-size: var(--wk-fs-m);
	transition: border-color var(--wk-d-fast) ease, box-shadow var(--wk-d-fast) ease;
}
textarea { min-height: 140px; padding: 14px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--wk-orange); box-shadow: var(--wk-shadow-focus); }

/* Number fields: no browser spinners */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Search fields: no browser clear button (we draw our own X) */
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Dropdowns – permanent rule: never the browser arrow at the edge.
   Own chevron 16px from the right edge, 48px right padding. */
select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-right: 48px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231E1D1A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 16px 16px;
}
select::-ms-expand { display: none; }

input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; margin: 0; accent-color: var(--wk-orange); }

/* Floating labels (set up by forms.js on WooCommerce and theme forms).
   The label sits in the field and slides into a gap in the border on focus or when filled. */
.wk-fl { position: relative; }
.wk-fl > label {
	position: absolute;
	left: 10px;
	top: calc(var(--wk-control-h) / 2);
	transform: translateY(-50%);
	z-index: 1;
	max-width: calc(100% - 60px);
	padding: 0 4px;
	margin: 0;
	background: var(--wk-surface);
	color: var(--wk-muted);
	font-size: var(--wk-fs-m);
	font-weight: 400;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
	transition: top var(--wk-d-fast) ease, font-size var(--wk-d-fast) ease, color var(--wk-d-fast) ease;
}
.wk-fl.is-textarea > label { top: 26px; }
.wk-fl.is-filled > label,
.wk-fl.is-focused > label { top: 0; font-size: var(--wk-fs-xs); color: var(--wk-ink-2); }
.wk-fl.is-focused > label { color: var(--wk-orange-text); }
.wk-fl.is-focused input, .wk-fl.is-focused textarea { box-shadow: var(--wk-shadow-focus); }
.wk-fl > label .required, .wk-fl > label .optional { text-decoration: none; color: inherit; }
.wk-fl input::placeholder, .wk-fl textarea::placeholder { color: transparent; }

/* Tables ------------------------------------------------------------------ */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 8px; text-align: left; border-bottom: 1px solid var(--wk-line-soft); }
th { font-size: var(--wk-fs-sm); font-weight: 600; color: var(--wk-muted); }

/* Content ----------------------------------------------------------------- */
.wk-content > *:first-child { margin-top: 0; }
.wk-content img { border-radius: var(--wk-r-md); }
.wk-content ul, .wk-content ol { padding-left: 1.2em; }
.wk-content blockquote { margin: 1.5em 0; padding: 0 0 0 20px; border-left: 2px solid var(--wk-line); color: var(--wk-ink-2); }
.alignwide { max-width: 1280px; }
.alignfull { width: 100%; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0s; animation-duration: 0s; scroll-behavior: auto; }
}
