/* ==========================================================================
   STEEL3D.CSS: the 3D frame configurator, used by the home page and /m.
   INDUSTRIAL TOKENS: light palette, heavy-industry character. Concrete and
   zinc greys, safety amber for action, structural blue-grey for secondary,
   hairline rules, small radii, condensed technical headings, mono figures.
   ========================================================================== */
:root {
  --ind-page: #F4F4F2;
  --ind-card: #FFFFFF;
  --ind-ink: #1C1F23;
  --ind-muted: #5B6168;
  --ind-rule: #D4D6D9;
  --ind-amber: #F2A900;
  --ind-amber-ink: #8A5F00;
  --ind-steel: #3A4A5A;
  --ind-radius: 3px;
  --font-tech: 'Barlow Condensed', 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --ind-grid: linear-gradient(rgba(58,74,90,.07) 1px, transparent 1px) 0 0 / 24px 24px,
              linear-gradient(90deg, rgba(58,74,90,.07) 1px, transparent 1px) 0 0 / 24px 24px;
  --ind-hazard: repeating-linear-gradient(-45deg, var(--ind-amber) 0 10px, var(--ind-ink) 10px 20px);
}

/* ---------------------------------------------------- 3D frame configurator */
.peb3d-section { background: var(--ind-grid), var(--ind-page); border-top: 1px solid var(--ind-rule); border-bottom: 1px solid var(--ind-rule); }
.peb3d-section .section-subtitle { font-family: var(--font-mono); color: var(--ind-amber-ink); letter-spacing: .14em; }
.peb3d-section .section-title { font-family: var(--font-tech); text-transform: uppercase; letter-spacing: .01em; color: var(--ind-ink); }
.peb3d-lede { color: var(--ind-muted); max-width: 680px; margin: 12px auto 0; line-height: 1.65; }
.peb3d { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0; border: 1px solid var(--ind-ink); border-radius: var(--ind-radius); background: var(--ind-card); box-shadow: 8px 8px 0 rgba(28,31,35,.08); overflow: clip; }
.peb3d-stage { position: relative; min-height: 540px; background: #d9dcdf; border-right: 1px solid var(--ind-ink); }
.peb3d-stage::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--ind-hazard); z-index: 2; }
.peb3d-canvas { position: absolute; inset: 0; }
.peb3d-tag { position: absolute; top: 16px; left: 16px; z-index: 2; background: var(--ind-ink); color: #fff; font: 600 .78rem/1.3 var(--font-mono); padding: 8px 12px; border-left: 4px solid var(--ind-amber); max-width: calc(100% - 32px); }
.peb3d-hint { position: absolute; bottom: 14px; left: 16px; z-index: 2; font: 500 .74rem var(--font-mono); color: var(--ind-muted); background: rgba(255,255,255,.85); padding: 6px 10px; border: 1px solid var(--ind-rule); pointer-events: none; }
.peb3d-panel { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.peb3d-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.peb3d-row[hidden] { display: none; }
.peb3d-row label { font: 700 .74rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ind-muted); display: flex; justify-content: space-between; gap: 8px; }
.peb3d-row output { color: var(--ind-ink); font-weight: 700; }
.peb3d-row select { height: 44px; border: 1px solid var(--ind-rule); border-radius: var(--ind-radius); background: #fff; color: var(--ind-ink); font: 600 .92rem var(--font-body); padding: 0 10px; }
.peb3d-row select:focus-visible, .peb3d-row input:focus-visible, .peb3d-cta:focus-visible { outline: 3px solid var(--ind-amber); outline-offset: 2px; }
.peb3d-row input[type=range] { width: 100%; height: 32px; accent-color: var(--ind-steel); }
.peb3d-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.peb3d-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--ind-rule); border: 1px solid var(--ind-rule); margin: 6px 0 0; }
.peb3d-stats > div { background: var(--ind-page); padding: 10px 12px; }
.peb3d-stats dt { font: 700 .66rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ind-muted); }
.peb3d-stats dd { margin: 2px 0 0; font: 700 1.05rem var(--font-mono); color: var(--ind-ink); font-variant-numeric: tabular-nums; }
.peb3d-stats dd.sub { font-size: .74rem; font-weight: 500; color: var(--ind-muted); }
.peb3d-error:empty { display: none; }
.peb3d-error { color: #b42318; font-size: .85rem; margin: 0; }
.peb3d-cta { height: 52px; border: 0; border-radius: var(--ind-radius); background: var(--ind-amber); color: var(--ind-ink); font: 800 1.05rem var(--font-tech); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.peb3d-cta:hover { background: #ffb800; }
.peb3d-note { font-size: .78rem; color: var(--ind-muted); line-height: 1.5; margin: 0; }
@media (max-width: 1024px) {
  .peb3d { grid-template-columns: 1fr; }
  .peb3d-stage { min-height: 0; height: 62vw; max-height: 520px; border-right: 0; border-bottom: 1px solid var(--ind-ink); }
}
@media (max-width: 640px) {
  .peb3d-stage { height: 92vw; }
  .peb3d-panel { padding: 16px; }
  .peb3d-hint { display: none; }
}

/* − / number / + next to each size slider, for exact sizes */
.peb3d-fine { display: grid; grid-template-columns: 44px 1fr 44px; gap: 6px; margin-top: 2px; }
.peb3d-fine button { height: 40px; border: 1px solid var(--ind-rule); border-radius: var(--ind-radius); background: #fff; color: var(--ind-ink); font: 700 1.2rem var(--font-mono); cursor: pointer; }
.peb3d-fine button:active { background: var(--ind-page); }
.peb3d-fine input { height: 40px; min-width: 0; border: 1px solid var(--ind-rule); border-radius: var(--ind-radius); background: #fff; color: var(--ind-ink); text-align: center; font: 700 1rem var(--font-mono); -moz-appearance: textfield; }
.peb3d-fine input::-webkit-inner-spin-button, .peb3d-fine input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.peb3d-fine button:focus-visible, .peb3d-fine input:focus-visible { outline: 3px solid var(--ind-amber); outline-offset: 1px; }
.peb3d-wa { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: var(--ind-radius); background: #1f9d55; color: #fff; text-decoration: none; font: 800 1rem var(--font-tech); letter-spacing: .06em; text-transform: uppercase; }
.peb3d-wa:focus-visible { outline: 3px solid var(--ind-amber); outline-offset: 2px; }

/* Phones and tablets: the viewer stays pinned under the top bar while the
   controls scroll beneath it, so every change is seen as it is made. */
@media (max-width: 1024px) {
  .peb3d-stage { position: sticky; top: var(--app-top, var(--top-h, 0px)); z-index: 5; height: min(62vw, 40vh); min-height: 220px; max-height: 420px; box-shadow: 0 6px 12px -8px rgba(28,31,35,.45); }
  .peb3d-panel { position: relative; z-index: 1; }
}
@media (max-width: 1024px) and (orientation: landscape) {
  .peb3d-stage { height: 52vh; }
}

/* buttons match styles.css "BUTTON SYSTEM": brass-gold nameplate, no dark fills */
.peb3d-cta { position: relative; overflow: hidden; isolation: isolate; height: 56px; border: 2px solid #A87A12; border-radius: 0;
  background: linear-gradient(180deg, #FFE08A 0%, #F4C430 48%, #D9A21B 100%); color: #5C4108;
  font: 800 .95rem 'Archivo', 'Barlow Condensed', sans-serif; font-stretch: 125%; letter-spacing: .08em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 0 0 2px rgba(255,236,170,.45), 0 4px 14px -6px rgba(168,122,18,.6); transition: transform .15s, filter .15s; }
.peb3d-cta::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.7), transparent); transform: skewX(-20deg); transition: left .5s ease; }
.peb3d-cta:hover { background: linear-gradient(180deg, #FFE08A 0%, #F4C430 48%, #D9A21B 100%); transform: translateY(-1px); filter: brightness(1.04); }
.peb3d-cta:hover::before { left: 120%; }
.peb3d-wa { height: 52px; border-radius: 0; border: 2px solid #128C4A; background: linear-gradient(180deg, #34DB78 0%, #1FB25B 100%);
  font: 800 .9rem 'Archivo', 'Barlow Condensed', sans-serif; font-stretch: 125%; letter-spacing: .08em; }
.peb3d-fine button { border-radius: 0; background: #FFFDF6; color: #5C4108; border: 2px solid #A87A12; }
.peb3d-fine button:hover { background: #FFF4D1; }
.peb3d-tag { background: rgba(255,253,246,.95); color: #2A2F35; border: 1px solid #D4D6D9; border-left: 4px solid #D9A21B; }
@media (prefers-reduced-motion: reduce) { .peb3d-cta::before { display: none; } }
