:root {
  color-scheme: light;
  --background: #faf9f6;
  --paper: #ffffff;
  --ink: #171717;
  --muted: #66625c;
  --line: #d9d7d0;
  --soft: #e9e7e0;
  --danger: #8c2d2d;
  --page: 1440px;
  --gutter: clamp(16px, 3vw, 42px);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
  --motion-fast: 170ms;
  --motion-slow: 360ms;
  font-family: var(--sans);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--background);
  text-rendering: optimizeLegibility;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.page-shell { width: min(var(--page), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.view[hidden] { display: none !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 249, 246, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  transition: background-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.header-shell {
  width: min(var(--page), calc(100% - var(--gutter) * 2));
  min-height: 68px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 28px;
}

.brand-link, .desktop-nav button, .header-action {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.brand-link { display: grid; justify-items: start; gap: 4px; }
.brand-name { font-family: var(--serif); font-size: 18px; letter-spacing: .09em; }
.brand-note { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .18em; }
.desktop-nav { display: flex; align-items: center; gap: 26px; }
.desktop-nav button, .header-action { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.header-action { min-height: 44px; }
.desktop-nav button:hover, .header-action:hover { text-decoration: underline; text-underline-offset: 5px; }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.bag-action { white-space: nowrap; }
.bag-action span { display: inline-grid; min-width: 18px; height: 18px; place-items: center; margin-left: 2px; color: var(--paper); background: var(--ink); border-radius: 50%; font-size: 10px; }

.header-search {
  width: min(var(--page), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
}
.header-search label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.search-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.search-row input { min-width: 0; min-height: 48px; padding: 0 14px; border: 1px solid var(--ink); background: var(--paper); font-size: 16px; }
.search-row button { min-height: 48px; padding: 0 18px; border: 1px solid var(--ink); background: transparent; cursor: pointer; }
.search-row button[type="submit"] { color: var(--paper); background: var(--ink); }

.home-intro {
  padding-block: clamp(34px, 6vw, 76px) clamp(32px, 5vw, 60px);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
  align-items: end;
  gap: 16px clamp(24px, 6vw, 88px);
}

.eyebrow { margin: 0; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .17em; }
.home-intro .eyebrow { grid-column: 1 / -1; }
.home-intro h1, .editorial-heading h1, .account-intro h1 {
  margin: 0;
  font-family: var(--serif);
  max-width: 18ch;
  font-size: clamp(36px, 4.4vw, 62px);
  font-weight: 400;
  letter-spacing: -.052em;
  line-height: 1.02;
}
.intro-copy { max-width: 36ch; margin: 0; color: var(--muted); font-size: clamp(14px, 1.15vw, 16px); line-height: 1.55; }

.catalog-section { padding-block: 20px 86px; }
.catalog-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 15px; border-bottom: 1px solid var(--ink); }
.catalog-heading-row > div { display: grid; gap: 8px; }
.catalog-heading-row h2, .about-strip h2, .bag-header h2 { margin: 0; font-family: var(--serif); font-size: clamp(26px, 3vw, 42px); font-weight: 400; letter-spacing: -.045em; }
#catalog-heading { scroll-margin-top: 84px; }
.catalog-count { margin: 0; color: var(--muted); font-size: 12px; }
.catalog-toolbar { min-height: 62px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.category-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 4px; }
.category-list::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-size: 12px; transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease, border-color var(--motion-fast) ease; }
.filter-chip:focus-visible { outline-offset: -3px; }
.filter-chip.is-active:focus-visible { outline-color: var(--paper); }
.filter-chip.is-active { color: var(--paper); border-color: var(--ink); background: var(--ink); }
.sort-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.sort-control select { min-height: 38px; padding: 0 30px 0 10px; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; color: var(--ink); background: transparent; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 16px; padding-top: 18px; }
.product-card { min-width: 0; }
.product-card-button { width: 100%; display: grid; gap: 9px; padding: 0; border: 0; text-align: left; background: transparent; cursor: pointer; transition: transform var(--motion-fast) var(--motion-ease); }
.product-media { position: relative; aspect-ratio: 5 / 6; overflow: hidden; border-radius: 4px; background: linear-gradient(145deg, #e7e5de, #d3d0c7); }
.product-media img, .detail-photo img, .bag-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-media img { transition: transform 320ms var(--motion-ease); }
.product-media::after { content: "VIEW PIECE"; position: absolute; inset: auto 12px 12px; padding: 11px; opacity: 0; color: var(--paper); background: rgba(23,23,23,.88); text-align: center; font-size: 10px; font-weight: 750; letter-spacing: .12em; transition: opacity var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease); transform: translateY(6px); }
.product-card-button:focus-visible .product-media::after { opacity: 1; transform: translateY(0); }
@media (hover: hover) and (pointer: fine) {
  .product-card-button:hover { transform: translateY(-2px); }
  .product-card-button:hover .product-media img { transform: scale(1.025); }
  .product-card-button:hover .product-media::after { opacity: 1; transform: translateY(0); }
}
.product-card-copy { min-width: 0; display: grid; gap: 4px; }
.product-card-copy strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; min-height: 2.7em; overflow: hidden; overflow-wrap: anywhere; font-size: clamp(13px, 1.2vw, 15px); font-weight: 600; line-height: 1.35; }
.product-card-facts { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.product-card-price { font-size: 15px; font-weight: 650; }
.empty-state { padding: 90px 20px; text-align: center; }
.empty-state h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 32px; font-weight: 400; }
.empty-state p { margin: 0 0 18px; color: var(--muted); }
.empty-state button, .about-strip button, .back-button { padding: 0 0 5px; border: 0; border-bottom: 1px solid currentColor; background: transparent; cursor: pointer; }
.catalog-notice { color: var(--muted); text-align: center; }
.catalog-notice:empty { display: none; }
.catalog-pagination { display: flex; justify-content: center; }
.catalog-pagination button:not([hidden]) { margin-top: 16px; }

.about-strip { padding: 90px 0; color: var(--paper); background: var(--ink); }
.about-strip-grid { display: grid; grid-template-columns: .7fr 1.4fr .9fr; gap: clamp(24px, 5vw, 80px); align-items: start; }
.about-strip .eyebrow { color: #aaa79e; }
.about-strip h2 { max-width: 15ch; font-size: clamp(32px, 4vw, 58px); line-height: 1.06; }
.about-strip p:not(.eyebrow) { margin: 0; color: #b9b6af; line-height: 1.65; }
.about-strip button { justify-self: start; color: var(--paper); }

.product-view, .about-view, .account-view { min-height: 72vh; padding-block: 38px 110px; }
.back-button { margin-bottom: 30px; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: clamp(26px, 4vw, 64px); align-items: start; }
.product-gallery { display: grid; gap: 10px; min-width: 0; margin: 0; }
.detail-frame { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; background: #e4e1d8; }
.detail-photo { display: block; width: 100%; height: 100%; position: relative; overflow: hidden; background: linear-gradient(145deg, #e7e5de, #d3d0c7); }
.detail-photo-main { animation: photo-in 220ms var(--motion-ease); }
.detail-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; max-width: 340px; }
.detail-thumbs button { min-width: 0; aspect-ratio: 1; padding: 2px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); cursor: pointer; }
.detail-thumbs button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.detail-caption { color: var(--muted); font-size: 11px; }
.detail-photo-main img { object-fit: contain; }
.product-summary { position: sticky; top: 96px; display: grid; gap: 18px; }
.product-summary-head { display: grid; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.product-summary h1 { margin: 0; overflow-wrap: anywhere; font-family: var(--serif); font-size: clamp(25px, 2.8vw, 40px); font-weight: 400; letter-spacing: -.034em; line-height: 1.1; }
.product-summary-brand { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.detail-price { font-family: var(--serif); font-size: 24px; }
.detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.detail-facts div { min-height: 72px; padding: 12px; display: grid; gap: 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-facts span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.detail-facts strong { font-size: 13px; font-weight: 600; }
.detail-section { display: grid; gap: 8px; }
.detail-section h2 { margin: 0; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; }
.detail-section p { margin: 0; color: var(--muted); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.primary-button { min-height: 52px; padding: 0 20px; border: 1px solid var(--ink); color: var(--paper); background: var(--ink); cursor: pointer; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.primary-button:hover { color: var(--ink); background: transparent; }
.product-safe-note { margin: -12px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

.editorial-heading { padding: 60px 0 70px; display: grid; gap: 20px; }
.about-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr); gap: clamp(38px, 7vw, 110px); align-items: start; }
.about-visual { min-height: 650px; display: grid; place-items: center; color: var(--paper); background: linear-gradient(145deg, #c7c4bb, #6f6c65); }
.about-visual span { font-family: var(--serif); font-size: clamp(78px, 13vw, 190px); letter-spacing: -.08em; opacity: .82; }
.about-copy { display: grid; gap: 20px; }
.about-copy h2 { margin: 18px 0 0; font-family: var(--serif); font-size: 32px; font-weight: 400; }
.about-copy p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.75; }

.account-shell { padding: 70px 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: clamp(40px, 8vw, 130px); align-items: center; }
.account-intro { display: grid; gap: 26px; }
.account-intro p:last-child { max-width: 470px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.account-panel { padding: 30px; background: var(--paper); border: 1px solid var(--line); }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.account-tabs button { padding: 0 0 14px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; }
.account-tabs button.is-active { color: var(--ink); border-color: var(--ink); }
.account-panel form { display: grid; gap: 12px; }
.account-panel label { font-size: 12px; font-weight: 700; }
.account-panel input { min-height: 52px; padding: 0 14px; border: 1px solid var(--line); background: var(--background); font-size: 16px; }
.form-note { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.bag-dialog { width: min(540px, calc(100% - 28px)); max-height: calc(100vh - 28px); margin: 14px 14px 14px auto; padding: 0; border: 0; color: var(--ink); background: var(--paper); }
.bag-dialog::backdrop { background: rgba(23,23,23,.45); backdrop-filter: blur(3px); }
.bag-header { padding: 26px; display: flex; justify-content: space-between; align-items: start; gap: 20px; border-bottom: 1px solid var(--line); }
.bag-header > div { display: grid; gap: 7px; }
.bag-header button { padding: 0 0 4px; border: 0; border-bottom: 1px solid currentColor; background: transparent; cursor: pointer; }
.bag-content { min-height: 180px; padding: 10px 26px; }
.bag-empty { min-height: 170px; display: grid; place-items: center; color: var(--muted); text-align: center; }
.bag-row { padding: 16px 0; display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); }
.bag-thumb { aspect-ratio: 4 / 5; background: var(--soft); }
.bag-row-copy { min-width: 0; display: grid; gap: 5px; }
.bag-row-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.bag-row-copy span { color: var(--muted); font-size: 11px; }
.bag-row button { padding: 0; border: 0; border-bottom: 1px solid currentColor; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; }
.bag-footer { padding: 22px 26px 28px; display: grid; gap: 14px; border-top: 1px solid var(--line); }
.bag-footer > div { display: flex; justify-content: space-between; }
.bag-footer > div strong { font-family: var(--serif); font-size: 20px; }
.bag-footer p { margin: 0; color: var(--muted); font-size: 11px; text-align: center; }

.site-footer { color: var(--paper); background: var(--ink); }
.footer-grid { padding-block: 64px; display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-grid > div { display: grid; align-content: start; justify-items: start; gap: 10px; }
.footer-grid strong { font-family: var(--serif); font-size: 18px; letter-spacing: .06em; }
.footer-grid p { max-width: 240px; margin: 0; color: #a9a69f; font-size: 12px; line-height: 1.55; }
.footer-grid span { margin-bottom: 6px; color: #a9a69f; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.footer-grid button, .footer-grid a { padding: 0; border: 0; color: var(--paper); background: transparent; cursor: pointer; font-size: 12px; }
.footer-grid button:hover, .footer-grid a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { min-height: 62px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid #3d3d3d; color: #a9a69f; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }

.site-message { position: fixed; z-index: 60; right: 20px; bottom: 20px; max-width: min(380px, calc(100% - 40px)); padding: 14px 16px; color: var(--paper); background: var(--ink); box-shadow: 0 18px 46px rgba(0,0,0,.2); font-size: 12px; line-height: 1.45; animation: message-in 360ms var(--motion-ease) both; }

.header-search:not([hidden]) { animation: search-in 210ms var(--motion-ease) both; }
.view.is-entering { animation: view-in 240ms var(--motion-ease) backwards; }
.bag-dialog[open] { animation: dialog-in 360ms var(--motion-ease) both; }

.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--motion-slow) var(--motion-ease), transform var(--motion-slow) var(--motion-ease);
}
.motion-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.motion-ready [data-reveal-index="1"] { transition-delay: 28ms; }
.motion-ready [data-reveal-index="2"] { transition-delay: 56ms; }
.motion-ready [data-reveal-index="3"] { transition-delay: 84ms; }

@keyframes view-in {
  from { opacity: .75; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes photo-in {
  from { opacity: .64; }
  to { opacity: 1; }
}
@keyframes search-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes message-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .header-shell { grid-template-columns: 1fr auto; }
  .desktop-nav { display: none; }
  .home-intro { grid-template-columns: 1fr; gap: 14px; }
  .home-intro .eyebrow { grid-column: auto; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about-strip-grid { grid-template-columns: 1fr 1.5fr; }
  .about-strip-grid > p:not(.eyebrow), .about-strip-grid > button { grid-column: 2; }
  .product-detail { grid-template-columns: 1fr; }
  .product-summary { position: static; }
  .account-shell { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  :root { --gutter: 16px; }
  .site-header { position: static; }
  .header-shell { min-height: 58px; gap: 8px; }
  .brand-note { display: none; }
  .brand-name { font-size: clamp(12px, 3.6vw, 16px); letter-spacing: .055em; }
  .header-actions { gap: clamp(8px, 2.4vw, 14px); }
  .header-action { font-size: 10px; letter-spacing: .025em; }
  .search-row { grid-template-columns: 1fr auto; }
  .search-row button[data-search-close] { grid-column: 1 / -1; }
  .home-intro { padding-block: 30px 18px; }
  .home-intro h1, .editorial-heading h1, .account-intro h1 { max-width: 20ch; font-size: clamp(30px, 7.9vw, 43px); }
  .intro-copy { max-width: 39ch; font-size: 14px; }
  #catalog-heading { scroll-margin-top: 12px; }
  .catalog-toolbar { align-items: stretch; flex-direction: column; gap: 5px; padding: 7px 0 9px; }
  .sort-control { justify-content: space-between; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 10px; }
  .product-media::after { display: none; }
  .about-strip { padding: 66px 0; }
  .about-strip-grid { grid-template-columns: 1fr; }
  .about-strip-grid > p:not(.eyebrow), .about-strip-grid > button { grid-column: auto; }
  .product-gallery { gap: 6px; }
  .product-detail { gap: 20px; }
  .detail-frame { aspect-ratio: 5 / 4; }
  .detail-thumbs { max-width: 250px; }
  .product-view, .about-view, .account-view { padding-bottom: 70px; }
  .about-layout { grid-template-columns: 1fr; }
  .about-visual { min-height: 420px; }
  .account-panel { padding: 22px; }
  .bag-dialog { width: 100%; max-width: none; max-height: calc(100vh - 10px); margin: 10px 0 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .product-card-button:hover, .product-card-button:hover .product-media img { transform: none; transition: none; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; }
}
