/*
Theme Name: MG Coffee Tools
Description: An English WordPress site for espresso tamper development and OEM manufacturing.
Version: 2.2.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: mg-coffee-tools
*/

@font-face {
	font-family: 'Instrument Sans';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url('assets/fonts/instrument-sans.woff2') format('woff2');
}

:root {
	--paper: #faf9f6;
	--white: #fffefd;
	--ink: #212320;
	--muted: #565a54;
	--line: #ddded7;
	--accent: #873b30;
	--accent-hover: #6d2f26;
	--image-mat: #eae9e4;
	--panel: #f0f0ec;
	--footer: #232522;
	--font: "Instrument Sans", "Inter", Arial, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, monospace;
	--gutter: clamp(20px, 4.1vw, 70px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.58 var(--font); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(1320px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 10px; z-index: 100; padding: 10px 16px; background: var(--white); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: grid; align-items: center; grid-template-columns: 1fr auto 1fr; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 39px; aspect-ratio: 1; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.045em; }
.brand-name { font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.menu { display: flex; align-items: center; gap: clamp(18px, 3vw, 43px); list-style: none; margin: 0; padding: 0; }
.menu a, .header-quote { font-size: 14px; font-weight: 680; white-space: nowrap; }
.menu a:hover, .menu a[aria-current] { color: var(--accent); }
.header-quote { display: inline-flex; justify-self: end; gap: 12px; align-items: center; padding: 9px 14px; border: 1px solid #b5b8b0; }
.header-quote:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle { display: none; padding: 8px 0; border: none; color: var(--ink); background: transparent; font-weight: 700; }
.nav-toggle span { margin-left: 4px; }

.home-hero { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(28px, 4.5vw, 72px); align-items: center; padding-block: clamp(36px, 5.3vw, 80px) clamp(30px, 3.6vw, 53px); }
.home-copy { min-width: 0; padding-block: 15px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow span:empty { flex: 0 0 7px; height: 7px; background: currentColor; }
h1, h2, h3 { font-weight: 650; }
h1 { margin-top: 16px; font-size: clamp(43px, 5.2vw, 78px); letter-spacing: -.043em; line-height: 1.03; }
h2 { font-size: clamp(30px, 3.7vw, 55px); letter-spacing: -.036em; line-height: 1.08; }
h3 { font-size: clamp(20px, 1.8vw, 27px); letter-spacing: -.025em; line-height: 1.2; }
.lede { color: var(--muted); font-size: clamp(16px, 1.5vw, 21px); line-height: 1.5; max-width: 37em; margin-top: 22px; }
.home-hero .lede { max-width: 26em; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 27px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 11px 16px; color: var(--ink); border: 1px solid transparent; font-size: 14px; font-weight: 650; line-height: 1.4; text-align: center; transition: background-color .18s ease, border-color .18s ease; }
.button-primary { color: #fff; background: var(--accent); }
.button-primary:hover { background: var(--accent-hover); }
.button-outline { border-color: #b5b8b0; }
.button-outline:hover { background: var(--panel); border-color: var(--ink); }
.hero-figure { min-width: 0; }
.hero-figure img { width: 100%; aspect-ratio: 1.31; object-fit: cover; object-position: 56% 50%; background: var(--image-mat); }
.hero-figure figcaption { padding-top: 8px; color: var(--muted); font-size: 12px; }
.factory-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-block: 1px solid var(--line); }
.factory-facts li { display: grid; align-content: start; gap: 5px; padding: 17px clamp(9px, 1.7vw, 24px); }
.factory-facts li:first-child { padding-left: 0; }
.factory-facts li + li { border-left: 1px solid var(--line); }
.factory-facts strong { font-size: clamp(14px, 1.5vw, 19px); line-height: 1.25; }
.factory-facts li span { color: var(--muted); font-size: clamp(12px, 1.12vw, 15px); }
.home-manufacturing { margin-top: clamp(34px, 5vw, 75px); }
.home-blog { border-top: 1px solid var(--line); }

.section { padding-block: clamp(56px, 7vw, 106px); }
.section-head { margin-bottom: 30px; }
.section-head-split { display: flex; align-items: end; justify-content: space-between; gap: 20px 32px; }
.section-head h2, .feature-copy h2, .cta-band h2 { margin-top: 10px; }
.section-head > p, .section-description { color: var(--muted); max-width: 37em; }
.section-head > p { margin-top: 11px; }
.section-head-split > p { margin-top: 0; }
.section-head-split .text-link { flex-shrink: 0; }
.product-grid, .editorial-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(16px, 2.1vw, 28px); }
.product-card { min-width: 0; display: flex; flex-direction: column; }
.product-image { aspect-ratio: 1.5; overflow: hidden; background: var(--image-mat); }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-body { display: flex; flex: 1; flex-direction: column; padding-block: 16px 8px; }
.product-body p { color: var(--muted); margin-block: 8px 15px; }
.product-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.text-link { display: inline-flex; gap: 7px; align-items: baseline; color: var(--accent); font-size: 14px; font-weight: 650; }
.text-link:hover, .footer-email:hover { text-decoration: underline; text-underline-offset: .2em; }

.feature-band { background: var(--panel); }
.split { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(28px, 5.5vw, 84px); align-items: start; }
.feature-inner { align-items: center; padding-block: clamp(42px, 6vw, 90px); }
.capability-image img { width: 100%; aspect-ratio: 1.61; object-fit: cover; background: var(--image-mat); }
.capability-image figcaption { padding-top: 8px; color: var(--muted); font-size: 12px; }
.capability-image figcaption a { text-decoration: underline; text-underline-offset: .15em; }
.feature-copy > p:not(.eyebrow) { color: var(--muted); max-width: 32em; margin-top: 17px; }
.feature-copy .text-link { margin-top: 18px; }

.editorial-card { border-top: 1px solid #a7a99e; }
.post-body { display: flex; align-items: start; flex-direction: column; gap: 10px; padding: 15px 5px 6px 0; }
.post-meta { display: flex; gap: 8px 13px; flex-wrap: wrap; color: var(--accent); font: 600 11px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.post-body .post-meta span { color: var(--muted); }
.post-body > p:not(.post-meta) { color: var(--muted); max-width: 34em; }
.post-body h3 a:hover { color: var(--accent); }
.post-image img { width: 100%; aspect-ratio: 1.65; object-fit: cover; }
.article-shell .post-image { margin-bottom: 26px; }

.cta-band { padding-block: clamp(38px, 5vw, 74px); background: var(--panel); border-top: 1px solid var(--line); }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px 35px; }
.cta-band p { margin-top: 10px; color: var(--muted); }
.cta-band .button { flex-shrink: 0; }
.site-footer { padding-top: 22px; background: var(--footer); color: #f7f7f4; }
.site-footer .brand-mark { background: #f7f7f4; color: var(--ink); }
.site-footer a:focus-visible { outline-color: #fff; }
.footer-main { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 27px; padding-block: 18px 26px; }
.footer-main nav { display: flex; flex-wrap: wrap; gap: 10px 19px; }
.footer-main nav a, .footer-email { font-size: 14px; font-weight: 650; }
.footer-main nav a:hover, .footer-email:hover { text-decoration: underline; text-underline-offset: .2em; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px 24px; border-top: 1px solid #4a4c46; padding-block: 13px 21px; color: #d6d8d2; }

.page-hero { padding-block: clamp(40px, 7vw, 94px) clamp(33px, 5vw, 68px); }
.page-hero:not(.wrap) { background: var(--panel); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 14em; font-size: clamp(39px, 6vw, 77px); line-height: 1.02; }
.page-hero .split { align-items: center; }
.page-hero .split h1 { font-size: clamp(37px, 5vw, 65px); }
.page-hero .lede { max-width: 36em; }
.component-section, .process-section { background: var(--panel); border-top: 1px solid var(--line); }
.spec-list { border-top: 1px solid #aeb0a4; }
.spec-list > div { padding-block: 15px; border-bottom: 1px solid #aeb0a4; }
.spec-list dt { font-size: 19px; font-weight: 750; }
.spec-list dd { margin-top: 4px; color: var(--muted); }
.step-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; padding: 0; list-style: none; counter-reset: step; }
.step { border-top: 1px solid #a9aa9e; padding-block: 14px; counter-increment: step; }
.step::before { content: '0' counter(step); display: block; margin-bottom: 10px; color: var(--accent); font: 650 12px/1 var(--mono); }
.step p { margin-top: 8px; color: var(--muted); }
.article-shell { max-width: 800px; }
#main > .article-shell { padding-block: 65px; }
.article-back { margin-bottom: 20px; }
.article-body { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.72; }
.article-body > * + * { margin-block-start: 1.1em; }
.article-body h2 { font-size: clamp(24px, 3vw, 38px); }
.article-body a { text-decoration: underline; text-underline-offset: .2em; color: var(--accent); }
.pagination { margin-top: 22px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers { padding: 6px 10px; border: 1px solid var(--line); }
.page-numbers.current { border-color: var(--accent); color: var(--accent); }

.quote-page { padding-block: clamp(43px, 7vw, 95px); }
.quote-layout { display: grid; grid-template-columns: .83fr 1.17fr; gap: clamp(25px, 5vw, 76px); align-items: start; }
.quote-intro h1 { font-size: clamp(39px, 5.5vw, 72px); }
.quote-contact { margin-top: 24px; padding-top: 13px; border-top: 1px solid var(--line); }
.quote-contact .text-link { overflow-wrap: anywhere; }
.quote-form { display: grid; gap: 13px; padding: clamp(17px, 2.8vw, 34px); border: 1px solid var(--line); background: var(--white); }
.quote-form h2 { font-size: clamp(25px, 3vw, 38px); margin-bottom: 2px; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.quote-form label { display: block; min-width: 0; font-size: 14px; font-weight: 690; }
.quote-form label span { color: var(--accent); }
.quote-form :is(input,select,textarea) { display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 8px 9px; border: 1px solid #a6a79a; border-radius: 0; background: var(--white); color: var(--ink); font-size: 14px; font-weight: 500; }
.quote-form textarea { resize: vertical; }
.quote-form .button-row { margin-top: 0; }
.copy-brief { background: none; border: 0; padding: 8px; }
.quote-help { color: var(--muted); font-size: 13px; }
#quote-status { padding-top: 8px; border-top: 1px solid var(--line); }

@media (max-width: 950px) {
	.header-inner { gap: 20px; }
	.home-hero { gap: 22px; }
	.section-head-split { align-items: start; flex-direction: column; gap: 11px; }
}
@media (max-width: 820px) {
	.header-inner { min-height: 64px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 15px; }
	.header-quote { margin-left: auto; }
	.primary-nav { order: 4; width: 100%; padding-block: 9px; border-top: 1px solid var(--line); }
	.menu { flex-wrap: wrap; gap: 5px 21px; }
	.nav-ready .nav-toggle { display: block; order: 3; font-size: 13px; }
	.nav-ready .primary-nav { display: none; }
	.nav-ready.nav-open .primary-nav { display: block; }
	.brand-mark { width: 34px; }
	.brand-name { font-size: 12px; }
	.header-quote { padding: 7px 8px; font-size: 12px; gap: 5px; }
	.home-hero, .split, .quote-layout { grid-template-columns: 1fr; }
	.home-hero { padding-block: 28px 22px; gap: 23px; }
	.home-copy { padding: 0; }
	.home-copy .button { padding-inline: 11px; font-size: 13px; }
	h1 { font-size: clamp(42px, 8.7vw, 62px); }
	.hero-figure img { aspect-ratio: 1.44; }
	.factory-facts li { padding: 10px 8px; }
	.factory-facts strong { font-size: 13px; }
	.factory-facts li span { line-height: 1.35; }
	.product-grid, .editorial-grid { grid-template-columns: 1fr; gap: 19px; }
	.product-image { aspect-ratio: 1.55; }
	.step-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
	.cta-inner { align-items: start; flex-direction: column; }
}
@media (max-width: 395px) {
	.header-inner { gap: 0 10px; }
	.brand { gap: 7px; }
	.header-quote { padding-inline: 6px; }
	.field-grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
	.factory-facts { grid-template-columns: 1fr; }
	.factory-facts li { padding-inline: 0; }
	.factory-facts li + li { border-left: 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
