/* Datos display headings: the locked Bodoni Moda treatment, site-wide.

   Source: studio/brand-system "Typography" lock and DATOS_TYPOGRAPHY.md (18 Nov 2026).
   - Bodoni Moda 700, Roman; only the final word of a heading in the real Italic file
   - lowercase
   - fixed horizontal proportion 0.76 (one transform, never per heading)
   - tracking -0.1em for h1/h2; line height .92 (loosened from the social lock's .68 by the owner for the web)
   - h3 keeps the face, case, italic and 0.76 width but gets readable leading and
     tracking, because small multi-line headings collide at 0.68 / -0.1em
   Colour is not set here: each surface keeps its own (white on dark, ink on light).

   The fonts are the exact bundled files (see static/datos/fonts/bodoni/). No other
   Bodoni optical-size file is substituted. Opt a heading out with data-dx="off".
   The final-word italic is added by datos-display.js. */

@font-face{
  font-family:'Bodoni Moda';
  font-style:normal;
  font-weight:400 900;
  font-display:swap;
  src:url('../../fonts/bodoni/bodoni-moda-roman.woff2') format('woff2');
}
@font-face{
  font-family:'Bodoni Moda';
  font-style:italic;
  font-weight:400 900;
  font-display:swap;
  src:url('../../fonts/bodoni/bodoni-moda-italic.woff2') format('woff2');
}

:root{
  --dx-w:.76;                       /* horizontal proportion */
}

/* The face, weight, case and proportion. Broad on purpose: it has to beat
   each page's own heading rules (.hero h1, .auth-heading, .t-h1 ...). */
h1:not([data-dx="off"]):not(.metric-num),
h2:not([data-dx="off"]):not(.metric-num),
h3:not([data-dx="off"]):not(.metric-num){
  font-family:'Bodoni Moda','DM Serif Display',serif !important;
  font-weight:700 !important;
  font-style:normal;
  text-transform:lowercase !important;
  font-synthesis:none;
  /* Wider box, squeezed by the transform: the text wraps at the right measure and the
     visible block ends up exactly its container's width. */
  width:var(--dxw, calc(100% / var(--dx-w)));
  max-width:none;
  /* The individual `scale` property, not `transform`: pages animate `transform` with GSAP,
     and this composes with it instead of being overwritten. */
  scale:var(--dx-w) 1;
  transform-origin:var(--dx-origin, 0 50%);
}
h1:not([data-dx="off"]):not(.metric-num),
h2:not([data-dx="off"]):not(.metric-num){
  letter-spacing:-0.1em !important;
  line-height:.92 !important;        /* owner loosened this from the .68 social lock for the website, 2026-11-18 */
  padding-block:.06em;
}
h3:not([data-dx="off"]):not(.metric-num){
  letter-spacing:-0.03em !important;
  line-height:1.15 !important;
}
/* Centred headings: squeeze toward the middle, and centre the wide box with margins
   (not translate: GSAP folds individual transform properties into its own transform).
   --dxw is the box width; a page can cap it, e.g. --dxw:min(100% / var(--dx-w), 820px / var(--dx-w)). */
[data-dx-align="center"]{
  --dx-origin:50% 50%;
  --dxw:calc(100% / var(--dx-w));
  margin-left:calc((100% - var(--dxw)) / 2) !important;
  margin-right:0 !important;
}

/* The final word, true Italic (the real italic file, never a slant). */
.dx-last,
h1 em, h2 em, h3 em{
  font-style:italic !important;
  font-weight:700 !important;
}
.dx-last{ font-family:inherit; }
/* Several of the product pages colour their <em>; the lock keeps it white/ink like the rest. */

/* Reduced-width headings must not widen the page. */
html, body{ overflow-x:clip; }
