/* The Swan Ateliere - components. Uses ONLY tokens.css variables (no raw colours / sizes of its own). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-weight: var(--body-weight); font-size: var(--fs-body); line-height: var(--lh-body); letter-spacing: var(--ls-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-kerning: normal; overflow-wrap: break-word; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-xs); }
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.stack > * + * { margin-top: var(--space-4); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type roles ---------- */
.t-display, .t-h1, .t-h2, .t-h3 { font-family: var(--font-display); font-weight: var(--display-weight); margin: 0; text-wrap: balance; hyphens: manual; }
.t-display { font-size: calc(var(--fs-display) * var(--display-scale)); line-height: var(--lh-display); letter-spacing: calc(var(--ls-display) + var(--display-tracking-add)); }
.t-h1 { font-size: calc(var(--fs-h1) * var(--display-scale)); line-height: var(--lh-h1); letter-spacing: calc(var(--ls-h1) + var(--display-tracking-add)); }
.t-h2 { font-size: calc(var(--fs-h2) * var(--display-scale)); line-height: var(--lh-h2); letter-spacing: calc(var(--ls-h2) + var(--display-tracking-add)); }
.t-h3 { font-size: calc(var(--fs-h3) * var(--display-scale)); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
.t-caps { text-transform: uppercase; line-height: 1.32; letter-spacing: .02em; }
.t-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-body-sm { font-size: var(--fs-body-sm); line-height: var(--lh-body-sm); }
.t-caption { font-size: var(--fs-caption); line-height: var(--lh-caption); letter-spacing: var(--ls-caption); color: var(--text-muted); }
.t-label { font-family: var(--font-label); font-weight: var(--label-weight); font-size: var(--fs-label); line-height: var(--lh-label); letter-spacing: var(--ls-label); text-transform: uppercase; }
.t-muted { color: var(--text-muted); }
.t-italic { font-style: italic; }

/* ---------- logo ---------- */
.logo { display: block; color: var(--ink); height: auto; }
.logo--wordmark { width: 7.25rem; }
.logo--full { width: 10.5rem; }
.logo--mark { width: 2rem; }
.logo--stacked { width: 12rem; }
.logo--on-dark { color: var(--swan-ivory); }

/* ---------- buttons ---------- */
.btn { display: flex; width: fit-content; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--tap); padding: 0 var(--space-6); border: 1px solid transparent; border-radius: var(--radius-pill); font-family: var(--font-label); font-weight: var(--label-weight); font-size: var(--fs-button); line-height: var(--lh-button); letter-spacing: var(--ls-button); text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--secondary { background: transparent; color: var(--text); border-color: var(--text); }
.btn--secondary:hover { background: var(--text); color: var(--bg); }
.btn--ghost { background: transparent; color: var(--text); padding: 0 var(--space-3); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .4em; }
.btn--ghost:hover { text-decoration-thickness: 2px; }
.btn--light { background: var(--swan-ivory); color: var(--swan-soapstone); }
.btn--light:hover { background: var(--swan-ivory-50); }
.btn--outline-light { background: transparent; color: var(--swan-ivory); border-color: var(--swan-ivory); }
.btn--outline-light:hover { background: var(--swan-ivory); color: var(--swan-soapstone); }
.btn--block { width: 100%; }
.btn--sm { min-height: 2.25rem; padding: 0 var(--space-4); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.icon-btn { display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; background: none; color: var(--text); border-radius: var(--radius-pill); cursor: pointer; }
.icon-btn:hover { background: var(--line); }
.icon-btn svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header + nav ---------- */
.hdr { position: sticky; top: 0; z-index: var(--z-header); background: var(--bg); border-bottom: 1px solid var(--line); height: var(--header-h); padding-top: env(safe-area-inset-top, 0); box-sizing: content-box; }
.hdr__in { height: var(--header-h); display: grid; grid-template-columns: calc(var(--tap) * 2) minmax(0, 1fr) calc(var(--tap) * 2); align-items: center; gap: var(--space-2); max-width: var(--container); margin-inline: auto; padding-inline: calc(var(--gutter) - var(--space-2)); }
.hdr__logo { justify-self: center; display: block; color: var(--ink); padding: var(--space-2); }
.hdr__wm--d { display: none; }
.hdr__nav { display: none; }
.hdr__actions { display: flex; justify-content: flex-end; }
.hdr__actions .btn { display: none; }
.hdr__menu { justify-self: start; }
@media (min-width: 48rem) {
  .hdr__in { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-6); padding-inline: var(--gutter); }
  .hdr__logo { justify-self: start; padding: 0; }
  .hdr__wm--m { display: none; }
  .hdr__wm--d { display: block; }
  .hdr__wm--d .logo { width: 10.5rem; }
  .hdr__menu { display: none; }
  .hdr__nav { display: flex; justify-content: center; gap: var(--space-6); }
  .hdr__actions { gap: var(--space-2); align-items: center; }
  .hdr__actions .btn { display: flex; }
  .hdr__actions .icon-btn--chat { display: none; }
}
.nav-link { font-family: var(--font-label); font-weight: var(--label-weight); font-size: var(--fs-label); line-height: var(--lh-label); letter-spacing: var(--ls-label); text-transform: uppercase; text-decoration: none; color: var(--text); padding: var(--space-3) 0; border-bottom: 1px solid transparent; transition: border-color var(--dur-fast) var(--ease-out); white-space: nowrap; }
.nav-link:hover, .nav-link[aria-current="page"] { border-bottom-color: currentColor; }
.drawer { background: var(--bg); color: var(--text); display: flex; flex-direction: column; min-height: 100%; padding: var(--space-4) var(--gutter) var(--space-8); }
.drawer__top { display: grid; grid-template-columns: var(--tap) minmax(0, 1fr) var(--tap); align-items: center; margin-inline: calc(var(--space-2) * -1); margin-bottom: var(--space-7); }
.drawer__top .logo { justify-self: center; }
.drawer__list { list-style: none; margin: 0; padding: 0; }
.drawer__list li { border-bottom: 1px solid var(--line); }
.drawer__list a { display: flex; justify-content: space-between; align-items: center; min-height: 3.5rem; font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(var(--fs-h2) * var(--display-scale)); letter-spacing: var(--ls-h2); text-decoration: none; }
.drawer__foot { margin-top: auto; padding-top: var(--space-7); display: grid; gap: var(--space-4); }

/* ---------- section heading ---------- */
.sec-head { display: grid; gap: var(--space-3); justify-items: center; text-align: center; max-width: var(--measure); margin-inline: auto; }
.sec-head--left { justify-items: start; text-align: left; margin-inline: 0; }
.sec-head__lead { color: var(--text-muted); margin: 0; }
.ornament { display: flex; align-items: center; gap: var(--space-4); color: var(--text); }
.ornament .logo--mark { width: 1.75rem; color: var(--ink); }
.ornament .t-label { color: var(--text-muted); }

/* ---------- badge ---------- */
.badge { display: flex; width: fit-content; align-items: center; min-height: 1.5rem; padding: 0 var(--space-3); border-radius: var(--radius-pill); font-family: var(--font-label); font-weight: var(--label-weight); font-size: var(--fs-label); line-height: 1; letter-spacing: var(--ls-label); text-transform: uppercase; white-space: nowrap; }
.badge--new { background: var(--surface-blue); color: var(--text-on-blue); }
.badge--sale { background: var(--accent); color: var(--on-accent); }
.badge--sold { background: var(--surface); color: var(--text-muted); border: 1px solid var(--line-strong); }

/* ---------- price ---------- */
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); font-family: var(--font-body); font-size: var(--fs-price); line-height: var(--lh-price); font-weight: 500; font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0; }
.price__was { font-size: var(--fs-body-sm); font-weight: var(--body-weight); color: var(--text-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.price--sale .price__now { color: var(--accent); }
.price--ask { font-weight: var(--body-weight); color: var(--text-muted); font-size: var(--fs-body-sm); }

/* ---------- product card ---------- */
.card { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; text-decoration: none; color: inherit; }
.card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface-blue-soft); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-glide) var(--ease-glide); }
.card:hover .card__media img { transform: scale(1.035); }
.card__badges { position: absolute; top: var(--space-3); left: var(--space-3); display: flex; gap: var(--space-2); flex-wrap: wrap; }
.card__body { display: grid; gap: var(--space-1); padding-inline: var(--space-1); min-width: 0; }
.card__cat { color: var(--text-muted); }
.card__name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(var(--fs-h3) * var(--display-scale)); line-height: var(--lh-h3); margin: 0; text-wrap: balance; }
.card__variant { color: var(--text-muted); font-size: var(--fs-caption); line-height: var(--lh-caption); margin: 0; }
.card__body .price { margin-top: var(--space-1); }
.grid { display: grid; gap: var(--space-6) var(--space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 48rem) { .grid { gap: var(--space-8) var(--space-6); grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 23.75rem) { .card__name { font-size: calc(var(--fs-body) * 1.1 * var(--display-scale)); } }

/* ---------- form ---------- */
.field { display: grid; gap: var(--space-2); }
.field__label { font-size: var(--fs-body-sm); font-weight: 500; line-height: var(--lh-body-sm); }
.input, .select, .textarea { width: 100%; min-height: 3rem; padding: 0 var(--space-4); background: var(--surface); color: var(--text); border: 1px solid var(--field-border); border-radius: var(--radius-md); font: inherit; font-size: max(1rem, var(--fs-body)); transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.textarea { min-height: 7rem; padding: var(--space-3) var(--space-4); resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 0; border-color: var(--focus); box-shadow: 0 0 0 3px var(--surface-blue); }
.field__hint { font-size: var(--fs-caption); line-height: var(--lh-caption); color: var(--text-muted); margin: 0; }
.field--error .input { border-color: var(--accent); border-width: 2px; }
.field--error .field__hint { color: var(--accent); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { display: flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); padding: 0 var(--space-4); border: 1px solid var(--field-border); border-radius: var(--radius-pill); background: transparent; color: var(--text); font: inherit; font-size: var(--fs-body-sm); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* ---------- footer ---------- */
.footer { background: var(--swan-afterdark); color: var(--swan-ivory); padding: var(--space-9) 0 var(--space-6); }
.footer a { color: var(--swan-cloud); text-underline-offset: .25em; }
.footer__grid { display: grid; gap: var(--space-7) var(--space-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer__brand, .footer__wide { grid-column: 1 / -1; }
@media (min-width: 48rem) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-7); } .footer__brand, .footer__wide { grid-column: auto; } }
.footer__brand { display: grid; gap: var(--space-4); justify-items: start; }
.footer__brand .logo { color: var(--swan-ivory); }
.footer h4 { margin: 0 0 var(--space-3); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.footer li a { display: flex; align-items: center; min-height: var(--tap); }
.footer__legal { margin-top: var(--space-8); padding-top: var(--space-5); border-top: 1px solid rgba(236, 232, 221, .2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); }

/* ---------- photo + text overlay (scrim / glass) ---------- */
.photo { position: relative; overflow: hidden; border-radius: var(--radius-lg); isolation: isolate; color: var(--swan-ivory); }
.photo > img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; z-index: -2; }
.photo--hero { min-height: clamp(26rem, 110vw, 36rem); display: flex; align-items: flex-end; }
@media (min-width: 48rem) { .photo--hero { aspect-ratio: 16 / 9; min-height: 0; } }
.photo__scrim { position: absolute; inset: 0; z-index: -1; background: var(--scrim); }
.photo__text { display: grid; gap: var(--space-3); justify-items: start; padding: var(--space-6) var(--space-5); width: 100%; max-width: 40rem; }
.photo__text .t-display, .photo__text .t-h1 { color: var(--swan-ivory); }
.photo__text .t-label, .photo__text p { color: var(--swan-ivory); margin: 0; }
.photo__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.photo__glass { position: absolute; left: var(--space-4); right: var(--space-4); bottom: var(--space-4); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); color: var(--text); display: grid; gap: var(--space-1); }
.photo__glass.glass--dark { background: var(--glass-fallback-dark); color: var(--swan-ivory); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .photo__glass.glass--dark { background: var(--glass-tint-dark); } }
.photo__glass .t-label { color: var(--text); }
.photo__glass.glass--dark .t-label { color: var(--swan-ivory); }

/* ---------- misc ---------- */
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.band { background: var(--bg-alt); }
.band--blue { background: var(--surface-blue); color: var(--text-on-blue); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-sm); }
@media (prefers-reduced-motion: reduce) { .card:hover .card__media img { transform: none; } .btn:active { transform: none; } }
