:root {
  color-scheme: light;
  --paper: #f6f1e9;
  --paper-deep: #ebe3d6;
  --ink: #241a24;
  --ink-soft: #6a5d64;
  --brass: #86683a;
  --line: rgba(36, 26, 36, .16);
  --serif: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --sans: "Jost", "Century Gothic", "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
  --nav-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, p, dl, dd, figure { margin: 0; }
button, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 16px; z-index: 60; }
.skip:focus { left: 8px; }

.eyebrow { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--brass); }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 40; height: var(--nav-height); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gutter); background: rgba(246, 241, 233, .94); border-bottom: 1px solid var(--line); }
.nav-mark, .footer-mark { font-family: var(--serif); font-size: 22px; letter-spacing: .04em; text-decoration: none; white-space: nowrap; }
.nav-mark span, .footer-mark span { font-family: var(--sans); font-size: 10px; font-weight: 400; letter-spacing: .34em; text-transform: uppercase; margin-left: 6px; }
.nav nav { display: flex; gap: clamp(14px, 3vw, 36px); }
.nav nav a { font-size: 13px; letter-spacing: .1em; text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; white-space: nowrap; }
.nav nav a:hover, .nav nav a[aria-current] { border-bottom-color: var(--ink); }

/* Opening */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: calc(100svh - var(--nav-height)); }
.hero-text { display: flex; flex-direction: column; justify-content: center; padding: 48px var(--gutter); }
.wordmark { font-family: var(--serif); font-weight: 400; font-size: clamp(76px, 10.5vw, 176px); line-height: .92; letter-spacing: -.01em; margin: 20px 0 0; }
.wordmark span { display: block; font-family: var(--sans); font-size: clamp(15px, 1.7vw, 25px); font-weight: 300; letter-spacing: .62em; text-transform: uppercase; line-height: 1; margin: 22px 0 0 6px; }
.hero-lede { max-width: 26em; margin-top: 40px; font-size: clamp(17px, 1.4vw, 20px); font-weight: 300; }
.tally { display: flex; gap: clamp(24px, 4vw, 56px); margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.tally dt { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.tally dd { font-family: var(--serif); font-size: clamp(30px, 3vw, 44px); line-height: 1.2; white-space: nowrap; }
.hero-link { align-self: flex-start; margin-top: 36px; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.hero-link:hover { color: var(--brass); border-color: var(--brass); }
.hero-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; min-height: 0; }
.hero-photos img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; min-height: 0; max-height: calc(100svh - var(--nav-height)); }

/* Catalogue */
.collection, .sheet { padding: clamp(56px, 8vw, 120px) var(--gutter); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.section-head h1, .section-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 72px); line-height: 1.05; }
.result { font-size: 14px; letter-spacing: .06em; color: var(--ink-soft); white-space: nowrap; padding-bottom: 8px; }

.filters { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); margin-bottom: clamp(32px, 4vw, 56px); }
.filters summary { cursor: pointer; padding: 14px 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.filter-grid { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 3fr) minmax(0, 4fr) auto; gap: 16px 40px; padding: 22px 0 26px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .filter-end label { padding: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.options { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.options-size { gap: 6px; }
.opt { background: none; border: 0; padding: 4px 0; cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; gap: 7px; border-bottom: 1px solid transparent; white-space: nowrap; }
.opt:hover { color: var(--brass); }
.opt[aria-pressed="true"] { border-bottom-color: var(--ink); font-weight: 500; }
.opt-size { min-width: 44px; height: 44px; justify-content: center; border: 1px solid var(--line); }
.opt-size:hover { border-color: var(--ink); color: inherit; }
.opt-size[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dot { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(36, 26, 36, .25); }
.filter-end { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.filter-end label { display: block; margin: 0; }
.filter-end select { display: block; margin-top: 10px; padding: 7px 8px; background: transparent; border: 1px solid var(--line); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); min-height: 44px; }
.clear { background: none; border: 0; padding: 4px 0; cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-soft); }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(36px, 4vw, 64px) clamp(14px, 2vw, 30px); }
.card { min-width: 0; }
.card[hidden] { display: none; }
.card-link { display: block; text-decoration: none; }
.card-photo { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: var(--paper-deep); }
.card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: opacity .7s ease; }
.card-photo .alt-view { opacity: 0; }
@media (hover: hover) {
  .card-link:hover .alt-view { opacity: 1; }
}
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 14px; }
.card-name { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(21px, 1.8vw, 27px); line-height: 1.2; overflow-wrap: break-word; min-width: 0; }
.card-sub { font-size: 13px; letter-spacing: .06em; color: var(--ink-soft); margin-top: 2px; min-height: 1.6em; }
.card-total { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.card-colour { font-size: 14px; color: var(--ink-soft); min-height: 1.6em; }
.sizes { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); font-size: 14px; }
.sizes b { font-weight: 500; }
.sizes span { color: var(--ink-soft); font-size: 12px; margin-left: 3px; }
.placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border: 1px solid var(--line); }
.ph-mark { font-family: var(--serif); font-size: clamp(64px, 8vw, 120px); line-height: 1; color: rgba(36, 26, 36, .22); }
.ph-label { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); text-align: center; padding: 0 10px; }
.ask { display: inline-block; margin-top: 10px; font-size: 13px; letter-spacing: .04em; text-underline-offset: 3px; color: var(--brass); padding: 6px 0; }
.empty { padding: 72px 0; text-align: center; font-family: var(--serif); font-size: 24px; }

/* Image fade */
.js img.fade { opacity: 0; transition: opacity .8s ease; }
.js img.fade.is-in { opacity: 1; }
.js .card-photo img.fade.alt-view.is-in { opacity: 0; }
@media (hover: hover) {
  .js .card-link:hover .card-photo img.fade.alt-view.is-in { opacity: 1; }
}

/* Dress page */
.dress { display: grid; grid-template-columns: minmax(280px, 4fr) minmax(0, 9fr); gap: clamp(32px, 5vw, 80px); padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(64px, 8vw, 110px); }
.dress-info { position: sticky; top: calc(var(--nav-height) + 32px); align-self: start; }
.back { display: inline-block; margin-bottom: clamp(28px, 5vw, 64px); font-size: 13px; letter-spacing: .1em; text-underline-offset: 4px; }
.dress-name { font-family: var(--serif); font-weight: 400; font-size: clamp(50px, 5.6vw, 88px); line-height: 1.04; margin-top: 10px; overflow-wrap: anywhere; }
.dress-code { font-size: 14px; letter-spacing: .16em; text-transform: uppercase; margin-top: 14px; }
.dress-colour { font-size: 18px; font-weight: 300; margin-top: 4px; color: var(--ink-soft); }
.ledger { width: 100%; border-collapse: collapse; margin-top: 32px; font-size: 16px; }
.ledger caption { text-align: left; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); padding-bottom: 10px; }
.ledger th, .ledger td { padding: 9px 0; text-align: left; border-top: 1px solid var(--line); font-weight: 400; }
.ledger thead th { border-top: 1px solid var(--ink); font-size: 12px; letter-spacing: .1em; color: var(--ink-soft); }
.ledger td:last-child, .ledger thead th:last-child { text-align: right; }
.ledger tfoot th, .ledger tfoot td { border-top: 1px solid var(--ink); font-weight: 500; }
.enquire { margin-top: 28px; }
.wa-button { display: block; padding: 14px 16px; background: var(--ink); color: var(--paper); text-align: center; text-decoration: none; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; transition: background .3s ease; }
.wa-button:hover { background: var(--brass); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; }
.pager a { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--ink-soft); }
.pager a:last-child { text-align: right; }
.pager span { display: block; font-size: 15px; letter-spacing: .05em; text-transform: none; color: var(--ink); }
.dress-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
.dress-photos button { padding: 0; border: 0; background: var(--paper-deep); cursor: zoom-in; display: block; width: 100%; }
.dress-photos button:first-child { grid-column: 1 / -1; }
.dress-photos img { width: 100%; height: auto; }

.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #17111a; color: var(--paper); }
.viewer::backdrop { background: #17111a; }
.viewer[open] { display: flex; align-items: center; justify-content: center; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer button { position: absolute; background: rgba(23, 17, 26, .55); border: 0; color: var(--paper); cursor: pointer; }
.viewer-close { top: 12px; right: 12px; padding: 10px 16px; font-size: 13px; letter-spacing: .12em; }
.viewer-prev, .viewer-next { top: 50%; transform: translateY(-50%); width: 52px; height: 76px; font-size: 34px; line-height: 1; }
.viewer-prev { left: 8px; }
.viewer-next { right: 8px; }
.viewer-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 13px; letter-spacing: .14em; }

/* Stock sheet */
.sheet-scroll { overflow-x: auto; border-top: 1px solid var(--ink); }
.sheet-table { width: 100%; min-width: 660px; border-collapse: collapse; font-size: 15px; }
.sheet-table th, .sheet-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; font-weight: 400; }
.sheet-table thead th { font-size: 12px; letter-spacing: .1em; color: var(--ink-soft); padding: 12px 10px; }
.sheet-table .col-dress, .sheet-table .col-colour { text-align: left; }
.sheet-table .col-dress { position: sticky; left: 0; background: var(--paper); min-width: 150px; }
.sheet-table .col-total { font-weight: 500; }
.sheet-dress { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 15px; letter-spacing: .04em; white-space: nowrap; }
.sheet-dress img { width: 34px; height: 51px; object-fit: cover; object-position: top; background: var(--paper-deep); }
a.sheet-dress:hover { color: var(--brass); }
.sheet-text { display: flex; flex-direction: column; line-height: 1.25; }
.sheet-text b { font-family: var(--serif); font-weight: 400; font-size: 18px; letter-spacing: 0; }
.sheet-text small { font-size: 12px; color: var(--ink-soft); }
.sheet-ph { display: flex; align-items: center; justify-content: center; width: 34px; height: 51px; flex: none; background: var(--paper-deep); font-family: var(--serif); font-size: 15px; color: rgba(36, 26, 36, .3); }
.sheet-group th { position: static; text-align: left; font-family: var(--serif); font-size: 21px; padding: 30px 0 8px; border-bottom: 1px solid var(--ink); }
.sheet-sub th, .sheet-sub td { font-weight: 500; font-size: 14px; }
.sheet-sub th { text-align: left; }
.sheet-table .nil { color: rgba(36, 26, 36, .24); }
.sheet-table tfoot th, .sheet-table tfoot td { font-weight: 500; border-bottom: 0; border-top: 1px solid var(--ink); padding-top: 14px; }
.sheet-table tfoot th { text-align: left; }

/* Contact and footer */
.contact { padding: clamp(56px, 8vw, 110px) var(--gutter); background: var(--ink); color: var(--paper); }
.contact .eyebrow { color: #d9c49c; margin-bottom: 12px; }
.contact h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.4vw, 64px); }
.contact a { display: inline-block; margin: 18px 32px 0 0; font-size: 18px; text-underline-offset: 5px; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 32px; padding: 30px var(--gutter); border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.footer-mark { color: var(--ink); }

@media (min-width: 800px) {
  .filters summary { display: none; }
}
@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-text { padding: 44px var(--gutter) 36px; }
  .hero-photos { height: 62vw; min-height: 240px; padding: 0 var(--gutter); }
  .hero-photos img { max-height: none; }
  .dress { grid-template-columns: minmax(0, 1fr); }
  .dress-info { position: static; order: 2; }
  .back { display: none; }
  .dress-photos { order: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 6px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .dress-photos button { flex: 0 0 82%; scroll-snap-align: center; }
  .dress-photos img { aspect-ratio: 2 / 3; object-fit: cover; object-position: top; }
}
@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-meta { flex-direction: column; align-items: flex-start; gap: 0; }
  .card-name { font-size: 17px; hyphens: auto; }
  .filter-grid { grid-template-columns: minmax(0, 1fr); }
  .section-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (max-width: 560px) {
  .nav-mark span { display: none; }
  .nav nav a { font-size: 12px; letter-spacing: .06em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .nav, .footer, .skip { display: none; }
  .sheet { padding: 0; }
  .sheet-scroll { overflow: visible; }
  .sheet-table { font-size: 11px; }
  .sheet-table tr { break-inside: avoid; }
}
