/* MAKORA – main styles.
   Layout: build-plate grid. Hero with a live "print", product grid, steps, materials table, quote band.
   Colours follow the MAKORA logo: near-black ink and sky blue (#48C2FD). The blue is too light for white
   text, so buttons and links use a deeper shade of it (--accent) in light mode. */

:root {
	--bg: #EEF1F4;
	--plate: #E2E7EC;
	--card: #FAFBFC;
	--fg: #111518;
	--muted: #59646E;
	--line: #C9D2DA;
	--brand: #48C2FD;
	--accent: #0A6AA8;
	--accent-fg: #FFFFFF;
	--hot: #E2672A;
	--ok: #2E7D32;
	--warn: #B26A00;
	--err: #C0392B;

	--display: "Montserrat", "Arial Black", system-ui, sans-serif;
	--body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

	--r: 10px;
	--r-lg: 14px;
	--wrap: 1180px;
	--gutter: max(16px, env(safe-area-inset-left, 0px));
	--gutter-r: max(16px, env(safe-area-inset-right, 0px));
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #111518;
		--plate: #182026;
		--card: #1C252C;
		--fg: #E8EDF1;
		--muted: #98A4AE;
		--line: #2F3B44;
		--brand: #48C2FD;
		--accent: #48C2FD;
		--accent-fg: #04263A;
		--hot: #FF8A4C;
		--ok: #7CC67F;
		--warn: #F0B35A;
		--err: #FF7A6B;
		color-scheme: dark;
	}
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--fg); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.02em; }
h1 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.8vw, 32px); font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.lead { font-size: 18px; color: var(--muted); max-width: 56ch; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 16px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 0; border-radius: 999px; padding: 12px 22px;
	font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer;
	background: var(--accent); color: var(--accent-fg);
	transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.08); color: var(--accent-fg); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.btn--light { background: var(--card); color: var(--fg); }
.btn--light:hover { color: var(--fg); }
.link-arrow { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ---------- header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.site-header {
	position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
	background: color-mix(in srgb, var(--bg) 90%, transparent);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: calc(32px + env(safe-area-inset-top, 0px)); }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header__inner { display: flex; align-items: center; gap: 20px; padding-block: 12px; }
.brand { margin-right: auto; }
.brand .custom-logo { max-height: 44px; width: auto; display: block; }
.logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--fg); }
.logo:hover { color: var(--fg); }
.logo .logo-svg { display: block; height: 46px; width: auto; }
.logo-svg .blue { fill: var(--brand); }
.logo--footer .logo-svg { height: 104px; }
@media (max-width: 760px) { .site-header .logo .logo-svg { height: 34px; } }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--fg); }
.site-nav .current-menu-item > a[href*="#"] { color: var(--muted); }
.site-nav .current-menu-item > a[href*="#"]:hover { color: var(--fg); }
.site-nav .sub-menu { display: none; }

.cart-link {
	position: relative; display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line);
	color: var(--fg); text-decoration: none; font-weight: 600; font-size: 15px;
}
.cart-link:hover { color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.cart-link__count {
	position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
	background: var(--hot); color: #fff; font-family: var(--mono); font-size: 12px; display: grid; place-items: center;
}
.cart-link__count[hidden] { display: none; }

.nav-toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--fg); }

@media (max-width: 760px) {
	.nav-toggle { display: inline-flex; order: 3; }
	.cart-link { order: 2; }
	.cart-link__label { display: none; }
	.site-header__inner { flex-wrap: wrap; gap: 12px; }
	.site-nav { order: 4; flex-basis: 100%; display: none; }
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; gap: 0; padding-block: 6px 10px; }
	.site-nav a { display: block; padding: 10px 0; font-size: 17px; border-top: 1px solid var(--line); }
}

/* ---------- hero ---------- */
.hero { padding-block: 52px 36px; }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.hero__copy { min-width: 0; }
.hero h1 { font-size: clamp(34px, 5.4vw, 64px); letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin: 18px 0 26px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.specs { display: flex; gap: 26px; flex-wrap: wrap; margin: 32px 0 0; }
.specs div { margin: 0; }
.specs dt { font-family: var(--mono); font-size: 18px; font-weight: 600; }
.specs dd { margin: 0; font-size: 13px; color: var(--muted); }
.printer { position: relative; aspect-ratio: 1 / 1; max-width: 100%; border-radius: 16px; overflow: hidden; background: var(--plate); border: 1px solid var(--line); }
.printer canvas { width: 100%; height: 100%; display: block; }
.printer__hud { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); }
@media (max-width: 820px) {
	.hero__inner { grid-template-columns: 1fr; }
	.printer { max-width: 420px; }
}

/* ---------- sections ---------- */
.section { padding-block: 40px; }
.sechead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sechead h2 { margin: 0; }
.sechead p { color: var(--muted); margin: 6px 0 0; max-width: 60ch; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { border-top: 3px solid var(--accent); padding-top: 12px; }
.step__n { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.step h3 { margin: 6px 0; font-size: 15px; }
.step p { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .steps { grid-template-columns: 1fr; } }

.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.tbl table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.mono { white-space: nowrap; }

.band {
	display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
	padding: 28px; border-radius: 18px; color: var(--accent-fg);
	background: var(--accent) repeating-linear-gradient(0deg, transparent 0 7px, rgb(255 255 255 / .06) 7px 8px);
}
.band h2 { margin: 0 0 4px; }
.band p { margin: 0; opacity: .9; max-width: 54ch; }

.empty-state { border: 1.5px dashed var(--line); border-radius: var(--r-lg); padding: 36px 20px; text-align: center; }
.empty-state p { margin: 0 0 4px; }

/* ---------- pages ---------- */
.mk-page { padding-block: 36px 56px; }
.mk-page--narrow { max-width: 780px; }
.mk-page--center { text-align: center; padding-block: 90px; }
.mk-page--center .ctas { justify-content: center; }
.page-header { margin-bottom: 26px; }
.page-header .lead { margin-top: 10px; }
.entry-content { max-width: 72ch; }
.entry-content > * + * { margin-top: 1em; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.2em; }
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 10px; }
.post-list { display: grid; gap: 18px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.post-card h2 { font-size: 20px; }
.post-card h2 a { color: var(--fg); text-decoration: none; }
.post-thumb { margin: 0 0 24px; }
.post-thumb img { border-radius: var(--r-lg); }
.nav-links { display: flex; gap: 10px; margin-top: 24px; }

/* WooCommerce cart/checkout/account pages use page.php – let them use the full width */
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content,
.woocommerce-account .entry-content { max-width: none; }

/* ---------- forms ---------- */
.formcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fgrid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .fgrid { grid-template-columns: 1fr; } }
.fgrid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
.fgrid label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--fg); font-size: 14px; }
.fgrid label.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.hint { font-weight: 400; font-size: 12px; color: var(--muted); }
input:not([type]), input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="password"], input[type="search"], input[type="file"], select, textarea {
	width: 100%; padding: 10px 12px; font-size: 15px; font-weight: 400; color: var(--fg);
	background: var(--bg); border: 1.5px solid var(--line); border-radius: 8px;
}
input[type="file"] { padding: 8px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

.notice { border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid; }
.notice--ok { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.notice--error { background: color-mix(in srgb, var(--err) 12%, transparent); border-color: color-mix(in srgb, var(--err) 40%, transparent); }

.quote-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.quote-layout__aside { background: var(--plate); border-radius: var(--r-lg); padding: 22px; }
.quote-layout__aside h2 { font-size: 18px; }
.checklist { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.checklist li { padding-left: 26px; position: relative; font-size: 15px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(0deg, var(--accent) 0 2px, transparent 2px 4px); }
@media (max-width: 820px) { .quote-layout { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 36px; color: var(--muted); font-size: 14px; padding-bottom: env(safe-area-inset-bottom, 0px); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-title { font-family: var(--body); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--fg); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.contact-list li { display: flex; align-items: center; gap: 8px; }
.logo--footer { margin-bottom: 10px; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 28px; padding-block: 18px; font-size: 13px; }
.site-footer__bottom .seller { text-align: right; }
@media (max-width: 760px) { .site-footer__bottom .seller { text-align: left; } }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; animation: none !important; }
}
.site-footer .logo:hover { color: var(--fg); }
