/* ==========================================================================
   Neon Adda — The Workbench (studio)
   A wall to preview on, drawers of hardware, and a paper work order.
   ========================================================================== */

.bench {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(360px, .7fr);
	gap: clamp(1.6rem, 3vw, 3rem);
	width: min(100% - var(--gutter) * 2, 1600px);
	margin-inline: auto;
	padding: 96px 0 clamp(3rem, 6vw, 5rem);
	align-items: start;
}

/* ---------------------------------------------------------------- Stage */
.bench__stage {
	position: sticky;
	top: 84px;
	display: grid;
	gap: .8rem;
}

.bench__note {
	text-align: center;
	letter-spacing: .08em;
}

.stagewall {
	--c: var(--n-pink);
	--dim: .85;
	--line-ink: rgba(255, 255, 255, .34);
	position: relative;
	height: max(540px, calc(100svh - 150px));
	border-radius: var(--r-lg);
	overflow: hidden;
	isolation: isolate;
	border: 1px solid var(--line);
	box-shadow: 0 50px 90px -50px #000;
	transition: background-color .6s;
}

/* Walls */
.stagewall[data-wall="brick"] {
	background-color: #170d0c;
	background-image:
		radial-gradient(120% 90% at 50% 40%, transparent 30%, rgba(4, 3, 8, .7) 100%),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Crect width='120' height='60' fill='%23140b0a'/%3E%3Crect x='1.5' y='1.5' width='57' height='27' rx='2' fill='%23361b17'/%3E%3Crect x='61.5' y='1.5' width='57' height='27' rx='2' fill='%233d1f1a'/%3E%3Crect x='-28.5' y='31.5' width='57' height='27' rx='2' fill='%23321915'/%3E%3Crect x='31.5' y='31.5' width='57' height='27' rx='2' fill='%23391d18'/%3E%3Crect x='91.5' y='31.5' width='57' height='27' rx='2' fill='%23331a16'/%3E%3C/svg%3E");
	background-size: auto, 120px 60px;
}

.stagewall[data-wall="plaster"] {
	--line-ink: rgba(40, 32, 26, .42);
	background:
		radial-gradient(100% 80% at 30% 20%, #f3ece0, #d9cdb9 70%, #c2b49d);
}

.stagewall[data-wall="concrete"] {
	--line-ink: rgba(255, 255, 255, .4);
	background:
		radial-gradient(70% 60% at 60% 30%, rgba(255, 255, 255, .12), transparent 70%),
		linear-gradient(170deg, #77767a, #4b4a4e);
}

.stagewall[data-wall="teal"] {
	--line-ink: rgba(255, 255, 255, .36);
	background:
		radial-gradient(90% 80% at 40% 25%, #2d6a6c, #173a3d 70%, #0e2729);
}

.stagewall[data-wall="photo"] {
	background: #111;
}

.stagewall__photo {
	position: absolute;
	inset: 0;
	z-index: -2;
	background-size: cover;
	background-position: center;
}

/* Night: the room light is off, so the wall falls into shadow. */
.stagewall::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(90% 90% at 50% 40%, rgba(5, 4, 9, .35), rgba(5, 4, 9, .78));
	transition: opacity .9s var(--ease-out);
}

/* Day: afternoon light through a window. */
.stagewall__daylight {
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: 0;
	pointer-events: none;
	background:
		linear-gradient(118deg, rgba(255, 238, 205, .5) 0%, rgba(255, 238, 205, .18) 30%, transparent 30.5%, transparent 36%, rgba(255, 238, 205, .14) 36.5%, transparent 52%),
		linear-gradient(180deg, rgba(255, 250, 240, .25), transparent 60%);
	transition: opacity .9s var(--ease-out);
}

.stagewall.is-day::before {
	opacity: 0;
}

.stagewall.is-day .stagewall__daylight {
	opacity: 1;
}

.stagewall__spill {
	position: absolute;
	inset: 0;
	pointer-events: none;
	mix-blend-mode: screen;
	background: radial-gradient(42% 38% at 50% 40%, color-mix(in srgb, var(--c) 65%, transparent), transparent 72%);
	opacity: calc(var(--dim) * .95);
	transition: opacity .6s;
}

.stagewall.is-day .stagewall__spill {
	opacity: calc(var(--dim) * .22);
}

/* The mounted sign */
.mount {
	position: absolute;
	left: 50%;
	top: 40%;
	margin: 0;
	transform: translate(-50%, -50%);
	z-index: 2;
}

.mount__board {
	position: relative;
	display: grid;
	place-items: center;
	padding: .5em 1.1em;
	border-radius: 999px;
	background: linear-gradient(125deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .015) 40%, rgba(255, 255, 255, .06));
	border: 1px solid rgba(255, 255, 255, .16);
	box-shadow: 0 30px 50px -28px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .2);
	transition: border-radius .5s var(--ease-out), padding .5s var(--ease-out), background-color .5s;
}

.mount__board .plate__screw {
	opacity: 0;
	transition: opacity .3s;
}

/* Contour cut: no rectangular plate; the acrylic is drawn around the letters (.tube--cut). */
.mount__board[data-board="cut"] {
	background: none;
	border-color: transparent;
	box-shadow: none;
}

.mount__board[data-board="rect"],
.mount__board[data-board="black"] {
	border-radius: 12px;
	padding: .9em 1.5em;
}

.mount__board[data-board="rect"] .plate__screw,
.mount__board[data-board="black"] .plate__screw {
	opacity: 1;
}

.mount__board[data-board="black"] {
	background: linear-gradient(125deg, #1d1b22, #09080c);
	border-color: rgba(255, 255, 255, .08);
}

.mount__sign {
	font-size: 80px;
	line-height: 1.15;
}

/* Daylight: you see the coloured tube more than the glow. */
.stagewall.is-day .mount__sign {
	--glow: .28 !important;
	color: color-mix(in srgb, var(--tc) 60%, #fff);
}

.mount__tag {
	right: -26px;
	top: -22px;
	transition: top .6s var(--ease-out), right .6s var(--ease-out), font-size .6s var(--ease-out);
}

/* At true scale a small sign can be tinier than its tag: lift the tag clear. */
.stagewall[data-view="scale"] .mount__tag {
	top: -48px;
	right: -52px;
	font-size: 1.05rem;
}

/* Scale reference */
.sofa {
	position: absolute;
	left: 50%;
	bottom: 13%;
	width: var(--sofa-w, 56%);
	max-width: none;
	transform: translateX(-50%);
	color: var(--line-ink);
	z-index: 1;
}

.sofa__label {
	position: absolute;
	left: 50%;
	bottom: calc(13% - 26px);
	transform: translateX(-50%);
	color: var(--line-ink);
	letter-spacing: .14em;
}

.stagewall__bar {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 3;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.stagewall__left {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

/* Close-up hides the scale reference; "to scale" brings the sofa in. */
.sofa,
.sofa__label {
	transition: opacity .6s var(--ease-out);
}

.stagewall[data-view="close"] .sofa,
.stagewall[data-view="close"] .sofa__label {
	opacity: 0;
}

.stagewall[data-view="scale"] .mount {
	top: 38%;
}

.mount {
	transition: top .6s var(--ease-out);
}

.dayswitch {
	display: inline-flex;
	padding: 4px;
	border-radius: 999px;
	background: rgba(8, 7, 13, .7);
	border: 1px solid var(--line);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.dayswitch__opt {
	padding: .45em .9em;
	border-radius: 999px;
	font-family: var(--f-mono);
	font-size: .74rem;
	letter-spacing: .08em;
	color: var(--text-2);
	transition: background-color .3s, color .3s;
}

.dayswitch__opt[aria-pressed="true"] {
	background: var(--text);
	color: var(--ink-900);
}

.wallpick {
	display: inline-flex;
	gap: 8px;
	padding: 6px;
	border-radius: 999px;
	background: rgba(8, 7, 13, .7);
	border: 1px solid var(--line);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.wallpick__chip,
.wallpick__upload {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 2px solid transparent;
	box-shadow: 0 0 0 1px var(--line-2);
	cursor: pointer;
	transition: border-color .3s, transform .4s var(--ease-snap);
}

.wallpick__chip:hover,
.wallpick__upload:hover {
	transform: scale(1.1);
}

.wallpick__chip[aria-checked="true"] {
	border-color: var(--text);
}

.wallpick__chip--brick { background: linear-gradient(135deg, #3d1f1a, #22110f); }
.wallpick__chip--plaster { background: linear-gradient(135deg, #f3ece0, #c2b49d); }
.wallpick__chip--concrete { background: linear-gradient(135deg, #8a898d, #4b4a4e); }
.wallpick__chip--teal { background: linear-gradient(135deg, #2d6a6c, #0e2729); }

.wallpick__upload {
	display: grid;
	place-items: center;
	background: transparent;
	color: var(--text);
	font-size: 1.1rem;
	line-height: 1;
}

.wallpick__upload:focus-within {
	outline: 2px solid var(--n-cyan);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------- Tools */
.bench__tools {
	display: grid;
	gap: 1.4rem;
}

.bench__head {
	display: grid;
	gap: 1rem;
	padding-top: .4rem;
}

.drawers {
	display: grid;
}

.drawer {
	display: grid;
	grid-template-columns: 2.6rem 1fr;
	gap: .6rem;
	padding: 1.4rem 0;
	border-top: 1px solid var(--line);
}

.drawer__num {
	font-family: var(--f-mono);
	font-size: .78rem;
	color: var(--n-pink);
	padding-top: .35rem;
}

.drawer__body {
	display: grid;
	gap: .9rem;
	min-width: 0;
}

.drawer__body--split {
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 1.2rem;
}

.drawer__title {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	font-family: var(--f-display);
	font-size: 1.55rem;
	font-weight: 400;
	line-height: 1.1;
}

.drawer__value {
	font-family: var(--f-mono);
	font-size: .78rem;
	letter-spacing: .08em;
	color: var(--text-2);
}

.drawer__hint {
	font-size: .88rem;
	color: var(--muted);
}

.ideas {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.idea {
	padding: .15em .7em .25em;
	border-radius: 4px;
	background: var(--paper);
	color: var(--graphite);
	font-size: 1.15rem;
	box-shadow: 0 6px 10px -6px rgba(0, 0, 0, .8);
	transform: rotate(var(--r, -1.5deg));
	transition: transform .4s var(--ease-snap);
}

.idea:nth-child(2) { --r: 1.2deg; }
.idea:nth-child(3) { --r: -.6deg; }
.idea:nth-child(4) { --r: 2deg; }

.idea:hover {
	transform: rotate(0) translateY(-2px);
}

.keys {
	display: flex;
	flex-wrap: wrap;
	gap: .7rem;
	padding-bottom: 6px;
}

.hwrow {
	display: flex;
	align-items: flex-end;
	gap: 2rem;
	flex-wrap: wrap;
}

.hwrow__note {
	max-width: 15ch;
	color: var(--muted);
	font-size: 1.2rem;
	line-height: 1.05;
	padding-bottom: 2rem;
}

/* Steel ruler */
.ruler {
	--pos: 25%;
	position: relative;
	height: 78px;
	padding-top: 18px;
	touch-action: none;
	cursor: ew-resize;
	user-select: none;
}

.ruler__body {
	position: relative;
	height: 52px;
	border-radius: 4px;
	background:
		repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px),
		linear-gradient(180deg, #e3e6ea 0%, #b9bec5 45%, #9aa0a8 100%);
	box-shadow: 0 14px 20px -12px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(0, 0, 0, .25);
	overflow: hidden;
}

.ruler__ticks {
	position: absolute;
	inset: 0 10px;
}

.ruler__tick {
	position: absolute;
	top: 0;
	width: 1px;
	height: 9px;
	background: #2b2830;
}

.ruler__tick--5 { height: 15px; }

.ruler__tick--10 {
	height: 22px;
	width: 1.4px;
}

.ruler__num {
	position: absolute;
	top: 24px;
	transform: translateX(-50%);
	font-family: var(--f-mono);
	font-size: .66rem;
	color: #2b2830;
}

.ruler__size {
	position: absolute;
	bottom: 4px;
	transform: translateX(-50%);
	font-family: var(--f-mono);
	font-size: .62rem;
	font-weight: 500;
	color: #b0006a;
	letter-spacing: .06em;
}

.ruler__cursor {
	position: absolute;
	top: 6px;
	bottom: -4px;
	left: calc(10px + (100% - 20px) * var(--pos-n, .25));
	width: 2px;
	margin-left: -1px;
	background: var(--n-pink);
	box-shadow: 0 0 6px var(--n-pink), 0 0 14px var(--n-pink);
	transition: left .35s var(--ease-snap);
	pointer-events: none;
}

.ruler.is-dragging .ruler__cursor {
	transition: none;
}

.ruler__cursor span {
	position: absolute;
	left: 50%;
	top: -6px;
	width: 16px;
	height: 16px;
	margin-left: -8px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 0 3px var(--n-pink), 0 4px 10px rgba(0, 0, 0, .6);
}

/* Option chips */
.chips {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: .6rem;
}

.chip {
	display: grid;
	gap: .2rem;
	padding: .8rem .9rem;
	border-radius: var(--r-sm);
	border: 1px solid var(--line-2);
	text-align: left;
	font-size: .92rem;
	font-weight: 500;
	transition: border-color .3s, box-shadow .3s, background-color .3s;
}

.chip small {
	font-family: var(--f-mono);
	font-size: .66rem;
	letter-spacing: .06em;
	color: var(--muted);
	font-weight: 400;
}

.chip:hover {
	border-color: var(--text-2);
}

.chip[aria-checked="true"] {
	border-color: color-mix(in srgb, var(--n-pink) 60%, #fff);
	background: rgba(255, 46, 154, .07);
	box-shadow: 0 0 0 1px var(--n-pink), 0 0 18px -6px var(--n-pink);
}

/* ---------------------------------------------------------------- Work order */
.docket {
	position: relative;
	margin-top: 1rem;
	padding: 1.8rem 1.6rem 1.5rem;
	background:
		linear-gradient(rgba(0, 0, 0, .025) 1px, transparent 1px) 0 0 / 100% 2rem,
		var(--paper);
	color: var(--graphite);
	box-shadow: 0 40px 60px -30px rgba(0, 0, 0, .9);
	transform: rotate(-.5deg);
}

/* Punched tear-off edge */
.docket::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -6px;
	height: 12px;
	background: radial-gradient(circle at 8px 6px, var(--ink-900) 4.5px, transparent 5px) 0 0 / 16px 12px repeat-x;
}

.docket__stamp {
	position: absolute;
	right: 1.2rem;
	top: 1rem;
	padding: .3em .6em;
	border: 2.5px solid #c2185b;
	border-radius: 6px;
	color: #c2185b;
	font-family: var(--f-mono);
	font-size: .68rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-align: center;
	transform: rotate(-11deg);
	opacity: .78;
	mix-blend-mode: multiply;
}

.docket__head {
	display: grid;
	gap: .2rem;
	margin-bottom: 1rem;
}

.docket__title {
	font-family: var(--f-mono);
	font-size: .84rem;
	font-weight: 500;
	letter-spacing: .24em;
	text-transform: uppercase;
}

.docket__no {
	font-family: var(--f-mono);
	font-size: .72rem;
	color: #6c6670;
}

.docket__lines {
	display: grid;
}

.docket__lines > div {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: baseline;
	gap: .5rem;
	min-height: 2rem;
}

.docket__lines dt {
	font-family: var(--f-mono);
	font-size: .68rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #6c6670;
}

.docket__lines > div::after {
	/* dotted leader */
	content: "";
	order: 2;
	border-bottom: 1.5px dotted rgba(43, 40, 48, .35);
	transform: translateY(-4px);
}

.docket__lines dd {
	order: 3;
	font-family: var(--f-hand);
	font-size: 1.35rem;
	line-height: 1.1;
	color: #1f2a6b;
	text-align: right;
}

.docket__lines .is-money dd {
	font-family: var(--f-mono);
	font-size: .86rem;
	color: var(--graphite);
}

.docket__lines .is-sep {
	min-height: .9rem;
	border-top: 1px dashed rgba(43, 40, 48, .3);
	margin-top: .5rem;
}

.docket__lines .is-sep::after {
	content: none;
}

.docket__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-top: .6rem;
	padding-top: .6rem;
	border-top: 3px double var(--graphite);
}

.docket__total span {
	font-family: var(--f-mono);
	font-size: .8rem;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.docket__total strong {
	font-size: 2.6rem;
	line-height: 1;
	font-weight: 700;
	color: #1f2a6b;
}

.docket__fine {
	margin-top: .9rem;
	font-size: .82rem;
	color: #6c6670;
}

.docket__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	margin-top: 1.2rem;
}

.docket .btn--tube {
	background: #17151c;
}

.docket .btn--ghost {
	color: var(--graphite);
	border-color: rgba(43, 40, 48, .3);
}

.docket .btn--ghost:hover {
	border-color: var(--graphite);
}

.docket__status {
	min-height: 1.2em;
	margin-top: .8rem;
	font-size: .86rem;
	color: #2e7d32;
}

.ftr--slim {
	padding-block: 0 1.5rem;
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1080px) {
	.bench {
		grid-template-columns: 1fr;
	}

	.bench__stage {
		position: relative;
		top: 0;
	}

	.stagewall {
		height: max(440px, 62svh);
	}
}

@media (max-width: 640px) {
	.bench {
		padding-top: 84px;
	}

	.chips {
		grid-template-columns: 1fr;
	}

	.stagewall {
		height: 540px;
	}

	.mount,
	.stagewall[data-view="scale"] .mount {
		top: 33%;
	}

	.stagewall__bar {
		left: 10px;
		right: 10px;
		bottom: 10px;
		gap: .45rem;
	}

	.dayswitch__opt {
		padding: .4em .7em;
		font-size: .68rem;
	}

	.wallpick__chip,
	.wallpick__upload {
		width: 26px;
		height: 26px;
	}

	/* Keep the sofa clear of the control pills. */
	.sofa {
		bottom: 30%;
	}

	.sofa__label {
		bottom: calc(30% - 24px);
	}

	.mount__tag {
		right: -6px;
	}

	.hwrow__note {
		padding-bottom: 0;
	}
}
