/* The finishes drawer with the bench flying into favourites: the product page of Verdant Atelier, a made-up maker of
   street furniture in wood and steel. The page is a window on a warm neutral ground; inside it the bar, the product
   (a render of the bench drawn with gradients: wood with grain and slat gaps, brushed steel legs, sand floor and a
   soft shadow), the scrim and the drawer of finishes, the bench that flies, the notice with its timer. The colours of
   the bench are custom properties registered with @property, so a new finish slides from one colour to the next. */
:root {
  --ground: #e9e6de;        /* the page around the window */
  --paper: #fbfaf7;         /* the window */
  --ink: #241f21;           /* the words, the dark buttons */
  --muted: #7d7674;         /* the small words */
  --line: rgba(36, 31, 33, 0.09); /* the thin rules */
  --accent: #e9e778;        /* the favourites button, the timer */
  --sand: #e8e1d3;          /* the floor of the render */
  --slot: #ebe7df;          /* the empty slots of the small grid */
  --ease-spring: cubic-bezier(0.34, 1.5, 0.64, 1);
}

@property --wa { syntax: '<color>'; inherits: true; initial-value: #c99a62; }
@property --wb { syntax: '<color>'; inherits: true; initial-value: #a7773f; }
@property --wc { syntax: '<color>'; inherits: true; initial-value: #e3bf8c; }
@property --sa { syntax: '<color>'; inherits: true; initial-value: #c6cbcf; }
@property --sb { syntax: '<color>'; inherits: true; initial-value: #7f878d; }
@property --len { syntax: '<percentage>'; inherits: true; initial-value: 58%; }

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Hanken Grotesk Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

/* the ground: a soft light from the top left and a fine grain, never flat */
.stage {
  position: relative;
  min-height: 100svh;
  height: 100vh;
  max-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 3vh, 32px) clamp(8px, 3vw, 40px);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 60%),
    radial-gradient(80% 70% at 100% 100%, rgba(233, 231, 120, 0.16), rgba(233, 231, 120, 0) 70%),
    var(--ground);
}

.stage::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .47 0 0 0 0 .44 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- the window */
.shop {
  position: relative;
  width: min(1000px, 100%);
  height: min(620px, 100%);
  border-radius: clamp(14px, 2.4vh, 22px);
  background: var(--paper);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(36, 31, 33, 0.06),
    0 1px 2px rgba(36, 31, 33, 0.05),
    0 12px 28px -12px rgba(36, 31, 33, 0.18),
    0 40px 80px -40px rgba(36, 31, 33, 0.35);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------------------- the bar */
.bar {
  position: relative;
  z-index: 6;
  flex: none;
  height: clamp(42px, 9vh, 60px);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(12px, 2.6vw, 24px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(13px, 2.4vh, 15px);
  font-weight: 640;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__mark {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bar__nav {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.bar__link {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  transition: background-color 0.3s, color 0.3s;
}

.bar__link.is-on {
  color: var(--ink);
  background: rgba(36, 31, 33, 0.05);
}

@media (hover: hover) {
  .bar__link:hover {
    color: var(--ink);
    background: rgba(36, 31, 33, 0.04);
  }
}

.bar__end {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.fav-wrap {
  position: relative;
  display: flex;
}

/* born from nothing: width 0 and scale 0 at rest, like the site */
.fav {
  position: relative;
  width: 0;
  height: 32px;
  overflow: visible;
  transform: scale(0);
  transform-origin: 70% 50%;
}

.fav__inner {
  position: absolute;
  left: 0;
  top: 0;
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 0 10px;
  margin-right: 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: linear-gradient(180deg, #f1ef8f, var(--accent) 60%, #dcd965);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(36, 31, 33, 0.12),
    0 1px 2px rgba(36, 31, 33, 0.12),
    0 6px 14px -6px rgba(120, 118, 20, 0.5);
}

.fav__icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
}

.fav__icon svg {
  width: 16px;
  height: 16px;
  overflow: visible;
}

.fav__heart {
  fill: rgba(36, 31, 33, 0);
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.fav__burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  opacity: 0;
  pointer-events: none;
}

.fav__count {
  display: inline-block;
  height: 16px;
  min-width: 1ch;
  overflow: hidden;
  font-size: 13px;
  line-height: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.fav__count span {
  display: block;
}

.bag {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 560;
  box-shadow: inset 0 0 0 1px var(--line);
}

.bag__n {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* the small grid of what you saved, under the favourites button */
.peek {
  position: absolute;
  right: 8px;
  top: calc(100% + 10px);
  width: clamp(160px, 22vw, 200px);
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 0 0 1px rgba(36, 31, 33, 0.07),
    0 18px 40px -18px rgba(36, 31, 33, 0.4);
  visibility: hidden;
  opacity: 0;
  transform-origin: 85% 0%;
}

.peek__head {
  margin: 0 2px 8px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 620;
}

.peek__n {
  color: var(--muted);
  font-weight: 500;
}

.peek__grid {
  display: grid;
  grid-template: repeat(2, 1fr) / repeat(2, 1fr);
  gap: 3px;
  height: clamp(74px, 16vh, 110px);
  padding: 3px;
  border-radius: 8px;
  background: #f3f0ea;
  overflow: hidden;
}

.peek__grid.count-1 .tile:first-child { grid-area: 1 / 1 / -1 / -1; }
.peek__grid.count-2 { grid-template-rows: 1fr; }
.peek__grid.count-3 .tile:nth-child(1) { grid-area: 1 / 1; }
.peek__grid.count-3 .tile:nth-child(2) { grid-area: 2 / 1; }
.peek__grid.count-3 .tile:nth-child(3) { grid-area: 1 / 2 / span 2; }

.tile {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  background: var(--slot);
}

.peek__all {
  display: block;
  margin: 8px 2px 0;
  font-size: 11px;
  font-weight: 560;
  color: var(--muted);
}

/* ---------------------------------------------------------------- the product */
.product {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(16px, 3.4vw, 40px);
  padding: clamp(12px, 3.6vh, 32px) clamp(12px, 3vw, 32px);
  transform-origin: 50% 40%;
}

.media {
  position: relative;
  margin: 0;
  min-height: 0;
  border-radius: clamp(10px, 1.8vh, 14px);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(36, 31, 33, 0.05);
}

.media__tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 560;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 4px 10px -6px rgba(36, 31, 33, 0.3);
}

/* the light that passes over the render when the finish changes */
.render__sweep {
  position: absolute;
  inset: -10% auto -10% 0;
  width: 45%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0));
  transform: translateX(-120%) skewX(-12deg);
  mix-blend-mode: soft-light;
}

/* the render: a studio sweep of sand with a bench on it. Every part is placed in % of the box, so the same render
   works as the big picture, the flying copy, the thumbnail of the notice and the slots of the small grid */
.render {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: size;
}

.bench {
  position: absolute;
  inset: 0;
  transition: --wa 0.7s ease, --wb 0.7s ease, --wc 0.7s ease, --sa 0.7s ease, --sb 0.7s ease, --len 0.8s var(--ease-spring);
  background:
    radial-gradient(70% 55% at 50% 30%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #efe9de 0%, #ebe4d6 52%, #e3dac8 62%, #d9ceb8 100%);
}

/* the sand's grain */
.bench::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .5 0 0 0 0 .42 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bench__shadow {
  position: absolute;
  left: 50%;
  top: 70%;
  width: calc(var(--len) + 12%);
  height: 12%;
  transform: translateX(-48%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(70, 52, 34, 0.42), rgba(70, 52, 34, 0.16) 60%, rgba(70, 52, 34, 0));
  filter: blur(2px);
}

.bench__body {
  position: absolute;
  left: 50%;
  top: 47%;
  width: var(--len);
  height: 27%;
  transform: translateX(-50%);
}

.bench__body > span {
  position: absolute;
  display: block;
}

/* brushed steel: a vertical highlight and fine lines along the leg */
.leg {
  width: 3.6%;
  border-radius: 1px 1px 2px 2px;
  background:
    linear-gradient(90deg, var(--sb) 0%, var(--sa) 32%, rgba(255, 255, 255, 0.85) 44%, var(--sa) 56%, var(--sb) 100%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.leg--back {
  top: 22%;
  height: 58%;
  filter: brightness(0.62) saturate(0.9);
}

.leg--bl { left: 15%; }
.leg--br { right: 6%; }

.leg--front {
  top: 30%;
  height: 70%;
}

.leg--fl { left: 8%; }
.leg--fr { right: 13%; }

/* the foot plate of each front leg */
.leg--front::after {
  content: '';
  position: absolute;
  left: -40%;
  right: -40%;
  bottom: -2px;
  height: 3px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--sb), var(--sa) 50%, var(--sb));
}

/* the rail under the seat, between the legs */
.rail {
  left: 10%;
  right: 9%;
  top: 30%;
  height: 4%;
  background: linear-gradient(180deg, var(--sa), var(--sb));
  filter: brightness(0.7);
}

/* the seat seen from a little above: four slats along the length with dark gaps, the grain running with them */
.seat-top {
  left: 0;
  right: 0;
  top: 0;
  height: 20%;
  clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 40%),
    repeating-linear-gradient(180deg, transparent 0 22%, rgba(20, 12, 6, 0.55) 22% 25.5%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='60' preserveAspectRatio='none'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .55' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .12 0 0 0 0 .05 0 0 0 .7 -.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E") 0 0 / 100% 100%,
    linear-gradient(178deg, var(--wc) 0%, var(--wa) 45%, var(--wb) 100%);
}

/* the front face of the front slat, in its own shade */
.seat-front {
  left: 0;
  right: 5%;
  top: 20%;
  height: 10%;
  border-radius: 0 0 1px 1px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='20' preserveAspectRatio='none'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .7' numOctaves='2' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 .15 0 0 0 0 .08 0 0 0 0 .03 0 0 0 .6 -.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E") 0 0 / 100% 100%,
    linear-gradient(180deg, var(--wa), var(--wb));
  filter: brightness(0.78);
  box-shadow: 0 2px 3px -1px rgba(40, 24, 10, 0.35);
}

/* the side of the seat at the right end */
.seat-end {
  right: 0;
  top: 0;
  width: 5%;
  height: 30%;
  clip-path: polygon(100% 0, 100% 72%, 0 100%, 0 28%);
  background: linear-gradient(180deg, var(--wb), var(--wb));
  filter: brightness(0.6);
}

/* a soft reflection running along the top of the slats */
.seat-sheen {
  left: 8%;
  right: 6%;
  top: 2%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  mix-blend-mode: soft-light;
}

/* ---------------------------------------------------------------- the words of the product */
.info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.info__kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.info__name {
  margin: clamp(4px, 1.2vh, 10px) 0 0;
  font-size: clamp(24px, min(5vw, 7vh), 44px);
  line-height: 1.02;
  font-weight: 660;
  letter-spacing: -0.035em;
}

.info__line {
  margin: clamp(8px, 1.8vh, 14px) 0 0;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.info__finish {
  margin: clamp(8px, 2.4vh, 20px) 0 0;
  font-size: 13px;
  font-weight: 540;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.info__finish span {
  display: inline-block;
}

.info__price,
.drawer__price {
  margin: clamp(4px, 1vh, 8px) 0 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: clamp(18px, 3.4vh, 24px);
  font-weight: 640;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.info__vat {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

.info__actions {
  margin-top: clamp(10px, 3vh, 24px);
  display: flex;
  gap: 8px;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  position: relative;
  height: clamp(36px, 7vh, 44px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 clamp(12px, 2vw, 18px);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: box-shadow 0.35s, background-color 0.35s, filter 0.35s;
}

.btn__icon {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--ghost {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(36, 31, 33, 0.12), 0 1px 2px rgba(36, 31, 33, 0.06);
}

.btn--ghost .btn__icon circle {
  fill: #fff;
}

.btn--solid {
  color: #f7f5ef;
  background: linear-gradient(180deg, #3a3436, var(--ink) 55%, #1a1617);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(20, 16, 17, 0.9),
    0 8px 18px -8px rgba(36, 31, 33, 0.6);
}

.btn--solid .btn__icon {
  stroke: var(--accent);
}

.btn--wide {
  width: 100%;
}

.btn.is-hot.btn--ghost {
  box-shadow: inset 0 0 0 1px rgba(36, 31, 33, 0.28), 0 4px 12px -6px rgba(36, 31, 33, 0.25);
}

.btn.is-hot.btn--solid {
  filter: brightness(1.18);
}

@media (hover: hover) {
  .btn--ghost:hover {
    box-shadow: inset 0 0 0 1px rgba(36, 31, 33, 0.28), 0 4px 12px -6px rgba(36, 31, 33, 0.25);
  }

  .btn--solid:hover {
    filter: brightness(1.18);
  }

  .bag:hover {
    box-shadow: inset 0 0 0 1px rgba(36, 31, 33, 0.22);
  }
}

/* ---------------------------------------------------------------- scrim and drawer */
.scrim {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: radial-gradient(120% 100% at 30% 50%, rgba(36, 31, 33, 0.16), rgba(36, 31, 33, 0.3));
  visibility: hidden;
  opacity: 0;
}

.drawer {
  position: absolute;
  z-index: 8;
  top: 8px;
  right: 8px;
  bottom: 8px;
  width: min(380px, calc(100% - 40px));
  display: flex;
  flex-direction: column;
  border-radius: clamp(12px, 2vh, 16px);
  background: rgba(252, 251, 248, 0.94);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 1px 0 0 rgba(255, 255, 255, 0.8),
    0 0 0 1px rgba(36, 31, 33, 0.08),
    -24px 0 60px -24px rgba(36, 31, 33, 0.45);
  visibility: hidden;
  opacity: 0.5;
}

.drawer__head {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(12px, 3vh, 22px) clamp(14px, 2.4vw, 22px) clamp(8px, 1.6vh, 12px);
}

.drawer__kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.drawer__title {
  margin: 2px 0 0;
  font-size: clamp(18px, 3.6vh, 24px);
  font-weight: 660;
  letter-spacing: -0.03em;
}

.drawer__close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 0.3s, transform 0.5s var(--ease-spring);
}

.drawer__close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
}

@media (hover: hover) {
  .drawer__close:hover {
    background: rgba(36, 31, 33, 0.05);
    transform: rotate(90deg);
  }
}

.drawer__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0 clamp(14px, 2.4vw, 22px);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2.4vh, 18px);
}

.group {
  padding-top: clamp(8px, 2vh, 14px);
  border-top: 1px solid var(--line);
}

.group__head {
  margin: 0 0 clamp(6px, 1.4vh, 10px);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}

.group__val {
  display: inline-block;
  color: var(--muted);
  font-weight: 500;
}

.swatches {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 3px;
}

.sw {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: clamp(34px, 7.2vh, 42px);
}

.sw__chip {
  position: relative;
  width: clamp(30px, 6.4vh, 38px);
  height: clamp(30px, 6.4vh, 38px);
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    0 2px 5px -2px rgba(36, 31, 33, 0.45);
  transition: transform 0.5s var(--ease-spring);
}

/* a wood chip: the grain across it, a warm gloss on the top left */
.sw--wood .sw__chip {
  background:
    radial-gradient(60% 50% at 32% 26%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' preserveAspectRatio='none'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.02 .4' numOctaves='3' seed='2'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .12 0 0 0 0 .05 0 0 0 .8 -.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E") 0 0 / 100% 100%,
    linear-gradient(160deg, var(--c), var(--a) 50%, var(--b));
}

/* a steel chip: brushed lines, a cool streak of light across it */
.sw--steel .sw__chip {
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.6) 46%, rgba(255, 255, 255, 0) 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, rgba(0, 0, 0, 0.07) 1px 2px),
    linear-gradient(180deg, var(--a), var(--b));
}

.sw__name {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 540;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.3s;
}

.sw.is-on .sw__name {
  color: var(--ink);
}

@media (hover: hover) {
  .sw:hover .sw__chip {
    transform: scale(1.07);
  }
}

/* the ring that springs to the chosen chip */
.swatches__ring {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(38px, 7.6vh, 46px);
  height: clamp(38px, 7.6vh, 46px);
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--ink);
  pointer-events: none;
}

.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border-radius: 999px;
  background: rgba(36, 31, 33, 0.06);
  box-shadow: inset 0 1px 2px rgba(36, 31, 33, 0.08);
}

.seg__thumb {
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(36, 31, 33, 0.06), 0 2px 6px -2px rgba(36, 31, 33, 0.3);
}

.seg__opt {
  position: relative;
  height: clamp(26px, 5.4vh, 32px);
  font-size: 12px;
  font-weight: 560;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.seg__opt.is-on {
  color: var(--ink);
}

.specs {
  margin: 0;
  padding-top: clamp(8px, 2vh, 14px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.specs dt {
  font-size: 10px;
  color: var(--muted);
}

.specs dd {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 600;
}

.drawer__foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: clamp(10px, 2.4vh, 18px) clamp(14px, 2.4vw, 22px);
  border-top: 1px solid var(--line);
}

.drawer__price {
  margin: 0;
  flex-direction: column;
  gap: 0;
  font-size: clamp(16px, 3vh, 20px);
}

.drawer__foot .btn {
  flex: 1;
}

/* ---------------------------------------------------------------- the flying bench */
.flyer {
  position: absolute;
  z-index: 9;
  left: 0;
  top: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 20px 40px -14px rgba(36, 31, 33, 0.5);
  will-change: transform;
}

/* ---------------------------------------------------------------- the notice */
.toast {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: clamp(10px, 2.4vh, 20px);
  width: min(360px, calc(100% - 20px));
  margin-left: max(-180px, calc(-50% + 10px));
  border-radius: 14px;
  overflow: hidden;
  color: #f4f2ec;
  background: linear-gradient(180deg, #2f292b, var(--ink));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(20, 16, 17, 0.9),
    0 18px 40px -16px rgba(36, 31, 33, 0.7);
  visibility: hidden;
  opacity: 0;
}

.toast__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
}

.toast__thumb {
  position: relative;
  flex: none;
  width: 44px;
  height: 36px;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.toast__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toast__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 620;
}

.toast__sub {
  font-size: 11px;
  color: rgba(244, 242, 236, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast__view {
  flex: none;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.toast__timer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
}

/* ---------------------------------------------------------------- narrow and short */
@media (max-width: 700px) {
  .bar__nav {
    display: none;
  }

  .product {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: clamp(8px, 2vh, 16px);
  }

  .info__line {
    display: none;
  }

  .info__actions .btn {
    flex: 1;
  }
}

@media (max-width: 380px) {
  .brand__name {
    font-size: 13px;
  }

  .bag {
    padding: 0 10px;
  }

  .media__tag {
    display: none;
  }

  .toast__row {
    padding: 8px 8px 10px;
  }

  .toast__thumb {
    width: 38px;
    height: 32px;
  }
}

@media (max-height: 520px) {
  .info__line {
    display: none;
  }

  .specs {
    display: none;
  }
}
