/*
 * Front-page hero panels — the institute wordmark and the Aktuelles ticker,
 * sitting side by side under the nav circle.
 *
 * These replace the two quotation boxes that used to live here. Those boxes
 * were framed in 4px teal/yellow borders and had to be flanked around the nav
 * circle with a column-gap the width of the circle itself — which meant they
 * only ever sat side by side above 1660px and were hidden outright below
 * 1200px. The circle now sits above them, so this is an ordinary two-column
 * grid that works at every width and never hides its content.
 */
/*
 * Three columns: wordmark · nav circle · Aktuelles.
 *
 * The circle is a real grid item here, vertically centred with its neighbours.
 * Previously it hung above the bar on negative margins with the two panels
 * stacked underneath, so only its lower half sat on the white — it read as an
 * egg wedged into the top edge rather than the centre of a composition.
 *
 * The middle track is sized to the circle and does not flex; the two side
 * tracks share what is left equally, so the circle stays optically centred at
 * every width.
 */
.home-panels {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: clamp(16px, 2.2vw, 40px);
	align-items: center;
	/* Asymmetric: the top gap is small because the bar's own padding already
	   separates the panels from the boundary, and every pixel spent here comes
	   off the clearance under the Aktuelles panel on a short viewport. */
	padding: clamp(8px, 0.8vw, 14px) clamp(4px, 1.5vw, 24px) clamp(6px, 1vw, 14px);
}

.home-panel {
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/*
 * Top-aligned, so the circle's negative margin turns into protrusion one-for-one.
 * Centred in the row (the default here) the row is taller than the circle's own
 * outer box, and the leftover space was quietly eating most of the lift — the
 * circle cleared the bar by 42px at 1440 instead of the intended ~110px.
 */
.home-panels .navcircle-section {
	align-self: start;
}

/*
 * Below this the three columns cannot hold their content: the circle alone is
 * 88vw, which leaves nothing either side. Stack them, circle first — it is the
 * navigation, and burying it under the news would be perverse.
 */
@media (max-width: 1099px) {
	.home-panels {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		gap: clamp(18px, 4vw, 32px);
	}

	.home-panels .navcircle-section {
		order: -1;
	}

	.home-panel {
		width: 100%;
		max-width: 560px;
	}
}

/* --- Left: the wordmark ---------------------------------------------------
 *
 * No frame. This is the institute's name set in type — a logotype, not a
 * component — so it stands on the white ground the way it does on the logo.
 *
 * Colour note: the identity yellow is ~1.3:1 on white and the teal ~2.5:1.
 * That is below WCAG AA for text, and deliberate here: 1.4.3 exempts
 * logotypes, and this is the logo. The whole lockup carries a single
 * aria-label so assistive tech reads the name, not the colours. Nothing
 * elsewhere on the site sets running text in these two colours — see BRAND.md.
 */
.wordmark {
	margin: 0;
	font-family: 'DIN Alternate Bold', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.005em;
	text-wrap: balance;

	/*
	 * Centred in its track rather than pinned to the left edge.
	 *
	 * The side tracks are equal by construction (1fr auto 1fr), but their
	 * contents were not: the Aktuelles panel filled its track edge to edge while
	 * the name — 311px of a 476px track at 1440 — sat hard against the screen
	 * and left the white pool between itself and the circle. The two halves now
	 * hold the same shape of mass either side of the circle.
	 *
	 * fit-content, not text-align: the lines stay left-aligned because this is
	 * the logotype and it is ragged-right on the logo itself. Only the block
	 * moves; the lockup is untouched.
	 */
	width: fit-content;
	max-width: 100%;
	margin-inline: auto;
}

/*
 * Sized to the side track, not to the viewport.
 *
 * The circle takes ~560px out of the middle, so at 1440 each side column is
 * only about 376px. At the previous 60px, "ORGANISATIONS-" measured ~480px and
 * was clipped by the circle. 42px is what fits the longest word in the
 * narrowest column the three-up layout ever produces.
 */
.wordmark-line {
	display: block;
	font-size: clamp(26px, 2.9vw, 52px);
	text-transform: uppercase;
	/* Long compound: let it break rather than overflow if a translation or a
	   narrower track makes it longer still. */
	overflow-wrap: break-word;
}

/* "Institut für" is the quiet half of the lockup: sentence case, lighter, and
   about half the size of the shouted lines below it. "Angewandte" is not part of
   it — it belongs to ETHIK and is set like it. */
.wordmark-line--intro {
	font-size: clamp(15px, 1.3vw, 19px);
	text-transform: none;
	color: #111;
	letter-spacing: 0.01em;
	margin-bottom: 0.12em;
}

.wordmark-teal {
	color: var(--brand-teal);
}

.wordmark-yellow {
	color: var(--brand-yellow);
}

/* "und" sits on the ETHIK line, small and black, exactly as on the logo. */
.wordmark-conj {
	color: #111;
	text-transform: lowercase;
	font-size: 0.42em;
	margin-left: 0.28em;
	letter-spacing: 0.01em;
}

/* --- Right: the Aktuelles ticker ------------------------------------------
 *
 * Capped and centred, for the same reason the wordmark is: a panel that ran the
 * full width of its track put 476px of news against 311px of name at 1440 and
 * tipped the composition to the right. 400px is a comfortable measure for the
 * 16px headlines — around 50 characters — so the cap costs the panel nothing it
 * was using. Below ~1300px the track is narrower than the cap anyway and this
 * rule stops applying by itself.
 */
.home-panel--news .aktuelles {
	width: 100%;
	max-width: 400px;
	margin-inline: auto;
}

/* Below this the lines are centred too, not just the block: at phone width the
   name is alone on its row and a ragged right edge reads as a mistake. */
@media (max-width: 739px) {
	.home-panel--name {
		text-align: center;
	}
}
