/*
 * Final source-layout override.
 *
 * callouts.css renders the exact SVG frame, leader artwork, bullet columns,
 * label Y positions, and colors. This layer supplies the Illustrator-derived
 * vehicle placement and live, editable header typography.
 */

.msd{
  container-type:size;
  aspect-ratio:911.917 / 484;
  width:min(100vw,calc(100vh * (911.917 / 484)));
  height:min(100vh,calc(100vw * (484 / 911.917)));
}

/* Exact placed-image transform extracted from the PDF-compatible .ai file.
   Source bitmap: 1672 x 941 px.
   Illustrator rect: x 147.15323, y 82.84186, x2 718.35352, y2 404.31284. */
.hero{
  left:16.136691%;
  top:17.116086%;
  width:62.637311%;
  height:66.419624%;
  z-index:3;
}
.hero-image{
  width:100%;
  height:100%;
  object-fit:fill;
}

/*
 * HEADER
 *
 * The rail artwork already contains the two real black openings. These outer
 * elements are geometry-only slots. They have no knockout background and do
 * not move with the lettering.
 *
 * Corrected source geometry, transformed into the 911.92 x 484 XCARS canvas:
 *   header band: y 46.58 -> 73.85   (27.27 high)
 *   left opening:  x 95.09 -> 182.85 (87.76 wide)
 *   right opening: x 730.33 -> 797.94 (67.61 wide)
 *
 * The latest browser screenshot confirmed that the slots themselves are in
 * the right places. The remaining discrepancy is font rendering: live Antonio
 * is visibly wider and slightly taller than the outlined Illustrator type.
 * We therefore transform ONLY the inner text to match the source lettering.
 * The rail geometry stays untouched.
 *
 * MANUAL TUNING
 * ----------------
 * These are the only values that should ever need hand adjustment:
 *
 *   --text-x       horizontal nudge
 *   --text-y       vertical nudge
 *   --text-scale-x horizontal width correction
 *   --text-scale-y vertical height correction
 *   --text-size    font-size before transform
 *
 * Set --header-debug-outline to a visible color to see the fixed source slots.
 */
.identity{
  position:absolute;
  inset:0;
  z-index:6;
  pointer-events:none;

  --header-font-size:7.438017cqh;
  --header-font-weight:400;
  --header-color:#f0c119;
  --header-debug-outline:transparent;
}

.plate,.brand{
  position:absolute;
  top:9.623967%;
  height:5.634298%;
  margin:0;
  padding:0;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:visible;
  background:transparent;
  color:var(--header-color);
  outline:1px solid var(--header-debug-outline);
  outline-offset:-1px;

  --text-x:0cqw;
  --text-y:-.55cqh;
  --text-scale-x:1;
  --text-scale-y:.85;
  --text-size:var(--header-font-size);
}

.plate{
  left:10.427450%;
  width:9.623651%;
  right:auto;

  /* ALF-1129: source outline is ~82.6% of the opening width. */
  --text-x:0cqw;
  --text-scale-x:.66;
}

.brand{
  left:80.087069%;
  width:7.414028%;
  right:auto;

  /* XCARS: source outline is ~78.7% of the opening width. */
  --text-x:0cqw;
  --text-scale-x:.72;
}

.identity-text{
  display:inline-block;
  margin:0;
  padding:0;
  font-family:"Antonio","Arial Narrow",sans-serif;
  font-weight:var(--header-font-weight);
  font-size:var(--text-size);
  line-height:1;
  letter-spacing:0;
  white-space:nowrap;
  text-transform:uppercase;
  color:var(--header-color);
  background:transparent;
  font-synthesis:none;
  transform:translate(var(--text-x),var(--text-y)) scale(var(--text-scale-x),var(--text-scale-y));
  transform-origin:center center;
}

/* Trim Antonio's invisible font box to the cap-height/baseline box before
   centering. Older browsers simply fall back to line-height:1 plus the manual
   tuning variables above. */
@supports (text-box:trim-both cap alphabetic){
  .identity-text{
    text-box:trim-both cap alphabetic;
  }
}

/* Match the Illustrator callout typography while retaining the SVG-derived
   bullet/leader geometry from callouts.css. */
.callout{
  font-size:1.033058cqh;
  font-weight:400;
  line-height:1;
  gap:.18cqw;
}
.callouts i{
  box-shadow:none;
}
