/* Bench configurator — the bits that are bench-only, plus the standalone
 * page chrome.
 *
 * Everything shared with the shelf (tokens, cards, segmented pills, sliders,
 * value boxes, price, CTA, trust badges, orbit hint, responsive behaviour)
 * lives in ../base.css, which the shells link — and widget.js injects — ahead
 * of this file. The few rules here that must beat it are written
 * `.unfn-cfg.unfn-bench …`, so the cascade never depends on load order.
 *
 * Sections: 1) the widget's own drawing, 2) the standalone page around it
 * (store header, marketing bands) — the storefront supplies its own chrome,
 * so section 2 only ever renders on unfnshedapps.com/configurator/bench/ and
 * the Access-gated internal copy.
 */

/* =========================================================================
   1. The bench's 2D measured drawing
   ========================================================================= */

/* The drawing is inset from the card so its dimension labels have room; the
   3D canvas fills its surface edge to edge. */
.unfn-cfg.unfn-bench #bench-view2d { padding: 10px; display: grid; grid-template-rows: minmax(0, 1fr); }
.unfn-cfg.unfn-bench #bench-drawing { width: 100%; height: 100%; min-height: 0; }
/* Plywood tones, shared with the 3D materials (--wood-*) so the bench looks
   like the same object in either view. Strokes stay hairline at any zoom. */
.unfn-cfg.unfn-bench .drawing-part { fill: var(--wood-part); stroke: var(--wood-line); stroke-width: 0.28; vector-effect: non-scaling-stroke; }
.unfn-cfg.unfn-bench .drawing-top { fill: var(--wood-top); }
.unfn-cfg.unfn-bench .drawing-pocket { fill: var(--pocket-fill); stroke: var(--pocket-line); stroke-width: 0.24; stroke-dasharray: 1 0.65; vector-effect: non-scaling-stroke; }
.unfn-cfg.unfn-bench .drawing-measurements { pointer-events: none; }
.unfn-cfg.unfn-bench .drawing-dim { stroke: rgba(21, 19, 15, 0.5); stroke-width: 0.26; vector-effect: non-scaling-stroke; }


/* =========================================================================
   2. Standalone page chrome (unfnshedapps.com/configurator/bench/)
   ========================================================================= */

body.bench-standalone { --bench-page: #fff; --bench-ink: #15130f; --bench-muted: rgba(21, 19, 15, 0.62); --bench-faint: rgba(21, 19, 15, 0.42); --bench-line: rgba(21, 19, 15, 0.1); --bench-accent: #f25a38; --bench-shadow: 0 1px 2px rgba(21, 19, 15, 0.04), 0 12px 32px rgba(21, 19, 15, 0.07); }

body.bench-standalone, body.bench-standalone *, body.bench-standalone *::before, body.bench-standalone *::after { box-sizing: border-box; }
html:has(body.bench-standalone) { scroll-behavior: smooth; }
body.bench-standalone { color-scheme: light; margin: 0; background: var(--bench-page); color: var(--bench-ink); font-family: "Instrument Sans", system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }

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

.store-header { border-bottom: 1px solid var(--bench-line); background: #fff; }
.store-header__main { width: min(1320px, calc(100% - 48px)); min-height: 88px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.store-logo { display: inline-flex; align-items: center; min-height: 44px; }
.store-logo img { width: 154px; height: auto; display: block; }
.store-actions { display: flex; align-items: center; gap: 8px; }
.store-actions a { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--bench-ink); transition: background-color 150ms ease-out, scale 150ms ease-out; }
.store-actions a:hover { background: rgba(21, 19, 15, 0.05); }
.store-actions a:active { scale: 0.96; }
.store-actions svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.cart-count { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: var(--bench-accent); color: #fff; font-size: 10px; font-weight: 700; }
.quick-nav { width: min(1320px, calc(100% - 48px)); min-height: 52px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: clamp(24px, 3.6vw, 54px); overflow-x: auto; scrollbar-width: none; }
.quick-nav::-webkit-scrollbar { display: none; }
.quick-nav a { flex: none; color: var(--bench-ink); font-size: 13px; text-decoration: none; transition: color 150ms ease-out; }
.quick-nav a:hover { color: var(--bench-accent); }

body.bench-standalone main { width: 100%; }
body.bench-standalone .bench-configurator-embed, body.bench-standalone .page-band { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
body.bench-standalone .bench-configurator-embed { padding: 40px 0 86px; }
body.bench-standalone .bench-configurator-embed > h1 { margin: 0; font-family: "Instrument Serif", Georgia, serif; font-size: clamp(43px, 7vw, 67px); font-weight: 400; letter-spacing: -0.015em; line-height: 1.02; text-align: center; }
body.bench-standalone .bench-configurator-embed > h1 em, .bench-story h2 em, .bottom-cta h2 em { color: var(--bench-accent); font-weight: 400; }
body.bench-standalone .bench-configurator-embed__lede { margin: 6px auto 26px; color: var(--bench-muted); font-size: 17px; text-align: center; }

.page-band { padding: 82px 0; }
.section-kicker { margin: 0 0 12px; color: #9a8f83; font-size: 12px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; }
.page-band h2 { margin: 0 0 26px; font-family: "Instrument Serif", Georgia, serif; font-size: clamp(32px, 4.5vw, 42px); font-weight: 400; letter-spacing: -0.01em; line-height: 1.08; }
.bench-details { border-top: 1px solid var(--bench-line); }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.detail-grid article { min-height: 175px; padding: 24px; border-radius: 20px; background: #fff; box-shadow: var(--bench-shadow), inset 0 0 0 1px var(--bench-line); }
.detail-grid h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 10px; font-family: "Instrument Serif", Georgia, serif; font-size: 23px; font-weight: 400; }
.detail-grid h3::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--bench-accent); }
.detail-grid p, .bench-story p, .studio-band p, .bench-faq p, .bottom-cta p { color: var(--bench-muted); }
.detail-grid p { margin: 0; max-width: 52ch; font-size: 15px; line-height: 1.55; }
.bench-story { max-width: 948px; }
.story-lead { max-width: 58ch; margin: 0 0 34px; font-size: 19px; line-height: 1.65; }
.story-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 34px; align-items: center; }
.story-visual { min-height: 390px; display: grid; place-items: center; border-radius: 20px; overflow: hidden; background: linear-gradient(135deg, #f3eee7, #e2d8ca); box-shadow: inset 0 0 0 1px var(--bench-line); color: #9a8f83; font-size: 12px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; }
.story-copy h3 { margin: 0 0 14px; font-family: "Instrument Serif", Georgia, serif; font-size: 28px; font-weight: 400; line-height: 1.08; }
.story-copy p { margin: 0 0 16px; line-height: 1.65; }
.studio-band { min-height: 470px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: 20px; background: #f5f2ed; box-shadow: var(--bench-shadow), inset 0 0 0 1px var(--bench-line); }
.studio-copy { padding: clamp(36px, 6vw, 72px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.studio-copy h2 { margin-bottom: 14px; }
.studio-copy p { max-width: 40ch; margin: 0 0 26px; line-height: 1.65; }
.studio-copy a, .bottom-cta a { min-height: 44px; padding: 12px 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--bench-ink); color: #fff; font-size: 14px; font-weight: 650; text-decoration: none; transition: background-color 150ms ease-out, scale 150ms ease-out; }
.studio-copy a:hover, .bottom-cta a:hover { background: var(--bench-accent); }
.studio-copy a:active, .bottom-cta a:active { scale: 0.96; }
.studio-image { min-height: 470px; background: linear-gradient(140deg, rgba(21,19,15,0.06), rgba(21,19,15,0.18)), url("https://cdn.shopify.com/s/files/1/0808/8063/2114/files/IMG_3192_2.jpg") center/cover; }
.bench-faq { max-width: 948px; }
.bench-faq details { margin-bottom: 12px; padding: 0 22px; border-radius: 20px; background: #fff; box-shadow: var(--bench-shadow), inset 0 0 0 1px var(--bench-line); }
.bench-faq summary { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; font-weight: 620; }
.bench-faq summary::-webkit-details-marker { display: none; }
.bench-faq summary::after { content: "+"; color: var(--bench-faint); font-size: 24px; font-weight: 400; transition: rotate 180ms ease-out; }
.bench-faq details[open] summary::after { rotate: 45deg; }
.bench-faq details p { margin: -4px 0 0; padding: 0 0 22px; max-width: 70ch; line-height: 1.65; }
.bench-faq a { color: inherit; text-underline-offset: 3px; }
.bench-faq summary:focus-visible { outline: 2px solid var(--bench-accent); outline-offset: 3px; }
.bottom-cta { max-width: 948px; padding-bottom: 110px; text-align: center; }
.bottom-cta h2 { margin-bottom: 12px; }
.bottom-cta p { margin: 0 0 24px; }

@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-visual { min-height: 340px; }
}

@media (max-width: 700px) {
  .store-header__main { width: calc(100% - 32px); min-height: 70px; }
  .store-logo img { width: 130px; }
  .quick-nav { width: 100%; min-height: 46px; padding: 0 16px; justify-content: flex-start; gap: 24px; }
  body.bench-standalone .bench-configurator-embed, body.bench-standalone .page-band { width: min(100% - 32px, 1160px); }
  body.bench-standalone .bench-configurator-embed { padding: 28px 0 62px; }
  body.bench-standalone .bench-configurator-embed__lede { margin-bottom: 16px; font-size: 15px; }
  .unfn-cfg.unfn-bench #bench-view2d { padding: 4px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid article { min-height: 0; padding: 20px; }
  .page-band { padding: 62px 0; }
  .studio-band { width: calc(100% - 32px); grid-template-columns: 1fr; }
  .studio-image { min-height: 300px; grid-row: 1; }
  .studio-copy { padding: 34px 26px 40px; }
}

@media (max-width: 430px) {
  .store-actions { gap: 0; }
  .store-actions a { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.bench-standalone) { scroll-behavior: auto; }
  body.bench-standalone .store-header *, body.bench-standalone .page-band * { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
