@font-face {
  font-family: "DM Sans";
  src: url("fonts/body.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #faf6ee;
  --paper: #fffdf8;
  --ink: #25241e;
  --muted: #5d5449;
  --line: #d9ccbc;
  --brand: #a83d2b;
  --brand-hover: #823020;
  --wash: #efe4d6;
  --stage: #252720;
  --header-height: 73px;
  --gutter: clamp(18px, 4.8vw, 76px);
  --body: "DM Sans", Arial, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 22px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 1rem/1.55 var(--body); }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
.wrap { width: min(1320px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip-link { position: fixed; z-index: 5; top: 12px; left: 12px; padding: 12px 18px; background: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
main:focus-visible { outline-offset: -3px; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 700;
  text-align: center;
  transition: background .18s, border-color .18s, transform .18s;
}
.button:hover { border-color: var(--ink); background: var(--wash); transform: translateY(-2px); }
.button:active { transform: translateY(1px); }
.button:disabled { color: #74695e; background: transparent; border-color: var(--line); transform: none; }
.button--primary { border-color: var(--brand); background: var(--brand); color: white; }
.button--primary:hover { border-color: var(--brand-hover); background: var(--brand-hover); }
.text-button { min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--brand-hover); font-size: .875rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { text-decoration-thickness: 2px; }

.site-header { position: relative; z-index: 3; border-bottom: 1px solid var(--line); background: var(--canvas); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: var(--header-height); }
.brand { display: inline-flex; justify-self: start; align-items: center; gap: 9px; min-height: 44px; color: var(--ink); font: 400 2rem/.95 var(--display); white-space: nowrap; }
.brand-name { display: grid; gap: 3px; }
.brand-name > span { font: 700 .6875rem/1 var(--body); letter-spacing: .125em; }
.brand-mark { position: relative; display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; overflow: hidden; background: var(--brand); }
.brand-mark::before, .brand-mark::after { position: absolute; top: 8px; width: 5px; height: 14px; background: var(--paper); content: ""; transform: skewX(-29deg); }
.brand-mark::before { left: 9px; }
.brand-mark::after { left: 16px; }
.main-nav, .nav-actions { display: flex; align-items: center; }
.main-nav { gap: clamp(15px, 2.5vw, 38px); }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: .9375rem; font-weight: 600; white-space: nowrap; }
.main-nav a:hover, .footer-link:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 5px; }
.main-nav .menu-inquiry { display: none; }
.nav-actions { justify-self: end; gap: 10px; }
.nav-inquiry { white-space: nowrap; }
.saved-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 9px; border: 0; border-radius: 2px; background: transparent; font-size: .875rem; font-weight: 700; --bookmark-bg: var(--canvas); }
.saved-link:hover, .saved-link[aria-pressed="true"] { background: var(--wash); color: var(--brand-hover); --bookmark-bg: var(--wash); }
#saved-count { display: inline-grid; place-items: center; min-width: 21px; min-height: 21px; padding-inline: 4px; border-radius: 50%; background: var(--wash); color: var(--brand-hover); font-size: .75rem; }
.bookmark { display: inline-block; position: relative; width: 13px; height: 16px; flex: 0 0 13px; background: currentColor; clip-path: polygon(0 0,100% 0,100% 100%,50% 72%,0 100%); }
.bookmark::after { position: absolute; inset: 2px 2px 3px; content: ""; background: var(--bookmark-bg, var(--paper)); clip-path: polygon(0 0,100% 0,100% 100%,50% 71%,0 100%); }
[aria-pressed="true"] > .bookmark::after { display: none; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); }
.icon-button:hover { color: var(--brand-hover); background: var(--wash); --bookmark-bg: var(--wash); }
.menu-toggle { display: none; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 17px; height: 2px; background: currentColor; }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { position: absolute; content: ""; }
.menu-icon::before { top: -5px; }
.menu-icon::after { top: 5px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

.showroom { display: grid; align-items: center; min-height: calc(100svh - var(--header-height)); padding-block: clamp(34px,4.5vh,54px) clamp(38px,5.5vh,64px); }
.showroom-intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(205px,275px); justify-content: space-between; align-items: end; gap: 22px; margin-bottom: clamp(18px,2.7vw,35px); }
.kicker { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.kicker > span { display: inline-block; width: 19px; height: 2px; background: var(--brand); }
.showroom h1 { font: 400 clamp(4.2rem,8.28vw,7.5rem)/.88 var(--display); letter-spacing: -.045em; }
.showroom h1 em { color: var(--brand); white-space: nowrap; }
.showroom-action p { margin-bottom: 12px; color: var(--muted); }
.showroom-action .button { min-height: 48px; }
[data-enter] { animation: appear .5s ease-out both; }
.showcase[data-enter] { animation-delay: .07s; }
@keyframes appear { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

.showcase { display: grid; grid-template-columns: minmax(0,1.42fr) minmax(0,1fr); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 12px; min-height: clamp(416px,52vh,500px); }
.showcase-card { display: grid; min-width: 0; background: var(--paper); transition: transform .2s ease; }
.showcase-card:hover, .machine-card:hover { transform: translateY(-2px); }
.showcase-lead { grid-row: span 2; grid-template-rows: minmax(0,1fr) auto; border: 1px solid var(--line); }
.showcase-side { grid-template-columns: minmax(0,1.09fr) minmax(0,1fr); align-items: stretch; }
.showcase-mini { background: #efe0ce; }
.showcase-loader { background: #414a3e; color: #fffaf1; }
.showcase-photo, .machine-photo { min-width: 0; min-height: 0; overflow: hidden; background: #d8cbb8; }
.showcase-photo img, .machine-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.showcase-card:hover img, .machine-card:hover img { transform: scale(1.026); }
.showcase-lead .showcase-photo { position: relative; }
.showcase-lead .showcase-photo img { position: absolute; inset: 0; object-position: center 53%; }
.showcase-side .showcase-photo { position: relative; }
.showcase-side .showcase-photo img { position: absolute; inset: 0; }
.showcase-mini .showcase-photo img { object-position: 54% center; }
.showcase-loader .showcase-photo img { object-position: 61% center; }
.showcase-info { min-width: 0; padding: clamp(13px,1.6vw,22px); }
.showcase-lead .showcase-info { display: flex; justify-content: space-between; align-items: end; gap: 13px; border-top: 1px solid var(--line); }
.showcase-side .showcase-info { display: flex; flex-direction: column; justify-content: center; }
.equipment-type { color: var(--muted); font-size: .75rem; font-weight: 700; line-height: 1.4; letter-spacing: .065em; text-transform: uppercase; }
.equipment-type > span { padding-inline: 2px; }
.showcase-loader .equipment-type { color: #eeeadd; }
.showcase-card h2 { margin-top: 5px; font: 400 clamp(1.95rem,3.4vw,3.4rem)/.95 var(--display); letter-spacing: -.018em; overflow-wrap: anywhere; }
.showcase-side h2 { font-size: clamp(1.7rem,3.05vw,2.85rem); }
.showcase-price { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.showcase-lead .showcase-price { align-items: end; flex: 0 0 auto; }
.showcase-side .showcase-price { margin-top: clamp(8px,1.2vw,16px); }
.showcase-price strong { font-size: clamp(1.15rem,1.8vw,1.65rem); line-height: 1.2; letter-spacing: -.047em; }
.item-link { color: var(--brand-hover); font-size: .8125rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.showcase-loader .item-link { color: #fffaf1; }
.showcase-loader:focus-visible { outline-color: var(--brand); }

.inventory { padding-block: clamp(51px,7vw,96px); background: #efe7db; }
.inventory-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 22px; }
.inventory-heading h2, .support h2, .inquiry-band h2 { font: 400 clamp(2.75rem,5.2vw,5.05rem)/.95 var(--display); letter-spacing: -.027em; }
.inventory-heading p { color: var(--muted); }
.equipment-categories { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 17px; }
.equipment-categories button { min-height: 44px; padding: 7px 14px; border: 1px solid #c7b7a3; border-radius: 2px; background: transparent; color: var(--ink); font-size: .875rem; font-weight: 700; }
.equipment-categories button:hover { background: var(--paper); }
.equipment-categories button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.filters { display: grid; grid-template-columns: minmax(0,1.6fr) repeat(2,minmax(0,1fr)); gap: 12px; }
.filter, .inquiry-content label { display: grid; gap: 5px; min-width: 0; font-size: .875rem; font-weight: 700; }
.filter :is(input,select), .inquiry-content :is(input,select,textarea) { width: 100%; min-width: 0; min-height: 47px; padding: 8px 10px; border: 1px solid #c7b7a3; border-radius: 2px; background: var(--paper); font-size: 1rem; font-weight: 400; }
.filter select, .inquiry-content select {
  appearance: none;
  padding-right: 28px;
  background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%), linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-size: 5px 5px;
  background-position: calc(100% - 15px) 53%, calc(100% - 10px) 53%;
  background-repeat: no-repeat;
}
.search-box { position: relative; }
.search-icon { position: absolute; top: 15px; left: 13px; width: 13px; height: 13px; border: 1.5px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search-icon::after { position: absolute; right: -5px; bottom: -3px; width: 6px; height: 1.5px; content: ""; background: var(--muted); transform: rotate(45deg); }
.filter--search input { padding-left: 36px; }
.inventory-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 51px; color: var(--muted); font-size: .875rem; font-weight: 700; }

.machine-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.machine-card { position: relative; min-width: 0; border: 1px solid var(--line); background: var(--paper); transition: transform .2s ease; }
.machine-link { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.94fr); align-items: stretch; min-height: 218px; height: 100%; }
.machine-photo { position: relative; }
.machine-photo img { position: absolute; inset: 0; object-position: center 51%; }
.machine-info { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; padding: clamp(13px,1.7vw,24px); }
.machine-name { margin-top: 4px; font: 400 clamp(1.8rem,2.85vw,2.8rem)/.98 var(--display); overflow-wrap: anywhere; }
.machine-hours { margin-top: 4px; color: var(--muted); font-size: .875rem; }
.machine-list-price { margin-top: 9px; font-size: clamp(1.16rem,2.05vw,1.7rem); line-height: 1.2; letter-spacing: -.047em; font-variant-numeric: tabular-nums; }
.machine-info .item-link { margin-top: 4px; }
.machine-save { position: absolute; left: 8px; top: 8px; z-index: 1; }
.machine-save[aria-pressed="true"] { color: var(--brand-hover); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 13px; margin-top: 25px; }
#page-label { color: var(--muted); font-size: .875rem; font-weight: 600; text-align: center; }
.empty { padding: 31px 15px; border: 1px solid var(--line); background: var(--paper); text-align: center; }
.empty h3 { font: 400 2.5rem/1 var(--display); }
.empty p { margin-block: 7px 16px; color: var(--muted); }

.support { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(25px,8vw,114px); padding-block: clamp(55px,8vw,112px); }
.support-panel { min-width: 0; }
.support h2 { margin-bottom: 18px; font-size: clamp(2.45rem,4.3vw,4.2rem); }
.buying-steps > div, .accordion details { border-top: 1px solid var(--line); }
.buying-steps > div { padding-block: 12px; }
.buying-steps dt { font-weight: 700; }
.buying-steps dd, .accordion details p { margin-top: 4px; color: var(--muted); }
.accordion summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 54px; padding: 9px 0; list-style: none; cursor: pointer; font-weight: 700; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { flex: 0 0 21px; content: "+"; color: var(--brand-hover); font-size: 1.35rem; font-weight: 400; text-align: center; }
.accordion details[open] summary::after { content: "−"; }
.accordion details p { padding-bottom: 13px; }
.inquiry-band { padding-block: clamp(28px,4.2vw,57px); background: var(--brand); color: white; }
.inquiry-band-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.inquiry-band h2 { font-size: clamp(2.65rem,5vw,4.3rem); }
.inquiry-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; margin-top: 8px; font-style: normal; }
.inquiry-contact a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.inquiry-contact a:hover { text-decoration-thickness: 2px; }
.inquiry-band .button { flex-shrink: 0; }
.inquiry-band :focus-visible { outline-color: white; }
.site-footer { background: var(--canvas); }
.footer-inner { padding-block: 15px; }
.footer-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand-hover); font-size: .875rem; font-weight: 700; }
.chevron { width: 9px; height: 9px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.gallery-prev .chevron { transform: rotate(-135deg); }

.dialog { width: min(1120px, calc(100% - 36px)); max-width: none; max-height: min(90dvh, 900px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); overscroll-behavior: contain; }
.dialog::backdrop { background: #211913c7; }
.dialog-top { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 15px; border-bottom: 1px solid var(--line); background: var(--paper); }
.dialog-label { color: var(--muted); font-size: .875rem; font-weight: 700; }
.close-button span { position: relative; width: 17px; height: 17px; }
.close-button span::before, .close-button span::after { position: absolute; top: 8px; left: 0; width: 17px; height: 2px; content: ""; background: currentColor; transform: rotate(45deg); }
.close-button span::after { transform: rotate(-45deg); }
.machine-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 25px; padding: 18px; }
.gallery { min-width: 0; }
.gallery-stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2px; background: var(--stage); }
.gallery-stage img { width: 100%; height: 100%; object-fit: contain; }
.gallery-prev, .gallery-next { position: absolute; top: 50%; transform: translateY(-50%); }
.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }
.photo-count { position: absolute; bottom: 8px; right: 8px; padding: 4px 9px; border-radius: 5px; background: var(--stage); color: white; font: 600 .8125rem/1.5 var(--mono); }
.thumbnails { position: relative; display: flex; gap: 6px; padding: 6px 3px 9px; overflow-x: auto; scrollbar-width: thin; }
.thumbnail { flex: 0 0 62px; width: 62px; height: 51px; padding: 2px; border: 1px solid transparent; border-radius: 5px; background: transparent; }
.thumbnail[aria-current="true"] { border-color: var(--brand); }
.thumbnail img { width: 100%; height: 100%; border-radius: 3px; object-fit: cover; background: var(--canvas); }
.machine-spec h2, .inquiry-content h2 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.04; letter-spacing: -.067em; }
.machine-price { margin-top: 9px; font: 700 1.65rem/1.3 var(--mono); letter-spacing: -.045em; }
.spec-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-block: 15px; padding-block: 11px; border-block: 1px solid var(--line); }
.spec-grid dt { color: var(--muted); font-size: .8125rem; }
.spec-grid dd { font-weight: 700; }
.machine-spec h3 { margin-bottom: 6px; font-size: 1.125rem; }
.machine-spec > p:not(.machine-price,.inline-status) { color: var(--muted); }
.dialog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 11px; margin-top: 15px; }
.inline-status { min-height: 22px; margin-top: 7px; color: var(--brand-hover); font-size: .875rem; overflow-wrap: anywhere; }
.inquiry-dialog { width: min(630px, calc(100% - 26px)); }
.inquiry-content { padding: 20px; }
.inquiry-content > p { margin-top: 9px; color: var(--muted); }
.inquiry-content form { display: grid; gap: 12px; margin-top: 18px; }
.inquiry-fieldset { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.inquiry-content textarea { resize: vertical; }
.inquiry-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.inquiry-content .dialog-actions { margin: 3px 0 0; }
.inquiry-content .inline-status { margin-top: -5px; }

@media (max-width: 910px) {
  :root { --header-height: 63px; }
  .header-inner { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .menu-toggle { display: inline-grid; }
  .nav-inquiry { display: none; }
  .main-nav { display: none; position: absolute; top: 100%; inset-inline: 0; padding: 5px var(--gutter) 12px; border-block: 1px solid var(--line); background: var(--canvas); }
  .main-nav[data-open] { display: grid; gap: 0; }
  .main-nav :is(a,.menu-inquiry) { display: flex; min-height: 48px; border-bottom: 1px solid var(--line); }
  .showroom { min-height: auto; }
  .showroom h1 { font-size: clamp(3.85rem,9vw,5.2rem); }
  .showcase { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto auto; min-height: 0; }
  .showcase-lead { grid-column: 1 / -1; grid-row: auto; }
  .showcase-lead .showcase-photo { aspect-ratio: 1.83; }
  .showcase-side { min-height: 184px; }
  .machine-list { gap: 10px; }
  .machine-link { min-height: 190px; }
}

@media (max-width: 650px) {
  .showroom-intro, .support, .machine-layout { grid-template-columns: minmax(0,1fr); }
  .showroom-intro { gap: 13px; margin-bottom: 19px; }
  .showroom-action p { margin-bottom: 10px; }
  .showroom { padding-block: 27px 36px; }
  .showroom h1 { font-size: clamp(3.5rem,11vw,5.35rem); }
  .showcase { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .showcase-lead .showcase-photo { aspect-ratio: 1.46; }
  .showcase-lead .showcase-info { gap: 7px; }
  .showcase-side { min-height: 153px; }
  .showcase-lead h2 { font-size: clamp(1.85rem,7vw,2.65rem); }
  .showcase-side h2 { font-size: clamp(1.85rem,6vw,2.65rem); }
  .showcase-price strong { font-size: 1.125rem; }
  .inventory-heading { flex-direction: column; align-items: start; gap: 7px; margin-bottom: 17px; }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .filter--search { grid-column: 1 / -1; }
  .machine-list { grid-template-columns: minmax(0,1fr); }
  .machine-link { min-height: 175px; }
  .machine-name { font-size: clamp(1.65rem,6.7vw,2.6rem); }
  .support { gap: 38px; }
  .inquiry-band-inner { flex-direction: column; align-items: start; }
}

@media (max-width: 440px) {
  .header-inner { gap: 5px; }
  .brand { gap: 6px; font-size: 1.55rem; }
  .nav-actions { gap: 5px; }
  .saved-link { min-width: 44px; padding: 0 5px; }
  .saved-label { display: none; }
  .showcase-info { padding: 11px; }
  .showcase-lead .equipment-type { letter-spacing: .03em; }
  .machine-link { grid-template-columns: minmax(0,.8fr) minmax(0,1fr); }
  .machine-info { padding: 11px; }
  .dialog { width: calc(100% - 18px); max-height: 94dvh; }
  .dialog-top, .inquiry-content, .machine-layout { padding-inline: 12px; }
  .machine-layout { gap: 13px; }
  .inquiry-fields { grid-template-columns: minmax(0,1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
