/**
 * TEAB Värdegrund – "Vi är TEAB".
 *
 * Självförsörjande och scoped under .teab-values. Brand-färger som standard via
 * CSS-variabler; BB-modulen kan skriva över dem per nod (kolumner/accent/färger/
 * storlekar). Bokstäverna är bilder (loggans utklippta bokstäver eller egen
 * uppladdning) – de färgas aldrig om via CSS, så loggan förblir orörd.
 * Porterad från prototypen 16-vardegrund-teab.html.
 *
 * @package Teab_Moduler
 */

.teab-values {
	/* Följer temat (ljust/mörkt) men med ljusa defaults. */
	--teab-values-surface: var(--teab-panel, #FFFFFF);
	--teab-values-ink: var(--teab-text, #14201A);
	--teab-values-muted: var(--teab-muted, #5C6B61);
	--teab-values-line: var(--teab-border, #E2EBE5);
	--teab-values-accent: var(--teab-accent, #008A2B);

	--teab-values-cols: 4;
	--teab-values-gap: 1px;

	/* Storlekar – designens standard, kan överskrivas per instans. */
	--teab-values-letter-size: 88px;
	--teab-values-word-size: 22px;
	--teab-values-text-size: 15px;

	/* Typsnitt: ärver temat. BB:s typsnittsväljare kan skriva över per instans. */
	--teab-values-font-ui: var(--font-ui, inherit);
	--teab-values-font-display: var(--font-display, var(--teab-values-font-ui));
	--teab-values-word-weight: 700;

	color: var(--teab-values-ink);
	font-family: var(--teab-values-font-ui);
}

/* ============ RUBRIK ============ */
.teab-values__head {
	max-width: 940px;
	margin-bottom: 56px;
}

.teab-values__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--teab-values-font-ui);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--teab-values-muted);
}

.teab-values__eyebrow::before {
	content: "";
	width: 26px;
	height: 2px;
	background: var(--teab-values-accent);
}

.teab-values__title {
	margin-top: 26px;
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 18px;
}

.teab-values__title-text {
	font-family: var(--teab-values-font-display);
	font-weight: var(--teab-values-word-weight);
	font-size: clamp(34px, 4.4vw, 60px);
	line-height: 1;
	letter-spacing: -0.02em;
}

.teab-values__logo {
	display: block;
	height: clamp(34px, 4.4vw, 58px);
	width: auto;
	position: relative;
	top: 0.06em;
}

.teab-values__lead {
	margin-top: 24px;
	max-width: 62ch;
	font-size: 18px;
	line-height: 1.6;
	color: var(--teab-values-muted);
}

/* ============ RUTNÄT ============ */
.teab-values__grid {
	display: grid;
	grid-template-columns: repeat(var(--teab-values-cols), 1fr);
	gap: var(--teab-values-gap);
	background: var(--teab-values-line);
	border: 1px solid var(--teab-values-line);
}

.teab-value {
	background: var(--teab-values-surface);
	padding: 40px 32px;
}

.teab-value__word {
	font-family: var(--teab-values-font-display);
	font-weight: var(--teab-values-word-weight);
	font-size: var(--teab-values-word-size);
	line-height: 1.12;
	color: var(--teab-values-ink);
	margin: 0;
}

.teab-value__text {
	margin-top: 14px;
	font-family: var(--teab-values-font-ui);
	font-size: var(--teab-values-text-size);
	line-height: 1.65;
	color: var(--teab-values-muted);
	max-width: 32ch;
}

/* ---- Layout: bokstaven OVANFÖR ordet (stor initial) ---- */
.teab-values--stack .teab-value__letter {
	display: block;
	height: var(--teab-values-letter-size);
	width: auto;
	margin-bottom: 22px;
}

/* ---- Layout: bokstaven INLINE som leder ordet ---- */
.teab-values--inline .teab-value__word-visual {
	display: flex;
	align-items: baseline;
	gap: 3px;
}

.teab-values--inline .teab-value__cap {
	height: 0.92em;
	width: auto;
	align-self: center;
	position: relative;
	top: 0.02em;
}

/* Fallback när ingen bokstavsbild finns: ren text-versal. */
.teab-values--inline .teab-value__cap-text {
	font-weight: var(--teab-values-word-weight);
}

/* Skärmläsartext – dolt visuellt men läses av AT (hela värdeordet). */
.teab-values__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Platshållare i editorn. */
.teab-values--empty {
	padding: 24px;
	border: 1px dashed var(--teab-values-line);
	color: var(--teab-values-muted);
	font-size: 14px;
}

/* ============ RESPONSIVT ============ */
@media (max-width: 992px) {
	.teab-values__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.teab-values__grid {
		grid-template-columns: 1fr;
	}
	.teab-values__head {
		margin-bottom: 40px;
	}
}
