:root {
  color-scheme: light;
  --ink: #142039;
  --muted: #555a65;
  --paper: #faf6ef;
  --surface: #fffdf8;
  --border: #d8d0c3;
  --accent: #182440;
  --display: Georgia, "Times New Roman", serif;
  --page-gutter: clamp(1rem, 5vw, 5rem);
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; line-height: 1.5; }
a { color: inherit; }
button, input, select { font: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; border: 1px solid var(--accent); padding: .7rem 1.05rem;
  color: var(--accent); background: transparent; cursor: pointer;
}
button:disabled { opacity: .55; cursor: default; }
.primary { color: white; background: var(--accent); }
.primary:hover { background: #283b60; }
.outline:hover { background: #ece4d8; }
:focus-visible { outline: 3px solid #93673d; outline-offset: 4px; }
.masthead {
  display: flex; justify-content: space-between; align-items: center; gap: .9rem;
  min-height: 5rem; padding: .6rem var(--page-gutter); border-bottom: 1px solid var(--border);
  background: #faf6f0;
}
.brand { display: block; width: 9rem; height: 4.35rem; overflow: hidden; position: relative; flex: none; }
.brand img { position: absolute; width: 9rem; height: auto; max-width: none; left: 50%; top: 50%; transform: translate(-50%, -50%); mix-blend-mode: multiply; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem clamp(.75rem, 2.8vw, 2.5rem); }
nav a { text-underline-offset: .35rem; text-decoration: none; }
nav a:hover { text-decoration: underline; }
.hero { display: grid; grid-template-columns: .95fr 1.05fr; background: #eae4d9; }
.hero-copy { align-self: center; padding: clamp(2.6rem, 7vw, 7rem) var(--page-gutter); }
.location { font-size: .88rem; margin: 0 0 1.1rem; font-weight: 600; }
h1, h2, h3 { font-family: var(--display); font-weight: normal; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.95rem, 6.35vw, 7rem); letter-spacing: -.055em; }
h1 em { display: block; font-weight: normal; }
h2 { font-size: clamp(2.3rem, 4vw, 4.25rem); letter-spacing: -.04em; }
h3 { font-size: 1.38rem; }
p { color: var(--muted); }
.hero-copy > p:not(.location) { max-width: 35ch; margin: 1.25rem 0 1.6rem; }
.hero-photo { width: 100%; height: 100%; max-height: 41rem; min-height: 29rem; object-fit: cover; object-position: 50% 45%; display: block; }
.section { max-width: 100rem; margin: auto; padding: clamp(2.7rem, 6vw, 6rem) var(--page-gutter); }
.section-heading { margin-bottom: 1.5rem; }
.section-heading p { margin-block: .65rem 0; }
.collection-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .6rem 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filters button { border-color: var(--border); padding: .45rem .9rem; }
.filters [aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: white; }
.gallery-count { font-size: .875rem; margin: .8rem 0 1rem; }
.catalog { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.6rem clamp(.7rem, 2vw, 1.7rem); }
.product { min-width: 0; }
.product button { display: block; width: 100%; border: 0; padding: 0; color: inherit; text-align: left; }
.photo-frame { display: block; aspect-ratio: 1; background: #ece7dc; overflow: hidden; border: 1px solid var(--border); }
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .2s; }
.product button:hover img { transform: scale(1.04); }
.piece-name { display: block; margin: .65rem 0 .3rem; }
.product p { font-size: .875rem; margin: 0; }
.visit { background: var(--accent); color: white; }
.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.6rem; }
.contact address { font-style: normal; margin-top: .7rem; color: #f0e8db; }
.contact-links { display: flex; flex-wrap: wrap; gap: .65rem; }
.contact .outline { color: inherit; border-color: #d9d3ca; }
.contact .outline:hover { background: #2b3b5b; }
#piece-dialog { padding: 0; border: 0; width: min(56rem, calc(100% - 1.5rem)); max-width: none; max-height: calc(100dvh - 1.5rem); background: var(--surface); color: var(--ink); }
#piece-dialog::backdrop { background: #111b2bd1; }
.dialog-inner { position: relative; }
#piece-photo { display: block; width: 100%; height: min(62dvh, 36rem); object-fit: contain; background: #ece7dc; }
.close { position: absolute; top: .7rem; right: .7rem; border: none; background: var(--surface); width: 2.7rem; height: 2.7rem; padding: 0; font-size: 1.6rem; }
.dialog-copy { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.3rem; }
.dialog-copy h2 { font-size: clamp(1.7rem, 4vw, 2.8rem); }
.panel { background: var(--surface); border: 1px solid var(--border); padding: 1.2rem; }
.register-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1rem; }
.register h1 { font-size: clamp(2.7rem, 5vw, 4.6rem); }
.panel h2 { font-size: 1.95rem; margin-bottom: 1rem; }
label { display: block; margin-bottom: .35rem; }
input, select { width: 100%; padding: .6rem; border: 1px solid #7e776e; border-radius: 0; color: var(--ink); background: white; }
.rows { list-style: none; margin: .85rem 0 0; padding: 0; }
.rows li { padding: .8rem 0; border-bottom: 1px solid var(--border); }
.row, .total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.row p, .rows p { margin: .25rem 0 0; }
.total { margin: 1rem 0; font-size: 1.2rem; }
#checkout button { width: 100%; margin-top: .75rem; }
#message:empty { display: none; }
.history { margin-top: 1rem; }
footer { border-top: 1px solid var(--border); padding: 1.4rem var(--page-gutter); font-family: var(--display); }
@media (max-width: 960px) {
  .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 690px) {
  .hero, .register-layout { grid-template-columns: 1fr; }
  .hero-photo { min-height: 0; max-height: 27rem; aspect-ratio: 4 / 3; }
  .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand { width: 7.2rem; }
  .brand img { width: 7.2rem; }
  nav { justify-content: flex-end; font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) {
  .photo-frame img { transition: none; }
}
