:root {
  color-scheme: light;
  --ink: #2a2045;
  --muted: #534668;
  --paper: #fbf9f5;
  --lavender: #e5e3f0;
  --lavender-ink: #585071;
  --yellow: #f3e8c9;
  --line: #d8d2df;
  --edge: 1px solid var(--line);
  --display: "Avenir Next", "Segoe UI", sans-serif;
  --body: "Avenir Next", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--body); }
a { color: inherit; }
button { color: inherit; font: inherit; cursor: pointer; }
img { display: block; width: 100%; object-fit: cover; }
figure, h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 600; }
:focus-visible { outline: 3px solid #6330a5; outline-offset: 4px; }
.shell { width: min(100% - 6rem, 1232px); margin-inline: auto; }

.skip-link { position: fixed; z-index: 5; top: .5rem; left: .5rem; padding: .75rem; background: white; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.header { border-bottom: var(--edge); }
.nav { min-height: 76px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 2rem; }
.brand { display: inline-flex; width: fit-content; align-items: center; gap: .5rem; text-decoration: none; font: 650 clamp(1.05rem, 2.15vw, 1.35rem)/1 var(--display); letter-spacing: -.038em; }
.brand-moon { display: grid; place-items: center; flex: 0 0 2rem; height: 2rem; border: var(--edge); border-radius: 50%; background: var(--yellow); font: 1.4rem/1 Georgia, serif; }
.nav-links { display: flex; gap: 1.9rem; font-size: .9375rem; font-weight: 600; }
.nav-links a { text-decoration: none; }
.nav-links a:hover, .text-link:hover { text-decoration: underline; text-underline-offset: .23em; }
.bag-button { justify-self: end; min-height: 42px; display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .4rem .25rem .8rem; border: var(--edge); border-radius: .5rem; background: var(--paper); font-size: .9375rem; font-weight: 650; }
.bag-button:hover { background: var(--lavender); }
.bag-button span { display: grid; place-items: center; min-width: 1.55rem; height: 1.55rem; padding-inline: .25rem; border-radius: 50px; background: var(--lavender); color: var(--ink); font-size: .875rem; }

.eyebrow { color: var(--ink); font-size: .875rem; font-weight: 650; letter-spacing: .085em; text-transform: uppercase; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: .5rem; padding: .6rem 1.3rem; text-decoration: none; font-weight: 650; }
.button:hover { background: var(--lavender-ink); border-color: var(--lavender-ink); }
.button:disabled { opacity: .65; cursor: default; }

.gallery { padding-block: clamp(2rem, 5vw, 4rem) clamp(3.5rem, 8vw, 7rem); }
.gallery h1 { margin-bottom: clamp(1rem, 2.4vw, 1.8rem); color: var(--muted); font-size: .9375rem; letter-spacing: .065em; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
.gallery-grid img { height: auto; aspect-ratio: 5 / 6; background: var(--lavender); }
.gallery-profile { object-position: center 44%; }
.gallery-yellow { object-position: center 58%; }

.shop { border-top: var(--edge); background: var(--paper); padding-block: clamp(2.75rem, 6vw, 5rem); }
.shop-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.75rem; }
h2 { font-size: clamp(2.5rem, 5vw, 4.15rem); line-height: 1.06; letter-spacing: -.055em; margin-bottom: .5rem; }
.shop-heading p { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.bag-button[hidden], .filters[hidden] { display: none; }
.filters button { min-height: 44px; background: transparent; border: var(--edge); border-radius: .5rem; padding: .3rem .8rem; font-size: .875rem; font-weight: 650; }
.filters button:hover { background: var(--lavender); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.collection { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.8rem, 2vw, 1.55rem); }
.card { min-width: 0; }
.card-button { display: block; text-align: left; width: 100%; border: var(--edge); border-radius: .75rem; padding: .55rem .55rem .75rem; background: #fffdfa; }
.card-image { overflow: hidden; margin-bottom: .7rem; background: var(--paper); border-radius: .4rem; }
.card-image img { aspect-ratio: 1.12; transition: transform .25s ease; }
.card-button:hover img { transform: scale(1.025); }
.card-button:hover .card-name { text-decoration: underline; text-underline-offset: .16em; }
.card-name { display: block; margin: 0 .16rem .2rem; font: 600 clamp(1rem, 2vw, 1.22rem)/1.2 var(--display); letter-spacing: -.045em; }
.card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .5rem; margin-inline: .16rem; font-size: .875rem; }
.card-price { font-weight: 650; }

.studio { border-block: var(--edge); background: var(--yellow); }
.studio-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: clamp(1.25rem, 4vw, 3rem); padding-block: clamp(2.5rem, 5vw, 4rem); }
.text-link { text-underline-offset: .23em; font-weight: 650; }
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.55rem; }
.footer small { color: var(--muted); font-size: .875rem; }

dialog { border: var(--edge); border-radius: .75rem; padding: 1.25rem; width: min(608px, calc(100% - 2rem)); max-height: calc(100% - 2rem); background: var(--paper); color: var(--ink); box-shadow: 0 16px 46px #29204132; }
dialog::backdrop { background: #261c42a0; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.dialog-top h2 { font-size: 2.65rem; margin: 0; }
.close { display: grid; place-items: center; background: var(--lavender); border: var(--edge); border-radius: 50%; width: 44px; height: 44px; padding: 0; font-size: 1.65rem; line-height: 1; }
.close:hover { background: var(--yellow); }
#product-details img { aspect-ratio: 1.55; border: var(--edge); border-radius: .85rem; margin-bottom: 1rem; }
#product-details h2 { font-size: 2.55rem; }
#product-details p { color: var(--muted); margin-bottom: .75rem; }
.bag-dialog { margin: 0 0 0 auto; width: min(455px, 100%); height: 100%; max-height: 100%; border-radius: .75rem 0 0 .75rem; }
.bag-dialog[open] { display: flex; flex-direction: column; }
.bag-items { flex: 1; }
.bag-row { display: grid; grid-template-columns: 4rem 1fr auto; align-items: center; gap: .85rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.bag-row img { aspect-ratio: 1; border: var(--edge); border-radius: .55rem; }
.bag-row small { color: var(--muted); font-size: .875rem; }
.bag-row button { border: 0; background: none; text-decoration: underline; padding: .65rem .2rem; font-size: .875rem; }
.bag-bottom { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.bag-bottom p { color: var(--muted); margin: .6rem 0 0; }
.subtotal { display: flex; justify-content: space-between; }

@media (max-width: 950px) {
  .shell { width: calc(100% - 3rem); }
  .collection { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 2rem); }
  .nav { grid-template-columns: 1fr auto; gap: .55rem .75rem; padding-block: .65rem; }
  .nav-links { grid-row: 2; gap: 1.3rem; }
  .bag-button { grid-column: 2; grid-row: 1 / span 2; }
  .gallery-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .collection { gap: 1rem .82rem; }
  .studio-inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
