/* Titles in sentence case with normal letter spacing (Lauren, Nov 27). Generated from every selector in the design CSS that uses the title font. */
:is(#ai35-heading,
#blog36-heading,
#leaders38-heading,
#offers28-heading,
#orbit29-heading,
#surfaces30-heading,
.about-page h1,
.about-page h2,
.about-page h3,
.ai35-step h3,
.article70-section h2,
.article70-title,
.article70-toc a span,
.awards42-section h2,
.awards61-heading,
.blog36-card h3,
.blog64-card-heading,
.blog64-featured-heading,
.blog64-heading,
.brand-kicker,
.btf-heading,
.btf56-heading,
.cap47-heading,
.cap47-row h3,
.case-heading-canvas h2,
.engagement57-heading,
.engagement57-model-heading,
.flywheel48-heading,
.flywheel48-hub h3,
.flywheel48-node h3,
.flywheel48-step,
.footer41-tagline,
.hero46-heading,
.hero60-heading,
.kp-hl,
.leader-profile-head h2,
.leaders38-benefits h3,
.legal-heading,
.measurement52-heading,
.measurement52-value,
.offers28-copy h3,
.pov65-heading,
.pov65-number,
.quote32-text,
.s42,
.s88,
.services72-heading,
.services72-row,
.session-copy h1,
.statistic-value,
.surfaces30-kicker,
.surfaces30-value,
[data-node-id="602:1300"],
.kp-prose h2, .kp-prose h3, .legal-heading, .blog64-heading, .blog64-featured-heading, .blog64-card-heading, .footer41-tagline):not(.editorial, .is-style-editorial) { text-transform: none !important; letter-spacing: normal !important; }

/* =========================================================================
   Title leading (Lauren, Dec 1). One token pair in theme.json drives every title:
     settings.custom.typography.line-height.title        large display titles (h1-h3, section headings)
     settings.custom.typography.line-height.title-small  smaller titles (cards, post subheadings, h4-h6)
   The design CSS asks for "Druk", which kp.css maps to DM Sans at size-adjust 63%, so a title's
   font-size is ~1.59x its visible letter size. --kp-title-scale converts the token (written against
   the visible letters) into CSS line-height for those titles. Real "DM Sans" titles use scale 1.
   The homepage hero keeps its own tight leading (kp.css, "Homepage hero").
   ========================================================================= */
:root {
	--kp-title-scale: .63;
	--kp-title-lh: calc(var(--wp--custom--typography--line-height--title) * var(--kp-title-scale));
	--kp-title-lh-sm: calc(var(--wp--custom--typography--line-height--title-small) * var(--kp-title-scale));
}

/* Large display titles in the design pages (title font via the "Druk" alias). */
:is(#ai35-heading, #blog36-heading, #leaders38-heading, #offers28-heading, #orbit29-heading, #surfaces30-heading,
  .about-page h1, .about-page h2, .about-page h3, .article70-section h2, .article70-title, .awards42-section h2, .awards61-heading,
  .blog64-featured-heading, .blog64-heading, .btf-heading, .btf56-heading, .cap47-heading, .case-heading-canvas h2,
  .engagement57-heading, .engagement57-model-heading, .flywheel48-heading, .hero46-heading, .hero60-heading,
  .leader-profile-head h2, .legal-heading, .measurement52-heading, .pov65-heading, .quote32-text, .services72-heading,
  .session-copy h1, .kp-prose h1, h2.kp-hl-about):not(.editorial, .is-style-editorial),
:is(.hero60-heading, .about-page h1, .about-page h2) :is(.copy-title-mask, .copy-title-ink, .hero60-mask, .hero60-reveal, .reveal-mask) {
	line-height: var(--kp-title-lh) !important;
}

/* Smaller titles: cards, step and node titles, blog post subheadings. */
:is(.ai35-step h3, .blog36-card h3, .blog64-card-heading, .cap47-row h3, .flywheel48-hub h3, .flywheel48-node h3,
  .leaders38-benefits h3, .offers28-copy h3, .kp-prose h2, .kp-prose h3) {
	line-height: var(--kp-title-lh-sm) !important;
}
/* Mono subheadings (h4-h6) are Sometype Mono, not size-adjusted: the token applies as is. */
.kp-prose :is(h4, h5, h6) { line-height: var(--wp--custom--typography--line-height--title-small) !important; }

/* Interim templates, style guide: real DM Sans, no size adjustment. */
:is(.kp-svc-title, .kp-svc-h2, .kp-sg-title:not(.kp-sg-title--sm)) { line-height: var(--wp--custom--typography--line-height--title) !important; }
:is(.kp-case-title, .kp-svc .kp-prose h2, .kp-svc .kp-prose h3) { line-height: var(--wp--custom--typography--line-height--title-small) !important; }

/* Masks that clip a title line (overflow hidden for the reveal) would cut off ascenders and
   descenders once the line box is shorter than the letters: let them draw past the box. */
:is(.hero60-mask, .reveal-mask, .copy-title-mask, .offers28-reveal-mask, .measurement52-reveal-mask) { overflow: clip; overflow-clip-margin: .3em; }

/* Two-line image-replacement headlines in fixed masks (homepage "Bring us the number",
   How We Work / Work / Blog "What does growth look like for you?"): masks keep room for the
   letters (--hl-box) and the second line starts one title line-height (--hl-pitch) below the first. */
.specific40-story { --hl-fs: 100px; }
.growth59-heading { --hl-fs: 124px; }
:is(.specific40-story, .growth59-heading) {
	--hl-pitch: calc(var(--hl-fs) * var(--kp-title-lh));
	--hl-box: calc(var(--hl-fs) * .82);
}
.home-revision24 .specific40-mask, .home-revision24 .specific40-mask:nth-child(2),
.growth68 .growth59-mask, .growth68 .growth59-mask:nth-child(2) { height: var(--hl-box) !important; }
.home-revision24 .specific40-mask:nth-child(2), .growth68 .growth59-mask:nth-child(2) { top: var(--hl-pitch) !important; }
:is(.specific40-reveal, .growth59-reveal) .kp-hl, :is(.specific40-mask, .growth59-mask):nth-child(2) .kp-hl { line-height: var(--hl-box) !important; }
.home-revision24 #specific40-heading { height: calc(var(--hl-pitch) + var(--hl-box)) !important; }
/* Text below the homepage headline moves up by the height the headline gave back (was 227px). */
.home-revision24 :is(.specific40-description, .specific40-cta) { translate: 0 calc(var(--hl-pitch) + var(--hl-box) - 227px); }
.growth68 .growth59-heading-canvas { height: calc(var(--hl-pitch) + var(--hl-box)) !important; }
.growth68 .growth59-heading { height: calc((var(--hl-pitch) + var(--hl-box)) * var(--growth59-art-scale, var(--growth59-scale))) !important; }

/* Other image-replacement headlines (one flow box per line). */
:is(.newsletter84-heading-canvas, .about-contact h2.kp-hl-about) .kp-hl { line-height: var(--kp-title-lh) !important; }

/* Homepage "See the market sooner." cards: body.css lists span.offers28-reveal-text as body copy,
   which also caught the span inside these h3 titles (body weight 300 + body line-height).
   Inside the title, the span follows the title instead. */
.offers28-copy h3 span.offers28-reveal-text { font-weight: inherit !important; line-height: var(--kp-title-lh-sm) !important; }

/* Service pages (Marin's design, real DM Sans): same title tokens as the rest of the site. */
.ip :is(h1, h2, .h-xl, .h-l, .h-m),
.ip :is(.inf .case-b h3, .paid .two h3, .work .featured h3, .work .row-i h3, .about .yr h3, .alts .atlas h3, .alts .pc h3, .alts .scard h3, .alts .sheet-r h3),
:is(.inf, .paid, .tech, .how, .about, .work, .alts) :is(.hero h1, .bigcta h2) {
	line-height: var(--wp--custom--typography--line-height--title) !important;
}
.ip :is(h3, h4, h5, h6, .h-s, .faq-q):not(:is(.h-xl, .h-l, .h-m, .inf .case-b h3, .paid .two h3, .work .featured h3, .work .row-i h3, .about .yr h3, .about .yr h3.sub, .alts .atlas h3, .alts .pc h3, .alts .scard h3, .alts .sheet-r h3)) {
	line-height: var(--wp--custom--typography--line-height--title-small) !important;
}

/* =========================================================================
   DRUK EXCEPTION (Lauren, Dec 1): Druk is used ONLY in these two homepage places:
     1. Hero headline "Earned attention. / Proven growth." (live text, below)
     2. "You can buy reach. You still have to earn attention." (his original SVG lettering
        in design/assets/attention45, no font needed)
   Everywhere else titles stay DM Sans, sentence case. The real Druk files are loaded under
   their own family name, "Shelf Druk", so the "Druk" alias (= DM Sans) used by the rest of
   the design CSS is unaffected. Files: assets/fonts/druk, licensed web fonts (FONTS-LICENSE.md).
   ========================================================================= */
@font-face { font-family: "Shelf Druk"; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/druk/Druk-Medium-Web.woff2) format('woff2'); }
@font-face { font-family: "Shelf Druk"; font-style: normal; font-weight: 700; font-display: swap; src: url(../assets/fonts/druk/Druk-Bold-Web.woff2) format('woff2'); }

/* Hero: Druk, uppercase, his 6px tracking (canvas units); Lauren's larger size and tight
   leading; highlight box, rules and dots sized from the Druk letters (--g = font size,
   since Druk has no size adjustment). Description rules (kp.css) are unchanged. */
/* Size (Dec 1, to Lauren's reference at 1254px): line 1 spans ~58% of the viewport, cap height
   ~85px at 1254. In his 1440px canvas units (the canvas scales with the viewport) that is ~145px. */
html .kp-route-home .hero16 { --h-fs: clamp(100px, calc(150px * var(--hero-density, 1)), 145px); --g: var(--h-fs); --h-lh: calc(var(--g) * .88); }
/* Description column ~44% of the viewport (626 canvas px = 545px at 1254), about 4 lines. */
html .kp-route-home .hero16 [data-node-id="602:1301"] { width: 626px !important; }
/* Description ~17-18px on screen (reference: 17px at 1254), never below the 18px tablet/desktop floor. */
html .kp-route-home .hero16 p.s56 { font-size: max(calc(19.5px * var(--hero-density, 1)), calc(18px / var(--hero-scale, 1))) !important; }
html .kp-route-home .hero16 :is([data-node-id="602:1300"], .hero16-title-first, .hero16-title-second) {
	font-size: var(--h-fs) !important; line-height: var(--h-lh) !important; letter-spacing: calc(6px * var(--hero-density, 1)) !important;
}
html .kp-route-home .hero16 .hero16-selection { --pad-x: calc(var(--g) * .1); --rule: calc(var(--g) * .033); --dot: calc(var(--g) * .35); --reach: calc(var(--g) * .2);
	top: calc(var(--g) * -.11) !important; height: calc(var(--g) * 1.07) !important; }
@media (max-width: 700px) and (orientation: portrait) {
	html .kp-route-home .hero16 { --h-fs: 200px; }
	html .kp-route-home .hero16 [data-node-id="602:1301"] { width: 1280px !important; }
	html .kp-route-home .hero16 p.s56 { font-size: max(56px, calc(17px / var(--hero-scale, 1))) !important; }
}

/* =========================================================================
   EDITORIAL STYLE (Lauren, Dec 1): the look is separate from the heading level.
   Druk, uppercase, Konstantin's tracking (.05em), editorial line-height token.
   Use it on any heading level: block editor Styles panel "Editorial" (is-style-editorial)
   or class="editorial" in hand-coded HTML. Druk suits short display lines only.
   Everything without the class: DM Sans, sentence case.
   ========================================================================= */
:is(.editorial, .is-style-editorial) {
	font-family: "Shelf Druk", "Arial Narrow", sans-serif !important; font-weight: var(--wp--custom--type--editorial--weight) !important;
	text-transform: uppercase !important; letter-spacing: var(--wp--custom--type--editorial--letter-spacing) !important;
	line-height: var(--wp--custom--type--editorial--line-height) !important;
}
:is(.editorial, .is-style-editorial) :is(span, br) { letter-spacing: inherit; }
/* Live-text lines inside an Editorial heading (e.g. .kp-hl in "Bring us the number") follow its capitals. */
:is(.editorial, .is-style-editorial, #kp-specificity-boost) :is(.kp-hl, .copy-title-ink, .copy-title-mask, .reveal-mask) { text-transform: inherit !important; font-family: inherit !important; letter-spacing: inherit !important; }
html :is(.editorial, .is-style-editorial) :is(.copy-title-mask, .copy-title-ink, .hero60-mask, .hero60-reveal, .reveal-mask) { line-height: inherit !important; }

/* =========================================================================
   TYPE SCALE (theme.json settings.custom.type + font-size presets h1-h4).
   Canvas pages (Konstantin's 1440px canvas, scaled to the viewport) use the --canvas size;
   normal pages use the fluid presets. H3 and H4 are weight 500 (two steps lighter).
   ========================================================================= */
h3:not(.editorial, .is-style-editorial, .is-style-label), .services72-name { font-weight: var(--wp--custom--type--h-3--weight) !important; }
h4:not(.editorial, .is-style-editorial, .is-style-label) { font-weight: var(--wp--custom--type--h-4--weight) !important; }
.kp-prose :is(h4, h5, h6) { font-weight: var(--wp--custom--type--label--weight) !important; } /* mono labels in posts */
/* Homepage headings mapped to the scale (no one-off sizes): */
.offers28-copy h3 { font-size: calc(var(--wp--custom--type--h-3--canvas) * var(--stack-scale, 1)) !important; }
.specific40-story { --hl-fs: var(--wp--custom--type--h-2--canvas) !important; }
/* Modifiers: is-style-lead (large body) */
.is-style-lead { font-size: var(--wp--preset--font-size--lead) !important; line-height: var(--wp--custom--typography--line-height--body); }

/* Services pages: the closing call-to-action H2 uses the H2 size, so it is never bigger than the H1. */
.ip .bigcta h2 { font-size: var(--wp--preset--font-size--h-2) !important; }
