/* ============================================================
   VoltariTek label render (shared by builder + landing pages)
   Round 6: every label is an inline SVG drawn from label-shape.js,
   the production outline (concave left side, convex right side,
   2.2mm corners, white stripe inset 1.4 to 3.6mm). The SVG viewBox
   is (W + 3) x 35mm; --s is the scale (length per mm) set by the
   container, so the same markup is a preview, a review tile or a
   true-size print (--s: 1mm).
   ============================================================ */
/* House Italic = Serpentine Serif EF Bold Italic, the production label font
   (commercial license includes web use). font-display: block here (the builder
   re-measures once it loads); landing pages get "optional" + a preload so the
   hero never shifts. build_pages.py rewrites the URLs for labels/landing.css. */
@font-face {
  font-family: "VT Serpentine";
  src: url("fonts/SerpentineSerifEF-BoldIta.woff2?v=1") format("woff2"),
       url("fonts/SerpentineSerifEF-BoldIta.woff?v=1") format("woff"),
       url("fonts/SerpentineSerifEF-BoldIta.otf?v=1") format("opentype");
  font-weight: 100 900;
  font-style: italic;
  font-display: block;
}

.vl {
  --c: #fd1d25;
  --s: 1px;
  --mm: 143;
  --hmm: 35;               /* round 9: 34 x size + 1 (Small 24.8, Medium 29.9, Large 35) */
  display: inline-block;
  width: calc(var(--mm) * var(--s));
  height: calc(var(--hmm) * var(--s));
  flex: none;
  vertical-align: middle;
  overflow: visible;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.vl .vl-body { fill: var(--c); }
.vl .vl-stripe { fill: #fff; }
.vl .vl-text {
  fill: #fff;
  font-family: "VT Serpentine", "Arial Black", system-ui, sans-serif;
  font-weight: 800;
  font-style: italic;
  font-synthesis: none;
  white-space: pre;
  font-kerning: none;               /* the generator (matplotlib TextPath) does not kern */
  text-rendering: geometricPrecision; /* no hinting: glyph widths match the metrics at any size */
}
.vl.c-red   { --c: #fd1d25; }
.vl.c-black { --c: #111111; }
.vl.c-blue  { --c: #2850E0; }  /* production filament blue (Bambu AMS slot 1) */

/* Font sizes (in mm, as SVG font-size) live in label-shape.js FONT_CSS. */
.vl.f-block .vl-text     { font-family: "Sora", "Arial Black", system-ui, sans-serif; font-weight: 800; font-style: normal; font-synthesis: weight style; }
.vl.f-condensed .vl-text { font-family: "Oswald", "Arial Narrow", system-ui, sans-serif; font-weight: 600; font-style: normal; font-synthesis: weight style; }
.vl.f-legible .vl-text   { font-family: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif; font-weight: 700; font-style: normal; font-synthesis: weight style; }
/* Round 8 genre fonts. Colours come from the genre palette as inline styles (label-shape.js). */
.vl.f-stencil .vl-text   { font-family: "Saira Stencil One", "Arial Black", sans-serif; font-weight: 400; font-style: normal; }
.vl.f-script .vl-text    { font-family: "Lobster", "Brush Script MT", cursive; font-weight: 400; font-style: normal; }
.vl.f-sans .vl-text      { font-family: "Inter", "Helvetica Neue", Arial, sans-serif; font-weight: 700; font-style: normal; }
.vl.f-heavy .vl-text     { font-family: "Oswald", "Arial Narrow", sans-serif; font-weight: 700; font-style: normal; }
.vl.is-over { outline: 3px dashed #fd1d25; outline-offset: 3px; }

/* ---------- 3D stage (label-3d.js) ----------
   The static SVG is shown first (instant, no layout shift); the WebGL canvas
   fades in on top once ready. The stage size never changes. */
.vt3d {
  /* ONE fixed scale for every stage (label-shape.js STAGE: refMm 246.2, fill 0.86, zoom 1.43) */
  --ppm: calc(100cqw * 0.86 * 1.43 / 246.2);
  position: relative; overflow: hidden; container-type: inline-size;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 50% 30%, #34343a 0%, #1d1d21 55%, #121214 100%);
  isolation: isolate;
}
/* The static label (before the 3D is up, or with WebGL off) is drawn at the same fixed
   px-per-mm as the 3D, never fitted to the box. It sits in an absolutely positioned layer,
   so a new word, colour or size never moves anything (no layout shift). A label longer than
   the stage scrolls sideways instead of shrinking (round 13). */
.vt3d-svg { position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: safe center;
  padding: 0 3%; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.vt3d-svg .vl { --s: var(--ppm); flex: none; width: calc(var(--mm) * var(--s)); height: calc(var(--hmm) * var(--s));
  transform: translateY(calc(-6 * var(--s))); filter: drop-shadow(0 10px 14px rgba(0,0,0,.45)); }
.vt3d > canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .45s ease; z-index: 1; touch-action: pan-y; cursor: grab; outline: none; }
.vt3d > canvas:active { cursor: grabbing; }
.vt3d > canvas:focus-visible { box-shadow: inset 0 0 0 3px #fd1d25; }
.vt3d.is-3d > canvas { opacity: 1; }
.vt3d.is-3d > .vt3d-svg { visibility: hidden; }
.vt3d-hint { position: absolute; z-index: 2; left: 0; right: 0; bottom: .45rem; text-align: center; font: 600 .72rem/1 "Inter", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); pointer-events: none; opacity: 0; transition: opacity .45s ease; }
.vt3d.is-3d .vt3d-hint { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .vt3d > canvas, .vt3d-hint { transition: none; } }
