:root {
  color-scheme: light;
  --ink: #2a2020;
  --deep: #341d22;
  --paper: #fffcf7;
  --sand: #f6eee7;
  --accent: #763644;
  --muted: #635653;
  --line: #e0d3c9;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 1rem/1.55 var(--sans); background: var(--paper); color: var(--ink); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .wordmark { font: 400 1rem/1 var(--serif); }
h2 { font-size: clamp(2.65rem, 5vw, 4rem); }
a { color: inherit; }
img { display: block; width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(100% - 5rem, 82rem); margin-inline: auto; }
.skip { position: absolute; transform: translateY(-160%); background: white; padding: .6rem 1rem; z-index: 3; }
.skip:focus { transform: translateY(0); }
.site-header { background: var(--paper); }
.ribbon { padding: .47rem 1rem; background: var(--deep); color: #fff4ea; text-align: center; font-size: .875rem; }
.mast { min-height: 5.25rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; }
.wordmark { grid-column: 2; grid-row: 1; text-decoration: none; font-size: 3rem; letter-spacing: -.025em; white-space: nowrap; }
.wordmark span { color: var(--accent); font-size: inherit; }
.mast-search { grid-column: 1; grid-row: 1; display: flex; max-width: 20rem; }
.mast-search input { flex: 1; border-right: 0; background: var(--sand); font-size: .875rem; }
.mast-search button { border: 1px solid var(--line); background: transparent; padding: 0 .85rem; font-size: .875rem; font-weight: 700; }
.mast-search button:hover, .saved-trigger:hover { background: var(--sand); }
.nav-bar { border-top: 1px solid var(--line); }
nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem clamp(.9rem, 3vw, 2.5rem); }
.nav-bar nav { min-height: 3.1rem; padding-block: .7rem; }
nav a { text-decoration: none; font-size: .9rem; font-weight: 600; }
nav a:hover, .text-link:hover { text-decoration: underline; text-underline-offset: .25em; }
.saved-trigger { justify-self: end; border: 1px solid var(--line); background: transparent; padding: .55rem .7rem .55rem .9rem; font-size: .875rem; font-weight: 700; white-space: nowrap; }
.saved-trigger span { display: inline-grid; place-items: center; min-width: 1.4rem; padding-inline: .25rem; height: 1.4rem; margin-left: .25rem; background: var(--deep); color: #fff; border-radius: 100%; }
.hero { display: grid; position: relative; isolation: isolate; min-height: clamp(27rem, 42vw, 41rem); background: #362425; color: #fff7ed; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { height: 100%; object-fit: cover; object-position: center 54%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #281818f5 0%, #281818d6 23%, #2818187f 44%, transparent 70%); }
.hero-inner { display: flex; align-items: center; padding-block: 3.75rem; }
.hero-copy { width: min(100%, 34rem); }
.eyebrow { font-size: .875rem; letter-spacing: .14em; font-weight: 700; text-transform: uppercase; }
.hero .eyebrow { color: #f9dfcc; }
.hero h1 { font-size: clamp(3.6rem, 7.35vw, 7.5rem); letter-spacing: -.025em; line-height: .88; margin-top: 1.15rem; }
.hero h1 em { color: #edcabb; }
.hero-description { max-width: 23rem; margin: 1.45rem 0 1.65rem; color: #fff1e8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .8rem 1.2rem; min-height: 2.85rem; border: 1px solid transparent; font-weight: 700; font-size: .9rem; text-decoration: none; }
.light { background: #fff3e6; color: var(--deep); }
.light:hover { background: #fff; }
.hero-secondary { color: #fff7ed; border-color: #f5dfcfa6; background: #311c2255; }
.hero-secondary:hover { background: #311c22; }
.hero a:focus-visible { outline-color: #fff1df; }
.dark { background: var(--deep); color: white; }
.dark:hover { background: var(--accent); }
.categories, .guide { padding-block: clamp(3rem, 7vw, 6rem); }
.section-header { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; align-items: baseline; margin-bottom: 1.5rem; }
.text-link { text-underline-offset: .25em; font-weight: 600; }
.category-grid, .product-grid { display: grid; gap: 1.25rem; }
.category-grid { grid-template-columns: repeat(3, 1fr); }
.category { display: block; text-decoration: none; background: var(--paper); border-bottom: 1px solid var(--line); }
.category-image { overflow: hidden; background: var(--sand); }
.category img { aspect-ratio: 5/3.35; object-fit: cover; transition: transform .35s ease; }
.category:hover img { transform: scale(1.04); }
.category span { display: block; padding: .85rem .15rem 1rem; font: 400 clamp(1.5rem, 3vw, 2.7rem)/1 var(--serif); }
.category:hover span { color: var(--accent); }
.catalog { background: var(--sand); padding: clamp(3rem, 7vw, 6rem) 0; }
.filters { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: .8rem; }
label { display: grid; gap: .3rem; font-size: .875rem; font-weight: 700; }
input, select { width: 100%; min-width: 0; border: 1px solid #c6b7ab; border-radius: 0; padding: .65rem .75rem; min-height: 2.7rem; background: #fffcf7; font-weight: 400; }
select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, #61424a 50%),linear-gradient(135deg,#61424a 50%,transparent 50%); background-position: calc(100% - 16px) 53%,calc(100% - 11px) 53%; background-size: 5px 5px; background-repeat: no-repeat; }
.result-count, .product-meta, .list-meta { color: var(--muted); font-size: .875rem; }
.result-count { margin: 1.1rem 0 .65rem; }
.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; }
.product img { aspect-ratio: 1; object-fit: cover; background: #f7f0e9; }
.product-copy { display: grid; gap: .65rem; padding: 1.05rem; flex: 1; }
.product h3 { font-size: 1.65rem; }
.product-image { border: 0; padding: 0; background: transparent; overflow: hidden; }
.product-image img { transition: transform .3s ease; }
.product-image:hover img { transform: scale(1.035); }
.swatches { display: flex; align-items: center; flex-wrap: wrap; gap: .42rem; }
.swatch { border: 1px solid #868477; background: var(--swatch); width: 1.55rem; height: 1.55rem; border-radius: 100%; }
.swatch[aria-pressed="true"] { outline: 1px solid var(--ink); outline-offset: 2px; }
.swatch-name { font-size: .875rem; margin-left: .2rem; color: var(--muted); }
.outline { border-color: #b59897; background: transparent; align-self: end; }
.outline:hover { background: #f5e6dd; }
.empty { grid-column: 1/-1; padding: 1.2rem 0; }

.guide { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.guide-image img { aspect-ratio: 1.12; object-fit: cover; }
.guide-copy h2 { margin: .35rem 0 .75rem; }
.guide-copy > p:not(.eyebrow) { max-width: 35rem; color: var(--muted); }
.fit-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 1.15rem 0; }
#fit-result { margin-top: .65rem; font-weight: 600; min-height: 1.55rem; }
footer { background: var(--deep); color: #f4eee0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; padding-block: 2rem; }
footer .wordmark span { color: #edcabb; }
footer .footer-inner > span { font-size: .875rem; }
dialog { background: var(--paper); color: var(--ink); border: 1px solid var(--line); padding: 0; width: min(45rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); }
dialog::backdrop { background: #191c16aa; }
.dialog-bar { display: flex; align-items: center; justify-content: space-between; padding: .65rem 1.1rem; border-bottom: 1px solid var(--line); font-weight: 600; }
.dialog-bar h2 { font-size: 2rem; }
.icon-button { background: transparent; border: 0; padding: .1rem .55rem; font-size: 1.7rem; line-height: 1.4; }
.detail { display: grid; grid-template-columns: 1fr 1fr; }
.detail img { aspect-ratio: 1; object-fit: cover; height: 100%; }
.detail-copy, .list-body { padding: 1.2rem; }
.detail-copy h2 { font-size: 2.4rem; margin-bottom: .6rem; }
.detail-copy p, .detail-copy .swatches { margin-bottom: .9rem; }
.detail-copy label { margin-bottom: .9rem; }
.detail-copy input, .quantity input { width: 5.3rem; }
.saved-item { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto auto; gap: .7rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.saved-item img { aspect-ratio: 1; object-fit: cover; }
.saved-item h3 { font: 700 .95rem/1.3 var(--sans); }
.remove { background: transparent; border: 0; padding: .4rem 0; text-decoration: underline; font-size: .875rem; }
#download { margin-top: 1rem; }
.toast { position: fixed; bottom: 1rem; right: 1rem; background: var(--deep); color: white; padding: .8rem 1rem; max-width: calc(100% - 2rem); z-index: 2; }
@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  .wrap { width: calc(100% - 3rem); }
  .mast { gap: 1rem; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero::before { background: linear-gradient(90deg, #281818fa 0%, #281818df 26%, #28181872 60%, transparent 88%); }
}
@media (max-width: 820px) {
  .nav-bar nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; gap: .55rem .75rem; }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 2rem); }
  .mast { grid-template-columns: 1fr auto; gap: .65rem; padding-block: .75rem; }
  .mast .wordmark { grid-column: 1; font-size: 2.6rem; }
  .mast-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .nav-bar nav { gap: .35rem .5rem; }
  .nav-bar nav a { padding-block: .18rem; }
  .hero { min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .hero::before { display: none; }
  .hero-media { position: static; z-index: auto; }
  .hero-media img { height: auto; aspect-ratio: 1.5; object-position: center; }
  .hero-inner { padding-block: 1.8rem 2.25rem; }
  .hero h1 { font-size: clamp(3.5rem, 13vw, 5.1rem); }
  .hero-description { margin: 1.05rem 0 1.3rem; }
  .category-grid { gap: .6rem; }

  .category img { aspect-ratio: .86; }
  .category span { font-size: clamp(1.25rem, 4.4vw, 1.6rem); }
  .product-grid, .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .guide { grid-template-columns: 1fr; }
  .guide-image img { aspect-ratio: 2.2; }
  .detail { grid-template-columns: 1fr; }
  .detail img { height: auto; aspect-ratio: 1.55; }
  .dialog-bar { padding-inline: .8rem; }
  .list-body { padding: .8rem; }
  .saved-item { grid-template-columns: minmax(0, 1fr) auto auto; }
  .saved-item img { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
