/*
 * Heading styles (D-078), chosen in LaunchPad → Design variants → Heading style
 * (preview: ?lp_type=alpine). Classic is the default styling in components.css;
 * this file only holds the Alpine overrides, from logo options 3c/3d:
 * - Display headings (H1, H2, footer CTA) in Nunito Black 900.
 * - The *emphasis* phrase in the same font, no fill, outlined in the accent colour
 *   (the accent itself on dark panels; a deeper accent tone on light ones so the thin
 *   outline stays legible).
 * - Labels and eyebrows in Hanken Grotesk 700, uppercase, tracked 0.14em ("Manufacturing").
 * - Wordmark: LAUNCH solid + PAD outlined, sub line and tagline (0.2em, 600).
 * Two exceptions to the D-071 weights (400/600): 900 for display, 700 for labels.
 *
 * (c) Cornerstone Solutions & Services Ltd.
 */

.lp-type--alpine {
	--lp-outline-on-light: var(--lp-emphasis);
	--lp-outline-on-dark: var(--lp-accent-on-dark);
	--lp-outline-width: max(1px, 0.028em);
}

/* ---- Display headings ---- */
.lp-type--alpine h1,
.lp-type--alpine h2,
.lp-type--alpine .lp-cta__title {
	font-family: var(--lp-font-display);
	font-weight: 900;
	letter-spacing: -0.01em;
}

/* ---- Emphasis: outlined, no fill (H1s and the footer CTA only, as Classic's serif, D-071) ---- */
.lp-type--alpine h1 .lp-serif,
.lp-type--alpine .lp-cta__title .lp-serif,
.lp-outline {
	color: transparent;
	font-family: var(--lp-font-display);
	font-style: normal;
	font-weight: 900;
	letter-spacing: inherit;
	-webkit-text-stroke: var(--lp-outline-width, max(1px, 0.028em)) var(--lp-outline-on-light, var(--lp-accent));
	paint-order: stroke fill;
}

/* Dark panels: the accent as is. */
.lp-type--alpine .lp-cta__title .lp-serif,
.lp-type--alpine .lp-hero2--dark h1 .lp-serif,
.lp-type--alpine [class*="--dark"] h1 .lp-serif,
.lp-type--alpine .lp-footer .lp-outline {
	-webkit-text-stroke-color: var(--lp-outline-on-dark);
}

/* Browsers without text-stroke: solid accent text instead of invisible text. */
@supports not (-webkit-text-stroke: 1px black) {
	.lp-type--alpine h1 .lp-serif,
	.lp-outline {
		color: var(--lp-outline-on-light, var(--lp-primary-text));
	}
}

/* Windows high contrast / forced colours: no outlines, plain text. */
@media (forced-colors: active) {
	.lp-type--alpine h1 .lp-serif,
	.lp-type--alpine .lp-cta__title .lp-serif,
	.lp-outline {
		color: CanvasText;
		-webkit-text-stroke: 0;
	}
}

/* ---- Labels and eyebrows ---- */
.lp-type--alpine .lp-label,
.lp-type--alpine .lp-eyebrow {
	font-weight: 700;
	letter-spacing: 0.14em;
}

/* ---- Wordmark ---- */
.lp-logo__words {
	display: flex;
	flex-direction: column;
	gap: 2px;
	line-height: 1;
}

.lp-logo__name {
	color: var(--lp-heading);
	font-family: var(--lp-font-display);
	font-size: calc(var(--lp-logo-height) * 0.66);
	font-weight: 900;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.lp-logo__sub {
	color: var(--lp-outline-on-light, var(--lp-primary-text));
	font-family: var(--lp-font-heading);
	font-size: calc(var(--lp-logo-height) * 0.3);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.lp-logo__tagline {
	margin-top: var(--lp-s-1);
	color: var(--lp-on-dark-muted);
	font-family: var(--lp-font-heading);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.lp-footer .lp-logo__name { color: var(--lp-on-dark, #fff); }
.lp-footer .lp-logo__sub { color: var(--lp-accent-on-dark); }

/* -------------------------------------------------------------------------
 * Text case (D-079): LaunchPad → Branding → Typography. Values come from
 * lp_brand_css() as --lp-case-*; defaults match the design (labels uppercase).
 * Uppercase text gets a little extra tracking so it doesn't look cramped.
 * ---------------------------------------------------------------------- */

h1,
h2,
.lp-cta__title {
	text-transform: var(--lp-case-heading, none);
}

h1 .lp-serif,
h2 .lp-serif,
.lp-cta__title .lp-serif {
	text-transform: var(--lp-case-emphasis, inherit);
}

h3,
h4 {
	text-transform: var(--lp-case-subheading, none);
}

.lp-label,
.lp-eyebrow,
.lp-footer__heading {
	text-transform: var(--lp-case-label, uppercase);
}

.lp-btn,
.lp-header__cta,
.lp-mobile__cta {
	text-transform: var(--lp-case-button, none);
}

.lp-nav__link,
.lp-nav__subtitle,
.lp-mobile__link,
.lp-mobile__sublink {
	text-transform: var(--lp-case-nav, none);
}

.lp-logo__text {
	text-transform: var(--lp-case-logo, none);
}

/* Extra tracking when a part is set to uppercase (body classes from lp_case_body_classes()). */
.lp-case-heading-uppercase h1,
.lp-case-heading-uppercase h2,
.lp-case-heading-uppercase .lp-cta__title { letter-spacing: 0.02em; }
.lp-case-subheading-uppercase h3,
.lp-case-subheading-uppercase h4 { letter-spacing: 0.04em; }
.lp-case-button-uppercase .lp-btn,
.lp-case-button-uppercase .lp-header__cta,
.lp-case-button-uppercase .lp-mobile__cta,
.lp-case-nav-uppercase .lp-nav__link,
.lp-case-nav-uppercase .lp-mobile__link { letter-spacing: 0.06em; }

