/* ==========================================================================
   Siegel — Typography tokens
   Extracted verbatim from Figma named text styles, file VjTi5A18yB4EYm0h3k1lPL
   Audited 2026-07-29.

   DO NOT round these values. The fractional sizes are a deliberate 1.125
   modular scale (9 x 1.125^n and 20 x 1.125^n). Rounding 12.814453125 to 13
   breaks every line-height pairing downstream.

   rem values assume :root { font-size: 16px }. At default settings the render
   is identical to px; unlike px it survives user font scaling.
   ========================================================================== */

:root{

  /* --- Families -----------------------------------------------------------
     Aktiv Grotesk = headings, buttons, captions, price.  LICENSED — see §
     Lato          = body copy.  OFL / Google Fonts.
     Fallback metrics must be generated per-font (Fontaine or the Fallback
     Font Generator) or you will get CLS on first paint. */
  --font-heading:"Aktiv Grotesk","Aktiv Grotesk Fallback",-apple-system,"Segoe UI",Arial,sans-serif;
  --font-body:"Lato","Lato Fallback",-apple-system,"Segoe UI",Arial,sans-serif;

  /* --- Weights ---------------------------------------------------------- */
  --fw-regular:400;   /* Aktiv Grotesk Regular · Lato Regular */
  --fw-medium:500;    /* Aktiv Grotesk Medium */
  --fw-semibold:600;  /* Aktiv Grotesk SemiBold */
  --fw-bold:700;      /* Aktiv Grotesk Bold · Lato Bold */
  --fw-extrabold:800; /* Lato ExtraBold */

  /* --- Letter spacing ---------------------------------------------------- */
  --ls-tight:-0.025rem;        /* -0.4px  — headings, links */
  --ls-title:-0.0093994141rem; /* -0.150390625px — product titles */
  --ls-wide:0.0375rem;         /*  0.6px  — captions (uppercase) */
  --ls-cta:0.025rem;           /*  0.4px  — "Your Project Starts Now" */
  --ls-micro:-0.004em;         /* -0.4%   — NOTE: percent, not px. See BUG-16 */
}

/* ==========================================================================
   DOCUMENT DEFAULT
   ==========================================================================
   Every text style on the site is applied through a .t-* class, so nothing had
   ever set a family on the document itself. Anything without one of those
   classes — and, worse, every form control declaring font-family:inherit —
   fell through to the browser's default serif. The category price filter was
   the visible case: its Min/Max inputs and the "$" prefix rendered in Times
   New Roman beside Lato labels.

   Family only. Sizes and line-heights stay with the .t-* classes, so this
   corrects the fallback without moving anything that is already styled. */
body {
  font-family: var(--font-body);
}

/* ==========================================================================
   HEADINGS — Aktiv Grotesk Bold unless noted
   ========================================================================== */

.t-display{      font:var(--fw-bold) 4.5rem/4.7rem var(--font-heading);            letter-spacing:var(--ls-tight)} /* 72 / 75.2 */
.t-h1{           font:var(--fw-bold) 4rem/4rem var(--font-heading);                letter-spacing:var(--ls-tight);color:var(--text-heading-primary)} /* 64 / 64 */
.t-h2{           font:var(--fw-bold) 2.375rem/2.625rem var(--font-heading)}                                        /* 38 / 42 */
.t-h3{           font:var(--fw-bold) 1.7797851563rem/2.1357421875rem var(--font-heading)}                          /* 28.4765625 / 34.171875 */
.t-h4{           font:var(--fw-bold) 1.58203125rem/1.8984375rem var(--font-heading)}                               /* 25.3125 / 30.375 */
.t-h5{           font:var(--fw-bold) 1.40625rem/1.6875rem var(--font-heading)}                                     /* 22.5 / 27 */
.t-h6{           font:var(--fw-bold) 1.25rem/1.5rem var(--font-heading)}                                           /* 20 / 24 */
.t-h7{           font:var(--fw-bold) 0.75rem/1rem var(--font-heading)}                                             /* 12 / 16 */
.t-subheading-sm{font:var(--fw-bold) 0.875rem/1.25rem var(--font-heading);         letter-spacing:var(--ls-tight)} /* 14 / 20 */

/* ==========================================================================
   MOBILE HEADINGS
   NOTE: "Mobile/H3" exists TWICE in Figma with different sizes. Split here.
   ========================================================================== */

.t-m-display{font:var(--fw-bold) 3rem/3.15rem var(--font-heading);      letter-spacing:var(--ls-tight)} /* 48 / 50.4 */
.t-m-h1{     font:var(--fw-bold) 3rem/3.15rem var(--font-heading);      letter-spacing:var(--ls-tight)} /* 48 / 50.4 */
.t-m-h2{     font:var(--fw-bold) 2rem/2.125rem var(--font-heading);     letter-spacing:var(--ls-tight)} /* 32 / 34 */
.t-m-h3{     font:var(--fw-bold) 1.375rem/1.5rem var(--font-heading);   letter-spacing:var(--ls-tight)} /* 22 / 24 */
.t-m-h3-sm{  font:var(--fw-bold) 1rem/1.25rem var(--font-heading);      letter-spacing:var(--ls-tight)} /* 16 / 20 — 2nd "Mobile/H3" */

/* ==========================================================================
   BODY — Lato
   ========================================================================== */

.t-body-lg{        font:var(--fw-bold) 1.625rem/1.75rem var(--font-body)}                        /* 26 / 28 */
.t-body{           font:var(--fw-regular) 1rem/1.2625rem var(--font-body)}                       /* 16 / 20.2 */
.t-body-bold{      font:var(--fw-bold) 1rem/1.2625rem var(--font-body)}                          /* 16 / 20.2 */
.t-body-exbold{    font:var(--fw-extrabold) 1rem/1.2625rem var(--font-body)}                     /* 16 / 20.2 */
.t-body-sm{        font:var(--fw-regular) 0.9010162354rem/1.0812194347rem var(--font-body)}      /* 14.416259765625 / 17.299510955810547 */
.t-body-sm-exbold{ font:var(--fw-extrabold) 0.9010162354rem/1.0812194347rem var(--font-body)}
.t-body-xs{        font:var(--fw-regular) 0.8009033203rem/0.9610840082rem var(--font-body)}      /* 12.814453125 / 15.377344131469727 */
.t-body-xs-bold{   font:var(--fw-extrabold) 0.8009033203rem/0.9610840082rem var(--font-body)}
.t-body-xxs{       font:var(--fw-regular) 0.7119140625rem/0.8542968631rem var(--font-body)}      /* 11.390625 / 13.668749809265137 */
.t-body-h5{        font:var(--fw-regular) 0.6328125rem/0.759375rem var(--font-body)}             /* 10.125 / 12.149999618530273 */
.t-body-h5-bold{   font:var(--fw-bold) 0.6328125rem/0.759375rem var(--font-body)}
.t-body-h6{        font:var(--fw-regular) 0.5rem/0.675rem var(--font-body)}                      /* 8 / 10.8 */

/* ==========================================================================
   UTILITY
   ========================================================================== */

.t-caption{   font:var(--fw-bold) 0.75rem/1rem var(--font-heading);   letter-spacing:var(--ls-wide); text-transform:uppercase} /* 12 / 16 */
.t-caption-sm{font:var(--fw-bold) 0.625rem/0.75rem var(--font-heading);letter-spacing:var(--ls-wide); text-transform:uppercase} /* 10 / 12 */
.t-price{     font:var(--fw-medium) 1.5rem/1.5rem var(--font-heading)}                                                          /* 24 / 24 */
.t-link{      font:var(--fw-medium) 1rem/normal var(--font-heading);  letter-spacing:var(--ls-tight)}  /* 16 / AUTO — see BUG-17 */
.t-link-2{    font:var(--fw-regular) 0.875rem/1.25rem var(--font-body);letter-spacing:var(--ls-tight)} /* 14 / 20 */

/* ==========================================================================
   AD-HOC — used on Home but NOT bound to a Figma text style.
   These will drift. Get them promoted to real styles. See BUG-15.
   ========================================================================== */

.t-adhoc-product-title{font:var(--fw-bold) 1rem/1.25rem var(--font-heading);       letter-spacing:var(--ls-title)}  /* "SiegelSeal" x4 */
.t-adhoc-button{       font:var(--fw-semibold) 0.75rem/0.759375rem var(--font-heading);letter-spacing:var(--ls-micro)} /* x5 */
.t-adhoc-card-title{   font:var(--fw-bold) 3rem/normal var(--font-heading)}                                          /* 48 AUTO x2 */
.t-adhoc-card-body{    font:var(--fw-medium) 1.25rem/normal var(--font-heading)}                                     /* 20 AUTO x2 */
.t-adhoc-cta{          font:var(--fw-medium) 1rem/1.5rem var(--font-heading);      letter-spacing:var(--ls-cta)}     /* "Your Project Starts Now" */

/* ==========================================================================
   FONT LOADING — pixel-perfect AND zero CLS
   font-display:optional — no swap, no flash, no layout shift.
   Preload links for above-the-fold weights are emitted by siegel_font_preloads()
   in inc/enqueue.php (priority 2, before any CSS).

   Metrics source: fontTools 4.63 reading the real woff2 binaries.

   Do NOT derive size-adjust from OS/2 xAvgCharWidth. That field changed meaning
   between OS/2 table versions - up to v2 it is a weighted average over lowercase
   latin only, from v3 it is the plain average of every non-zero advance - and
   Arial still reports the legacy figure (904, 0.4414em) while its real average
   advance is 0.5743em. Ratioing that against Aktiv's modern 0.6990em gave
   size-adjust:158.36%, which rendered the fallback 71% WIDER than the real face:
   worse than shipping no override at all, and the reason unpreloaded weights
   came out visibly oversized. Average the SAME glyph set in both fonts instead:

     sample           = a-z A-Z 0-9 and space, mean advance / UPM
     size-adjust      = web.sample / local.sample
     ascent-override  = (hhea.ascender  / UPM) / size-adjust
     descent-override = (|hhea.descender| / UPM) / size-adjust
     line-gap-override= (hhea.lineGap   / UPM) / size-adjust

   The division by size-adjust matters: the overrides are resolved against the
   already-scaled em box, so skipping it leaves ascent and descent off by the
   same factor.

   Arial reference: UPM=2048 ascent=1854 descent=-434 lineGap=67
                    xAvgCharWidth=904 (0.4414em) sampled=1176.1 (0.5743em)
   ========================================================================== */

/* --- Aktiv Grotesk (licensed — client holds the binary) ------------------- */
/* Raw metrics: UPM=1000  ascent=997  descent=−283  lineGap=0  xAvgCharWidth=699..723 */

@font-face{
  font-family:"Aktiv Grotesk";
  src:url("../fonts/aktiv-grotesk-400.woff2") format("woff2");
  font-weight:400; font-style:normal; font-display:optional;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212;
}
@font-face{
  font-family:"Aktiv Grotesk";
  src:url("../fonts/aktiv-grotesk-500.woff2") format("woff2");
  font-weight:500; font-style:normal; font-display:optional;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212;
}
@font-face{
  font-family:"Aktiv Grotesk";
  src:url("../fonts/aktiv-grotesk-600.woff2") format("woff2");
  font-weight:600; font-style:normal; font-display:optional;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212;
}
@font-face{
  font-family:"Aktiv Grotesk";
  src:url("../fonts/aktiv-grotesk-700.woff2") format("woff2");
  font-weight:700; font-style:normal; font-display:optional;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212;
}

/* --- Lato (OFL 1.1 — see assets/fonts/LATO-LICENSE.txt) ------------------- */
/* Raw metrics: UPM=2000  ascent=1974  descent=−426  lineGap=0  xAvgCharWidth=1042..1076 */

@font-face{
  font-family:"Lato";
  src:url("../fonts/lato-400.woff2") format("woff2");
  font-weight:400; font-style:normal; font-display:optional;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212;
}
@font-face{
  font-family:"Lato";
  src:url("../fonts/lato-700.woff2") format("woff2");
  font-weight:700; font-style:normal; font-display:optional;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212;
}
@font-face{
  font-family:"Lato";
  src:url("../fonts/lato-800.woff2") format("woff2");
  font-weight:800; font-style:normal; font-display:optional;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212;
}

/* --- Fallback metric overrides (generated from real binaries) -------------- */
/* These shrink/stretch Arial so it occupies the same line box as the real font
   before it arrives. Combined with font-display:optional this eliminates CLS. */

@font-face{
  font-family:"Aktiv Grotesk Fallback";
  src:local("Arial");
  ascent-override:98.7%;
  descent-override:28.0%;
  line-gap-override:0%;
  size-adjust:100.9641%;
}

@font-face{
  font-family:"Lato Fallback";
  src:local("Arial");
  ascent-override:98.7%;
  descent-override:21.3%;
  line-gap-override:0%;
  size-adjust:100.0244%;
}
