:root {
  --blue: #003ce5;        /* the Umetalli logo */
  --blue-dk: #002fb8;
  --ral: #1f6db0;         /* RAL 5015 Sky Blue, the legs */
  --ink: #14181d;
  --muted: #59616b;
  --line: #d6dbe0;
  --paper: #ffffff;
  --studio: #e8eaed;
  --f: "Archivo", system-ui, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --hdr: 64px;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--f); -webkit-font-smoothing: antialiased; }
::selection { background: var(--blue); color: #fff; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
img { max-width: 100%; display: block; }
input, button { font: inherit; color: inherit; }

/* buttons: square, the logo blue */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; font-weight: 500; font-size: 16px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
.btn:active { transform: scale(.97); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
@media (hover: hover) and (pointer: fine) {
  .btn--blue:hover { background: var(--blue-dk); }
  .btn--line:hover { background: var(--ink); color: #fff; }
}

/* header: white bar, the real logo */
.hdr { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 32px; height: var(--hdr); padding: 0 clamp(16px, 3vw, 40px); background: var(--paper); border-bottom: 1px solid var(--line); }
.hdr__logo img { height: 30px; width: auto; }
.hdr__nav { display: flex; gap: 28px; margin-left: auto; font-size: 15px; }
.hdr__nav a { text-decoration: none; color: var(--muted); transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .hdr__nav a:hover { color: var(--ink); } }
@media (max-width: 960px) { .hdr__nav { display: none; } .hdr__cta { margin-left: auto; } }

/* the build: studio on the left, the order sheet on the right */
.build { display: grid; grid-template-columns: minmax(0, 1fr) 440px; height: calc(100svh - var(--hdr)); min-height: 760px; }
.build__stage { position: relative; overflow: hidden; background: #dde0e3; }
.build__view { position: absolute; inset: 0; }
.build__canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.build__canvas:active { cursor: grabbing; }
.build__fallback { position: absolute; inset: 22% 10% auto; width: 80%; mix-blend-mode: multiply; }
.build__copy { position: absolute; z-index: 2; left: 0; top: 0; max-width: 640px; padding: clamp(20px, 3vh, 36px) clamp(20px, 3vw, 48px) 28px; pointer-events: none; background: rgba(255,255,255,.86); }
.build__title { font-weight: 500; font-size: clamp(36px, 3.7vw, 60px); line-height: 1; letter-spacing: -0.03em; font-variation-settings: "wdth" 92; }
.build__title span { display: block; }
.build__lead { margin-top: 16px; max-width: 34em; font-size: 17px; color: var(--muted); }
.build__facts { position: absolute; z-index: 2; left: 0; bottom: 0; padding: 12px clamp(20px, 3vw, 48px); background: rgba(255,255,255,.86); display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

.dims { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.dims line { stroke: var(--ink); stroke-width: 1; }
.dims circle { fill: var(--ink); }
.dims text { font: 600 15px/1 var(--f); fill: var(--ink); text-anchor: middle; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--studio); stroke-width: 4px; }
html:not(.three-ready) .dims { display: none; }

/* order sheet */
.cfg { display: flex; flex-direction: column; gap: 14px; padding: 22px 28px 0; border-left: 1px solid var(--line); overflow-y: auto; background: var(--paper); }
.cfg__g { border: 0; padding: 0; min-width: 0; }
.cfg__g[hidden] { display: none; }
.cfg__g legend, .cfg__label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; padding: 0; }
.cfg__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 36px; padding: 0 11px; border: 1px solid var(--line); background: var(--paper); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; transition: transform 140ms var(--ease-out), background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (hover: hover) and (pointer: fine) { .chip:not([aria-pressed="true"]):hover { border-color: var(--ink); } }
.cfg__note { font-size: 15px; color: var(--ink); min-height: 3em; margin-top: -4px; }
.cfg__table { display: grid; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cfg__row { display: flex; flex-wrap: wrap; gap: 16px 24px; }
.cfg__name { display: block; }
.cfg__name input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); background: var(--paper); font-size: 16px; text-transform: uppercase; letter-spacing: .04em; border-radius: 0; }
.cfg__name input::placeholder { text-transform: none; letter-spacing: 0; color: #7d8590; }
.cfg__name input:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
.cfg__hint { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

.sum { position: sticky; bottom: 0; margin: auto -28px 0; padding: 16px 28px 22px; background: var(--paper); border-top: 1px solid var(--ink); }
.sum__title { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.sum__spec { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.sum__rows { margin-top: 10px; display: grid; gap: 4px; }
.sum__rows > div { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; font-variant-numeric: tabular-nums; }
.sum__rows > div[hidden] { display: none; }
.sum__rows dd { font-weight: 500; }
.sum__rows label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.sum__rows input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue); }
.sum__rows a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.sum__total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); align-items: baseline; }
.sum__total dt { font-size: 15px; font-weight: 500; }
.sum__total dd { font-size: 34px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.sum__total dd span { display: inline-block; }
.sum__total dd span.is-swap { animation: swap 320ms var(--ease-out); }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } }
.sum__vat { font-size: 13px; color: var(--muted); margin-top: 6px; }
.sum__act { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.sum__act .btn { padding: 0 12px; font-size: 15px; }

@media (max-width: 1100px) { .build { grid-template-columns: minmax(0, 1fr) 380px; } .cfg { padding: 20px; } }
@media (max-width: 860px) {
  .build { display: block; height: auto; min-height: 0; }
  .build__stage { display: flex; flex-direction: column; }
  .build__copy { position: relative; left: auto; top: auto; padding: 24px 16px 0; }
  .build__title { font-size: clamp(34px, 9.4vw, 46px); }
  .build__lead { font-size: 16px; }
  .build__view { position: relative; inset: auto; height: 46svh; min-height: 300px; }
  .build__facts { position: relative; left: auto; bottom: auto; padding: 0 16px 16px; font-size: 13px; gap: 4px 18px; }
  .cfg { border-left: 0; border-top: 1px solid var(--line); padding: 20px 16px 0; overflow: visible; }
  .sum { position: static; margin: 8px 0 0; padding: 16px 0 24px; }
  .cfg__chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .cfg__chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .sum__total dd span.is-swap { animation: none; } }

.sum__more { display: flex; gap: 18px; margin-top: 12px; font-size: 14px; }
.sum__more a, .sum__more button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }

/* studio / workshop switch, bottom right of the stage */
.viewsw { position: absolute; z-index: 3; right: 16px; bottom: 14px; display: flex; background: rgba(255,255,255,.9); border: 1px solid var(--line); }
.viewsw button { min-height: 36px; padding: 0 14px; border: 0; background: transparent; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out); }
.viewsw button:active { transform: scale(.97); }
.viewsw button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.build__fade { position: absolute; inset: 0; z-index: 1; background: #dde0e3; opacity: 0; pointer-events: none; transition: opacity 400ms var(--ease-out); }
.build__fade.is-on { opacity: 1; transition-duration: 180ms; }
.dims text { stroke: rgba(255,255,255,.9); }
.build__stage.is-shop .dims line { stroke: #fff; }
.build__stage.is-shop .dims circle { fill: #fff; }
@media (max-width: 860px) { .viewsw { position: relative; right: auto; bottom: auto; align-self: flex-start; margin: 8px 16px 0; } }
.viewsw[hidden] { display: none; }
