/* USDreamStore catalog. One small stylesheet, no frameworks.
   Idea: a gallery wall. Pieces sit in white mats, hung on a plum wall, with placard captions. */

:root {
  --paper: #f4f2f7;
  --mat: #ffffff;
  --ink: #241b2f;
  --ink-soft: #5b5069;
  --line: #dad4e2;
  --plum: #3b2a55;
  --wall: #2e2144;
  --wall-deep: #241936;
  --brass: #7d5e14;
  --brass-light: #d8b96a;
  --on-wall: #e6e0f0;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.7 var(--serif);
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--plum); text-underline-offset: 3px; text-decoration-color: var(--brass); }
a:hover { color: var(--wall-deep); }
h1, h2, h3 { font-family: var(--serif); color: var(--plum); line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 20;
  background: var(--mat); color: var(--ink); padding: 0.6rem 0.9rem; font: 600 0.95rem var(--sans);
}
.skip:focus { top: 0.5rem; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.15rem 1.5rem; padding-top: 0.8rem; padding-bottom: 0.6rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: 600 1.4rem/1 var(--serif); letter-spacing: 0.005em; color: var(--plum); text-decoration: none;
}
.brand svg { width: 1.45rem; height: 1.45rem; fill: var(--brass); }
.nav { display: flex; flex-wrap: wrap; gap: 0 1.3rem; font: 500 0.95rem var(--sans); }
.nav a {
  display: inline-block; padding: 0.55rem 0; color: var(--ink); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--brass); color: var(--ink); }
@media (max-width: 480px) { .nav { font-size: 0.875rem; gap: 0 1.1rem; } .nav .ext { display: none; } }

/* Buttons */
.btn {
  display: inline-block; background: var(--plum); color: #fff; text-align: center; text-decoration: none;
  font: 600 1rem/1.2 var(--sans); padding: 0.95rem 1.5rem; border-radius: 2px;
}
.btn:hover { background: var(--wall-deep); color: #fff; }
.btn.ghost { background: transparent; color: var(--plum); box-shadow: inset 0 0 0 2px var(--plum); }
.btn.ghost:hover { background: var(--plum); color: #fff; }
.btn.block { display: block; width: 100%; }

/* Frames: a white mat with a hairline bevel around the picture opening */
.frame { position: relative; display: block; background: var(--mat); padding: 0.5rem; }
.frame img { width: 100%; height: auto; }
.frame::after {
  content: ""; position: absolute; inset: 0.5rem; border: 1px solid rgba(36, 27, 47, 0.14); pointer-events: none;
}
.card .frame { box-shadow: 0 0 0 1px var(--line); }

/* Hero: text plus a plum wall with a hang of five frames */
.hero { display: grid; gap: 1.6rem; padding: 1.75rem 0 2.25rem; }
.hero h1 { font-weight: 400; font-size: clamp(2rem, 6.4vw, 3.5rem); line-height: 1.07; letter-spacing: -0.015em; margin-bottom: 1rem; }
.hero p { max-width: 34rem; color: var(--ink-soft); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.4rem; }
.wall {
  background: var(--wall); padding: clamp(0.6rem, 2.6vw, 1.5rem);
  display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(4, 1fr);
  gap: clamp(0.4rem, 1.7vw, 0.95rem); aspect-ratio: 5 / 4;
}
.wall .frame { padding: clamp(0.2rem, 0.9vw, 0.5rem); box-shadow: 0 8px 16px rgba(8, 3, 18, 0.42); min-width: 0; min-height: 0; }
.wall .frame::after { inset: clamp(0.2rem, 0.9vw, 0.5rem); }
.wall .frame img { width: 100%; height: 100%; object-fit: cover; }
.wall > :nth-child(1) { grid-area: 1 / 1 / 4 / 4; }
.wall > :nth-child(2) { grid-area: 1 / 4 / 3 / 6; }
.wall > :nth-child(3) { grid-area: 3 / 4 / 5 / 6; }
.wall > :nth-child(4) { grid-area: 4 / 1 / 5 / 2; }
.wall > :nth-child(5) { grid-area: 4 / 2 / 5 / 3; }
.wall > :nth-child(6) { grid-area: 4 / 3 / 5 / 4; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); align-items: center; gap: 3rem; padding: 3rem 0 3.25rem; }
}

/* Sections and grids */
.section { padding: 2.1rem 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 1.2rem; }
.section-head h2 { font-size: clamp(1.4rem, 3.6vw, 1.85rem); font-weight: 600; }
.section-head a { font: 500 0.95rem var(--sans); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 0.8rem; list-style: none; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.8rem 1.1rem; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { display: block; color: var(--ink); text-decoration: none; }
.card:hover { color: var(--ink); }
.plaque { display: block; padding: 0.65rem 0.1rem 0; }
.plaque .t { display: block; font: 600 1rem/1.3 var(--serif); }
.plaque .p { display: block; margin-top: 0.15rem; font: 500 0.875rem/1.4 var(--sans); color: var(--ink-soft); }
.card:hover .t { text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.card:hover .frame { box-shadow: 0 0 0 1px var(--brass); }

/* Facts strip */
.facts-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 1.5rem; }
.facts-band ul { list-style: none; display: grid; gap: 0.9rem 2rem; padding: 1.5rem 0; grid-template-columns: 1fr; }
@media (min-width: 700px) { .facts-band ul { grid-template-columns: repeat(4, 1fr); } }
.facts-band strong { display: block; font: 600 1rem var(--serif); color: var(--plum); }
.facts-band span { font: 0.92rem/1.5 var(--sans); color: var(--ink-soft); }

/* Breadcrumbs */
.crumbs { padding: 1rem 0 0; font: 0.85rem/1.4 var(--sans); color: var(--ink-soft); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; }
.crumbs li + li::before { content: "/"; margin: 0 0.5rem; color: var(--line); }
.crumbs a { color: var(--ink-soft); }
.crumbs [aria-current] { color: var(--ink); }

/* Collection pages */
.page-head { padding: 1.5rem 0 0.5rem; }
.page-head h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 400; letter-spacing: -0.01em; }
.page-head p { max-width: 40rem; color: var(--ink-soft); margin: 0.7rem 0 0; }
.page-head .count { font: 500 0.9rem var(--sans); }
.collection-grid { padding: 1.4rem 0 2.5rem; }

/* Product page */
.product { display: grid; gap: 1.4rem; padding: 1rem 0 2rem; }
.gallery .frame { padding: 0.55rem; }
.gallery .frame::after { inset: 0.55rem; }
.thumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin-top: 0.7rem; }
.thumbs a { display: block; width: 4.4rem; background: var(--mat); padding: 0.2rem; box-shadow: 0 0 0 1px var(--line); }
.thumbs a[aria-current="true"] { box-shadow: 0 0 0 2px var(--brass); }
.info h1 { font-size: clamp(1.4rem, 3.8vw, 1.95rem); font-weight: 600; line-height: 1.22; }
.price { margin: 1rem 0 0.1rem; font: 600 1.6rem/1.2 var(--sans); color: var(--ink); }
.price-note { margin: 0 0 1rem; font: 0.9rem/1.5 var(--sans); color: var(--ink-soft); }
.region { display: inline-block; margin: 0 0 1rem; padding: 0.3rem 0.65rem; font: 500 0.88rem/1.4 var(--sans); background: var(--mat); box-shadow: 0 0 0 1px var(--line); }
.facts { list-style: none; margin: 1.1rem 0 0; border-top: 1px solid var(--line); font: 0.93rem/1.5 var(--sans); color: var(--ink-soft); }
.facts li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.desc { margin-top: 1.6rem; }
.desc h2 { font-size: 1.15rem; margin: 1.6rem 0 0.45rem; }
.desc p { max-width: 62ch; }
.desc ul { margin: 0.4rem 0 1rem 1.15rem; max-width: 62ch; }
.desc li { margin-bottom: 0.3rem; }
.desc .sizes { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0.5rem 0 0.4rem; padding: 0; max-width: none; }
.desc .sizes li { margin: 0; padding: 0.12rem 0.55rem; font: 0.8rem/1.5 var(--sans); background: var(--mat); box-shadow: 0 0 0 1px var(--line); }
.desc .size-list { margin: 0.35rem 0 0.4rem; }
.desc .size-list summary { cursor: pointer; font: 500 0.9rem var(--sans); color: var(--plum); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin-top: 1.6rem; }
.chips li { padding: 0.15rem 0.65rem; font: 0.82rem/1.5 var(--sans); color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; }
.buybar { display: none; }
.related { padding: 1rem 0 2.5rem; border-top: 1px solid var(--line); margin-top: 1rem; }
.related h2 { font-size: 1.4rem; margin: 1.6rem 0 1.2rem; }
@media (min-width: 860px) {
  .product { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3rem; align-items: start; padding-top: 1.5rem; }
  .gallery { position: sticky; top: 1rem; }
  .thumbs a { width: 5rem; }
}
@media (max-width: 859px) {
  .buy-inline { display: none; }
  .buybar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    position: sticky; bottom: 0; z-index: 5; margin: 1.5rem calc(var(--gutter) * -1) 0;
    padding: 0.7rem var(--gutter); background: var(--paper); border-top: 1px solid var(--line);
  }
  .buybar .bp { font: 600 1.1rem/1.2 var(--sans); }
  .buybar .btn { padding: 0.8rem 1.1rem; }
}

/* Prose pages */
.prose { max-width: 44rem; padding: 1.75rem 0 3rem; }
.prose h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); font-weight: 400; letter-spacing: -0.01em; margin-bottom: 1.2rem; }
.prose h2 { font-size: 1.35rem; margin: 2rem 0 0.5rem; }
.prose ul { margin: 0 0 1em 1.2rem; }
.prose li { margin-bottom: 0.35rem; }
.prose .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.notfound { padding: 3rem 0 4rem; max-width: 36rem; }
.notfound h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); font-weight: 400; margin-bottom: 0.8rem; }

/* Footer */
.site-footer { margin-top: 2rem; background: var(--wall-deep); color: var(--on-wall); font: 0.95rem/1.6 var(--sans); }
.site-footer .wrap { display: grid; gap: 1.6rem; padding-top: 2.2rem; padding-bottom: 2.4rem; }
.site-footer a { color: var(--brass-light); text-decoration-color: rgba(216, 185, 106, 0.5); }
.site-footer a:hover { color: #fff; }
.site-footer .fbrand { font: 600 1.25rem var(--serif); color: #fff; margin-bottom: 0.4rem; }
.site-footer p { margin: 0 0 0.6em; max-width: 36rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.3rem; }
.site-footer .legal { color: #b9b0cc; font-size: 0.85rem; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1.4fr 1fr; gap: 3rem; } }

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