:root {
  color-scheme: light;
  --paper: #f7f3eb;
  --paper-light: #fffcf6;
  --ink: #25231e;
  --muted: #625a50;
  --rule: #d9d1c3;
  --dark: #25231e;
  --on-dark: #f9f2e5;
  --accent: #a4392a;
  --accent-hover: #842d22;
  --display: "Cormorant Garamond", Georgia, serif;
  --body: Inter, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; scrollbar-gutter: stable; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); line-height: 1.55; }
body:has(dialog[open]) { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid #297778; outline-offset: 4px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl { margin: 0; }
[hidden] { display: none !important; }

.shell { width: min(1280px, calc(100% - 112px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 4; top: 12px; left: 12px; padding: 12px; background: var(--paper-light); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 2; top: 0; background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; gap: 24px; }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: 11px; width: fit-content; font-size: .94rem; line-height: 1.15; font-weight: 650; letter-spacing: -.025em; }
.brand-mark { display: block; flex: 0 0 25px; height: 25px; background: var(--accent); border-radius: 55% 35% 54% 18%; transform: rotate(-18deg); }
.header-nav { display: flex; gap: clamp(22px, 3vw, 43px); font-size: .9rem; }
.header-nav a:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.header-action { justify-self: end; display: flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid var(--rule); font-size: .88rem; font-weight: 600; white-space: nowrap; }
.header-action:hover { border-color: var(--ink); }

.hero { background: var(--dark); color: var(--on-dark); }
.hero-inner { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: clamp(28px, 5vw, 84px); padding-block: 38px 28px; }
.hero-copy { padding-bottom: 32px; }
.eyebrow { color: var(--accent); font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .14em; }
.hero .eyebrow { color: #e6bca7; }
.accent-line { display: inline-block; width: 25px; height: 1px; margin-right: 9px; vertical-align: middle; background: currentColor; }
.hero-title { font: inherit; }
.hero-title .eyebrow, .hero-name { display: block; }
.hero-name { margin: 18px 0 24px -.054em; font-family: var(--display); font-size: clamp(6.4rem, 12vw, 11.3rem); font-weight: 500; letter-spacing: -.075em; line-height: .88; }
.hero-description { max-width: 24ch; margin-bottom: 32px; color: #e8dbca; font-size: clamp(1.15rem, 2.05vw, 1.76rem); line-height: 1.38; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px 20px; }
.hero-catalog-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: #e8dbca; font-size: .88rem; }
.hero-catalog-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-figure img { width: 100%; height: auto; aspect-ratio: 1.49; object-fit: cover; background: #706456; }
figcaption { margin-top: 12px; font-size: .76rem; }
.hero-figure figcaption { display: flex; justify-content: space-between; gap: 16px; color: #e4d5bf; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 47px; padding: 10px 17px; border: 1px solid transparent; font-size: .92rem; font-weight: 650; line-height: 1.2; white-space: nowrap; transition: background-color .18s, border-color .18s, color .18s; }
.button span { font-size: 1.13em; }
.button-primary { min-height: 51px; padding-inline: 20px; color: #fff; background: var(--accent); }
.button-primary:hover { background: var(--accent-hover); }
.button-outline { background: transparent; color: var(--ink); border-color: var(--rule); }
.button-outline:hover { border-color: var(--accent); color: var(--accent); }

.catalog-section { padding-block: clamp(50px, 6.6vw, 94px) clamp(64px, 8vw, 110px); }
.catalog-top { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
h2 { font-family: var(--display); font-size: clamp(3rem, 6.5vw, 6rem); font-weight: 600; letter-spacing: -.055em; line-height: .95; }
.catalog-top h2 { margin-top: 6px; }
.catalog-summary { padding-bottom: 5px; color: var(--muted); font-size: .9rem; }
.price-guide { display: grid; grid-template-columns: .75fr 1fr 1fr; align-items: center; gap: 13px 24px; margin-top: 23px; padding: 13px 17px; background: #eee6d9; border-block: 1px solid var(--rule); }
.price-guide-label, .price-guide-unit, .price-guide-note { color: var(--muted); font-size: .83rem; }
.price-guide-amount { font-size: 1.17rem; font-weight: 650; white-space: nowrap; }
.price-guide-note { justify-self: end; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 17px 22px; }
.catalog-toolbar[hidden] + .catalog-grid { margin-top: 22px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filters button { min-height: 40px; padding: 7px 15px; color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 99px; font-size: .86rem; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--on-dark); background: var(--ink); border-color: var(--ink); }
.result-count { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 23px; }
.painting-card { padding-bottom: 17px; border-bottom: 1px solid var(--rule); }
.painting-image { position: relative; display: block; width: 100%; aspect-ratio: 1.28; padding: 0; overflow: hidden; border: 0; background: #e7ded2; }
.painting-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.painting-image:hover img { transform: scale(1.03); }
.image-action { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 36px; height: 36px; color: var(--ink); background: var(--paper-light); font-size: 1.05rem; }
.painting-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; padding-top: 14px; }
.painting-title { font-family: var(--display); font-size: clamp(1.72rem, 2.48vw, 2.45rem); font-weight: 650; line-height: 1.03; letter-spacing: -.045em; }
.painting-spec { margin-top: 8px; color: var(--muted); font-size: .76rem; }
.painting-sale { display: flex; flex-direction: column; align-items: end; gap: 7px; }
.painting-price { font-size: .93rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.painting-sale .button { min-height: 40px; padding-inline: 11px; gap: 7px; font-size: .84rem; }

.about-section { background: #eae2d6; }
.about-inner { display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(24px, 6vw, 94px); align-items: center; padding-block: clamp(38px, 6vw, 85px); }
.about-figure img { width: 100%; height: auto; }
.about-figure figcaption { color: var(--muted); }
.about-copy h2 { max-width: 15ch; margin: 10px 0 17px; font-size: clamp(2.75rem, 4.7vw, 5.25rem); }
.about-copy > p:not(.eyebrow) { max-width: 46ch; margin-bottom: 22px; color: var(--muted); }
.specs { font-size: .86rem; }
.specs div { display: grid; grid-template-columns: minmax(72px, .65fr) 1fr; gap: 10px; padding-block: 8px; border-top: 1px solid var(--rule); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 550; }

.order-section { background: var(--dark); color: var(--on-dark); }
.order-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: clamp(42px, 6vw, 84px); }
.order-inner h2 { font-size: clamp(2.75rem, 5vw, 5.2rem); }
.order-inner p { max-width: 53ch; margin-top: 13px; color: #e8dbca; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; min-height: 83px; gap: 18px; }
.footer-inner > a:last-child { font-size: .84rem; }

.dialog { max-height: calc(100dvh - 38px); padding: 0; color: var(--ink); background: var(--paper-light); border: 1px solid var(--rule); box-shadow: 0 20px 90px #0005; }
.dialog::backdrop { background: #211d18b8; }
.dialog-close { position: absolute; z-index: 1; right: 12px; top: 12px; }
.dialog-close button, .gallery-arrow { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--rule); color: var(--ink); background: var(--paper-light); font-size: 1.5rem; line-height: 1; }
.dialog-close button:hover, .gallery-arrow:hover { border-color: var(--ink); }
.detail-dialog { width: min(1050px, calc(100% - 36px)); }
.detail-layout { display: grid; grid-template-columns: 1.2fr 1fr; min-width: 0; }
.gallery { min-width: 0; padding: 20px; background: #f0ebe2; }
.gallery-stage { display: grid; place-items: center; width: 100%; aspect-ratio: 1.24; background: #e1d8ca; }
.gallery-stage img { width: 100%; height: 100%; object-fit: contain; }
.gallery-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.gallery-controls p { color: var(--muted); font-size: .8rem; text-align: center; }
.gallery-arrow { font-size: 1.2rem; }
.gallery-thumbs { display: flex; gap: 5px; overflow-x: auto; padding: 5px; margin: 6px -5px -5px; }
.gallery-thumbs button { flex: 0 0 calc((100% - 40px) / 9); min-width: 36px; aspect-ratio: 1; padding: 1px; border: 1px solid transparent; background: none; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.gallery-thumbs button:focus-visible { outline-offset: 1px; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-copy { display: flex; flex-direction: column; min-width: 0; padding: 35px 26px 23px; }
.detail-copy h2 { margin-block: 8px 15px; padding-right: 16px; font-size: clamp(2.6rem, 4vw, 4.6rem); }
#detail-description { margin-bottom: 19px; color: var(--muted); font-size: .9rem; }
.detail-sale { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 18px; gap: 12px; }
.detail-sale p { font-weight: 650; font-size: 1.2rem; }
.detail-note { margin-top: 10px; color: var(--muted); font-size: .76rem; }

@media (max-width: 1060px) {
  .shell { width: calc(100% - 64px); }
  .hero-name { font-size: clamp(6rem, 13vw, 10rem); }
  .catalog-grid { gap: 26px 17px; }
  .painting-info { gap: 5px; }
  .painting-title { font-size: clamp(1.6rem, 3vw, 2.08rem); }
  .painting-spec { font-size: .72rem; }
}

@media (max-width: 800px) {
  .shell { width: calc(100% - 44px); }
  .hero-inner { gap: 20px; }
  .hero-name { font-size: clamp(5.4rem, 12vw, 8rem); }
  .hero-description { font-size: 1.13rem; }
  .header-inner { min-height: 67px; gap: 15px; }
  .header-nav { gap: 16px; font-size: .8rem; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-inner { gap: 21px; }
  .detail-copy { padding-inline: 18px; }
}

@media (max-width: 590px) {
  html { scroll-padding-top: 75px; }
  .shell { width: calc(100% - 32px); }
  .header-inner { grid-template-columns: 1fr auto; min-height: 61px; }
  .header-nav { display: none; }
  .header-action { padding: 8px 10px; }
  .brand { font-size: .88rem; }
  .brand-mark { flex-basis: 21px; height: 21px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; padding-block: 31px 18px; }
  .hero-copy { padding-bottom: 0; }
  .hero-name { margin: 11px 0 13px -.04em; font-size: clamp(5.65rem, 20vw, 8rem); }
  .hero-description { margin-bottom: 19px; }
  .catalog-section { padding-top: 44px; }
  .catalog-top { align-items: start; flex-direction: column; gap: 10px; }
  .price-guide { grid-template-columns: 1fr 1fr; align-items: start; gap: 9px 12px; margin-top: 13px; padding: 10px 12px; }
  .price-guide-note { grid-column: 1 / -1; justify-self: start; }
  .price-guide-unit { display: inline-block; }
  .catalog-toolbar { align-items: start; flex-direction: column; gap: 8px; padding-block: 13px 16px; }
  .filters { gap: 5px; }
  .filters button { min-height: 38px; padding-inline: 11px; font-size: .78rem; }
  .catalog-grid { grid-template-columns: 1fr; gap: 23px; }
  .painting-title { font-size: 2rem; }
  .painting-spec { font-size: .76rem; }
  .painting-sale .button { min-height: 44px; }
  .about-inner { grid-template-columns: 1fr; }
  .about-copy { grid-row: 1; }
  .order-inner { flex-direction: column; align-items: start; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-dialog { width: calc(100% - 22px); max-height: calc(100dvh - 24px); }
  .gallery { padding: 11px; }
  .gallery-stage { aspect-ratio: 1.46; }
  .detail-copy { padding: 19px 14px; }
}

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