/* ============================================================
   v3/atelier.css — the bench, the basket drawer and checkout.
   Uses the tokens declared in gallery.css.
   ============================================================ */

body.no-scroll {
  overflow: hidden;
}

/* The drawer, its scrim and the checkout all set `display`, which beats the
   UA stylesheet's `[hidden] { display: none }`. Without this the empty
   checkout overlay sits over the page dimming everything. */
[hidden] {
  display: none !important;
}

/* ---------------- the mirror render ---------------- */
.mirror {
  position: relative;
  display: block;
  filter: drop-shadow(0 30px 45px rgba(60, 50, 30, 0.18))
    drop-shadow(0 6px 14px rgba(60, 50, 30, 0.12));
}
.mirror-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.mirror-glass {
  position: absolute;
  overflow: hidden;
  background: linear-gradient(
    118deg,
    #e7e9e6 0%, #f2f3ef 18%, #d8dcd8 34%, #fbfbf7 48%,
    #dfe2dd 62%, #eef0ea 80%, #d9dcd6 100%
  );
}
.mirror-glass::before {
  /* the window the mirror is reflecting */
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(
    115deg,
    transparent 28%,
    rgba(255, 255, 255, 0.85) 40%,
    rgba(255, 255, 255, 0.25) 47%,
    transparent 55%,
    rgba(255, 255, 255, 0.5) 68%,
    transparent 76%
  );
}
.mirror-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 2px 8px rgba(40, 36, 28, 0.22);
  border-radius: inherit;
}
.mirror-panes {
  pointer-events: none;
}

/* ---------------- the bench ---------------- */
.atelier {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-warm) 100%);
}

.cfg {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(32px, 5vw, 56px);
}

.cfg-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(560px, 62vh);
  padding: 40px;
  background:
    linear-gradient(112deg, transparent 38%, rgba(255, 253, 244, 0.7) 50%, transparent 64%),
    linear-gradient(170deg, #fbf8f1, #ece4d4);
  border: 1px solid var(--line);
  position: sticky;
  top: 24px;
}
.cfg-dims {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.cfg-panel {
  display: grid;
  gap: 26px;
  align-content: start;
}

.cfg-group {
  display: grid;
  gap: 12px;
}
.cfg-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.cfg-val {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cfg-val small {
  font-size: 11px;
  color: var(--ink-faint);
}

/* range */
.cfg-group input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--gold) 0,
    var(--gold) var(--fill, 0%),
    var(--line) var(--fill, 0%),
    var(--line) 100%
  );
  cursor: pointer;
}
.cfg-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 2px 6px rgba(23, 20, 14, 0.2);
}
.cfg-group input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}
.cfg-group input[type="range"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
}

/* chips + segmented */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 8px 14px;
  font: inherit;
  font-size: 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.chip:hover {
  border-color: var(--ink-faint);
}
.chip.on {
  border-color: var(--ink);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

.seg {
  display: flex;
  border: 1px solid var(--line);
}
.seg button {
  flex: 1;
  padding: 11px 12px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.seg button:last-child {
  border-right: 0;
}
.seg button:hover {
  color: var(--ink-soft);
}
.seg button.on {
  background: var(--ink);
  color: var(--paper);
}

/* swatches */
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.swatch {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.swatch:hover {
  transform: scale(1.08);
}
.swatch.on {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink);
}
.swatch-x::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    45deg,
    transparent 46%, rgba(255, 255, 255, 0.9) 46%,
    rgba(255, 255, 255, 0.9) 54%, transparent 54%
  );
}

/* toggles */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.t-copy {
  display: grid;
  gap: 3px;
}
.t-title {
  font-size: 14px;
  color: var(--ink);
}
.t-sub {
  font-size: 12px;
  color: var(--ink-faint);
}
.t-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.switch {
  width: 44px;
  height: 24px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  position: relative;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: transform 0.22s var(--ease), background 0.22s var(--ease);
}
.switch.on {
  background: var(--ink);
  border-color: var(--ink);
}
.switch.on::after {
  transform: translateX(20px);
  background: var(--gold-pale);
}

/* price card */
.price-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
}
.price-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.price-lbl {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.price-amount {
  font-family: var(--display);
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.price-note {
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-faint);
}
.btn-block {
  width: 100%;
}
.btn.added {
  background: var(--gold);
  color: var(--ink);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------------- header + cart button ---------------- */
/* Fixed, not sticky: the reel below is dark and full-bleed, and a sticky
   bar would take a strip of flow above it. gallery.css tucks it out of
   sight while the reel is on screen. */
.site-head {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(20px, 5vw, 76px);
  background: rgba(247, 243, 234, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head-mark {
  font-family: var(--display);
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}

/* The header's backdrop-filter makes it its own backdrop root, which Chrome
   can composite over the modal scrim despite the lower z-index. Drop both
   while a drawer or the checkout is open. */
body.no-scroll .site-head {
  z-index: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
}
.site-nav a {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--ink);
}
.cart-btn {
  position: relative;
  padding: 9px 16px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}
.cart-btn:hover {
  border-color: var(--ink);
}
.cart-btn.pulse {
  animation: cartPulse 0.5s var(--ease);
}
@keyframes cartPulse {
  50% {
    transform: scale(1.07);
    border-color: var(--gold);
  }
}
.cart-count {
  display: inline-block;
  min-width: 18px;
  margin-left: 8px;
  padding: 1px 5px;
  font-size: 11px;
  line-height: 16px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
}

/* ---------------- basket drawer ---------------- */
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 13, 8, 0.45);
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 61;
  width: min(420px, 100vw);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px rgba(16, 13, 8, 0.24);
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
}
.cart-drawer.open {
  transform: none;
}
.cart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
}
.cart-head h2 {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 500;
}
.cart-x {
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: none;
  border: 0;
  cursor: pointer;
}
.cart-x:hover {
  color: var(--ink);
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 26px;
}
.cart-empty {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding: 60px 10px;
  color: var(--ink-faint);
  font-size: 14px;
}
.cart-line {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.cart-thumb {
  flex: none;
  width: 76px;
  height: 92px;
  display: grid;
  place-items: center;
  background: var(--paper-warm);
  border: 1px solid var(--line);
}
.cart-meta {
  flex: 1;
  min-width: 0;
}
.ci-title {
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.2;
}
.ci-spec {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-faint);
  margin-top: 3px;
}
.ci-price {
  font-family: var(--display);
  font-size: 19px;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.ci-remove {
  margin-top: 8px;
  padding: 0;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.ci-remove:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.cart-foot {
  padding: 20px 26px 26px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.cart-tot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.cart-tot.grand {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.cart-tot.grand .amt {
  font-family: var(--display);
  font-size: 28px;
}
.cart-foot .btn {
  margin-top: 10px;
}
.co-fine {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-faint);
  margin-top: 10px;
}
.co-fine.warn {
  color: #8a6a2a;
}

/* ---------------- checkout ---------------- */
.co-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
  background: rgba(16, 13, 8, 0.6);
  overflow-y: auto;
}
.co-card {
  position: relative;
  width: min(900px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px rgba(16, 13, 8, 0.4);
}
.co-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  padding: 6px 8px;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: none;
  border: 0;
  cursor: pointer;
}
.co-close:hover {
  color: var(--ink);
}
.co-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.co-left {
  padding: 40px 34px;
  background: var(--paper-warm);
  border-right: 1px solid var(--line);
}
.co-right {
  padding: 40px 36px;
}
.co-lines {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}
.co-line {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.co-thumb {
  flex: none;
  width: 68px;
  height: 84px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
}
.co-line-title {
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.2;
}
.co-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.co-sum-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.co-sum-line .k {
  font-size: 12px;
  color: var(--ink-faint);
}
.co-sum-line .v {
  font-size: 13px;
  color: var(--ink-soft);
}
.co-sum-line .v.gold {
  color: var(--gold);
}
.co-sum-total {
  margin-top: 12px;
}
.co-sum-total .k {
  color: var(--ink);
  font-size: 12.5px;
}
.co-total-amt {
  font-family: var(--display);
  font-size: 27px;
  color: var(--ink);
}
.co-deposit {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(179, 144, 63, 0.09);
  border: 1px solid var(--gold-pale);
}
.co-h {
  font-family: var(--display);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.15;
  margin: 10px 0 18px;
}
.co-sub {
  font-size: 13px;
  color: var(--ink-faint);
  margin: -8px 0 18px;
}
.co-fields {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}
.co-field {
  display: block;
}
.co-field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.co-input {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 0;
}
.co-input:focus {
  outline: none;
  border-color: var(--ink);
}
textarea.co-input {
  resize: vertical;
}

.co-pay-toggle {
  display: grid;
  gap: 8px;
  margin: 16px 0 20px;
}
.co-pay-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.co-pay-opt.on {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}
.co-pay-opt .radio {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 3px;
  border: 1px solid var(--ink-faint);
  border-radius: 50%;
  position: relative;
}
.co-pay-opt.on .radio {
  border-color: var(--ink);
}
.co-pay-opt.on .radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--ink);
}
.po-copy {
  flex: 1;
  display: grid;
  gap: 3px;
}
.po-title {
  font-size: 14px;
}
.po-sub {
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.5;
}
.po-amt {
  flex: none;
  font-family: var(--display);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.co-payfast {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  margin-bottom: 18px;
  background: rgba(179, 144, 63, 0.07);
  border: 1px solid var(--gold-pale);
}
.co-payfast-mark {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.co-payfast-note {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.co-right .btn + .btn {
  margin-top: 10px;
}
.co-error {
  margin-top: 12px;
  font-size: 12.5px;
  color: #9a3412;
}

.co-done {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
  padding: 70px 40px;
}
.co-check {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--paper);
  font-size: 27px;
}
.co-done h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 34px;
}
.co-done p {
  max-width: 44ch;
  color: var(--ink-soft);
}

/* ---------------- small screens ---------------- */
@media (max-width: 900px) {
  .cfg {
    grid-template-columns: 1fr;
  }
  .cfg-stage {
    position: static;
    min-height: 46vh;
    padding: 24px;
  }
  .co-grid {
    grid-template-columns: 1fr;
  }
  .co-left {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 30px 24px;
  }
  .co-right {
    padding: 30px 24px;
  }
  /* The old header only appeared after the walk, so hiding every link on
     a phone cost nothing. It is now the only navigation on the page, so
     keep the two destinations that matter and drop the rest. */
  .site-nav a[href="#photographs"],
  .site-nav a[href="#contact"] {
    display: none;
  }
  .site-nav a {
    font-size: 11px;
    letter-spacing: 0.06em;
  }
}

/* ============================================================
   bench additions (2026-09-07)
   ============================================================ */

/* --- typed millimetres beside every slider ---
   Someone buying a mirror for a specific wall knows the number; make it
   typeable instead of making them hunt for it with a drag. */
.cfg-dim-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}
.cfg-num {
  width: 5.5em;
  padding: 6px 8px;
  font-family: var(--ui);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  -moz-appearance: textfield;
}
.cfg-num::-webkit-outer-spin-button,
.cfg-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cfg-num:focus {
  outline: none;
  border-color: var(--gold);
}
.cfg-unit {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* --- what this started life as --- */
.cfg-origin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding: 10px 12px;
  background: var(--paper-warm);
  border-left: 2px solid var(--gold-pale);
}
.cfg-origin.changed {
  border-left-color: var(--gold);
}
.cfg-origin-text {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cfg-reset {
  font-family: var(--ui);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 2px 0;
  cursor: pointer;
}
.cfg-reset:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* --- the spec line under the price --- */
.price-summary {
  margin: 6px 0 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* Four shapes no longer fit on one row on a narrow phone. */
@media (max-width: 460px) {
  .seg {
    flex-wrap: wrap;
  }
}
